Monday, August 31, 2009

How to connect GNS3 virtual routers to local PC NICs - windows

My GNS3 topology:



To verify connectivity between CUCM and the virtual routers running under GNS3, I must first verify that the vitual routers can access the PC NICs. To do this , I followed these steps:
  1. create new network connection, use "add hardware" menu on the Control Panel to do this
  2.  let the add hardware wizard runs its course
  3. click on Yes , i have connected the hardware
  4. scroll to the bottom of the list and choose "add a new hardware device"
  5. install the hardware manually
  6. select Network Adaptor
  7. select Microsoft and choose MS Loopback Adaptor and finish installation
  8. under "Network Connections" , a new icon is created besides the usual Wireless NC, Local Area Connection, VMware NA and so forth
  9. rename this Loopback - GNS3
  10. configure the PC loopback interface with an IP address : 10.1.2.254 / 24
  11. on the GNS3 installation directory, run "Network device list.cmd"
  12. the output will look like this:
Network adapters on this machine:

NIO_gen_eth:\Device\NPF_{E2A157C9-021A-4FB1-86BF-34ED8C2310E1}
 Name      : VMware Network Adapter VMnet1
 Desciption: VMware Virtual Ethernet Adapter

NIO_gen_eth:\Device\NPF_{C7EF6659-191D-451B-801F-0AC64C7E1FDF}
 Name      : VMware Network Adapter VMnet8
 Desciption: VMware Virtual Ethernet Adapter

NIO_gen_eth:\Device\NPF_{0688B198-50D9-41C8-958B-4CB935DF609C}
 Name      : Local Area Connection
 Desciption: Broadcom NetXtreme Gigabit Ethernet Driver

NIO_gen_eth:\Device\NPF_{FD2911D5-CAC7-4382-813B-4E4997876429}
 Name      : Loopbaack - GNS3
 Desciption: MS LoopBack Driver

NIO_gen_eth:\Device\NPF_{2818775B-F831-4CF4-B07E-9B6276B2A397}
 Name      : Wireless Network Connection 2
 Desciption: Belkin Wireless G USB

Use as follows:
  F0/0 = NIO_gen_eth:\Device\NPF_{...}
Press any key to continue . . .

  1. edit the xxxx.net file , in my case, I saved the topology file into test1.net
  2. as illustrated in the topolgy, the HQ router is connecting to the CO cloud via a switch
  3. edit the switch config as follow:   
  4.     [[ETHSW SW0]]
            1 = access 1
            2 = access 1 NIO_gen_eth:\Device\NPF_{FD2911D5-CAC7-4382-813B-4E4997876429}
  5. switch port 1 is connected to HQ router
  6. switch port 2 is connected to PC loopback interface NIO which device # you 'd get from "Network device list.cmd"
  7. start GNS3 and load all the routers configs
  8. the PC should be able to ping the routers in the topology now
E:\Documents and Settings\Administrator>ipconfig
Windows IP Configuration
Ethernet adapter Wireless Network Connection 2:
   Connection-specific DNS Suffix  . :
   IP Address. . . . . . . . . . . . : 192.168.1.112
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
Ethernet adapter VMware Network Adapter VMnet8:
   Connection-specific DNS Suffix  . :
   IP Address. . . . . . . . . . . . : 192.168.238.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
Ethernet adapter VMware Network Adapter VMnet1:
   Connection-specific DNS Suffix  . :
   IP Address. . . . . . . . . . . . : 192.168.193.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
Ethernet adapter Loopbaack - GNS3:
   Connection-specific DNS Suffix  . :
   IP Address. . . . . . . . . . . . : 10.1.2.254
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.1.2.1
Ethernet adapter Local Area Connection:
   Media State . . . . . . . . . . . : Media disconnected
E:\Documents and Settings\Administrator>ping 10.1.2.1
Pinging 10.1.2.1 with 32 bytes of data:
Reply from 10.1.2.1: bytes=32 time=98ms TTL=255
Reply from 10.1.2.1: bytes=32 time=28ms TTL=255
Reply from 10.1.2.1: bytes=32 time=31ms TTL=255
Reply from 10.1.2.1: bytes=32 time=41ms TTL=255
Ping statistics for 10.1.2.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 28ms, Maximum = 98ms, Average = 49ms
E:\Documents and Settings\Administrator>

No comments:

Post a Comment