How to run a switch in Gns3:
In this article I will
show you how to use Cisco switch in Gns3 1.1 and Gns3 0.8 virtualbox edition. You can perform switching
functionality on GNS3 simply by using NM-16ESW module. This module is
normally available or work with Cisco 3600 & 3700 series. Using NM-16ESW
you can configure switching protocols like VLAN, STP, VTP on gns3 ect.
Cisco Commands For Beginners
Cisco Commands For Beginners
How to use Switch in Gns3 1.1:
Open Edit \ Preferences\ dynamips\IOS
Router & click on new button.
Browse the Cisco 3600
& 3700 series image and click next.
Type it’s name and set a
suitable RAM for it.
The next step is most
important one, where you need to define NM-16ESW, you can choose it from drop
down menu.
In next step, set the idle
PC value for your router and finish this wizard.
After this you will find
your router with switching functionality in Gns3 device menu.
You can drag it
to gns3 stag and connect it via NM-16ESW module with other devices and you can try some switching commands that are mention at the end of this post.
How to use Switch in gns3 0.8 virtualbox edition:
- 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 have used IOS c3640-jk9o3s-mz.124-16a (33MB). You can download switch IOS for GNS3 from this link.
- 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.
How to add switch image in GNS3 1.1
For gns3 1.1 open the edit\preferences, then explore the dynamips tab and click on "ios routers". now click on new and browse the above downloaded image, click next.
Type name for router and click next. Now from slots tab choose the NM-16ESW for switching function and click finish.
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
how mine is not working dam it
ReplyDeleteis there any error ??? and which IOS you are using...???
ReplyDeleteIf I add ethernet-switch and set it as ethernet-switch. I have not place to set the IOS as you do on a router.
DeleteIf 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.
DeletePlease help didn't work with me !!!!
DeleteHi,
DeleteI had configured the router as Ethernet switch, but I am not able to use switch commands. Please help
thanks sooooooooooooooooooo much!!!
ReplyDeletethanks alot ...........its working fine....:-)
ReplyDeleteAmazing it solve my problem thank you veeeeeeeeeeeery much.Keep it up
ReplyDeleteThere is something incorrect as when I write that command:
ReplyDeleteswitch#vlan database, I got invalid input detected?!
Any update in that case ??
10x
vlan database is old way of creating vlans. New one is switch(config)#vlan
Deletemake sure you have used NM-16ESW module in that router..
ReplyDeletethis is what i got !!!!
ReplyDelete% Invalid input detected at '^' marker.
make sure your in enable mode, not global config when using R1# vlan database command
Delete^
add NM-16ESW module in switch in order to execute the "switch#vlan database" command.
ReplyDeletethanks man...i cleared my CCIE rns with this only.....amazing work guys...
ReplyDeleteThanks Dear, it is great!!! i really mean it.
ReplyDelete:-)
ReplyDeletehi why is the link redirecting me to amazon?
ReplyDeleteI cannot download the ios image
please update the link
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.)
ReplyDeletehi if you wana download IOS files then u can download from gns3.net or search google u ll find more links.
ReplyDeletethank u so much.....m trying to use switch for 2 months but router interfaces came in between of etherswitch router
ReplyDeletejust use the "NM-16ESW module" in any router, then u can run different switch commands in gns3.. try this n reply what hapen...
ReplyDeleteHi, I tried above setup but its not working...... any one pls suggest ...
ReplyDeleteswitch#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)
use the interfaces of fa1/0 ,fa1/1,fa1/2 .....etc
Deleteinstead of interface fa0/0 or fa0/1
Interface fa0/0 and fa0/1 are router interfaces. The Switch interfaces start from fa1/0.
DeleteI hope this will help
its working fine......
ReplyDeletehey i want to add switch catalyst 4507r. how can i do it ... help m plz
ReplyDeleteif ther any one can halp me this is my skype ;hamadabenyettou
ReplyDeletethnx
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.
ReplyDeleteHi, this is working quite well but we can't access to all vlan acl can we?
ReplyDeleteI tried
SW1(config)#vlan access-map
and
SW1(config)#vlan filter
It didn't work.. any idea how to make those work?
thanks a lot it`s working exactly the same to me
ReplyDeleteyou are wonderful,thanks a million,i thought iwas lost forever.
ReplyDeletehmm....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...
ReplyDeletethanks a lot, you`re genius
ReplyDeletethankx for all ur comments.., it really help alot
ReplyDeletewhy cant i see any Vlans (not even the default ones) when i enter show vlans on gns3
ReplyDeleteI 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?
ReplyDeleteworking for me... thank you. :)
ReplyDeleteHello Can anybody share the link to download the module NM-16ESW please?
ReplyDeletei am not sure about other routers but 3600 series has NM-16ESW module..
Deletejust add this router in your topology and from slot option select this module.. thanks..
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,,
ReplyDeletehi, do u manage to create vlan or not????
Deleteyes , 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
Deletetry following command:
Deleteshow vlan-switch brief
Use sh vlan-switch
DeleteThanks a lot! Had the same "problem"
Deleteshow vlan does not work, use show vlans switch instead
ReplyDeletehello, thanks I must have been blind yesterday when I missed this:
ReplyDeletehttp://commonerrors.blogspot.sk/2011/06/save-vlan-configuration-database-in.html
show vlan-switch solved my problem...
Hi
ReplyDeletewhen 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 ?
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..
Deletethanks
Switch#vlan database
ReplyDeleteSwitch(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.
try switchport mode access on fastethernet instead of ethernet, see what happen????
DeleteWell 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,
Deletecan 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.
thank you it working good for me..
ReplyDeletehi, what type and number of this IOS switch that you used in this Lab? can you tell so I can search for it myself.
ReplyDeleteNot Working the switchport mode access in c7200 & 3640.
ReplyDeletePlease find the below error that i am getting. Please help
ReplyDeleteC:\unpack>unpack.exe
'unpack.exe' is not recognized as an internal or external command,
operable program or batch file.
now what is this unpack.exe???
DeleteHi Dear,
ReplyDeleteI 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.
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.
ReplyDeleteI was wondering how can I do something like that...now, I got an answer...thx a lot
ReplyDeleteany 1 can give iso image 3600 ?
ReplyDeleteGREAT! THANKS SO MUCH.
ReplyDeletewhere can we get the nm16esw module......i didnt find it in the slot option....how do we get that...IOS image is required
ReplyDeletegood stuff
ReplyDeleteThank you verry much, so helpful !
ReplyDeleteHey 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?
ReplyDeletethanx
ReplyDeleteI entered switchport mode access but it doesn't show up in the running config. Cant seem to figure out why... another site suggested that entering the commands in a specific order would make it work right but. I appreciate GNS3 but I wish I could just rent some real lab equipment for about three months..
ReplyDeleteUnfortunately, GNS3 doesn't seem to be real tolerate of errors, once I write to the vlan.dat file when using these switch modules; so I have scrap the whole topology and start over just to test that theory... extra practice I suppose...
Sw1Pod1#show run | section interface FastEthernet0/2
interface FastEthernet0/2
switchport access vlan 10
switchport voice vlan 15
switchport mode access is the default command it will not show up in running config
Deletevtp mode cmd not working
ReplyDeleteman for 10 months i am using gns3 and wanted to use switchport command
ReplyDeleteand this the site that has given me the answer how to . Hats off to you.
a big thanks to you and i am giong to bookmark your site.
Hi Thanks mate for sharing this information, i was able to configure successfully.
ReplyDeleteHi, so cool idea but i have a problem, switch#Vlan database command did not apply.
ReplyDeleteplz guide me. Thank's
make sure you have used NM-16ESW module in that router..
DeleteI m getting following error while following your mentioned steps & plz help me to get it resolve.
ReplyDeleteR6: error from server 127.0.0.1:7204: 206-unable to create VM instance 'ghost-c3640-Gns3 IOS for switch.image-127.0.0.1.ghost'
Iep,
DeleteJust change the name of the ".bin" by c3640-jk9o3s-mz.124-16a.bin and don't forget the IDLE PC auto calculation
Man you are awesome , i had the same issue and its solved .. Thanks a milllion brooo...
DeleteThanks a lot whoever posted "Just change the name of the ".bin" by c3640-jk9o3s-mz.124-16a.bin and don't forget the IDLE PC auto calculation"
DeleteI tried this too but I keep getting this error:
DeleteServer error [-3200] : unable to create VM instance 'Ghost'
An emulator instance (PID 5288) is already running with identifier 0.
If this is not the case, please erase file "c7200_i0_lock".
VM Ghost: unable to create instance!
I upgraded to GNS3 version 1.2.3. Could it be because of my version?
OK now somehow I overcame this problem but I got another error in the router console:
DeleteConnected to Dynamips VM "R4" (ID 4, type c3600) - Console port
Press ENTER to get the prompt.
ROMMON emulation microcode.
Launching IOS image at 0x80008000...
Error : compressed image checksum is incorrect 0x9139C5F2
Expected a checksum of 0xAC10AA9F
!!! WARNING - VM is not running, will be unresponsive (status=1) !!!
Thanks its working great :)
ReplyDeletebut i can not enable spanning tree protocol. How can I do it ? please help me.
Thanks in advance.
Thanks for sharing. For those of you who can't even put it on, delete the space in the file name, somehow my GNS3 didn't like it.
ReplyDeleteI had the same problem, GNS3 wouldn't install the router on the workspace because of the name of the /.bin file. Make sure you replace the spaces with _ or whatever, then it's all good.
ReplyDeletedear all...plz give me this ios c3640-jk9o3s-mz.124-16a..i can't find this on the internert plz send me...
ReplyDeleteI tried the above steps but dont see an option to use manual mode after I hit ok after selecting NMS-16ESW , and get this error logs :
ReplyDelete---------Traceback lines (saved in exception.log)----------
Traceback (most recent call last):
File "GNS3\Scene.pyo", line 725, in slotStartNode
File "GNS3\Node\IOSRouter.pyo", line 607, in startNode
File "GNS3\Dynagen\dynagen.pyo", line 2542, in check_ghost_file
File "GNS3\Dynagen\dynagen.pyo", line 2565, in _create_ghost_instance
File "GNS3\Dynagen\dynamips_lib.pyo", line 2163, in __init__
File "GNS3\Dynagen\dynamips_lib.pyo", line 4998, in send
DynamipsError: 206-unable to create VM instance 'ghost-c3640-Gns3 IOS for switch.image-127.0.0.1.ghost'
Hello
ReplyDeleteI have set up a router with 3600 series router IOS with NM-16ESW module.
If I hover over the switch I see all the ethernet ports Fastetherenet 0/1 - 0/15 however when I go inside the router and type in show interface none of these ethernet ports show up. Any recommendations...
try to connect these interfaces with other devices by manual selection, and then try again..
DeleteGreat Work Man...Thumbs up...<3...it works for me...
ReplyDeleteThanks, good work.
ReplyDeleteexcellent work..........thank youuuuuuuu
ReplyDeleteno idea how you get a layer 3 switch coming up, all i get is a router...
ReplyDeleteKindly update me regarding the GNS3 , how to access from network. i try so many thing but not access.
ReplyDeleteFirst connect gns3 to physical interface of your PC with gns3-cloud and then access it through network ..
Deletei cant create the vlans... had the followin messages:
ReplyDeleteS1(vlan)#vlan 2 name ITTeam
VLAN 2 added:
Name: ITTeam
S1(vlan)#vlan 5 name Accounting
VLAN 5 added:
Name: Accounting
S1(vlan)#exit
% not enough space on flash to store vlan database. trying squeeze...
% error squeezing flash - (No device available)
Error on database apply 40: NV storage failure
Use 'abort' command to exit
S1(vlan)#
and when i tryed to fulsh/erase the memory had the following message:
S1#erase flash:
Erasing the flash filesystem will remove all files! Continue? [confirm]
%Error erasing flash: (No device available)
S1#
Maybe is a configuration (Gns3 IOS hardware config) issue... by the way is a 2691 with c2691-advipservicesk9-mz.124-15.T6..unpacked IOS image.
hello, whould you help me, i have a same problem.
Deletetry adding a disk configuring your router, so a flash comes up
ReplyDeleteAns:- 1. Must Be Getting Error Like This:-
ReplyDelete-------------------------------------------------------------------------
R2(vlan)#vlan 12
VLAN 12 added:
Name: VLAN0012
R2(vlan)#exi
% not enough space on flash to store vlan database. trying squeeze...
% error squeezing flash - (No device available)
Error on database apply 40: NV storage failure
Use 'abort' command to exit
-------------------------------------------------------------------
2. Error Erasing Flash :- If you Try directly with switch on , you will get like this
-------------------------------------------------------------------------------
R2(vlan)#abort
Aborting....
R2#era
R2#erase fl
R2#erase flash:
Erasing the flash filesystem will remove all files! Continue? [confirm]
%Error erasing flash: (No device available)
--------------------------------------------------------------------------------------
3. STEPS:-
1. first write /save your config ( by typing "wr" in privilege(#) mode
-----------------------------------------------------------------------------------
R2#wr
Building configuration...
[OK]
---------------------------------------------------------------------------------
2. stop switch/router (by right clicking on switch/router image in GNS
------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
3. Go to Configure , as seen in image options above:-
----------------------------------------------------------------------------------------------------------
i.Click your device(sw/router) in list or select group (to apply to same kind of device from next time automatically)
ii.locate Memories and disks --> discs--> PCMCIA disk0 size:- option
iii. change size of flash to 1 mb or more
iv. apply & click OK.
------------------------------------------------------------------------------------------------------------
4. Start your device again
------------------------------------------------------------------
(Note if you do this you will get error again)
(
R2#vlan da
R2#vlan database
R2(vlan)#vlan 12
VLAN 12 added:
Name: VLAN0012
R2(vlan)#exi
% not enough space on flash to store vlan database. trying squeeze...
% error squeezing flash - (Operation not supported on this file)
Error on database apply 40: NV storage failure
Use 'abort' command to exit
)
-----------------------------------------------------------------
5.Erase Flash now from privilege mode(#)
--------------------------------------------------------------------
R2#era
R2#erase fl
R2#erase flash:
Erasing the flash filesystem will remove all files! Continue? [confirm]
Current DOS File System flash card in flash: will be formatted into Low End File System flash card! Continue? [confirm]
Erasing device... eeeeeeeeeeeeeeee ...erased
Erase of flash: complete
---------------------------------------------------------------------------
6. DONE. Now if you go to vlan database & create vlan & exit , it will be successful , (if you followed everything correctly)
---------------------------------------------------------------------------------------------------
R2#vlan da
R2#vlan database
R2(vlan)#vlan 12
VLAN 12 added:
Name: VLAN0012
R2(vlan)#exi
APPLY completed.
Exiting....
Hello ALL,
ReplyDeletei am facing some problem
i am using gns3 after attached switch ios in gns3 my switch port is disable how i can enabled is any one know this error kindly let me know ASAP
Thank you
add NM-16ESW module from router configuration...!
DeleteI did add NM-16ESW and I right click a router to assign a connection cable, I do see Fast Ethernet Ports. However, when I double click on a router, it doesn't take me to the router console page completely. I am using MAC OS X and get the following message:
ReplyDeleteTrying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connected to Dynamips VM "R1" (ID 10, type c3600) - Console port
Press ENTER to get the prompt.
Please assist.
Hi,
ReplyDeleteCan any one provide the switch IOS for latest GNS3, for TShoot labs Practice,
Thanks IK
hi!. please i set up my vlan using the vlan database command on a 3600 switch, and after setting the vlans, i proceeded to the global config mode to assign switchports to the vlans and also confirmed that the switchports have been assigned to the respective vlans using the 'sh vlan-switch brief' command. The issue i'm having is that after saving with the 'copy run start' and then restart the switch, and do the same 'sh vlan-switch brief' , all the initially assigned port would go to the default vlan (vlan 1). That is, there would be no more switchports assigned to the initially configured vlans.
ReplyDeleteplease, any form of assistance with this issue is welcome. my email address is bakaretemiloluwa@yahoo.com
How to erase commands while configuring in console port. The delete and backspace keys never work
ReplyDeletehow to save run-configuration in gns3
ReplyDeleteMine is not working.
ReplyDeletePl help.
can anyone explain how to change vtp versions in gns 3?
ReplyDelete