How to Add Layer 3 Switch in GNS3

The GNS3 software, which we use to enhance our knowledge of computer networks, also supports Layer 3 Switch devices. In the always-changing world of networks, we often use L3 switches to ensure data travels well between our devices. So, we provide efficient data transmission and communication among devices in our environment.

To prepare for tests from Cisco or other companies, we use advanced network tools using GNS3. Also, if we like networking, we try to improve. In this article, we’ll examine why we use GNS3 Layer 3 switches in the emulator program and how we set them up.

How to Add Layer 3 Switch in GNS3

Advantages of Using Layer 3 Switches in GNS3

A Layer 3 Switch (L3 Switch) is a unique network tool that works on the third level of the OSI model, known as the network layer. In comparison, Layer 2 Switches work on the second layer and send frames based on MAC addresses. The big plus of L3 over L2 is that it uses IP addresses to figure out where to send things. That’s why people like using Layer 3 devices in big and complicated networks.

A big plus of having a Layer 3 Switch in the network is that it can handle different groups of IP addresses (called subnets) and VLANs. These devices look at their IP addresses to figure out where to send incoming packets. Then, they find the best way to get the packages to where they’re going, making the network faster and more responsive.

If you’re getting ready for Cisco exams, you’re probably using GNS3. With this make-believe program, you can also play around with Layer 3 Switch devices. It lets you copy real network devices on your computer in a virtual world. When you add a Router or Switch, you can make your network projects better and do some really cool setups.

The best thing about using an L3 device with GNS3 is that we don’t need actual equipment. These network devices cost a lot of money, so buying them might not be possible. But with great software like GNS3, we can use these devices on our computers in a virtual environment.

What Can We Do with L3 Switch in the GNS3 Program?

This software lets us emulate a Cisco L3 Switch device, and that gives us a bunch of good things. First off, we can use it on our computer without having to buy a real one. Plus, we can use almost everything that an actual device can do, like all the cool features and commands.

For instance, with L3 devices, we can control where users can and cannot go using something called Access Control Lists (ACLs). In simple terms, we can stop a user from doing things like pinging with the ICMP protocol. L3 devices also have cool extras like Quality of Service (QoS). This helps network administrators set up priorities for how traffic moves around the network.

Another big reason we like using L3 devices is because of something called VLANs (Virtual Local Area Networks). With VLANs, we can split one physical setup into different make-believe groups. This helps us keep devices and computers logically apart in the network. To send data between these pretend networks, we use something called Inter-VLAN.

Also, we can use special rules called routing protocols like OSPF, EIGRP, RIP, or BGP. In short, they help us set up a network that can change and adapt more quickly.

Layer 3 switches can do something called Virtual Router Redundancy Protocol (VRRP) and Hot Standby Router Protocol (HSRP). When we use a Layer 3 Switch in the GNS3 program, it helps make sure our network stays working even if something goes wrong.

The things an L3 switch can do in GNS3 aren’t just these. It can also work with Network Address Translation (NAT) and Intrusion Detection Systems (IDS).

How to Add Layer 3 Switch (L3 Switch) on GNS3

Installing an L3 Switch in GNS3 is similar to installing a Cisco Router. So, you can use it to perform switching-based operations in the simulator.

When you put this device into GNS3, you can do things like VLAN, 802.1Q Trunking, and InterVLAN Routing.

First of all, click the button below to download the IOS image for your Cisco Layer 3 Switch to your computer.

Once you get the IOS image for the L3 switch on your computer, open up the network simulator and do the steps below.

Step 1

To add a new device to the system, start by choosing the Edit option in GNS3 GUI.

Clicking Edit from GNS3 Toolbar

Step 2

Inside the Edit menu, click on Preferences. This is where you can access and set settings up just the way you like them.

Opening Preferences

Step 3

Look for and click the IOS Routers tab in the General Preferences window. In short, this is where you handle routers that use the IOS system.

Dynamips / IOS Routers

Step 4

If you remember, we had added an L2 Switch from Qemu VMs before. Now, click the New button in the IOS Router templates window to add the L3 Switch.

Adding New IOS Router

Step 5

In the IOS Image window, start by choosing New Image. Then, click Browse to select the image for the IOS system from your files.

Selecting the IOS Router File

Step 6

Choose the IOS version you downloaded by clicking the button mentioned. After that, click Open to begin adding the chosen iOS version to GNS3.

