How to Add Layer 3 Switch in GNS3
In our previous article, we added the Layer 2 Switch IOS image. In this article, we will configure Layer 3 Switch IOS image. As you know, L2 Switches only transmit packets according to the MAC address table.
Layer 3 switches also use the MAC address table and additionally serve as routing.
How to Use Layer 3 Switch on GNS3
Installing L3 Switch to GNS3 is almost the same as installing a Cisco Router. To perform Switching-based operations with the simulator, you need to use the L3 Switch.
With Layer 3 Switches, you can perform the VLAN, 802.1Q Trunking, and InterVLAN Routing.
Cisco Layer 3 Switch IOS Download
First, download the Switch IOS image to your computer by clicking the button below.
How to Add L3 Switch in GNS3
After downloading the L3 Switch IOS image to your computer, open the network simulator, and follow the steps below.
Step 1
To add a new device, click Edit.
Step 2
From the Edit menu, click Preferences.
Step 3
In the General Preferences window, click the IOS Routers tab.
Step 4
Previously we added L2 Switch from Qemu VMs. To add L3 Switch, click the New button in the IOS Router templates window.
Step 5
In the IOS Image window, select New Image, then click Browse.
Step 6
Select the IOS you downloaded from the above button and click the Open button.
Step 7
The GNS3 program asks if you want to copy the IOS to the default image folder, click Yes.
Step 8
After adding Switch IOS, click Next to continue.
Step 9
In this step, select “This is an EthernetSwitch Router” and then click Next.
Step 10
Leave the RAM value of Layer 3 Switch as default and click Next.
Step 11
In the Network Adapters window, select the NM-16ESW interface in Slot 0 and continue to the next step.
Step 12
Click the Idle-PC Finder button to select the optimal value for your computer’s processor performance for Layer 3 Switch IOS.
Step 13
Wait while calculating the Idle-PC value.
Step 14
After determining the optimal Idle-PC value for IOS, click OK to continue.
Step 15
As you can see in the image below, the Layer 3 Switch (EtherSwitch Router) has added successfully.
Step 16
Drag and drop the Switch to the GNS3 workspace.
Step 17
Create a topology as follows and double click on L3 Switch.
Step 18
Now, to test the Switch, execute the show vlan-switch command in the CLI command interface.
Configure the 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#
Step 19
Configure the VPCS and then ping the VLAN1 interface to test the connection as follows.
Step 20
You can see that pinging between VPCS is successful.
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
GNS3 L3 Switch Configuration ⇒ Video
You can watch the video below to use Switch on GNS3 and also subscribe to our YouTube channel to support us!
Final Word
In this article, we examined the GNS3 Layer 3 Switch settings, the most popular network simulator program used to prepare for Cisco exams. Thanks for following us!
Related Articles
♦ GNS3 VM Network Settings
♦ How to Install Router in GNS3 VM
♦ How to Use VLANs in Layer 2 Switch
♦ How to Run GNS3 in Linux
♦ How to Configure a Cisco Switch
Hi there, not sure what the problem could be but when I try to create inter vlan with as the above example topology, it does not work. Used wireshark and it shows the L3 switch is not responding to arps. And when I try to ping the VPC from the L3 device pings also fail. Any idea what could be wrong, please/Thanks.
Hey, good evening…
You have to set the command
ip routing
Best regards
Volker Warnecke