User login

WinXP Routing

Windows XP Routing

I run in to a common problem when I try to use my Cisco Lab over the internet. I have 2 network interfaces in the computer I remote desktop in too. One provides connectivity to the internet and the other provides network connectivity to my lab. If I do a lab exercise that requires the use of public addresses in my lab then I can't check connectivity without changing a few things.

This is where the Windows XP route command comes in. It allows me to route packets to a different interface. For example I was using /27 as a loopback address during a frame relay lab. In order to not have packets routed to that address on the public internet I use the route add command. The interface connected to my lab is on the /24 network with a default gateway of A little primer on routing, the /27 would normally be sent out whatever gateway was mapped to the route because there was no entry for that network in the routing table. That would route it on to the public internet via the wireless adaptor. What I will be doing is adding a route using the route add command so that it is routed out the interface I want.

C:\route add MASK

To verify that the route was added use the route print command. You will get output similar to the following:

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          omitted	  1
Default Gateway:
Persistent Routes:

The routes added using the preceding method are dynamic in that will be removed when you reboot. To verify that everyting is working properly I ping from the PC to the router. I've issued the command debug ip icmp on the router. The debug output looks like this:

02:15:08: ICMP: echo reply sent, src, dst
02:15:08: ICMP: echo reply sent, src, dst
02:15:08: ICMP: echo reply sent, src, dst

There is one other variable that needs to be accounted for and that is the metric. I didn't have to modify the metric in this example but I am going to show how it's done. When the route print command is used, the beginning of the output will show the available network adapters:

Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 50 56 c0 00 08 ...... VMware Virtual Ethernet Adapter for VMnet8
0x3 ...00 50 56 c0 00 01 ...... VMware Virtual Ethernet Adapter for VMnet1
0x4 ...00 50 8d e7 42 30 ...... VIA Networking Velocity Family Giga-bit Ethernet
 Adapter - Packet Scheduler Miniport

If you have 2 routes to the same destination then the route with the lower metric will be used. As an example lets say that there is a route to the network in the routing table. Adapter 0x2 has a metric of 20 and adapter 0x3 has a metric of 30 (VMnet8 and Vmnet1 respectively). Adaptor 0x3 should be the primary route so the metric will have to be changed. There are two ways to do this, either of which is valid, increase the metric for 0x2 or decrease the metric for 0x3 In this case I will be decreasing the metric for 0x3. The command is:

C:\route add MASK metric 10 if 3