Intense School Resources is proud to present the first in a series of videos that bring our daily articles to you in an easy-to-understand video tutorial format!

In this video, we discuss how to interface GNS3 with the outside world, whether via a network of virtual machines, a real network, or even the internet. Click the video below, turn up your sound, and follow along as our instructor gets you up to speed.

For more information on getting started with GNS3, please see our article on getting started with GNS3. And once you’re up and running and want to try some more, click here for our guide to our first two dozen GNS3 labs available for free on the site. And use the GNS3 Labs tag to find even more!

If you have topics you’d like to see covered in future videos, leave your ideas in the comments section.

CCNA Training – Resources (Intense)

Video Transcript:

Hi there and welcome to this video on how to connect GNS3 to a real network.

Many times, it is not enough to work only with the devices available in GNS3.

For example, if you want to use a real or virtual PC in your GNS3 topology, then you need to interface with the “outside” world. Outside here means outside of GNS3. There are many instances where this sort of interfacing is necessary: testing out a remote VPN configuration, using the ASDM to manage Cisco ASAs, copying files using TFTP and so on.

In this video, I will show you the basic method of interfacing GNS3 with a real network via the system on which GNS3 is connected.

I am using GNS v1.2.3 on a Windows 8 OS. You may be using a different version but the concepts remain fairly the same. We will consider a simple topology of connecting a router to an outside network.

 To make a connection outside GNS3, we need to use a cloud. There are other alternatives such as using a host (which is just a cloud with all interfaces on your system) or adding a VirtualBox VM directly into GNS3. This CSR1000v is an example of a VirtualBox VM. However, the foundation knowledge you need to connect GNS3 to an outside network is using a cloud.

How you configure the cloud will depend on what you want to achieve. There are times when you don’t care to which network interface on the system that GNS3 will connect to. This is usually the case when you want GNS3 to communicate with the host system. Other times, you want to connect to a specific network interface, for example, the network interface to which your virtual machine is connected to. You can use the knowledge gained in this video for whatever case you are dealing with.

 In our own scenario, we intend to use CCP to manage a Cisco router. CCP is installed on the system on which GNS3 is also installed, so it doesn’t really matter which network interface I connect to since the system is listening on all IP addresses of its network interfaces.

However, you need to think about flexibility. If you use your wireless interface card in the GNS3, you are not free to edit the IP settings if your wireless NIC is your connection to the Internet.

This is why people create loopback interfaces on their systems because there are free to edit the configuration without affecting their normal connection. For me, since I have both VirtualBox and VMware installed and these come with their own network interfaces, I don’t bother adding a loopback interface because I can easily edit the configuration on any of these virtual network interfaces.

Let’s get down to business. I will add a router and a cloud. We need to configure the cloud so I will right-click on it and select configure.

Here, we can choose what interface we want to use to connect to the outside world. I will use my VirtualBox network adapter based on the discussion we already had.

One thing to note is that this version of GNS3 is actually very helpful with logical way interfaces are named. It used to be a bit difficult knowing which interface you are connecting to based on the GNS3 name.

Having configured the cloud, let’s add the cable connection. My VirtualBox network adapter is on a subnet of 192.168.56.0/24 so the easiest thing to do will be to also configure my router on that interface. However, the reason I chose this network adapter is so that I have leeway to freely make changes to the IP configuration. In short, if you don’t want to use 192.168.56.0/24, change it.

So I will go ahead and configure my router and give it an IP address of say 192.168.56.10.

Now, ping is the easiest way to test connectivity so let’s ping the host from the router. The host is on 192.168.56.1.

People sometimes get stuck at this point because their ping fails. Of course it could be about wrong configuration but most times, it’s simply a firewall issue; so If it doesn’t work, check the firewall settings on your system or allow ICMP through the firewall. Antivirus applications such as McAfee also take over the firewall function on your system so you may have to check the settings there.

 As you can see, there isn’t much to it but let’s take it a step further. I will add a loopback on the router to which we want to the system to be able to reach. Let’s use an IP address of 1.1.1.1/32.

 The problem here is that the system does not know how to reach 1.1.1.1/32 so if we ping that address, we will not get a reply.

One way to get around this is to configure a default gateway on the host. That means that in our case, we will configure the VirtualBox network interface with the router (192.168.56.10) as the default gateway.

There are times that this method is intrusive like the example I gave of using your Wifi interface in the GNS3 cloud – changing the default gateway means loss of Internet connection.

Therefore, there is a second method I prefer – adding routes to the system’s routing table. Yes, your Windows OS actually has a routing table.

To view this table, open command prompt and type “route print”. As you can see, I have a default route via my wireless interface.

 We can make changes to this routing table just like we add routes on a router’s rouing table. To do this, you need to run command prompt with administrative privileges.

You can view the route command syntax by typing route and hitting enter.

In our scenario, we want to add a route for 1.1.1.1/32 via 192.168.56.10 therefore the syntax will be route add 1.1.1.1 mask 255.255.255.255 192.168.56.10

If all is good, we should see this message.

By default, this route is removed after you reboot your system but you can use the -p switch to make it persistent.

Now let’s ping again.

Nice!

 With this network level connectivity, we can now add the router to CCP. That’s not part of this video though.

 In this video, we have seen how to connect GNS3 to the outside world or a real network using a GNS3 cloud. We also saw how to add entries to the routing table of a Windows OS.

 I hope you have found this video informative.