Professional Documents
Culture Documents
04/04/2011
1|Page
Contents
Introduction: GNS3 and Virtualbox ........................................................................................................... 3 Creating the network with GNS3 .............................................................................................................. 4 Basic Router Configuration of the network ............................................................................................ 12 Adding virtual machines to the network ................................................................................................ 15 Confirming virtual machine communication on the network ................................................................ 19 Conclusion and Further Reading ............................................................................................................. 25 Resources ................................................................................................................................................ 26
2|Page
3|Page
Now that a project has been opened up, the topology needs to be built. Before the objects on the left side can be dragged to the center area to create the network map, a Cisco IOS needs to assigned to the object. To do this, select Edit > IOS Images and Hypervisors.
4|Page
Under the IOS Images tab, there will be a Settings section. Find your IOS image file by clicking the ... button and browsing to it.
One very important step that is hard to forget, is that since GNS3 is a simulated environment, it has trouble sometimes uncompressing Cisco IOS images within its virtualized environment. If this is the case, when you get around to starting up the simulated router, a ton of garbage will fly across the console screen and the router will crash. To fix this issue, you will need to uncompress the .bin IOS image. To do this, simply open up a terminal, change directories to the path where the IOS images are located and type unzip ciscoIOS.bin. (Replace ciscoIOS.bin with the actual name) Use this IOS image instead and GNS3 should have no problem loading the image.
5|Page
In this example, an unzipped 2600 router IOS has been selected. No base configuration will be used, the platform was automatically selected as a c2600 (which is correct), and all other options are left at default. Click Save in the lower left and the path to the image along with the model is saved in the top section.
6|Page
After the IOS is saved, close the IOS images and hypervisors window. Now, find the type of router that was added on the left under Node Types. (In this example, the Router c2600) Left-click and drag the router to the middle blank pane. The first node is now in the topology!
7|Page
Before device configuration starts, a simple example topology is built using another router to act as the border router, a switch(Ethernet switch) to connect to the internal router (our first router), and a cloud (last Node) up top to connect to the border router. (This will act as our Internet cloud) Three additional clouds are added as place holders, which will be configured as the virtual machines later on. I have also renamed the devices by right clicking them and selecting Change the hostname.
8|Page
We will need a third port on our inside router for the web server virtual machine. Right click the R_Internal router and click Configure. From there, select R_Internal and then the Slots tab. From here, you can add adapters just like a real router. Click the drop down for slot 1and select NM1FE-TX for a fast ethernet slot. Click apply and ok. (If you get a message about restarting the router for changes to take place, just press the red stop button and then the green start arrow to start the devices again)
9|Page
Time to make some physical connections. Find the Add a link icon and left -click it. (Three to the left of the console icon.) Select FastEthernet, left-click the R_Internal router, and then the Switch. A new connection is made. Click the R_Internal router again and then click the R_Border router to make another connection. When you are done making connections, click the red circle with an X that has replaced the add a link icon to stop.
10 | P a g e
11 | P a g e
Since the IOS is not compressed, there is not waiting for decompression. Select the R_Internal router. Press 'Enter' and then 'no' for the initial configuration dialog. Enter again gives you a command prompt. The following configuration is entered: enable config t hostname R-Internal int fa 0/0 ip address 192.168.5.1 255.255.255.0 no shut 12 | P a g e
int fa 0/1 ip address 192.168.15.1 255.255.255.0 no shut int fa 1/0 ip address 192.168.10.1 255.255.255.0 no shut exit router eigrp 1 network 192.168.5.0 0.0.0.255 network 192.168.10.0 0.0.0.255 network 192.168.15.0 0.0.0.255 network 192.168.20.0 0.0.0.255 Ctrl+z wr A similar configuration is done for the R_Border router: enable config t hostname R-Border int fa 0/0 ip address 192.168.15.2 255.255.255.0 no shut int fa 0/1 ip address 192.168.20.1 255.255.255.0 no shut exit router eigrp 1 network 192.168.5.0 0.0.0.255 network 192.168.10.0 0.0.0.255 network 192.168.15.0 0.0.0.255 network 192.168.20.0 0.0.0.255 Ctrl+z wr Both routers should now be configured with basic communication and be able to ping each interface address. The topology map in GNS3 has also been updated to include text notes containing the IP address scheme used. To add a text note, click the notepad icon to the right of the start, pause, stop icons.
13 | P a g e
14 | P a g e
Select one of the Workstation virtual machines and click Settings. Click Network and ensure that Adapter 1 is set as Host-only and vboxnet0. Do the same for the other Workstation. Put the web server virtual machine on the host only network vboxnet1. 15 | P a g e
Now it is time to add the virtual machines to the GNS3 network, which is where those clouds come in. Right-click the Workstation1 cloud and click Configure. Under the NIO Ethernet tab, there are options for adding Ethernet adapters. Click the drop down box under Linux Ethernet NIO, find the same network that was in Virtualbox for the 192.168.5.0 network (vboxnet0), select it, and click add. Apply and Ok to close the box.
16 | P a g e
Create a link from Workstation1 cloud to the switch. Repeat adding the Linux Ethernet NIO for Workstation2 using vboxnet0 (since they are both on the same network segment). Create a link from Workstation2 cloud to the Switch. When editing the Web_Server cloud, ensure the Linux Ethernet NIO vboxnet1 network is added (since it is on the 192.168.10.0 network). Create a link from the Web Server cloud to the R_Internal router. The topology should look like Figure 3-4 when complete.
17 | P a g e
18 | P a g e
To do this in CentOS, click System > Administration > Network. Click Edit to edit the eth0 adapter. Next, click the circle that says Statically set IP addresses.
Click Ok, then File > Save. A pop up box informs you to restart the network service or the computer. To restart the network service click: System > Administration > Services. Scroll down to network, select it, and click Restart. 19 | P a g e
Finally! Testing can begin! From the console of the R-Internal router, ping the following: 192.168.5.2 (Workstation1), 192.168.5.3 (Workstation2), and 192.168.10.2 (Web Server). If instructions were followed properly, all should be successful.
20 | P a g e
For more testing, open a terminal on the Workstation1 virtual machine. Ping 192.168.5.3 (Workstation2), 192.168.5.1 (R-Internal gateway interface), 192.168.20.1 (R-Border far outside interface. This shows that inter routing is working), and 192.168.10.2 (Web Server).
21 | P a g e
22 | P a g e
One last test is on Workstation1, open a web browser, and in the address bar type: 192.168.10.2 (Web Server). The Apache Web Server test page should open up! If it did not, ensure that the httpd service on the web server has been started. (System > Administration > Server Settings > Services. Scroll down to httpd, select it, and click start)
23 | P a g e
24 | P a g e
25 | P a g e
Resources
Altbiz. (2010, February 03). Gns3 lab with virtualbox. Retrieved from http://altbiz.wordpress.com/2010/02/03/gns3-and-virtualbox/ Grossmann, J. (2010, December 12). Gns3 graphical network simulator. Retrieved from http://www.gns3.net/ Hughes, J, Singh, K, Perrin, J, Angenendt, R, & Guay, P. (2010, May 14). Centos: the community enterprise operating system. Retrieved from http://www.centos.org/ Kaage. (2009, September 06). Howto connect vmware virtual machine to your lab in gns3. Retrieved from http://www.gns3.net/phpBB/topic1139.html?sid=11ed17c29a256bfb64796d1947916f93 Lammle, T. (2007). Ccna: cisco certifed network associate study guide sixth edition. Indianapolis, Indiana: Wiley Publishing, Inc.
26 | P a g e