How to Add Layer 3 Switch in GNS3? – In our previous article, we added Layer 2 Switch IOS image on GNS3. In this article, we will add and configure the Layer 3 Switch IOS image to GNS3. As you know, Layer 2 Switches only forward packets according to the MAC address table. Layer 3 Switches use the MAC address table and additionally serve as IP forwarding.
How to Add Layer 3 Switch in GNS3?
Adding a Layer 3 Switch on GNS3 is almost identical to adding a Cisco Router in the GNS3 program. In order to perform Switching based operations with GNS3, you need to add a Layer 3 Switch on GNS3.
With Layer 3 Switches on GNS3, you can perform VLAN, 802.1Q Trunking and InterVLAN Routing.
Download Cisco Layer 3 Switch IOS for GNS3
Before adding a Layer 3 Switch on GNS3, download the L3 Switch IOS image by clicking the button below.
How to Add and Configure Cisco Layer 3 Switch on GNS3?
After downloading the Layer 3 Switch IOS image to your computer, open the GNS3 network simulator program and follow the steps below in order.
First run the GNS3 program and click on the Edit menu.
From the Edit menu, click Preferences.
In the General Preferences window that opens, click the IOS Routers tab.
Previously we added the Layer 2 Switch from the Qemu VMs section. Adding Layer 3 Switch on GNS3 is done from this section. In the Cisco Router template window, click the New button.
In the IOS Image window, select the New Image option and click the Browse button.
Select the IOS you downloaded from the above button and click the Open button.
If the GNS3 program asks if you want to copy IOS to the default image folder, click Yes.
Click Next to continue.
This is the most important step of adding Layer 3 Switch on GNS3. You need to select “This is an Ethernet Switch Router” here. Once you have selected this option, click Next to continue.
Leave the Layer 3 Switch’s RAM value as default and click Next.
In the Network Adapters window, select the NM-16ESW interface in Slot 0 and proceed to the next step.
Click the Idle-PC Finder button to select the most appropriate value for your computer’s CPU performance for the Layer 3 Switch IOS.
Wait while calculating the Idle-PC value.
The most appropriate Idle-PC value for GNS3 Layer 3 Switch IOS has been determined. Click the OK button to continue.
As you can see in the image below, the Layer 3 Switch has been successfully added.
Drag and drop the Layer 3 Switch to the GNS3 workspace.
Create the topology as follows. Double-click to test the GNS3 Layer 3 Switch.
We completed the process of adding GNS3 Layer 3 Switch. Now, in order to test the switch, apply the show vlan-switch command in the CLI command interface.
Configure the GNS3 Layer 3 Switch by executing the following commands.
ESW1# conf t ESW1(config)#interface vlan 1 ESW1(config-if)#ip address 192.168.10.1 255.255.255.0 ESW1(config-if)#no shutdown ESW1(config-if)#exit ESW1(config)#infterface fastethernet0/0 ESW1(config-if)#no shutdown ESW1(config-if)#exit ESW1(config)#exit ESW1#
Configure VPCS on GNS3 and then ping the Vlan 1 interface to test the connection as follows.
You can see that the operation is successful when pinging each other on the VPCS. Layer 3 Switch is running smoothly.
GNS3 Layer 3 Switch Show Commands
ESW1#show running-config Building configuration... Current configuration : 2035 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption no service dhcp ! hostname ESW1 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 5 no ip routing no ip icmp rate-limit unreachable ! ! no ip cef no ip domain lookup ! ! ip auth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3 ! ! vtp file nvram:vlan.dat ! ! ip tcp synwait-time 5 ! ! ! interface FastEthernet0/0 description *** Unused for Layer2 EtherSwitch *** ! interface FastEthernet0/1 description *** Unused for Layer2 EtherSwitch *** shutdown ! interface FastEthernet0/2 ! interface FastEthernet0/3 ! interface FastEthernet0/4 ! interface FastEthernet0/5 ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 ! interface FastEthernet0/10 ! interface FastEthernet0/11 ! interface FastEthernet0/12 ! interface FastEthernet0/13 ! interface FastEthernet0/14 ! interface FastEthernet0/15 ! interface Vlan1 ip address 192.168.10.1 255.255.255.0 no ip route-cache ! no ip http server no ip http secure-server ! ip forward-protocol nd ! ! no cdp log mismatch duplex ! ! control-plane ! ! mgcp behavior g729-variants static-pt ! ! banner exec ^C *************************************************************** This is a normal Router with a SW module inside (NM-16ESW) It has been preconfigured with hard coded speed and duplex To create vlans use the command "vlan database" from exec mode After creating all desired vlans use "exit" to apply the config To view existing vlans use the command "show vlan-switch brief" Warning: You are using an old IOS image for this router. Please update the IOS to enable the "macro" command! *************************************************************** ^C ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! ! end ESW1#
ESW1#show ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset up up FastEthernet0/1 unassigned YES unset administratively down down FastEthernet0/2 unassigned YES unset up down FastEthernet0/3 unassigned YES unset up down FastEthernet0/4 unassigned YES unset up down FastEthernet0/5 unassigned YES unset up down FastEthernet0/6 unassigned YES unset up down FastEthernet0/7 unassigned YES unset up down FastEthernet0/8 unassigned YES unset up down FastEthernet0/9 unassigned YES unset up down FastEthernet0/10 unassigned YES unset up down FastEthernet0/11 unassigned YES unset up down FastEthernet0/12 unassigned YES unset up down FastEthernet0/13 unassigned YES unset up down FastEthernet0/14 unassigned YES unset up down FastEthernet0/15 unassigned YES unset up down Vlan1 192.168.10.1 YES manual up up ESW1#
ESW1#show vlan-switch VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/0, Fa0/1, Fa0/2, Fa0/3 Fa0/4, Fa0/5, Fa0/6, Fa0/7 Fa0/8, Fa0/9, Fa0/10, Fa0/11 Fa0/12, Fa0/13, Fa0/14, Fa0/15 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 1 enet 100001 1500 - - - - - 1002 1003 1002 fddi 101002 1500 - - - - - 1 1003 1003 tr 101003 1500 1005 0 - - srb 1 1002 1004 fdnet 101004 1500 - - 1 ibm - 0 0 1005 trnet 101005 1500 - - 1 ibm - 0 0
How to Configure and Use Cisco Layer 3 Switch using GNS3 ⇒ Video
You can watch the following video for using the Cisco Layer 3 Switch on GNS3, and you can also subscribe to our YouTube channel to support us…
In this article, we added and configured a Cisco Layer 3 Switch on the most popular GNS3 network simulator program used to prepare for Cisco exams. Thanks for following us!
If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!
Also, you can add to browser bookmarks by pressing the CTRL+D to read this article later!