Use Windows loopback with Cisco Router Emulator October 1, 2006
There are plenty of times where you might want to use Dynamips when not connected to a network. Maybe your out on the road and just want to practice some labs. It would be nice to have your laptop network adapter part of the emulated network - even when your laptop is not connected to any network.
The solution is to use a loopback adapter in Windows, then including it in your Dynagen config file.
First, create a new loopback adapter in Windows (these instructions are assuming Windows XP)
- Click Start, and then click Control Panel. Because this is XP, you may have it set up this way, or you may have your interface set up in Classic view. Either way, navigate your way to ‘Add Hardware’, or ‘Printers and Other Hardware’

- Launch the Wizard to Add Hardware to your system. Do not be confused because you are not actually installing any new hardware, just simply adding a ‘network adapter’ which is acting as a virtual adapter.
- Click next, once you have launched the Wizard. You will see a series of dialog boxes open to ask you about scanning for hardware changes, etc – you will want to do everything manually in this exercise. There will be no automatic scanning for any reason because you have not installed anything, the installation will immediately fail.

- You will next be asked if the hardware is connected. You can select Yes from the options and click Next.

- Now, select *from the bottom of the list* the ‘Add a new hardware device’ option, and then click Next.

- Click Install the hardware that I manually select from a list, and then click Next

- Select ‘Network adapters’ from the Common hardware types section within the dialog box. Click Next

- Select Microsoft and then the Microsoft Loopback Adapater, and then click Next.



- Now, you can go into the network connections folder and modify any properties of the loopback, just like any other network adapter. You can assign a static IP address to the loopback at this point.
In order to use the new loopback with Dynamips, run the Network Device List command in the Dynamips folder.

The command shows our loopback as: \Device\NPF_{AC6BC0D4-7AE7-45B3-A74B-13A59015D26C}
So, if you have installed the Dynagen package - look at the Dynagen Sample Labs folder. In this explanation - I will use the simple2 folder.
Edit the simple2.net file and modify it to look something like the following:
# Another simple dynagen configuration file
#
# All the f0/0 interfaces are on VLAN 1 and the F1/0 interfaces are on VLAN 2
[localhost]
[[7200]]
image = \Program Files\Dynamips\images\image.bin
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
npe = npe-400
ram = 160
[[ROUTER Zapp]]
console = 2001
f0/0 = S1 1
f1/0 = S1 2
[[ROUTER Leela]]
console = 2002
f0/0 = S1 3
f1/0 = S1 4
[[ROUTER Kif]]
console = 2003
f0/0 = S1 5
f1/0 = S1 6
[[ethsw S1]]
1 = access 1
2 = access 2
3 = access 1
4 = access 2
5 = access 1
6 = access 2
7 = access 1 NIO_gen_eth:\Device\NPF_{AC6BC0D4-7AE7-45B3-A74B-13A59015D26C}
When this Dynagen configuration file is run, you will have three 7200 routers - all with the fa0/0 interface in the same vlan as the Windows loopback adapter.
To test, assign fa0/0 on Zapp an ip address in the same subnet as your MS loopback - then perform a ping test.
Now you have a test lab with your laptop as part of the simulated network.

Loading...
3 Responses to “Use Windows loopback with Cisco Router Emulator”
[...] References: http://tech.scottp.net/index.php/2006/10/01/use-windows-loopback-with-cisco-router-emulator/ [...]
[...] I just saw a great site with some networking how-to videos - one of them was based on an article I did on Windows Loopback configuration and working with Dynagen/Dynamips. Article printed from scottp.net - Tech Site: http://tech.scottp.net URL to article: http://tech.scottp.net/index.php/2007/04/14/great-networking-how-to-videos/ Tags [...]
it works!!, but what about loopback for vista?, all i get is partial connections please help me, or send a reply to sanyaalagbe@yahoo.com