Fri 31 Aug 2007
Cisco - Dynamips with Linux loopback (tap) interface
Posted by Josh under Cisco , Cisco Routers , Dynamips -This tutorial will show you how to add a tap interface to your linux machine and how to communicate with your dynamips router session via the tap interface. In a previous tutorial, I used a loopback interface on a Windows XP machine to accomplish the same goal.
For me, the reason for using loopback (or tap) interface with dynamips is that it allows me to create complete lab scenarios right on my pc with only one network interface. For instance, the tutorial following this one will demonstrate configuring nat on the dynamips routers. The traffic will flow from the tap interface, to the dynamips router, it will undergo translation and exit the eth0 interface.

Here is the short list of commands used in the tutorial
- In the Dynagen .net config file
[[ router R1]]
F0/0 = NIO_tap:tap0 - [root]#apt-get install uml-utilities
- [root]#modprobe tun
- [root]#tunctl
- [root]#ifconfig tap0 10.100.100.100 netmask 255.255.255.0 up
- [root]#dynagen loopback.net
- Inside the router
#config t
(config)#int f0/0
(config-if)#no shut
(config-if)#ip address 10.100.100.1 255.255.255.0
(config-if)#end
#ping 10.100.100.100
.!!!! Success

(12 votes, average: 4.25 out of 5)







September 14th, 2007 at 9:10 am
Thank u very much!!!
September 22nd, 2007 at 5:21 am
This would have to be the most useful information I have found on the net.
Thank you, thank you thank you
September 26th, 2007 at 6:17 am
Great tutorial.
October 10th, 2007 at 3:40 pm
[...] Dynamips with Linux loopback (tap) interface [...]
October 25th, 2007 at 1:33 pm
Can we use the same technique in Vista ? because it is not possible see the loopback in the ‘network device list’ for dynagen ?
please advice.
December 5th, 2007 at 8:36 pm
Thanks! I needed that help.
March 26th, 2008 at 9:26 pm
[...] Dynamips with Linux loopback (tap) interface [...]
April 6th, 2008 at 7:36 am
thanks. a lot.
followed the steps and successfully create tap0, tap1, tap2.
however, after reboot ubuntu. all tap interfaces are all gone.
how to save them?
April 7th, 2008 at 6:27 am
Read here :
http://ubuntu.wordpress.com/2005/09/07/adding-a-startup-script-to-be-run-at-bootup/