Simulating a Host in Dynamips/GNS3

For those who don’t know what Dynamips is …. aaaaaaaahhh … it is a very cool piece of software that allows us to emulate any Cisco router and even the PIX. It is a very useful tool for experimenting with Cisco-based networks and one of the cheapest ways to prepare for the CCIE lab. I use it for the later purpose and also to get some hands-on practice with various networking technologies. GNS3 is a very cute graphical front-end to Dynamips which is more suited for adhoc experimentation due to the simply way you can create any topology by dropping devices and connecting them. I was watching a video class on IPv6 when something the instructor said hit me “… without the ipv6 unicast-routing command, this router will not function as a router”! …. immediately I fired up my copy of GNS3 and to simulate a host, I added a router and proceded thus to make it a ‘host’ 1. Disabled routing [no ip routing in global config mode] 2. Configured and IP address and subnet mask on an interface and enabled the interface. 3. Gave the router a default gateway by typing ip default network a.b.c.d where a.b.c.d is the IP address of the router to which this ‘host’ is connected. An viola! I had a host I could ping from. This enables me to simulate a LAN connected to the router … definitely a more elegant way that using loopback addresses which is what I was using until now. So experiment away and drop me any suggestions.

9 thoughts on “Simulating a Host in Dynamips/GNS3

  1. Hello,

    You know alot about Dynamips/GNS3. Have you ever had an issue where you were using a pre-built net file used in Dynamips, and tried to import it using GNS3? doesn’t seem to work for some reason.

    Vin

    • Hi Vin,

      If the .net file was pre-built on the same PC, there shouldn’t be any problem. If it wasn’t, I’d check my paths to dynamips and images.

      • Hi,

        What I find is that Dynamips .net files and GNS3 .ntes files are not interchangeable. Looks like GNS3 expects different info in the net file itself, that’s what I was getting at.

        For example,
        I tried reading this in, (had to change the path to the images)
        # Simple Ethernet Switch lab
        autostart = false
        ghostios = true

        [localhost]

        [[7200]]
        image = /opt/dynagen/images/c7200-p-mz.120-32.S5.image
        ram = 64
        npe = npe-400
        disk0 = 0
        disk1 = 0
        # idlepc = 0x6065cea4
        idlepc = 0x6058b478

        [[ROUTER PE1]]
        F0/0 = S1 1
        A1/0 = BB2-CE3 A1/0
        S2/0 = ASBR1 S2/2

        [[ROUTER PE2]]
        #image = \Program Files\Dynamips\images\c7200-js-mz.123-21.image
        #ram = 128
        #idlepc = 0x60bb54c0
        F0/0 = S1 2
        F1/0 = BB1-CE5 F0/0

        [[ROUTER PE3]]
        F0/0 = S1 3

        [[ROUTER RR]]
        F0/0 = S1 4

        [[ROUTER BB2-CE3]]

        [[ROUTER ASBR1]]
        S2/0 = ASBR2 S2/0
        S2/1 = ASBR2 S2/1

        [[ROUTER ASBR2]]
        F0/0 = S1 5

        [[ROUTER PE4]]
        F0/0 = S1 6

        [[ROUTER CE6]]
        F0/0 = S1 7

        [[ROUTER BB3-CE7]]
        F0/0 = S1 8

        [[ROUTER BB1-CE5]]

        [[ROUTER CE8]]
        #image = \Program Files\Dynamips\images\c7200-js-mz.123-21.image
        #ram = 128
        #idlepc = 0x60bb54c0
        F0/0 = S1 9
        S1/0 = CE2 S1/0

        [[ROUTER CE2]]
        F0/0 = S1 10

        [[ROUTER CE1]]
        F0/0 = S1 11

        [[ethsw S1]]
        1 = dot1q 1 # PE1 F0/0
        2 = dot1q 1 # PE2 F0/0
        3 = dot1q 1 # PE3 F0/0
        4 = dot1q 1 # RR F0/0
        5 = access 240 # ASBR2 F0/0
        6 = dot1q 1 # PE4 F0/0
        7 = dot1q 1 # CE6 F0/0
        8 = access 300 # BB3-CE7 F0/0
        9 = access 82 # CE8 F0/0
        10 = access 23 # CE2 F0/0
        11 = access 13 # CE1 F0/0

        And I get an exception error in GNS3, but I think it works just fine in Dynamips/Dynagen.

        Thanks,

        Vin

  2. i followed the instruction but, but the message i got was that ‘ip address may not be added to an L2 link’ i was using a fastethernet port.

  3. Hi! Quick question that’s totally off topic.
    Do you know how to make your site mobile friendly? My web site looks weird when browsing from my iphone 4.
    I’m trying to find a template or plugin that might be able to
    resolve this issue. If you have any suggestions, please share.

    Cheers!

Leave a Reply