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.

 

Update: Use this tutorial for tap interfaces + bridging and GNS3 (Much better tutorial)

 
 

 

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
Be Sociable, Share!