Article

LBSources

Topology: VLAN Trunking GNS3 Lab - 802.1Q - Router On A Stick

Written by LBSources from http://www.gns3-labs.com on June 15th, 2008 | 40 Comments

This is a lab testing VLAN trunking, subinterfaces, router on a stick and 802.1q (DOT1Q) using 3640 routers as routers using the NM-16ESW module. The PCs are also 3640 routers.

Routers Used: 3640 w/ NM-16ESW modules

IOS: c3640-jk9s-mz.124-16a

Feature of Topology: VLAN testing. Router On A Stick / Subinterfaces. Communicating with VLANs VIA the DOT1Q trunking protocol.

Image:

Download: GNS3 VLAN Trunk Lab

Dynamips - Dynagen Version: Dynamips-Dynagen-VLAN Trunk Lab With VPCS Config

Inspired by : 7200emu.hacki.at - vlan trunk lab

Important note from Jaap

Hi all,

Also stumbled on this one :(.
However, after adding the vlan’s (Hub,SW1 & SW2) I wasn’t able to ping from and to the nodes attached to SW2. I checked the trunk between Sw1 & SW2: show int fa0/12 switchport
ans everything looked fine, but it didn’t work. After deleting the trunk (line) and adding it back again, it worked fine. Pinging all over te place :).

Enjoy .. LBS

41,120 views

Tags: , , , , , , ,

