How To Emulate Switches

These methods are not guaranteed to emulate 100% of the switching functions. However, they provide more than 90% of the switching features most network engineers need for CCNA/CCNP preparation.

There are many options:

  • GNS3 routers with NM-ESW16 modules
  • GNS3 with Virtual IOS Layer 2
  • GNS3 with IOU L2 images
  • Unified Networking Lab

First, read this post to add IOS images.

GNS3 routers with NM-ESW16 modules

A router can be equipped with a NM-ESW16 module to fulfill the functions of an EtherSwitch Module. This module provides many layer 2 switch functionnalities.

nm-16esw Etherswitch Module

The only type of routers that supports the NM-16ESW EtherSwitch module and is also supported by GNS3 is the Cisco 3725 router.

 GNS3 with Virtual IOS Layer 2

Nathan Ash has written a clear tutorial for this.

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_46_57

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_47_03

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_47_12

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_47_25

For the RAM value, choose something that’s higher than 380 MB then click Next.

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_47_44

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_47_52

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_48_14

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_48_22

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_48_38

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_48_49

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_49_03

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_52_44

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_52_59

GNS3-qemu-VM-vIOS-l2-2015-11-08 19_53_47

One thing to mention though. Make sure to choose the right version of Qemu binary when you add the vIOS-L2 image. I have a Windows 7 64 bits and I first used the default Qemu binary and I got a Network Connection failure message. I thought it was a firewall issue at first. But I realized it was something with the Qemu binary and I changed the setting to qemu-system-x86-64w.exe



GNS3 with IOU L2 images

This technique uses a virtual IOS for Layer 2 and run it on Qemu. Then GNS3 interfaces with Qemu to manipulate the virtual IOS.

You need to have a vIOS-L2 Vmware image (vIOS-l2.vmdk) for this technique.

Here are a couple of great resources:

Download Virtualbox.

Download The GNS3 IOU VM.

Follow the steps in this blog.

When trying to install VirtualBox, you may encounter the error “Windows Installer Service could not be accessed..” then I recommend you check some of the workaround mentioned in this link.

One thing I’d like to cite is to check your GNS3 client version:

GNS3-2015-11-08 19_32_56

GNS3-2015-11-08 19_33_00

My current GNS3 client version is 1.3.11. Why is this important? Because the GNS3 client version must match the GNS3-server version that is on the VirtualBox VM. Otherwise, you’ll get an error like this:

=> Error while creating project: Client version 1.3.11 differs with server version 1.3.0

The solution is to upgrade the server inside the IOU VM (credit to Julien Duponchelle):

  •  Stop the VM in VirtualBox, either from Virtualbox or from the VM command line

2015-11-08 17_03_44-GNS3 IOU VM [En fonction] - Oracle VM VirtualBox

  • Go the virtualbox settings and change the network adapter from host only to nat

2015-11-08 17_01_39-Oracle VM VirtualBox - Gestionnaire de machines

2015-11-08 17_01_52-GNS3 IOU VM - Paramètres

  • Boot the vm

2015-11-08 17_02_03-Oracle VM VirtualBox - Gestionnaire de machines

  • Upgrade the GNS3 server version with the PIP command. For example, if your GNS3 client version is 1.3.11, then the GNS3-server version must also be 1.3.11, and we issue the follwing command on the VM:
 pip3 install gns3-server==1.3.11
2015-11-08 17_03_19-GNS3 IOU VM [En fonction] - Oracle VM VirtualBox
  • Stop the VM
  • Go the virtualbox settings and change the network adapter from nat back to host only

2015-11-08 17_04_11-GNS3 IOU VM - Paramètres

2015-11-08 17_04_18-Oracle VM VirtualBox - Gestionnaire de machines

Files needed

Files for Cisco IOU and GNS3

Files for Cisco vIOS on GNS3

  • GNS3 latest version
  • vIOS L2 image

Files for Unified Networking Lab

  • UNL file
  • VMware Workstation or VMware player

Useful links to build a switching lab

How To Connect Cisco IOU and Emulate Cisco Switch in GNS3 1.1

How to Emulate a Cisco Switch

Layer 2 Switch With Full IOS in GNS3

Connection Problem With The Latest vIOS Image in GNS3

Unified Networking Lab OVA file

Unified Networking Lab: Documentation

Leave a Comment

Ads Blocker Image Powered by Code Help Pro
Ads Blocker Detected!!!

My blog has detected that your browser is blocking ads.

Ads generate tiny amounts of money that could help me pay hosting services for this blog.

Please disable your ads blocker to continue.