Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6684612
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: 网络与安全

2016-01-20 14:50:20



We were discussing about physical networking with GNS3. GNS3 is the wonderful software for virtual networking computing. Last article, we had a discussion on virtual LAN network by . In this tutorial I would like to share how to configure GNS3 to connect VirtualBox virtual machines. As we know GNS3, the best virtual network software, supports oracle VirtualBox, hence it is easy to work around VirtualBox virtual machines (VMs) as comparing to vmWare VMs. Even though we could Interface GNS3 to vmWare with some tweaks that I will cover later. By interfacing GNS3 to connect VirtualBox you may realize the real network scenarios as a practical feel.

Now, let’s see the steps for connect GNS3 to VirtualBox Virtual Machines.

Connect GNS3 VirtualBox Virtual Network [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3

Before you Begin

Please make sure that you have the knowledge of the following and have equipped with specified tools and hardware.

Preliminary Knowledge

  • Basic understanding of GNS3 virtual network simulator (Check out some of my previous )
  • Installing and configuring Oracle VirtualBox virtual machine. ()

Tools required

  • Graphical Network Simulator GNS3: GNS3 is free Network Simulator that is available to download from the link ()
  • Cisco IOS: GNS3 works with real Cisco Internet Operating System, you need to have a Cisco IOS for setting up virtual network labs. Distributing Cisco IOS is illegal so I could not support you for that, just Google it.
  • Oracle VM VirtualBox: There are many Virtualization software are available, but Oracle VirtualBox is FREE and GNS3 supports it directly! 

My Hardware:

  • Intel Core i3 Windows 7 PC
  • 8GB RAM

I recommend these hardware configurations to learn virtual networking concepts because virtual machine networking requires at least 2 VMs to be up and run. Anyway you may also proceed even with 4GB RAM.
No you are ready to go….!

How to Connect Gns3 to VirtualBox VMs

VMs acts as virtual network client for GNS3 network topology.The step by step procedure to connect GNS3 to VirtualBox as follows.
Step 1: Setting up of VMs
Make sure you installed VirtualBox VMs, for me I have 4 VMs installed. Among these I will connect Win7_1 and Win7_2 to GNS3.
VirtualBox VMs [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
Step 2:
Run GNS3, Edit → Preferences → VirtualBox

GNS3 Preferences VirtualBox [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
In the General Settings tab click ‘Test Settings’ button, you will see a message ‘VBoxwrapper and VirtualBox API have successfully started’.
VirtualBox GNS3 [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
Step 3:
Select ‘VirtualBox Guest’ tab, you may find all VMs in the VM List. Select suitable one after setting an Identifier Name. Set required VMs and the click Save button.

VirtualBox Guest GNS3 [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3

Step 4:
Browse VirtualBox guest to the work space.
VirtualBox guest with GNS3 [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
If you have more than one VM, you will be asked to select one among those.
GNS3 VirtualBox VMs [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
Step 5: GNS3 Network scenario with VirtualBox
Build a simple scenario with VirtualBox guest. For me, I done with two VMs and one router.
GNS3 Network scenario with VirtualBox [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
Step 6: Run Simulation
Now let’s run our Network. Before running the simulation open VirtualBox side by side with GNS3. [Only open VirtualBox, do not run any VMs]. Then click Start button to begin simulation.
Interfacing GNS3 VirtualBox  [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3

After starting the simulation the we can see all of the VMs that you added in the example scenario will run automatically.
GNS3 Network Scenario VirtualBox [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
Step 7: Set Static IP for VMs
Once the VMs are started change the IP of virtual machines. In my example I assigned 10.0.0.2/8 and 20.0.0.2/8 to the VMs
GNS3 VirtualBox IPs [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
Step 8: Cisco Router Configuration for VirtualBox Interface.
Now configure the router and assign IP address to each port. Configuration commands are followed.

R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit
*Jun 17 14:15:11.947: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Jun 17 14:15:12.947: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#
R1#
*Jun 17 14:15:30.303: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
R1#
*Jun 17 14:15:30.739: %SYS-5-CONFIG_I: Configured from console by console
*Jun 17 14:15:31.303: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R1#copy running-config startup-config
Destination filename [startup-config]?
Warning: Attempting to overwrite an NVRAM configuration previously written
by a different version of the system image.
Overwrite the previous NVRAM configuration?[confirm]
Building configuration...
[OK]

Step 9: Ping test and verification
Try to ping from the router to the VMs and vice versa.

PING GNS3 VirtualBox [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
[Pinging from router CLI to VMs]

PING VirtualBox GNS3 [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3
[Pinging from VMs to router]

Troubleshooting: Unable to ping from VirtualBox to Router

GNS3 VirtualBox Connection Troubleshooting [Solved] How to Connect GNS3 to VirtualBox: Virtual Network Lab with GNS3

Sometimes you can’t ping between VirtualBox VM and router. This is because your firewall blocking ICMP traffic. To get rid of from the issue disable firewall in the VirtualBox VMs or allow the networks 10.0.0./8 and 20.0.0.0/8. Actually disabling firewall is not a proper way, but times being do it. I will be sharing detailed troubleshooting guide for Windows firewall and other third party antivirus firewall.

Keep visiting SPT for more computer networking tutorials and how to guides. Don’t forget to like our Facebook page.

阅读(1589) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~