A few months ago, I wrote "Eight ways to strengthen your Cisco networking skills," and the second suggestion I listed for improving your abilities was to use a simulator. However, while simulators are useful, there's something even better that you can get for free -- an emulator.
What's the difference? A simulator attempts to re-create the Cisco IOS using a programming language, but an emulator takes the real IOS router code, which you supply, and emulates the hardware behind it so you can run the real IOS on your PC.
With a simulator, there are always missing commands and programming errors, and it can never really be as complete as the real IOS. However, because an emulator runs the IOS, you get every feature that the real IOS has (based on the limitations of the emulated hardware, of course).
For example, if your emulated hardware has a Gig Ethernet interface, and the IOS supports a Gig Ethernet interface on that platform, then you can use the Gig Ethernet interface. If, however, your emulated hardware doesn't have a VoIP FXS card, then you wouldn't be able to configure one in the Cisco IOS, even if the IOS supported it.
What is Dynamips?
You can use the Dynamips Emulator for training purposes and testing configurations. You can create configurations and later deploy them to real routers. The Dynamips Emulator can boot IOS images from 7200, 3600, 3700, and 2600 series routers, even including the latest and greatest 12.4T IOS (something that my old 2600 router can't do because it doesn't have enough RAM).
One caveat is that you must supply the IOS for any router that you're going to emulate. It is, of course, illegal to distribute the IOS and only legal to obtain it by purchasing and downloading it from Cisco. However, if you already have a router that's one of these models, you can copy that IOS into the Dynamips Emulator for testing and training purposes.
What is Dynagen?
Dynagen is the text-based front end for the Dynamips Emulator. It allows you to automatically provision Dynamips-emulated networks. It has a large following, supported through 7200emu.hacki.at Forum for Dynamips & Dynagen.
Now, as much as I like using Dynamips and Dynagen together, their configuration can be challenging for new users to understand. However, a package called GNS3 helps make it easier.
What is the Graphical Network Simulator?
A new open source project that helps improve on Dynamips is the Graphical Network Simulator (GNS). Linked to Dynamips and Dynagen, GNS3 is available precompiled for Windows, and the source is available if you want to run it on Linux or Mac OS X.
The GNS3 Windows all-in-one installation package includes Dynamips, WinPCAP, and GNS3. Let's walk through installing and using GNS3.
First, I downloaded the GNS3 Windows all-in-one package and installed it. To install WinPCAP, I did have to reboot my PC. Once installed, I ran GNS3 from the desktop icon the installation process created.This brought up a nice GUI interface that was similar to some of the Cisco IOS simulators I've seen. I was able to quickly create a sample network by dragging and dropping router icons and then connecting them with the Connection tool. Figure A offers a screenshot of what it looked like.
After creating the network, I did have to add my IOS images because GNS3 didn't provide them. To add IOS images, go to Edit | IOS Images and Hypervisors. Figure B shows a screenshot of what it looked like after I finished.
Next, I started the Dynamips Emulator by go to Preferences | Dynamips and clicking Test. Figure C offers a screenshot.
From here, I could configure the specifications for the router -- amount of RAM, Flash, cards in slots, and configuration-register. Next, to use the network, click the Emulation Mode button. Once in Emulation Mode, click the Play button to start the IOS instances of all routers. Figure D offers a screenshot.
This launches a console for each router, and it boots up the routers, as shown in Figure E.
As you can see, just like a real test lab with multiple routers, I was able to configure these two routers to communicate with each other by configuring IP addressing, enabling the interfaces, and configuring a routing protocol. Figure F shows how I configured basic RIP routing and how the router received a RIP route from the other router.
While I recommend building your own lab so you can get a better understanding of how it works, there are also some sample labs available when you install Dynagen. I've also seen some sample labs and an entire CCIE commercial lab workbook, all based on using Dynamips, on the Internetwork Expert Web site.
The ability to run multiple routers inside your PC is very useful for testing and training. It can save you the time and trouble from having to invest in a test Cisco network, and it certainly makes it more convenient. I hope that by trying and using GNS and Dynamips, you can become a better Cisco network administrator.
Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!