How to use switch in gns3 | switching labs in gns3

-->

Today i shall show you how to use Cisco switch in gns3. In node panel of gns3 you  could not find any layer2 or layer3 Cisco switch, you cannot use the Cisco 2900 or 3800 series switches in gns3. But there is a way by which you can use your router as switch by using NM-16ESW module in router. In this way you can configure switching protocols like VLAN, STP, VTP ect.
So follow these steps..
  • First open the "Symbol Manger" from Edit tab.
  • Add a ethernet_switch from  available symbol to customize nodes. Type a name for switch and in Type field assign the Cisco router IOS to switch, in my case i select the  c3600 series and i use the IOS c3640-jk9o3s-mz.124-16a (33MB).

  • Click on apply and then on ok button.
  • Now you can find a new switch in nodes types.

  • Now drag this switch on stage and click on configuration and add  NM-16ESW module from slot tap.

  • click on OK you may received a message "You must use 'manual mode' to connect a link with a NM-16ESW module". Therefore use the manual method to configure this.
Switching labs in gns3 
Now for test i shall configure two vlan on switch. For Vlan configuration you can use the following commands.
vlan database
vlan 10
vlan 20

  • Start your switch and try these commands also can see in screen-shot for vlan 10, 20.
For complete switching labs visit following posts of blog.   

