In the previous article on this topic, we looked at how to connect a router to a host machine through a loopback address using a simple topology. In this article, we will take it a step further by connecting our GNS3 devices to a ‘live’ network and also consider the issues that may arise.
GNS3 Topology Environment
I’d be altering the topology we used in the last article a bit. First, I will change the network adapter on my cloud to my Wireless Network Adapter. Secondly, I will add another router connected to my first router. My base topology is as shown below:
To delete an adapter from the cloud, just double-click on the cloud to get to the node configuration page; select the node you want to configure, highlight the adapter you want to delete and then click the Delete button.
I will go ahead to delete my loopback adapter and add my Wireless network adapter instead. I will also connect the routers together. At the end of my setup, my topology will look something like this.
Let’s configure the router for basic connectivity. I will add the FA0/0 (the interface connected to the cloud) to my wireless LAN and will configure Fa0/1 on another subnet – 192.168.200.0/24.
First, let me confirm what my wireless LAN subnet is. You can do this by issuing “ipconfig” from a Windows command line or “ifconfig” on a Linux box.
As you can see from the output above, my wireless network is on a subnet of 192.168.0.0/24. I can use an IP address of 192.168.0.10 for my router because I’m sure no one is using that IP address – I’m the only one at home! (Except my neighbour has hacked my Wi-Fi password).
Similarly, I will configure the second router as shown below:
To test for basic connectivity, I will issue a ping from the central device i.e. My_Router1. First to the host (remember to turn off or configure your firewall and antivirus software):
As shown below, I also have connection to my other router.
All these have been child’s play up to this point. It gets more interesting, trust me. If I was using a LAN connection, I would have been able to test Internet connectivity but because I’m using a wireless connection, the AP does not have the router as an associated endpoint, so it does not have its MAC address. In summary, if I try to ping that AP, it will not respond.
There are certain workarounds but I won’t go into that in this article. In this article, we want to focus on the 2nd router. This router does not have a direct connection to the host machine (the cloud) but what if we have Cisco Configuration Professional (CCP) installed on the host machine for instance and we want to be able to manage both devices?
The first thing that should strike you is: this is just a routing issue. We just need to ensure that the router can reach the host and that the host can also reach the router. The 1st bit is quite easy and well-known as we can just use the “ip route” command on the router. However, what about the second part?
Let me explain the challenge we are faced with: I’m connected to the host through my wireless adapter which provides Internet connection for me. This means that I cannot edit the default gateway (which is currently set as my wireless AP) to point to My_Router1; else, I’d lose my Internet connection. If I cannot edit that default gateway, what then can I do?
I told you it will get more exciting 🙂 Did you know a Windows system also has its own routing table? When I found out about this some years ago, I was really tripped. (I wonder if I am one the only one who didn’t know this at that time).
To view/edit this table, we use the “route” command.
At the end of this output, there are usage examples of the route command which are very helpful as shown below.
Let’s first take a look at the routing table. We can do this by using the “route print” command. Just a snippet:
Using the route command, we can edit the routing table of the Windows system which includes inserting a new route and specifying which interface to use. This is done using the “ADD” command option. Keep in mind that to add a route to the routing table, you must have administrative privileges and also run the Command Prompt as Administrator. When you run CMD as administrator, notice that the directory path changes to something like C:\windows\system32:
Our route statement will be something similar to: route add 192.168.200.20 mask 255.255.255.255 192.168.0.10 (I like being as specific as I can when adding routes to the system).
If your statement is correct and you have the correct privilege level, you will get an “OK!” message to let you know the route has been added. Cool!
Let’s not forget to configure our 2nd router to be able to route to the host machine’s LAN subnet.
Moment of truth: Let’s try to ping. Fingers crossed.
Yes! It worked.
In this article, we have seen how to connect our devices to a real network like our Wireless network connection or LAN. We have also looked at a way to edit the routing table of a Windows operating system.
As you can see, the opportunities are endless. If you have a larger network, you can configure a routing protocol and just advertise the host subnet into that routing protocol. This is very helpful when you have an AAA server configured on your host machine for example, or for using the CCP tool as we will begin considering in an upcoming series.
I hope you have found this article helpful and I look forward to the next article.
GNS3: Graphical Network Simulator: http://www.gns3.net/
Windows XP Professional Product Documentation: Route: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/route.mspx?mfr=true