Using Dynamips as Internet Router

Finally my first technical post! :) Dynamips as we know it has been instrumental to assist Cisco cert pursuers to understand and learn more about the configuration of the device. Ever since its inception it has garnered much respect and appreciation from all those who have used the software. It has evolved even to a GUI type application which is called GNS3. I myself, is a big fan of dynamips and using it for my labs. Dynamips saved me a lot of money and trouble of browsing ebay and purchasing Cisco equipment for sale. :)

Well enough talk about Dynamips. When I was in the middle of studying my ISCW, I was thinking of a way to use Dynamips as internet router. I tried a few things and with the help of others in the forums I finally made it work.

Disclaimer: The purpose of this is to demonstrate how to use PPPoE in a Cisco router and not for business purposes or to do away with real Cisco devices in favor of Dynamips.

To begin, of course you should have installed Dynamips and WinPcap and should have a running setup. Any latest IOS that is supported by Dynamips will do.

1. Create a loopback interface, if there is none. Hold CTRL and click both Loopback interface and the Local Area Network connection where your DSL modem is connected. Select Bridge Connections. A network bridge should appear. This serves like a virtual switch inside your computer connecting the loopback interface and the physical interface.

2. Restart your computer to utilize the full functionality of the network bridge. This would also allow you to see the NIO value of the network bridge in dynamips Network Device List tool.

3. Click on the icon Network Device List usually found on your desktop and look for the network Bridge NIO value.

4. Open your .net file and map the NIO value to the interface you intended to connect to the modem logically. Check the .net file I made below. I made autostart = true to speed things up once I open the .net file.

autostart = true
ghostios = true
sparsemem = true
# Dynamips internet router


image = \Program Files\Dynamips\images\c7200-jk9o3s-mz.124-7a.bin
# On Linux / Unix use forward slashes:
# image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image
npe = npe-400
ram = 160

fa1/0 = NIO_gen_eth:\Device\NPF_{888833F9-9A11-478C-9859-1A8051CAC4AC}

Fa1/0 will serve as the connection to the modem and also the inside interface of the NAT configuration later on.

Go to Network Connections and right click on the Network Bridge and click Properties. Go to Internet Protocol and assign an Ip address on the same subnet as your modem. I used Default gateway is which would be the ip address of your dynamips fa1/0 interface.

5. Access your modem by its default management ip address by typing it on your web browser. Make sure that the operational mode is set to Bridge Mode and not PPPoE.

6. Start Dynamips and launch your .net file. Don't forget to get the idlepc values by typing idlepc get R1 after the Router> prompt appears. Select the appropriate idlepc value, usually the one with the * and save idlepc value using idlepc save R1.

7. Now lets start configuring the router! In this setup Fa1/0 serves as the logical connection to the modem and also the inside interface. So we have to configure the ip address on the same subnet as the modem. In my example, I am using the default (duh!) for my modem, so I'll configure my Fa1/0 as

Enable PPPoE on the interface and map it to a dial pool number. Dial pool number is used to map the physical interface with the dialer interface.

R1#config t
R1(config)#int fa1/0
R1(config-if)# ip address
R1(config-if)# no shut
R1(config-if)#pppoe enable
R1(config-if)#pppoe-client dial-pool-number 1

8. Create and configure a dialer interface. This will act as your pppoe dialer, like what you have in your Windows pc. The ip address must be set to negotiated for IPCP to provide it an ip address. You can only put a specific ip address here if you have bought a static ip from your ISP.

R1(config)#int dialer0
R1(config-if)#ip address negotiated
R1(config-if)#encapsulation ppp
R1(config-if)#dialer pool 1
R1(config-if)#ip mtu 1492

A dialer for DSL is incomplete without user credentials, therefore we should declare in the configuration what those are. I used both chap and pap because I don't know what my ISP is using. :)

R1(config)#ppp chap hostname pete
R1(config)#ppp chap password cisco
R1(config)#ppp pap sent-username pete password cisco

Right after this configuration it should work now. A Virtual Access interface Vi1 will be created on your router. You will see an ip address assigned to your Dialer interface. Good but we are not done yet!

9. Specify the default route. This should be pointing to the dialer interface.

R1(config)#ip route dialer0

10. Never forget that we are using the internet and using private IP on our LAN so NATing is needed. Lets configure NATing as our last and final step. First specify an access list of what is to be NATed. Use a standard or extended, doesn't matter anyway.

R1(config)#access-list 100 permit ip any

Specify the inside and outside interfaces.

R1(config)#int fa1/0
R1(config-if)#ip nat inside
R1(config)#int dialer0
R1(config-if)#ip nat outside

Declare which will be natted to which. In our case we will NAT the fa1/0 to whatever the ip address of Dialer0 is

R1(config)#ip nat inside source list 100 interface dialer0 overload

11. Find our your ISP's DNS servers and configure it on the router.

R1(config)# ip name-server
R1(config)# ip name-server

12. Test by browsing to the internet. Do a show ip nat translations and check if you are seeing ip address translations. This should work by now

Now you have a dynamips internet router working, don't be afraid to try several things. If you have a friend who uses this as well, try to create a Site to Site VPN. If you want to try FW, try it with an IOS with FW service. AutoQos is a good thing to try too. Enjoy!!!


1 Response to "Using Dynamips as Internet Router"

Anonymous said... May 16, 2010 at 9:32 AM

Good Work MAN !!!! Thanks a lot

Post a Comment



The Dreamer

A fun loving person who enjoys learning new things. Currently working as a Network Engineer supporting the global network of a Fortune 500 company. This blog serves as my notes for the labs I created for my CCIE journey. I can guarantee there are errors in my posts. If you spot them, please let me know.

Join my Facebook Page I WANT TO BE A CCIE

Donate to the Cause

My aim is to create materials for free and possibly a free lab. If you wish to help out, please send any amount. Thanks.

Join my Bandwagon

Blogs that I Read