1. Switch virtual interface SVI configuration on gns3 
2. Inter VLAN on gns3 
3. Hot Standby Router Protocol configuration on GNS3
    Learn about Cloud Computing and Active Directory.

    65 comments:

    1. how mine is not working dam it

      ReplyDelete
    2. is there any error ??? and which IOS you are using...???

      ReplyDelete
      Replies
      1. If I add ethernet-switch and set it as ethernet-switch. I have not place to set the IOS as you do on a router.

        Delete
      2. If I add the ethernet-switch symbol and set it to ethernet-switch, there is no place to point the IOS, as there is on a router.

        Delete
    3. thanks sooooooooooooooooooo much!!!

      ReplyDelete
    4. thanks alot ...........its working fine....:-)

      ReplyDelete
    5. Amazing it solve my problem thank you veeeeeeeeeeeery much.Keep it up

      ReplyDelete
    6. There is something incorrect as when I write that command:
      switch#vlan database, I got invalid input detected?!

      Any update in that case ??

      10x

      ReplyDelete
      Replies
      1. vlan database is old way of creating vlans. New one is switch(config)#vlan

        Delete
    7. make sure you have used NM-16ESW module in that router..

      ReplyDelete
    8. this is what i got !!!!

      % Invalid input detected at '^' marker.

      ReplyDelete
    9. add NM-16ESW module in switch in order to execute the "switch#vlan database" command.

      ReplyDelete
    10. thanks man...i cleared my CCIE rns with this only.....amazing work guys...

      ReplyDelete
    11. Thanks Dear, it is great!!! i really mean it.

      ReplyDelete
    12. hi why is the link redirecting me to amazon?
      I cannot download the ios image
      please update the link

      ReplyDelete
    13. Downloading IOS files and refering to them is illegal, but you should be able to find them if you search hard enough(usenet,torrents etc.)

      ReplyDelete
    14. hi if you wana download IOS files then u can download from gns3.net or search google u ll find more links.

      ReplyDelete
    15. thank u so much.....m trying to use switch for 2 months but router interfaces came in between of etherswitch router

      ReplyDelete
    16. just use the "NM-16ESW module" in any router, then u can run different switch commands in gns3.. try this n reply what hapen...

      ReplyDelete
    17. Hi, I tried above setup but its not working...... any one pls suggest ...

      switch#vlan da
      switch#vlan database
      switch(vlan)#vlan 100
      VLAN 100 added:
      Name: VLAN0100
      switch(vlan)#vlan 200
      VLAN 200 added:
      Name: VLAN0200
      switch(vlan)#
      switch(vlan)#ex
      APPLY completed.
      Exiting....
      switch#
      switch#
      switch#config t
      Enter configuration commands, one per line. End with CNTL/Z.
      switch(config)#int fa 0/0
      switch(config-if)#sw
      switch(config-if)#swit
      switch(config-if)#swit?
      % Unrecognized command
      switch(config-if)#^Z
      switch#
      switch#
      switch#sh ver
      *Mar 1 00:02:26.927: %SYS-5-CONFIG_I: Configured from console by console
      switch#sh ver
      Cisco IOS Software, 3700 Software (C3725-ADVIPSERVICESK9-M), Version 12.4(23), RELEASE SOFTWARE (fc1)

      ReplyDelete
      Replies
      1. use the interfaces of fa1/0 ,fa1/1,fa1/2 .....etc

        instead of interface fa0/0 or fa0/1

        Delete
      2. Interface fa0/0 and fa0/1 are router interfaces. The Switch interfaces start from fa1/0.

        I hope this will help

        Delete
    18. its working fine......

      ReplyDelete
    19. hey i want to add switch catalyst 4507r. how can i do it ... help m plz

      ReplyDelete
    20. if ther any one can halp me this is my skype ;hamadabenyettou
      thnx

      ReplyDelete
    21. May I know the IOS version and sw / router module that is being used in order to configure VRRP and HSRP ? So far I am not able to use "standby" command and "vrrp" commands. I used "c3640-jk9o3s-mz.124-16a" IOS and using "NM-16ESW" , "NM-1FE-TX". But still cannot use "standby" and "vrrp"commands. Pls. advise.

      ReplyDelete
    22. Hi, this is working quite well but we can't access to all vlan acl can we?

      I tried

      SW1(config)#vlan access-map
      and
      SW1(config)#vlan filter

      It didn't work.. any idea how to make those work?

      ReplyDelete
    23. thanks a lot it`s working exactly the same to me

      ReplyDelete
    24. you are wonderful,thanks a million,i thought iwas lost forever.

      ReplyDelete
    25. hmm....When I do the steps...it shows the ethernet_switch under 'Decorative Nodes' in node panel and it doesn't give me more options like adding Adapters on slots...

      ReplyDelete
    26. thanks a lot, you`re genius

      ReplyDelete
    27. thankx for all ur comments.., it really help alot

      ReplyDelete
    28. why cant i see any Vlans (not even the default ones) when i enter show vlans on gns3

      ReplyDelete
    29. I have tried mounting the NM-16ESW module to multiple IOS images and router types but for some reason the add on card does not get picked up at all. No VLAN commands or interfaces visible. Other add on cards work and extra ports are picked up automatically. Am I missing something?

      ReplyDelete
    30. working for me... thank you. :)

      ReplyDelete
    31. Hello Can anybody share the link to download the module NM-16ESW please?

      ReplyDelete
      Replies
      1. i am not sure about other routers but 3600 series has NM-16ESW module..
        just add this router in your topology and from slot option select this module.. thanks..

        Delete
    32. hi, I did everything as described above, well I see all interfaces when show ip int brief. but if I type " show vlan" it doesn´t work for me, it says " Ambiguous command: show vlan " instead ,,, any idea why ? or maybe since it is router IOS it just doesnt support this command,,

      ReplyDelete
      Replies
      1. hi, do u manage to create vlan or not????

        Delete
      2. yes , I could create them, but once I type "show vlan" that message occured "Ambiguous command: show vlan " , don´t know why though... is there any other command to show list of vlans created on it? thanks

        Delete
      3. try following command:

        show vlan-switch brief

        Delete
    33. show vlan does not work, use show vlans switch instead

      ReplyDelete
    34. hello, thanks I must have been blind yesterday when I missed this:
      http://commonerrors.blogspot.sk/2011/06/save-vlan-configuration-database-in.html
      show vlan-switch solved my problem...

      ReplyDelete
    35. Hi

      when using NM-16ESW module in router and then for example in the IOS type int f1/0 , IOS give the this error :

      invalid input detected at ' ' marker.

      why this error show me ?

      ReplyDelete
      Replies
      1. int f1/0 is not valid for your setup. use the "Router#show ip interface brief" command for show all interfaces and then select the one which you wana configure..

        thanks

        Delete
    36. Switch#vlan database
      Switch(vlan)#vlan 100
      VLAN 100 added:
      Name: VLAN0100
      Switch(vlan)#vlan 200
      VLAN 200 added:
      Name: VLAN0200
      Switch(vlan)#exit
      APPLY completed.
      Exiting....
      Switch#conf t
      Enter configuration commands, one per line. End with CNTL/Z.
      Switch(config)#interface e1/0
      Switch(config-if)#sw
      Switch(config-if)#switchport mode access
      ^
      % Invalid input detected at '^' marker.
      ------------------------------------------------

      any idea please

      Regards.

      ReplyDelete
      Replies
      1. try switchport mode access on fastethernet instead of ethernet, see what happen????

        Delete
      2. Well Thanks I have tried the Fastethernet and still it is the same, but i gave the interface an ip address connected to router and it is pinging, i mean I can ping the router connect to the fastethernet , not as yesterday when I used Ethernet, I couldn't even ping. thanks again,

        can anyone tell me why Switchport mode access is not working on my switch, It is 3600 router simulated as switch and I am using c3640-is-mz124-21.bin

        thanks again.

        Delete
    37. thank you it working good for me..

      ReplyDelete
    38. hi, what type and number of this IOS switch that you used in this Lab? can you tell so I can search for it myself.

      ReplyDelete
    39. Not Working the switchport mode access in c7200 & 3640.

      ReplyDelete
    40. Please find the below error that i am getting. Please help


      C:\unpack>unpack.exe
      'unpack.exe' is not recognized as an internal or external command,
      operable program or batch file.

      ReplyDelete
      Replies
      1. now what is this unpack.exe???

        Delete
    41. Hi Dear,

      I am Charan, preparing for CCNP SWITCH. I struggled a lot to do Switching Lab practice and this really helped me a lot.

      Thank you for the great support and sharing.

      ReplyDelete
    42. I do not use GNS3 for switching, I'm using SunOS SPARC in Simics to create network topology for switching practice, configuration and verification. VLAN, VTP, STP and other switch configuration works fine in SunOS.

      ReplyDelete
    43. I was wondering how can I do something like that...now, I got an answer...thx a lot

      ReplyDelete
    44. any 1 can give iso image 3600 ?

      ReplyDelete
    45. GREAT! THANKS SO MUCH.

      ReplyDelete
    46. where can we get the nm16esw module......i didnt find it in the slot option....how do we get that...IOS image is required

      ReplyDelete
    47. Thank you verry much, so helpful !

      ReplyDelete
    48. Hey thanks. Nice info. But what do I have to do to run vtp commands on this newly created switch. When I tried it in global mode, it asked me to create a file in which it will store the vtp database. I gave it the name : "vtp.dat". But then I couldn't do anything with that file or with any other vtp command. Any ideas?

      ReplyDelete