How To Use Switches in GNS3 – Switching Simulation

In order to perform the lab exercises that require switches in GNS3, first, you need to add and configure switches in GNS3. There are three options to simulate switching in GNS3.

  1. Use an Ethernet Switch in GNS3.
  2. Add a Layer 2 Switch in GNS3.
  3. Add a Layer 3 Switch in GNS3.

Ethernet switches are included in the GNS3 console, by default. However, you cannot take console of or configure an Ethernet switch in GNS3 that is added by default. An Ethernet switch in GNS3 provides just the basic connectivity option, nothing else. So, it cannot be used to perform VLAN, VTP, STP lab exercises. If you are looking for switching emulation that can be used to perform VLAN, VTP, InterVLAN routing functions, you have to use a layer 3 switch.

In this post, we will focus on how to add and use switches in GNS3 (especially layer 2 switches). For this, you need to add a Qemu VM in GNS3 that will act as a Layer 2 switch. This switch can be used to perform VLAN, VTP, STP, and other switch-based lab exercises. Since it is a simulated method, it may not support all of the features provided by the traditional physical switches.

Switching Simulation in GNS3

To add and configure switches in GNS3 (Switching Simulation), you need to perform the following steps:

  1. Download and extract the IOSv-L2 VMDK image file. [Image Credit: Nathanash]
  2. Once you have downloaded the VMDK file, open the Preferences window in GNS3 by navigating Edit and Preferences in the GNS3 console.
  3. Select Qemu VMs in the left pane and then click New to add a new Qemu VM template.Add and use switches in GNS3
  4. On the QEMU VM Type page, select IOSv-l2 in from the Type drop-down list and then click Next.
  5. On the QEMU VM name page, specify a name for this Qemu VM in the Name text box. Click Next to proceed.
  6. In the QEMU binary and memory page, select the binary directory. If you select x86 binary for the 64-bit system, you might get an error during opening the console of the switch in GNS3. Hence, select the appropriate binary depending on the type of architecture of your system. Click Next to proceed.Switching simulation in GNS3
  1. On the Disk image page, select the New Image radio button. Browse and select the IOSv2-l2 VMDK file that you have downloaded previously. Click Finish to close the New QEMU VM template window.
  2. Drag the recently added switch in the work view area and start the switch.Layer 2 Switches in GNS3
  3. Open the console of the added switch. Let’s complete the booting process. If everything goes in the right way, the console of the switch will be displayed.Adding Cisco switches in GNS3

Now, start to perform switching labs in GNS3. We hope, you have loved and enjoyed it.

Posted in CCNA, GNS3 Tutorials, Switching Tagged with: , ,
3 comments on “How To Use Switches in GNS3 – Switching Simulation
  1. someone says:

    i`ve done all the steps except selecting IOSv-l2 from drop down list because the 1st thing that pops when creating the new VM is choosing a name and then the image there is no option to choose the type IOSv-l2. and the layer 2 switch doesnt appear, what can i do?

    • facundo says:

      hello someone,

      have you tried adding the default path to your vms folder to the vmware ini file? find it on the path below, it’s called preferences.ini

      edit the file by adding the line below..
      prefvmx.defaultvmpath = “PATH_TO_YOUR_VMs_FOLDER”

      hope that works =)

  2. MasterD says:

    Hello, how can I optimize the CPU of my computer when using IOSv2-l2 VMDK?
    There is no option or equivalent to “Idle-PC” as on classic IOS images.