Switches in GNS3
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.
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.