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.

4 comments to Quick Start Guide for Linux Users

  • Fernando López

    Hello!

    I would like to ackowledge your work. GNS3 it’s simply fantastic. However i have some trouble in gns3 over Linux debian 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux.

    I have installed gns3 through apt’s tools as usual. The package is:

    Package: gns3
    Version: 0.7.4-1
    Installed-Size: 18020
    Maintainer: Erik Wenzel
    Architecture: all
    Depends: python (>= 2.6), python-support (>= 0.90.0), dynamips (>= 0.2.7-0.2.8RC1), python-qt4 (>= 4.3), ucf

    Before these installation, i had installed first qemu and some other qemu packages related, dynamips and virtualbox.

    Package: qemu
    Version: 1.1.2+dfsg-6a
    Installed-Size: 371
    Maintainer: Debian QEMU Team
    Architecture: i386
    Depends: qemu-system (>= 1.1.2+dfsg-6a), qemu-user (>= 1.1.2+dfsg-6a), qemu-utils (>= 1.1.2+dfsg-6a)
    Suggests: qemu-user-static

    Package: dynamips
    Version: 0.2.7-0.2.8RC2-5.1
    Installed-Size: 938
    Maintainer: Erik Wenzel
    Architecture: i386
    Depends: libc6 (>= 2.7), libelf1 (>= 0.131), libpcap0.8 (>= 0.9.8)

    Package: virtualbox
    Version: 4.1.18-dfsg-2+deb7u1
    Installed-Size: 45774
    Maintainer: Debian Virtualbox Team
    Architecture: i386

    All of them have been installed without problem. However I have no options for virtualbox in the window of preferences in gns3 as i can see in the pic that show this web http://www.gns3.net/documentation/gns3/quick-start-guide-for-linux-users/#respond

    So, i must to use qemu host (i have an tinycorelinux as image), and, however the testing process of qemu is passing, i can’t opening a functional terminal or serial console in gns3:
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is '^]'.

    After that, the console is inoperative.

    Nor installing all the software througth the gns3′s package ist giving me an operative application.

    A greeting!

    • Jeremy

      Do not use version 0.7.4, updated Debian packages for Dynamips and GNS3 are available from the download page but still considered under testing.

  • Hello …

    I use GNS3 on Slackware 13.27 machines and WinXP. Runs smoothly on both machines. based on my experience, the second method “Using a Router that Acts Like a PC” -if the router c1700 pc has the right idle-, cpu load will be lower than using qemu, which means lower resource?
    Once again thank you for this great software
    best regards

    • Jeremy

      Hello,

      Yes, with the router c1700 acting as a PC and the right idlepc, it is very likely the CPU/RAM will be lower than using Qemu.