40 Responses to “Topology: VLAN Trunking GNS3 Lab - 802.1Q - Router On A Stick”

  1. LBSources LBSources

    Here is the config steps for those interested.. I modified them to the interfaces in this topology

    PC1#configure terminal
    no ip routing
    ip default-gateway 192.168.1.10
    interface e0/0
    ip address 192.168.1.1 255.255.255.0
    no shutdown
    end

    PC2#configure terminal
    no ip routing
    ip default-gateway 192.168.2.20
    interface e0/0
    ip address 192.168.2.1 255.255.255.0
    no shutdown
    end

    PC3#configure terminal
    no ip routing
    ip default-gateway 192.168.1.10
    interface e0/0
    ip address 192.168.1.2 255.255.255.0
    no shutdown
    end

    PC4#configure terminal
    no ip routing
    ip default-gateway 192.168.2.20
    interface e0/0
    ip address 192.168.2.2 255.255.255.0
    no shutdown
    end

    R1#configure terminal
    interface FastEthernet0/0
    no shutdown
    interface FastEthernet0/0.10
    encapsulation dot1Q 10
    ip address 192.168.1.10 255.255.255.0
    interface FastEthernet0/0.20
    encapsulation dot1Q 20
    ip address 192.168.2.20 255.255.255.0
    end

    ——SW1——-
    SW1#vlan database
    vlan 10 name vlan10
    vlan 20 name vlan20
    exit
    configure terminal
    interface f0/1
    switchport mode access
    switchport access vlan 10
    no shutdown
    exit
    interface f0/2
    switchport mode access
    switchport access vlan 20
    no shutdown
    exit
    interface f0/12
    switchport mode trunk
    switchport trunk encapsulation dot1q
    no shutdown
    exit
    interface f0/0
    switchport mode trunk
    switchport trunk encapsulation dot1q
    no shutdown
    end

    ——SW2——-
    SW2#vlan database
    vlan 10 name vlan10
    vlan 20 name vlan20
    exit
    configure terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    interface f0/1
    switchport mode access
    switchport access vlan 10
    no shutdown
    exit
    interface f0/2
    switchport mode access
    switchport access vlan 20
    no shutdown
    exit
    interface f0/12
    switchport mode trunk
    switchport trunk encapsulation dot1q
    no shutdown
    end

  2.  csplau

    Hello,
    How can I create Sw1 and Sw2? Using cisco3600 router? I did it. But, the switchmode port trunk command is not support? vlan also cannot be created!!!

  3. LBSources LBSources

    remember that you must load the NM-16ESW port module in the slot.

  4. GNS3 Tutorials: BlindHog - How to build a switching lab | GNS3 Labs :: Cisco Router Simulator Network Topologies GNS3 Tutorials: BlindHog - How to build a switching lab | GNS3 Labs :: Cisco Router Simulator Network Topologies

    [...] case you have had a look at our Topology: VLAN Trunking GNS3 Lab - 802.1Q - Router On A Stick & need some help with configurations have a look over at [...]

  5. blindhog.net » GNS3 - Switching lab part 2 (router on a stick) blindhog.net » GNS3 - Switching lab part 2 (router on a stick)

    [...] References: http://www.gns3-labs.com/2008/06/15/topology-vlan-trunking-gns3-lab-8021q-router-on-a-stick/ [...]

  6. GNS3 Tutorials: BlindHog - How to build a switching lab Part 2 | GNS3 Labs :: Cisco Router Simulator Network Topologies GNS3 Tutorials: BlindHog - How to build a switching lab Part 2 | GNS3 Labs :: Cisco Router Simulator Network Topologies

    [...] You can also find some help in my lab GNS3-Labs:: Topology: VLAN Trunking GNS3 Lab - 802.1Q - Router On A Stick [...]

  7. Chris SMith Chris SMith

    Great lab - but no step by step testing or explanations for beginners.

  8. LBSources LBSources

    Hey Chris.. As I have said elsewhere..

    Hey Chris .. These are not my goals. My goals are to compile complete labs I use for my own testing, or that others share, package them nicely and share with you all. You can then do your own testing and break-fix scenarios. I’m far from an instructor or have the knowledge to build test labs for others to solve. :)

    You can learn more about the site here: http://www.gns3-labs.com/about-gns3-labs/

  9. Chris Smith Chris Smith

    LBSources . . . I hear you and I still appreciate your lab. Dynamips and GNS3 are very good stuff. I’ve been going over your “Router on a Stick” lab and was at least expecting to have been able to ping 1 pc to another in the other vlan (or even in the same vlan) but was not able to. So I have to go over the configs to see if anything is missing. I was still pleasantly surprised to have it displayed and running on my instance of GNS3. The blindhog videos are great as well. I just need to read up on some networking material it seems. Thanks.

  10. LBSources LBSources

    Sounds like you already have a scenario in the lab which you must fix. All labs on this site are delivered fully working.. This lab in particular is also the #1 topology of the site and I’m sure that someone else would have reported it non-working it truly was broken :) ..

  11. Chris Smith Chris Smith

    mmmmmm . . . sounds like reverse psychology to me. You wanted to come up with a broken lab so that people would have to work to fix it in the first place. Very good idea on your part! ;)

  12. Nhan Nhan

    I has run Vlantrunklab, after finish load the configuration, From any PC, I can’t ping the default gateway and the PC in same VLAN, it’s only ping successfully it’s Ip address.
    Please help me.
    I use the lastest GNS3.

  13. LBSources LBSources

    Nhan .. Thats the idea of labs buddy to sort it all out and get it working :)

  14. rcastro rcastro

    I followed all the step, IOS c3640-jk9s-mz.124-16a, loaded the NM-16ESW port module, I’m using GNS3-0.5, and dynamips-0.2.8-RC2-x86. my operative system is Kubuntu 8.4 with KDE 3, everything works as should, but the trunk isn’t working. Do you have any idea why this happen? Thanks a lot.

  15. LBSources LBSources

    @rcastro That’s for you to figure out :)

  16. nucleo nucleo

    GNS3 does not save vlan database. May be this explains problem with this lab?

  17. LBSources LBSources

    @nucleo Create a new project from this lab .. You’ll get it working.. It can never be broken .. Its a architecture for you to correct.

  18. nucleo nucleo

    I just open VLAN.Trunk.Lab.net with corrected path to ios and configs and then started lab.
    To make it working it is enough to do following steps
    ——SW1——-
    SW1#vlan database
    SW1(vlan)#vlan 10
    SW1(vlan)#vlan 20
    SW1(vlan)#exit

    ——SW2——-
    SW2#vlan database
    SW2(vlan)#vlan 10
    SW2(vlan)#vlan 20
    SW2(vlan)#exit

    Vlan databases are saved in files c3600_SW1_bootflash and c3600_SW2_bootflash which are not in vlantrunklab.rar archive.

  19. LBSources LBSources

    @nucleo Great and that’s because those are working directory files which I never share due to size.

  20. kamlesh Limbachiya kamlesh Limbachiya

    hi ,
    i have download VLAN.Trunk.Lab.net .when i LOGIN by console to SW1 or SW2 ,in sw1 or sw2 i is not showing any interface in it running configuration.i also not able to apply any command related to vlan.

    so kindly provide the solution.

    Regards,
    Kamlesh Limbachiya

  21. LBSources LBSources

    @Kamlesh Remember the limitations of using a switching module in a router within GNS3. There are limits to how much VLAN work you’ll get done in GNS3.

    Here is a list of what is missing with the 16 port switching module (NM-16ESW)

    http://www.gns3.net/phpBB/post645.html?hilit=vlan#p645

  22. Jaap Jaap

    Hi all,

    Also stumbled on this one :(.
    However, after adding the vlan’s (Hub,SW1 & SW2) I wasn’t able to ping from and to the nodes attached to SW2.
    I checked the trunk between Sw1 & SW2: show int fa0/12 switchport
    ans everything looked fine, but it didn’t work.
    After deleting the trunk (line) and adding it back again, it worked fine.
    Pinging all over te place :).

    Greetz Jaap

  23. berry Numbi berry Numbi

    great is ya job guyz!!!!!

  24. Paulo Paulo

    Hi LBS,

    Besides “switchport” command, I’ve noted that “interface vlan” is supported only with NM-16ESW installed. Is this correct? I also tried this lab but I didn’t use NM-16ESW on the R1, but my ping wasn’t successful. Any ideas?

  25. Tumur Tumur

    Is there configuration in the HUB? how to send ping from PC4 to HUB ?

  26. runssh runssh

    Deleting and then adding the trunk lines didn’t help. SW2 shows fa0/12 line and protocol is up but SW1 fa0/12 shows line is up but protocol is down. Encapsulation is the same as how you’ve configured. Any ideas? TIA

  27. runssh runssh

    Ok, so I detected mismatched duplex issue with the NM on SW1 and SW2. I’m replacing the NM4E modules with FE modules on all the other routers and post back soon. TIA

  28. runssh runssh

    BTW, I tried setting the FEs to half duplex and speed settings to 10 but it was still detecting mismatches so I gave up…

  29. runssh runssh

    This lab works. If you’re going to install NM4E on the Hub and PCs(routers), try to see if you can match the half duplex/speed on both SW1 and SW2. Otherwise, install FE modules for all the routers except SW1 and SW2. Thanks a bunch!!!

  30. LBSources LBSources

    @runssh Glad I could help :) Seriously, sorry I didn’t get to your questions.

    @Tumur The configuration for the hub are already there.

    @Paulo What did you use then?

  31. Halil ERDUR Halil ERDUR

    this works fine…..thansk a lot men..

  32. jagdish jagdish

    hi
    i am using ubuntu and install gns3 and i follow all the step above by adding switch slot but that router(3660) could not support switchport command.is anything type before that command.

  33. andrew andrew

    hy all.. nice easy “roast” lab…this is basic stuff..if you switch to cisco packet tracer 5.2 you will have a much better interface to work from.gns3 is ok but i find it very limited.

  34. LBSources LBSources

    @Andrew .. I haven’t used packet tracer at all, but I’ve heard that it doesn’t compare to the abilities of GNS3, at least with routing capabilities. GNS3 just lacks real switching.

  35. andrew andrew

    yes your right..packet tracer has limited routing and gns3 is pretty good..like being able to use real ios images..but i only use packet tracer to check out my configs and labs before i move on to my real set up..gns3 switching limitations is a real bummer when your studying for exams.(having to configure routers as dummy switches is good command and config practice but for the less experienced its quite daunting).i use gns3 for more complicated routing configs and packet tracer for everthing else..i just think that some of the guys on here would not be having the problems they are having with a clear context.
    they could move back to gns3 for routing configs as they gain experience..
    anyway.. cool labs and good help and advice..like you i cant speak more highly of chris bryant and the bryant advantage…

  36. googoosh googoosh

    hub is router or switch?

  37. googoosh googoosh

    ohh sorry of course router

  38. sam sam

    from where should i download ios for gns3

  39. LBSources LBSources

    @Sam, We do not provide any IOS to anyone. It’s up to you to obtain the IOS. Please do not ask here for it.

  40. Projet Projet

    We are using GNS3 0.7.1. We tried a simple topology with 3 routers 3640(one acting as a PC with a slot NM-1FE-TX, one as a switch with a slot NM-16ESW and one real router with a slot NM-1FE-TX).
    The IOS image is: c3640-jk9s-mz.124-16a.bin
    We’re working on a Unix machine Sun.
    We write the same configuration as yours. But we can’t ping from the PC to the router!
    Do you have any idea what may be the problem?
    Thank you

Leave a Reply



Subscribe To GNS3-Labs

Subscribe to GNS3 Labs :: Cisco Router Simulator Network Topologies


Show Love!

If you would like to donate for the time it takes to do all of this, feel free to use the link below. Thank you in advance for any contribution you make :)

Categories