How to Add Layer 2 Switch in GNS3

Adding a Layer 2 Switch to GNS3 can significantly improve your practice sessions if you prepare for Cisco pass exams. Using a network device such as an L2 Switch involves creating a new project, selecting its type, and configuring its settings. Also, this device lets you connect your virtual computers or other network devices.

After setting up the switch, you can use various switching concepts such as VLAN, STP, and EtherChannel in your topology. In short, you can gain valuable experience and improve your skills before taking the genuine exam by simulating devices used in the real world.

Adding Layer 2 Switch in GNS3

Importance of a Layer 2 Switch in GNS3 Networking

A Layer 2 switch is a network appliance that works at the Data Link layer in the OSI model (Layer 2). This means that it uses MAC addresses to send messages between devices on the network. Primarily, it links devices on the web and helps them talk to each other.

Layer 2 switches are essential parts of today’s computer networks. They make things go fast and prevent the network from getting too busy by sending traffic only to the right places.

Also, L2 devices help network managers split networks and better manage how traffic moves around. They use VLANs (Virtual Local Area Networks) to do this. Without this device, keeping a network stable and working well would be hard.

Using a Layer 2 Switch on GNS3

Once you install GNS3 on your PC, things like Cisco Switch or Router don’t automatically come with it. So, you need to set up these devices yourself.

For instance, if you want to add a Layer 2 Switch into GNS3, you must start by getting the IOS image. After that, you add it from the QEMU part of the program.

If you’re getting ready for Cisco exams, practicing with L2 devices like switches is critical to learning about Switching.

When setting up a Layer 2 switch, you might only use some cool things physical devices can do. That’s because some IOS images don’t support every feature.

For instance, after putting in a vIOS Switch image, you can set up things like VLAN, VTP, and STP configurations.

How to Add and Configure L2 Switch in GNS3

First, click the button below to download the image of Switch (vIOS-L2.vmdk).

Download vIOS-L2

Step 1

To use the Switch IOS file, first download it and then open the GNS3 emulator program. Once the program is open, click on the Edit button.

GNS3 / Edit

Step 2

To access the Preferences settings, go to the Edit menu and click on it.

GNS3 / Edit / Preferences

Step 3

To find QEMU virtual machines in the General Preferences, go to the QEMU tab and pick QEMU VMs.

Qemu VMs

Step 4

To make a new QEMU virtual machine template, click the New button.

Qemu VMs / New

Step 5

Please enter a name for the Layer 2 Switch in the Qemu VM name window.

Qemu VM Name

Step 6

In the Qemu settings for the binary and memory, if your operating system is 64-bit, choose the option shown in the picture below.

Qemu Binary

Step 7

Also, set how much RAM the switch should have in this window and click Next.

Setting the RAM for the L2 Switch

Step 8

To select a new image, click the “New Image” option and then the “Browse” button.

Selecting an Image File

Step 9

Choose the vIOS-L2.vmdk file you downloaded, then click Open in the pop-up window.

vIOS-L2.vmdk

Step 10

Next, confirm the addition by clicking “Yes” to start copying.

Confirm Default Location

Step 11

Once you have identified the position of the image, click on the “Finish” button.

Locating IOS

Step 12

The Qemu VM Templates window confirms the successful placement of the Layer 2 Switch.

QEMU VM Templates

Step 13

Right-click on the Layer 2 Switch from the Devices section.

Configuring Layer 2 Switch

Step 14

Please press the Configure Template button to change the template’s appearance.

Configure Template

Step 15

To configure the Layer 2 Switch, first open the configuration window. Next, select the ‘Switches’ group from the ‘Category’ menu.

Category / End Devices

Step 16

To change the Layer 2 Switch’s symbol, click the Browse button.

Category / Switches

Step 17

To choose a logo, you can refer to the image below.

iosv_l2

Step 18

Click OK to keep your settings after changing the switch symbol.

Closing Switch Settings

Step 19

Please drag and drop the “Layer 2 Switch” icon to the workspace.

Add Switch to Workspace

Step 20

To add the interface to the switch, right-click the Configure button.

SW Configuration

Step 21

You can add interfaces to the Switch from the Network tab.

L2 Switch / Network Settings

Step 22

Open the CLI prompt by double-clicking the switch. Afterward, check the device status using the ‘show vlan brief‘ command.

show vlan brief

Command Output:

vIOS-L2-01#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi0/0, Gi0/1, Gi0/2
100 VLAN100 active
200 VLAN0200 active
300 VLAN0300 active
1002 fddi-default act/unsup
1003 trcrf-default act/unsup
1004 fddinet-default act/unsup
1005 trbrf-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
100 enet 100100 1500 - - - - - 0 0
200 enet 100200 1500 - - - - - 0 0
300 enet 100300 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 trcrf 101003 4472 1005 3276 - - srb 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trbrf 101005 4472 - - 15 ibm - 0 0
VLAN AREHops STEHops Backup CRF
---- ------- ------- ----------
1003 7 7 off

Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------

vIOS-L2-01#

Video

Frequently Asked Questions About Switches in GNS3

  1. Does GNS3 support L2 or other devices?
Yes, GNS3 can support Layer 2 switches. But, when you first get it, it doesn’t come with pictures or software for actual devices. So, you have to put IOS files from Cisco or other companies into the program yourself.
  1. How do I add a new network Layer 2 device to GNS3?
To add a new Layer 2 network device to your emulator program, you should first look at the GNS3 settings. To do this, go to Preferences > QEMU > QEMU VMs. Then, choose to add a new device, specify the appropriate amount of RAM, and add it. Finally, close the wizard and start using it by including it in your project.
  1. What are the switch types in GNS3?
GNS3 supports a wide range of switches from different vendors. These include Cisco switches such as IOSvL2, IOSv, and NX-OSv. Additionally, it supports devices like Juniper vSRX and QFX. Furthermore, it also supports some devices from other vendors like Arista, HP, and Dell.

Conclusion

When preparing for Cisco exams, putting a Layer 2 switch into GNS3 is a big deal. This device lets you pretend to be in different network situations as they happen in real life. It’s perfect for practicing with VLANs, STP, and EtherChannel. Following the steps in this guide, you can easily add and set up an L2 network device in GNS3. As a result, this boosts your skills and helps you do well in your exams.

39 Comments

Add a Comment

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