Switching simulation in GNS3

Frame Relay and ATM devices

An integrated Frame Relay switch is provided by GNS3. It is actually part of Dynamips. Just drag the Frame Relay switch from Nodes Types into the workspace. Right-click on the Frame Relay switch and choose Configure. Now you may assign your DLCIs at the source and destination – creating a frame relay map between the two.

In our example below, local DLCI 102 on port 1 is mapped to DLCI 201 on port 2. You cannot start, stop, suspend, or resume a frame relay switch. ATM switches are configured similarly.

Also note that the simple Frame-Relay switch only understant ANSI LMIs, don’t forget to set the LMI type on your Router’s serial interfaces (default type is CISCO) using the following command:

frame-relay lmi-type ansi

If you want more control over Frame-Relay, please configure an IOS instance to act as a Frame-Relay switch.

Ethernet Switch devices

GNS3 with Dynamips help integrates an Ethernet switch that supports VLANs with 802.1q trunking. Trunk ports trunk all VLANs known to the switch – no VLAN pruning here. It is just a basic virtual switch with limited functionality that provides the very basics you’d want in a switch. If you drag an Ethernet switch onto the workspace, right-click it and choose Configure, you’ll see the options you may set.

By default, there are 8 ports in VLAN 1 configured as access ports. However, you may in theory have up to 10,000 ports and up to 10,000 VLANs. You are limited to either access ports or dot1q trunking ports.

You may connect the switch to the real world through a cloud device. The Console window in GNS3 may be used to show and clear the MAC address tables using the following commands:

show mac switch_name
clear mac switch_name

You can also see the MAC address table by right-cliking on your Ethernet switch and then choosing MAC Address Table.

If want greater functionality that the virtual Ethernet switch provides that is integrated into GNS3, then you’ll need to add a router with an EtherSwitch card.

EtherSwitch Cards

You can buy an EtherSwitch card that may be inserted into a router. The card will function similar to a switch. In GNS3 you may also insert an EtherSwitch card into a router slot. The 7200 series routers do not support this adapter but many of the router platforms available in GNS3 do. The EtherSwitch card that is supported is the NM-16ESW. Here is a list of some of the features supported by the NM-16ESW card.

  • Layer 2 Ethernet interfaces
  • Switch Virtual Interfaces (SVI)
  • VLAN Trunk Protocol (VTP): domains, all modes (server, client and transparent), pruning and passwords.
  • Trunking: 802.1Q only, no ISL, no dynamic auto or dynamic desirable mode.
  • EtherChannel: no LACP and Pagp support. Manual configuration supported.
  • Spanning Tree Protocol: simple STP supported but no MSTP, RSTP or other advanced stuff.
  • Cisco Discovery Protocol
  • Switched Port Analyzer (SPAN)
  • Quality of Service: mls qos commands and mls qos maps are supported.
  • IP Multicast Support
  • Storm Control
  • Flow Control

However keep in mind that this module works differently than a real Cisco switch and doesn’t support all the features of a Cisco Catalyst Switch. At this moment, it is not possible to emulate Catalyst switches with Dynamips/GNS3. This is due to the impossibility to emulate ASIC processors used in those type of devices. Please see the hardware emulated page for a complete list of missing features for EtherSwtich module.

Not all commands that exist on an actual switch are supported by the NM-16ESW card, but as you can see, using an EtherSwitch card gives you a lot more features than the integrated virtual switch. If you wish to use this card, I recommend that you download the documentation from Cisco’s official EtherSwitch module page. Only vlan database mode is possible (not the newer global configuration mode) and the show vlan command is show vlan-switch, for example.

To use the card, just add a router and include the NM-16ESW adapter or the EtherSwitch router device if you have configured a c3700 IOS image in GNS3.

Connecting real Cisco switches

Another solution, which is used by people studying for CCIE R&S, is to connect real Cisco Catalyst switches to your virtual GNS3 topology. A special section is dedicated to it.

What next?

You may also like these posts


Leave a comment

If you have a question, update, or comment about the article, please leave a comment. We try and respond to every comment, though it may take a few days, so please check back soon.

1 comment to VirtualBox

  • Anonymous

    This guide doesn’t explain what it is trying to achieve. It tells you what Virtualbox is but not what the end result is. It also doesn’t explain what the topology is (is it Virtualbox emulating two PCs on one physical PC?) or how you go about connecting to your host and editing your GNS3 preferences. I also don’t understand what The Linux Microcore is and how it relates to this example. The ‘linked clones’ seem to be over-complicating things and I can’t tell how you go about emulating routers, the prime purpose of this software. A good guide with some fairly fundamental mistakes.