Emulating Cisco networks for fun and profit

Free open source GNS3 provides a fantastic framework for designing, building, and testing complex networks right on Windows, Linux, or Mac OS X

Page 2 of 3

In the GUI editor, you can add interface modules to the routers, select the link types you want to use (ATM, T1, Fast Ethernet, Gigabit Ethernet), and link the routers, firewalls, and even emulated host systems. Virtual Ethernet and ATM switches are available with VLAN and trunking support.

I've found that GNS3 functions best on the Linux platform, and there are step-by-step guides to install it on Ubuntu. The Windows version comes complete with all the requisite supporting packages, and the Mac OS X version provides everything but QEMU, which can be a hassle to install unless you're versed in the use of MacPorts. I built my installation on CentOS with few problems other than compiling Qt 2.4.3, SIP, PyQt, and a patched QEMU from scratch. All told, the install on CentOS took about 45 minutes, mostly waiting for various packages to compile. On Windows, the install is basically just a double-click, roughly the same for Ubuntu.

Once you have everything in place and built your virtual network, each device can be accessed via console. In my setup, I emulated the Layer-3 switched environment of three sites connected by 100Mbit links to a central router that functioned as the provider cloud. I was able to configure and test internal routers for each site, and do all the LAN-to-LAN VPN configurations on the ASAs. I was also able to implement all of the OSPF over VPN and QoS configurations that would be necessary in the production environment and to test the rule sets. In order to run full testing of QoS rules and whatnot, hosts were needed at each virtual site to generate certain types of traffic. Luckily, that's not a problem in GNS3.

I built a custom Qemu image of a minimal CentOS 5.4 system and linked it to GNS3. This allowed me to drop several virtual Linux systems into each emulated site. Once they booted, they were the perfect tools to test the entire network configuration. It does take some twiddling to get the images right. They must be set to boot with a serial console if you wish to use GNS3's built-in console connections, and CentOS's habit of trying to get DHCP for each new interface is a bummer when you have six interfaces per virtual host. But once those hurdles are overcome, the image can be dropped into the network anywhere in a matter of seconds.

GNS3 also has the capability to pull the running configurations from all of the routers at once and save them to a specified directory. This isn't possible for the ASAs, as they are not emulated the same way as the routers, but it's not difficult to pull those configurations either. Also, GNS3 allows for the inclusion of a "cloud" in the virtual network that can be linked to a physical Ethernet interface on the host system, so your virtual network can connect to the real world should you need that. There's also built-in support for packet capture, so you can pull apart traffic flowing across your simulated links and dig right into the stream with Wireshark.

Each device in your GNS3 virtual network can be accessed via console. Above is the console of an emulated Cisco 3600 series router. Below is the console for a QEMU image of CentOS linked to the GNS3 environment.


| 1 2 3 Page 2
From CIO: 8 Free Online Courses to Grow Your Tech Skills