Friday, June 14, 2024

Graphical Network Simulator that can Run on a Raspberry Pi

- Advertisement -

Here is a cool tool for learning and testing in a simulated environment. Use this open source and free tool to design and test your own network with various network hardware devices and hosts, all on your Raspberry Pi. Read this article to know what it does

Pankaj V.

Fig 1: End devices

GNS3 is a graphical network simulator which provides you a real lab environment for learning and testing complex networks. With this tool you do not need to have dedicated network hardware devices. You can design and configure virtual networks on a traditional PC or a Raspberry Pi, and simulate in the closest possible way to how the real networks perform.

If you want to design and test your automation system network, GNS3 can just work fine for you. It allows you to run many virtual hosts with operating systems such as Linux, Windows, MacOS X or FreeBSD.

Integrated solution for network emulation
It uses the Dynamips, Pemu/Qemu and Dynagen emulators to run the very same operating systems as in real networks, ensuring complete and accurate simulations. Dynamips is the core program that allows IOS emulation.

- Advertisement -
Fig 2: GNS3 main window

Other emulation programs, namely Qemu, Pemu and VirtualBox, are used to emulate Cisco ASA and PIX firewalls, Cisco IPS, Juniper routers as well as hosts (Linux, Windows, MacOS X and FreeBSD). GNS3 integrates all the emulation and allows you to work in a real lab environment to have your host talking to your routers.

Better graphical front-end for ease of use
The GNS3 software provides an intuitive graphical user interface (GUI) to design and configure virtual networks running on traditional PC hardware for multiple operating systems, including Windows, Linux and MacOS.

GNS3 serves as a graphical front-end for the network emulators. For instance, using network emulators such as Dynagen or Dynamips independently will require you to build your labs using configuration files, but using a graphical tool like GNS3 makes things a bit easier for you.

GNS3 runs on top of these emulators to create a more user-friendly and graphical environment. You can click and drag different routers to your screen, hit a start button and start learning and testing.


Fig 3: Routers
Fig 3: Routers

While GNS3 is developed in Python, its GUI is made with the powerful Qt library. SVG technology (scalable vector graphics) in its GUI provides high-quality symbols for designing your network topologies.

The user-friendly GUI window is divided into four panes and provides you with all the options to create network topologies at the very first sight. Different types of network nodes are available at the leftmost pane. Clicking onto any node symbol will provide you with the list of various types of that node. For example, different routers, Ethernet switch, ATM bridge, ATM switch, frame relay switch, cloud, Qemu and VirtualBox guests will appear after clicking on the specific node symbol.

The rightmost pane provides a topology summary where your connections can be viewed and nodes can be renamed. The top pane in the middle is your work area where you can build your topology graphically while the bottom pane is the GNS3 management console. A shortcut menu is at the top which provides all the relevant shortcuts for your working with the created topologies.

Memory and CPU usage

1D7_ListRunning an IOS can consume up to 100 per cent of your CPU time and cause your computer to become very sluggish and prevent building more complex topologies. Also, building labs can consume a large amount of real and virtual memory.

GNS3 has in-built functionality to address these issues and ensure smooth functioning of the tool. An idle-pc value, dependent on the IOS version and not the PC, can be included to address the CPU usage. ghostios and sparsemem options are added to address the memory issues.

The idlepc value command performs analysis on a running image to determine the most likely points in the code that represent an idle loop in the IOS process and makes the virtual router to ‘sleep’ occasionally when this idle loop is executed, reducing the CPU consumption.

You can choose Idle PC by right clicking onto the router and an Idle PC value will be calculated, and then click the drop down arrow to see a list of possible idlepc values. You can select any one of the values with an asterisk (recommended values).

The ghostios option significantly reduces the amount of real host RAM needed for labs with multiple routers running the same IOS image, and the sparsemem feature, on the other hand, does not conserve real memory, but reduces the amount of virtual memory used by your router instances.

You can select Preferences under the Edit menu and check the appropriate boxes to enable these features.

Other features

2ZE_Box_2As mentioned above, GNS3 is not just a simulator, it is also an emulator. It can emulate a long list of router platforms and other devices. Additionally, if you use an EtherSwitch card in a router, switching platforms can also be emulated depending upon the degree of the card’s supported functionality.

It uses a TCP/IP communications channel for the Dynamips hypervisor mode, which means you can run GNS3 on one machine and the Dynamips emulator on a different machine. So, GNS3 provides you the flexibility of working with a remote host machine, if required.

Another key feature of this tool is that you can use it to connect your virtual devices with real network hardware. Although the provided switching environment is limited for networking personnel who want to make more advanced switching labs, it is good enough for the people who want to study for their networking certifications.

GNS3 as a learning tool
GNS3 can emulate most of the router platforms and other network devices. You can use GNS3 as an alternative or complementary tool to real labs and simulate Cisco and Juniper topologies.

Also, the VirtualBox support in GNS3 allows even system administrators and engineers to utilise GNS3 to make labs and test network features.

Additionally, the high level of accuracy in simulations makes GNS3 a suitable choice to experiment with features or to check configurations that need to be deployed later on real devices. For example, you can connect your virtual network to real ones or capture packets using Wireshark to start with your experimentations.

Why GNS3

Fig 4: Switches

The key feature which sets GNS3 apart from the other router simulators in market is that you can actually work on the same operating systems as in real networks and simulate them with higher accuracy in virtual environment.

There are several other router simulators in the market, but with the downside of being limited to the command line that a developer can choose to include. Also, these are not always accurate as the real network.

Most likely, you will find some commands or parameters which are not supported when working on a practice lab. Moreover, the other simulators can only provide a representation of the output of a simulated router where the accuracy of such representations depends only on the developer. But with GNS3, which allows you to run an actual Cisco IOS, you can see the exact output the IOS produces and have access to any command or parameter supported by the Cisco IOS.

Additionally, GNS3 is an open source, free program for you to use. However, licencing restrictions require you to provide your own Cisco IOSs to use with GNS3. Also, throughput provided in a virtual environment by GNS3 is around 1000 packets per second while a normal router will provide a hundred to a thousand times greater throughput.

We do not say GNS3 can take the place of a real router, but it is a tool for creating a lab environment which can provide you a good learning and testing closest to the real ones.

Additional support
To download the latest versions and support, visit the official website Official documentation and video tutorials are available at the website for your help. For any technical support, you can contact GNS3 community forum and social media sites. Also, a collection of exercises/labs to learn more with GNS3 is available at the website.

An IRC channel is also available on Freenode dedicated servers, which can be accessed via irc:// You can talk about anything concerning GNS3—future releases, new features and ideas on this channel.

Start simulating
Now you can experiment with configuring virtual networks on a PC or a Raspberry Pi running Linux, and simulate in the closest possible way to how the real networks perform.

The author is a technical journalist at EFY


Unique DIY Projects

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components