Introduction to GNS3 in Linux
GNS3 (Graphical Network Simulator 3) is an open source platform that allows you to create virtual network laboratories using real images of router, switch and other network devices operating systems. When running on a Linux distribution, GNS3 benefits from the stability, performance and flexibility of the kernel, which translates into a simulation experience very close to that of a physical environment.
Why Linux is the best partner for GNS3
Linux offers several advantages that make it ideal to run GNS3:
- Native access to virtualization technologies like KVM and QEMU, which are the engines behind the router emulation.
- Greater control over network permissions, facilitating the creation of bridges, taps and namespaces without relying on additional graphic tools.
- Frequently updated repositories that provide the latest versions of GNSS 3 and its dependencies.
- Low resource consumption on headless servers, perfect for remote or cloud laboratories.
Hardware and software requirements
Before starting the installation, check that your equipment meets the following minimum:
- Recent Linux distribution: Ubuntu 22.04 LTS, Fedora 38, Debian 12 or equivalent.
- Processor with virtualization support (Intel VT-x / AMD-V) enabled in BIOS.
- At least 4 GB RAM (8 GB recommended for multi-router laboratories).
- 20 GB free disk space for IOS images and virtual machines.
- Internet connection to download packages and, optionally, operating system images.
- User with sudo privileges.
Installation in Ubuntu and Debian
The following steps assume that you are using a Debian-based distribution:
- Update the package index:
sudo apt update && sudo apt upgrade -y - Add the official GNSS repository:
sudo add-apt-repository ppa:gns3/ppa - Install the graphical interface and server:
sudo apt install gns3-gui gns3-server -y - During installation, select «Local server» to run everything on your machine.
- Add your user to the groups needed for access to bridges and KVM:
sudo usermod -aG ubridge,kvm $USER - Close the session and start it again so that the group changes take effect.
Installation in Fedora and Red Hat
In RPM-based distributions the process is similar:
- Enable the GS3 COPR repository:
sudo dnf copr enable @gns3/gns3 - Install the package:
sudo dnf install gns3-gui gns3-server -y - Start and enable the GNS3 service:
sudo systemctl enable --now gns3.service - Add your user to the groups
ubridgeandkvm:sudo usermod -aG ubridge,kvm $USER - Reset the meeting.
Obtaining and configuring IOS devices
To emulate Cisco routers you need an IOS image. Note that their use is subject to licences; you can get them from:
- Cisco's CCO account (evaluation or contract images).
- Free images like VyOS, FRR or OpenWRT, which work well for routing and switching without legal restrictions.
Once you have the image, follow these steps in the GNSS interface:
- Go toEdit → Preferences → IOS routers → New.
- Indicates the route to .img or .bin file and assigns the amount of RAM (e.g. 256 MB).
- Save the configuration and check that the router appears on the device panel.
- Recommendation: create a profile called «IOS-Base» and double it for every router you need, modifying only the RAM or CPU according to the expected load.
Creating your first practical lab
With the routers ready, you can mount a simple topology to validate the connectivity:
- Drag two routers (R1 and R2) to the work area.
- Connect them using an Ethernet link using the connection typeAuto-Negotiate.
- Assign IP addresses to each interface, for example: R1 eth0 = 10.0.0.1 / 24, R2 eth0 = 10.0.0.2 / 24.
- Start both routers by right clicking →Start.
- Open a console for each router (right click →Console) and verifies the configuration with
show ip interface brief. - From the R1 console, run
ping 10.0.0.2to confirm connectivity.
This scenario serves as a basis for experimenting with routing protocols such as OSPF, BGP or MPLS simply by adding more routers and configuring routing processes in each.
Docker and container integration with GNS3
GNS3 allows you to connect Docker containers as devices in your topology, which is useful for simulating servers, firewalls or web applications:
- InEdit → Preferences → Docker containersadds a new template indicating the Docker image (e.g.,
nginx:latest). - Assign the ports you want to expose and the amount of RAM / CPU.
- Drag the container into the work area and connect it to the routers using Ethernet links.
- Start the container and check its access from the console of a router using
telnetorsshaccording to the image.
This capacity opens the door to data center laboratories, SD-WAN and safety policy tests without physical hardware.
Automation using the GNSS API 3
GNS3 presents a REST API that facilitates the creation, modification and elimination of projects by scripts. Some examples of use:
- Create an empty project:
POST /projectswith a JSON containing the name and route. - Add a router to a project:
POST /projects/{project_id}/nodesspecifying the IOS template and position. - Start all nodes:
POST /projects/{project_id}/nodes/{node_id}/start. - Collect traffic statistics:
GET /projects/{project_id}/links/{link_id}/statistics.
You can combine these calls with tools like Ansible or Python to create continuous test pipelines (CI) that validate configuration changes before applying them in production.
Common problem solution
Although GNS3 is quite stable, some inconvenience may appear. Here are the most common solutions:
- Error when creating bridges:Make sure the user belongs to the group
ubridgeand that the servicenetwork-manager no esté gestionando las interfaces que intentas usar. - Rockets that do not start:Verifies that the IOS image is compatible with the installed QEMU / KVM version and that the assigned RAM does not exceed the available memory.
- Performance loss:Close applications that consume a lot of CPU and check that nested virtualization is enabled if you are running GNS3 within a VM.
- Audio problems in consoles:Disable the "Enable audio" option in the console preferences if you don't need it.
Best practices and optimization
To make the most of your GNS3 laboratory in Linux, follow these recommendations:
- Use snapshots (functionSave State) to save the status of the routers and quickly return to a known configuration.
- Limit the amount of simultaneous routers according to the available RAM; each instance consumes between 200-300 MB.
- Document your topology using the functionExport → Projectand version the .gns3 file in a Git repository.
- Enable traffic compression in simulated WAN links to test low-speed behaviors without affecting global performance.
- Keep both the operating system and the GNS3 packages up to date through official repositories to benefit from safety patches and performance improvements.
Conclusion
Running GNS3 in Linux combines the power of open source virtualization with the flexibility of an operating system designed for developers and network administrators. Whether you're preparing for certifications like CCNA / CCNP, testing new data center topologies or simply exploring networking concepts, GNS3 in Linux provides a robust, free and close environment. With a suitable installation and some good practices, you will have a list laboratory to experiment in minutes, ready to grow according to your learning needs or professional work.