Opening the Cisco Router c3640 File

Step 7

When GNS3 asks, say Yes to copy the IOS to the image folder.

Copying Image File to Default Location

Step 8

Once you’ve added the Switch IOS successfully, go to the next step by clicking Next. Then, move to the next part to keep going with the configuration or setup process.

Proceeding through the GNS3 Add Device Wizard

Step 9

In this step, choose This is an EtherSwitch Router, and then click Next.

This is an EtherSwitch Router

Step 10

Keep the RAM value for the Layer 3 Switch as it is, and then click Next.

Determining an Appropriate RAM Size for a Cisco Switch

Step 11

Choose the NM-16ESW in Slot 0 in the Network Adapters.

Adding NM-16ESW Interface

Step 12

Click on the Idle-PC Finder button to make your Layer 3 Switch IOS work better. In short, it figures out the best value for it to work well.

Finding Idle-PC Value for IOS Switch

Step 13

Wait a moment as the system figures out the Idle-PC value. This step is crucial to make sure your system works well and uses resources effectively. In short, this step helps find the best settings for your system. So, your patience here helps make sure the system works as smoothly as possible.

Your PC Finds a Value for Idle-PC

Step 14

Once you figure out the best Idle-PC value, click OK to move forward. So, this makes sure the IOS system works at its best.

Wizard Found the Appropriate Value for IOS Switch

Step 15

The image below tells us that we added the Layer 3 Switch (EtherSwitch Router) successfully.

Checking the EtherSwitch Router's Settings

Step 16

Start by dragging the Layer 3 Switch onto GNS3. So, drop it on the workspace to begin setting it up.

Adding Layer 3 Cisco Switch to GNS3 Workspace

Step 17

Please create a topology as follows: then, double-click on the L3 switch.

An Example Topology in GNS3

Step 18

To check the Switch, type the show vlan-switch command in the command interface (CLI).

Using the show vlan-switch command on L3 Switch

Set up the Switch by typing in 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

Set up the VPCS and check the connection by pinging the VLAN1 interface.

Pinging VLAN1 Interface from VPCSs

Step 20

The VPCS can ping each other without any problems.

Testing Network Connectivity Between VPCS with Ping

Show Commands:

1. show running-config

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 regular 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 completing 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#

2. show ip interface brief

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#

3. show vlan-switch

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

Video

Frequently Asked Questions About GNS3 Layer 3 Switch (FAQ)

  1. How do I access my Layer 3 Switch?
To access an L3 Switch, use a console connection. For network devices, use SSH, Telnet, or a web interface. However, you need to know the management IP address of the device. For a console connection, you can use tools like PuTTY or HyperTerminal. After connecting one end of the cable to the console port of your device, you should plug the other end into the serial port of your PC. Then, you can establish a link and configure it using terminal apps.
  1. How do I import Switches into GNS3?
Using L3 with GNS3 is super easy. To set up the device, get the image and go to GNS3’s Edit > IOS Routers. After that, click New, configure the settings, complete the wizard, and import it.
  1. Do I need a Layer 3 Switch for VLANs?
No, you don’t have to use L3 for VLANs in the real world or GNS3. You can make VLANs with L2 switches too. So, you can create VLANs with L2 switches too. If you want PCs in different groups to talk to each other, use L3.
  1. How do I know if the Switch is L2 or L3?
To find out what a switch can do, figure out its model and version. You can check this detail on the manufacturer’s website. To see what a device can do, use the ‘show version’ command. It gives you helpful info about the device’s setup and abilities. Also, look at the ip routing command in config mode.

 

Conclusion

To wrap it up, Layer 3 Switches are beneficial in big and complicated networks. So, they become essential tools for network administrators. When you use GNS3, you pretend to have devices on your computer. This means you don’t have to buy real hardware devices. So, it’s perfect for learning and testing. Also, Layer 3 has cool features like handling IP addresses and VLAN groups. This even lets you control who can get in based on specific rules. So, Layer 3 switches in GNS3 are helpful for both network experts and beginners.

Related Articles

1. GNS3 VM Network Settings
2. How to Install Router in GNS3
3. How to Use VLANs in Layer 2 Switch
4. How to Run GNS3 in Linux
5. How to Configure a Cisco Switch

3 Comments

Add a Comment

Your email address will not be published. Required fields are marked *