Article

avatar

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

Written by LBSources from http://www.gns3-labs.com on June 15th, 2008 | 60 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


97,871 views

Tags: , , , , , , ,

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

  1. avatar 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. avatar 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. avatar LBSources

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

  4. avatar 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. avatar 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. avatar 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. avatar Chris SMith

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

  8. avatar 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. avatar 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. avatar 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. avatar 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. avatar 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. avatar LBSources

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

  14. avatar 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. avatar LBSources

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

  16. avatar nucleo

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

  17. avatar 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. avatar 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. avatar LBSources

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

  20. avatar 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. avatar 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. avatar 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. avatar berry Numbi

    great is ya job guyz!!!!!

  24. avatar 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. avatar Tumur

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

  26. avatar 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. avatar 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. avatar 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. avatar 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. avatar 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. avatar Halil ERDUR

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

  32. avatar 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. avatar 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. avatar 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. avatar 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. avatar googoosh

    hub is router or switch?

  37. avatar googoosh

    ohh sorry of course router

  38. avatar sam

    from where should i download ios for gns3

  39. avatar 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. avatar 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

  41. avatar encryptic

    I notice that with Windows 7 even if you change compatibility modes to XP EITHER GNS or WINDOWS 7 has issue. just running router on a stick I notice that, in the simplest configs I built, either the encapsulation isnt working since I cant ping other vlans, also in windows 7 I just found out that my NIO adapter cant connect to my outside interface…beside this…I can basically do most everything esle, so far…any feedback would be helpful…

  42. avatar ciscodude

    which one is yout R1 is it the hub im new to cisco

  43. avatar cisco.dude

    woo hooo pinging baby

  44. avatar Clovis Kruse

    Thanks for this lab. I was planning to buy two catalyst 3550 switch for my Switching practice. Your lab works fine for switching practice. Thanks a lot…..

  45. avatar Richard

    Was a bit disappointed with this video. Followed the video step by step, yet it didn’t work. Could’nt ping between PC1 and the gateway, or PC2 to the gateway.

    I finally worked out that the video failed to cover these two commands on the PC’s

    no ip routing
    ip default-gateway 192.168.1.1 (or 2.1 for PC2)

    Took me 30 minutes to find this. Good video, but shame it didn’t fully work at the end.

  46. avatar Richard

    Oh and GNS3 seemed to have another random fault with this when it comes to vlans.

    You have to do the order for the switchports correctly.

    This order will not work :

    R1(config-if)#switchport mode access
    R1(config-if)#switchport access vlan 42

    This order WILL work :

    R1(config-if)#switchport access vlan 42
    R1(config-if)#switchport mode access

    No idea why this order seemed to be the only way I could get it to work :(

  47. avatar INDIA

    this site Help you with GNS3 LABs
    http://gns3cisco.blogspot.com/2011/05/gns3cisco-help-you-pass-your-ccna-ccnp.html

  48. avatar Where to find Pillow Pets

    I’ve recently started a site, the information you provide on this website has helped me greatly. Thanks for all of your time & work.

  49. avatar Leora Wagar

    I really like this post, I’ll submit it to my stumbleupon!

  50. avatar Techno Songs

    Wow cool site! I’ll try to spread the word.

  51. avatar Amanda Wade

    Do you have any idea why your blog page got the recommendation from Christian Dillstrom? Mobile + social media marketing pros do not recommend something without a reason.

  52. avatar Sarath

    Not able to download the “GNS vlan trunk lab”, even though the rar is getting downloaded but when i try to open it, it is not working fine. Please look into it.

  53. avatar Sarath

    I am new to GNS3, i have tested the routing labs every thing working fine. But once i came to the switching lab, it is becoming very hard to try out the lab. I could not download the c3640-jk9s-mz.124-16a. This 32 MB file downloaded from “4shared” site, it gets downloaded but some issue with the file opening. Can any one please help me find the correct download page.

  54. avatar pdq terminal tip

    pdq terminal tip…

    [...]Topology: VLAN Trunking GNS3 Lab – 802.1Q – Router On A Stick | GNS3 Labs :: Cisco Router Simulator Network Labs & Topologies[...]…

  55. avatar low price payment processing

    low price payment processing…

    [...]Topology: VLAN Trunking GNS3 Lab – 802.1Q – Router On A Stick | GNS3 Labs :: Cisco Router Simulator Network Labs & Topologies[...]…

  56. avatar видеоуроки по wordpress

    видеоуроки по wordpress…

    [...]Topology: VLAN Trunking GNS3 Lab – 802.1Q – Router On A Stick | GNS3 Labs :: Cisco Router Simulator Network Labs & Topologies[...]…

  57. avatar фк

    фк…

    [...]Topology: VLAN Trunking GNS3 Lab – 802.1Q – Router On A Stick | GNS3 Labs :: Cisco Router Simulator Network Labs & Topologies[...]…

  58. avatar Portakal Ahşap

    Portakal Ahşap…

    [...]Topology: VLAN Trunking GNS3 Lab – 802.1Q – Router On A Stick | GNS3 Labs :: Cisco Router Simulator Network Labs & Topologies[...]…

  59. avatar dota2

    dota2…

    [...]Topology: VLAN Trunking GNS3 Lab – 802.1Q – Router On A Stick | GNS3 Labs :: Cisco Router Simulator Network Labs & Topologies[...]…

  60. avatar Gravypan

    Every time I open one of these labs, it's error messages galore.
     
    Never had this issue with Boson Netsim.

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