### Build and install GNS3 server Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Install the GNS3 server daemon using the Python setup script. ```bash sudo python3 setup.py install ``` -------------------------------- ### Install and run GNS3 Web UI Source: https://docs.gns3.com/docs/contribute/how-to-debug-web-ui-guide Commands to install dependencies, start the development server, or build the application. ```bash yarn install ``` ```bash yarn ng serve ``` ```bash yarn ng build ``` -------------------------------- ### Install yay from binary Source: https://docs.gns3.com/docs/getting-started/installation/linux Installs the pre-built binary version of the yay AUR helper. ```bash pacman -S --needed git base-devel git clone https://aur.archlinux.org/yay-bin.git cd yay-bin makepkg -si ``` -------------------------------- ### Install yay from source Source: https://docs.gns3.com/docs/getting-started/installation/linux Compiles and installs the yay AUR helper from source. ```bash pacman -S --needed git base-devel git clone https://aur.archlinux.org/yay.git cd yay makepkg -si ``` -------------------------------- ### Install GNS3 prerequisites on Arch Source: https://docs.gns3.com/docs/getting-started/installation/linux Installs necessary emulation and virtualization packages via yay. ```bash yay -S qemu docker vpcs dynamips libvirt ubridge inetutils ``` -------------------------------- ### Start Systemd daemon Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Start the GNS3 service using systemctl. ```bash sudo systemctl start gns3 ``` -------------------------------- ### Install GNS3 Server and GUI on Arch Source: https://docs.gns3.com/docs/getting-started/installation/linux Installs GNS3 components using the AUR helper. ```bash yay -S gns3-server gns3-gui ``` -------------------------------- ### Install System Dependencies on macOS Source: https://docs.gns3.com/docs/contribute/development-of-gns3 Commands to install Python and PyQt5 using Homebrew. ```bash brew install python3 brew install PyQt5 ``` -------------------------------- ### Install GNS3 on Remote Server Source: https://docs.gns3.com/docs/getting-started/installation/remote-server Run these commands as root on a fresh Ubuntu 18.04 LTS installation to install GNS3 and configure the VPN. ```bash cd /tmp curl https://raw.githubusercontent.com/GNS3/gns3-server/master/scripts/remote-install.sh > gns3-remote-install.sh bash gns3-remote-install.sh --with-openvpn --with-iou --with-i386-repository ``` -------------------------------- ### Add license via terminal Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Installs a trial license key directly through the CLI. ```text > request system add license terminal ``` -------------------------------- ### Install Kernel Packages Source: https://docs.gns3.com/docs/getting-started/setup-wizard-gns3-vm Install the downloaded deb packages using dpkg. ```bash sudo dpkg -i *.deb ``` -------------------------------- ### TinyCore Network Configuration Settings Source: https://docs.gns3.com/docs/emulators/adding-vmware-vms-to-gns3-topologies Example network configuration parameters for a TinyCore Linux virtual machine. ```text Interface: eth0 IP address: 10.1.1.2 Mask: 255.255.255.0 Broadcast: 10.1.1.255 Gateway: 10.1.1.1 DNS: 8.8.8.8 ``` -------------------------------- ### Install Development Dependencies Source: https://docs.gns3.com/docs/contribute/development-of-gns3 Commands to install project dependencies for development environments. ```bash sudo pip3 install -r dev-requirements.txt ``` ```bash python.exe -m pip install -r dev-requirements.txt ``` ```bash pip3 install -r dev-requirements.txt ``` -------------------------------- ### Enable GNS3 on boot Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Configure the GNS3 service to start automatically when the system boots. ```bash sudo systemctl enable gns3 ``` -------------------------------- ### Install Dynamips build tools Source: https://docs.gns3.com/docs/getting-started/installation/linux Installs build-essential and CMake for compiling Dynamips. ```bash sudo apt update sudo apt install build-essential sudo apt install cmake ``` -------------------------------- ### Install Dynamips dependencies Source: https://docs.gns3.com/docs/getting-started/installation/linux Installs required libraries for building Dynamips. ```bash sudo apt update sudo apt install libelf-dev libpcap0.8-dev ``` -------------------------------- ### Install GNS3 via pipx Source: https://docs.gns3.com/docs/getting-started/installation/linux Installs GNS3 server and GUI using pipx. ```bash pipx install gns3-server pipx install gns3-gui ``` -------------------------------- ### GNS3 Server Configuration File Example Source: https://docs.gns3.com/docs/using-gns3/administration/gns3-server-configuration-file An example of the gns3_server.conf/ini file structure, including sections for Server, VPCS, Dynamips, IOU, VirtualBox, and VMware settings. ```ini [Server] ; IP where the server listen for connection host = 127.0.0.1 ; HTTP port for controlling the servers port = 3080 ; Path where images of devices are stored images_path = /home/gns3/GNS3/images ; Path where user project are stored projects_path = /home/gns3/GNS3/projects ; Send crash to the GNS3 team report_errors = True ; First port of the range allocated to devices telnet console console_start_port_range = 2001 ; Last port of the range allocated to devices telnet console console_end_port_range = 5000 ; First port of the range allocated to communication between devices. You need two port by link udp_start_port_range = 10000 ; Last port of the range allocated to communication between devices. You need two port by link udp_end_port_range = 20000 ; Path of the ubridge program ubridge_path = /Applications/GNS3.app/Contents/Resources/ubridge ; Boolean for enabling HTTP auth auth = True ; Username for HTTP auth user = bob ; Password for HTTP auth password = alice [VPCS] ; Path of the VPCS binary vpcs_path = /usr/local/bin/vpcs [Dynamips] allocate_aux_console_ports = False mmap_support = True ; Path of the dynamips path dynamips_path = /usr/local/bin/dynamips sparse_memory_support = True ghost_ios_support = True [IOU] ; Path of the iouyap binary iouyap_path = /usr/local/bin/iouyap ; Path of your .iourc file. If empty we search in $HOME/.iourc iourc_path = /home/gns3/.iourc ; Validate if the iourc is correct. If you turn off and your licence is invalid iou will crash without errors license_check = True [VirtualBox] ; Path of the VBoxManage command vboxmanage_path = /usr/local/bin/VBoxManage ; Run VirtualBox with sudo as vbox_user vbox_user = [VMware] ; Type of Virtualization product (fusion, player, workstation) host_type = fusion ; First vmnet adapter controlled by GNS3 vmnet_start_range = 2 ; Last vmnet adapter controlled by GNS3 vmnet_end_range = 50 ; Path of the vmrun executable vmrun_path = /Applications/VMware Fusion.app/Contents/Library/vmrun ``` -------------------------------- ### Install IOU support on Ubuntu Source: https://docs.gns3.com/docs/getting-started/installation/linux Adds i386 architecture support and installs the GNS3 IOU package. ```bash sudo dpkg --add-architecture i386 sudo apt update sudo apt install gns3-iou ``` -------------------------------- ### Start GNS3 GUI Source: https://docs.gns3.com/docs/contribute/development-of-gns3 Commands to launch the GNS3 GUI application. ```bash python3 -m gns3 ``` ```bash python3.exe -m gns3 ``` -------------------------------- ### Install GNS3 on Ubuntu-based distributions Source: https://docs.gns3.com/docs/getting-started/installation/linux Adds the GNS3 PPA and installs the GUI and server packages. ```bash sudo add-apt-repository ppa:gns3/ppa sudo apt update sudo apt install gns3-gui gns3-server ``` -------------------------------- ### Start Upstart daemon Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Launch the GNS3 service using the Upstart service manager. ```bash sudo service gns3 start ``` -------------------------------- ### Example iourc license file format Source: https://docs.gns3.com/docs/emulators/non-native-iou-for-windows-and-osx The iourc file must contain a valid license key provided by Cisco. This is a placeholder example and will not function as a real license. ```text [license] gns3vm = 42aa42bb42cc84ff; ``` -------------------------------- ### Install Docker dependencies Source: https://docs.gns3.com/docs/getting-started/installation/linux Installs required packages for Docker CE installation. ```bash sudo apt-get install apt-transport-https ca-certificates curl software-properties-common ``` -------------------------------- ### Install Docker-CE Source: https://docs.gns3.com/docs/getting-started/installation/linux Updates package lists and installs the Docker Community Edition. ```bash sudo apt update sudo apt install docker-ce ``` -------------------------------- ### Create VLANs in vlan database Source: https://docs.gns3.com/docs/using-gns3/beginners/switching-and-gns3 Example of creating VLANs 10 and 20 using the vlan database mode on an Etherswitch router. ```text vlan database vlan 10 vlan 20 exit ``` -------------------------------- ### Launch GNS3 Server Source: https://docs.gns3.com/docs/getting-started/installation/linux Starts the GNS3 server process. ```bash gns3server ``` -------------------------------- ### Install GNS3 dependencies on Debian Source: https://docs.gns3.com/docs/getting-started/installation/linux Installs Python and required emulation/GUI packages. ```bash sudo apt install python3 python3-pip pipx python3-pyqt6 python3-pyqt6.qtwebsockets python3-pyqt6.qtsvg qemu-kvm qemu-utils libvirt-clients libvirt-daemon-system virtinst dynamips software-properties-common ca-certificates curl gnupg2 ``` ```bash sudo apt install python3 python3-pip pipx python3-pyqt6 python3-pyqt6.qtwebsockets python3-pyqt6.qtsvg qemu-kvm qemu-utils libvirt-clients libvirt-daemon-system virtinst ca-certificates curl gnupg2 ``` -------------------------------- ### Install GNS3 server dependencies Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Install the necessary Python and system packages required to build the GNS3 server daemon. ```bash python3-setuptools python3-aiohttp python3-psutil python3-jsonschema git ``` -------------------------------- ### Build and install Dynamips Source: https://docs.gns3.com/docs/getting-started/installation/linux Clones the Dynamips repository and compiles it from source. ```bash git clone https://github.com/GNS3/dynamips.git cd dynamips mkdir build cd build cmake .. make install ``` -------------------------------- ### Start GNS3 Server Source: https://docs.gns3.com/docs/contribute/development-of-gns3 Commands to launch the GNS3 server in debug and local mode. ```bash python3 -m gns3server --debug --local ``` ```bash python.exe -m gns3server --debug --local ``` -------------------------------- ### Execute NMAP Command Source: https://docs.gns3.com/docs/emulators/create-a-docker-container-for-gns3 Example command to test SSH algorithm support on a target device. ```bash nmap --script ssh2-enum-algos target_ip ``` -------------------------------- ### Start GNS3 server in SSL mode via CLI Source: https://docs.gns3.com/docs/using-gns3/administration/client-server-ssl-encryption Use this command to launch the GNS3 server with SSL enabled, specifying the paths to the certificate and key files. ```bash gns3server --certfile ~/.config/GNS3/ssl/server.cert --certkey ~/.config/GNS3/ssl/server.key --ssl ``` -------------------------------- ### Configure Systemd daemon Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Install the Systemd service file and reload the system manager configuration. ```bash sudo cp gns3.service.systemd /etc/systemd/system/gns3.service sudo systemctl daemon-reload ``` -------------------------------- ### Launch GNS3 with a specific profile Source: https://docs.gns3.com/docs/using-gns3/advanced/settings-profiles Use the --profile flag to specify a profile name when starting the GNS3 client from the command line. ```bash gns3 --profile work ``` -------------------------------- ### Accessing the VPCS Console Source: https://docs.gns3.com/docs/emulators/vpcs Displays the initial output upon starting a VPCS node. ```text Welcome to Virtual PC Simulator, version 0.6.1 Dedicated to Daling. Build time: Feb 25 2016 00:35:23 Copyright (c) 2007-2015, Paul Meng (mirnshi@gmail.com) All rights reserved. VPCS is free software, distributed under the terms of the "BSD" licence. Source code and license can be found at vpcs.sf.net. For more information, please visit wiki.freecode.com.cn. Press '?' to get help. Executing the startup file PC1> ``` -------------------------------- ### Define Dockerfile Content Source: https://docs.gns3.com/docs/emulators/create-a-docker-container-for-gns3 Basic configuration for an Ubuntu-based container with nmap installed. ```dockerfile FROM ubuntu:16.04 RUN apt-get update && apt-get install -y nmap ``` -------------------------------- ### Remove old Docker versions Source: https://docs.gns3.com/docs/getting-started/installation/linux Cleans up existing Docker installations before installing Docker CE. ```bash sudo apt remove docker docker-engine docker.io sudo snap remove docker ``` -------------------------------- ### Upgrade System Packages Source: https://docs.gns3.com/docs/getting-started/setup-wizard-gns3-vm Update the package list and upgrade installed packages within the GNS3 VM shell. ```bash sudo apt update sudo apt upgrade ``` -------------------------------- ### Create Dockerfile Source: https://docs.gns3.com/docs/emulators/create-a-docker-container-for-gns3 Initialize a new Dockerfile using the nano text editor. ```bash nano Dockerfile ``` -------------------------------- ### Configure Upstart daemon Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Copy and set permissions for the Upstart configuration file on older Ubuntu systems. ```bash sudo cp gns3.conf.upstart /etc/init/gns3.conf sudo chown root /etc/init/gns3.conf ``` -------------------------------- ### Configure R1 Interfaces Source: https://docs.gns3.com/docs/getting-started/your-first-cisco-topology Initial configuration of FastEthernet0/0 and Loopback0 on router R1. ```text R1# conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)# int fa0/0 R1(config-if)#ip add 10.1.1.1 255.255.255.0 R1(config-if)#int loop 0 R1(config-if)#ip add *Mar 1 00:03:42.663: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up R1(config-if)#ip add 1.1.1.1 255.255.255.255 R1(config-if)# end R1#sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 10.1.1.1 YES manual administratively down down Serial0/0 unassigned YES unset administratively down down FastEthernet0/1 unassigned YES unset administratively down down Serial0/1 unassigned YES unset administratively down down Serial0/2 unassigned YES unset administratively down down Serial0/3 unassigned YES unset administratively down down Serial0/4 unassigned YES unset administratively down down Serial0/5 unassigned YES unset administratively down down FastEthernet1/0 unassigned YES unset administratively down down FastEthernet2/0 unassigned YES unset administratively down down Loopback0 1.1.1.1 YES manual up up R1# ``` -------------------------------- ### Navigate to server directory Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Change the current working directory to the cloned GNS3 server folder. ```bash cd gns3-server ``` -------------------------------- ### Save Device Configuration Source: https://docs.gns3.com/docs/getting-started/your-first-gns3-topology Persists the current virtual PC configuration to the startup file. ```text PC-1> save Saving startup configuration to startup.vpc . done PC-1> PC-2> save Saving startup configuration to startup.vpc . done PC-2> PC-3> save Saving startup configuration to startup.vpc . done PC-3> ``` -------------------------------- ### Add and delete VLANs using macros Source: https://docs.gns3.com/docs/using-gns3/beginners/switching-and-gns3 Using global configuration macros to manage VLANs on the Etherswitch router. ```text va 10 # or vd 10 ``` -------------------------------- ### Run Tests Source: https://docs.gns3.com/docs/contribute/development-of-gns3 Commands to execute the test suite for the project. ```bash py.test ``` ```bash python.exe -m py.test ``` -------------------------------- ### Enable R1 Interface Source: https://docs.gns3.com/docs/getting-started/your-first-cisco-topology Use the 'no shut' command to bring the FastEthernet0/0 interface up on R1. ```text R1(config)#int fa0/0 R1(config-if)#no shut R1(config-if)#end R1# *Mar 1 00:06:52.391: %SYS-5-CONFIG_I: Configured from console by console R1#sh *Mar 1 00:06:52.667: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up *Mar 1 00:06:53.667: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up ``` -------------------------------- ### Saving Configuration Source: https://docs.gns3.com/docs/emulators/vpcs Persists the current configuration to the startup file to prevent data loss on restart. ```text PC1> save Saving startup configuration to startup.vpc . done ``` -------------------------------- ### Update Dockerfile with CMD Source: https://docs.gns3.com/docs/emulators/create-a-docker-container-for-gns3 Modified Dockerfile to include htop and set it as the default startup command. ```dockerfile FROM ubuntu:16.04 RUN apt-get update && apt-get install -y nmap RUN apt-get install -y htop CMD htop ``` -------------------------------- ### Enable Nested Virtualization on ESXi Source: https://docs.gns3.com/docs/getting-started/installation/esxi Configuration settings to add to the .vmx file to enable hardware-assisted virtualization on older ESXi versions. ```text hypervisor.cpuid.v0 = "FALSE" vhv.enable= "TRUE" ``` -------------------------------- ### Accessing the PFE Shell Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Use this command within the vCP VM to open the PFE shell for troubleshooting the virtualized Trio chipset components. ```bash > start shell pfe network fpc0 ``` -------------------------------- ### Fix tiny icons on Linux Source: https://docs.gns3.com/docs/troubleshooting-faq/troubleshoot-gns3 Use this command to launch GNS3 with a specific Qt scale factor to resolve display issues with tiny icons. ```bash QT_SCALE_FACTOR=1 gns3 ``` -------------------------------- ### Save Configuration Changes Source: https://docs.gns3.com/docs/getting-started/your-first-cisco-topology Commands to persist the running configuration to the startup configuration to ensure changes survive a project reload. ```text R1#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] ``` ```text R1#wr Building configuration... [OK] R1# ``` -------------------------------- ### Connect to VPN on Linux Source: https://docs.gns3.com/docs/getting-started/installation/remote-server Use OpenVPN to establish a secure connection to the remote GNS3 server. ```bash # sudo apt-get install openvpn # sudo openvpn client.ovpn Tue Apr 25 17:12:48 2017 [OpenVPN] Peer Connection Initiated with [AF_INET]X.X.X.X:1194 Tue Apr 25 17:12:51 2017 TUN/TAP device tun0 opened Tue Apr 25 17:12:51 2017 Initialization Sequence Completed ``` -------------------------------- ### Build Docker Container Source: https://docs.gns3.com/docs/emulators/create-a-docker-container-for-gns3 Build the container image from the current directory. ```bash docker build -t joe/nmap . ``` -------------------------------- ### Clone GNS3 Repositories Source: https://docs.gns3.com/docs/contribute/development-of-gns3 Commands to clone the server and GUI repositories from GitHub. ```bash git clone https://github.com/GNS3/gns3-server.git git clone https://github.com/GNS3/gns3-gui.git ``` -------------------------------- ### Add Docker GPG key Source: https://docs.gns3.com/docs/getting-started/installation/linux Imports the official Docker GPG key to the system keyring. ```bash curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - ``` -------------------------------- ### List project files with UUIDs Source: https://docs.gns3.com/docs/using-gns3/design/why-gns3-uses-uuid Displays the directory structure of a GNS3 project, showing how nodes are represented by UUIDs within the project-files directory. ```bash # ls -R myproject project-files tutu.gns3 myproject/project-files: vpcs myproject/project-files/vpcs: 1c18e765-0107-4083-b371-a92d490eb8a0 4349251e-1d91-454f-9d89-c998cbfa90c9 myproject/project-files/vpcs/1c18e765-0107-4083-b371-a92d490eb8a0: startup.vpc myproject/project-files/vpcs/4349251e-1d91-454f-9d89-c998cbfa90c9: startup.vpc ``` -------------------------------- ### Configure R2 Interfaces Source: https://docs.gns3.com/docs/getting-started/your-first-cisco-topology Configuration of FastEthernet0/0 and Loopback0 on router R2, including error handling for an invalid subnet mask. ```text R2#conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#int fa0/0 R2(config-if)#no shut R2(config-if)# *Mar 1 00:00:36.899: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up *Mar 1 00:00:37.899: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R2(config-if)#ip add 10.1.1.2 255.255.255.0 R2(config-if)#int loop 0 R2(config-if)# *Mar 1 00:00:53.215: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up R2(config-if)#ip add 2.2.2.2 255.255.255.25 Bad mask 0xFFFFFF19 for address 2.2.2.2 R2(config-if)#ip add 2.2.2.2 255.255.255.255 R2(config-if)# ``` -------------------------------- ### Enable virtual FP on legacy vMX Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Command to manually enable the virtual FP if it is not active after the vMX instance loads. ```bash root@% echo ‘vm_local_rpio=”1”’ >> /boot/loader.conf ``` -------------------------------- ### Run unit tests Source: https://docs.gns3.com/docs/contribute/how-to-debug-web-ui-guide Execute unit tests to verify that changes do not break existing functionality. ```bash yarn ng test ``` -------------------------------- ### Build PyQt Interface Source: https://docs.gns3.com/docs/contribute/development-of-gns3 Command to regenerate Python code from modified Qt interface files. ```bash python scripts/build_pyqt.py ``` -------------------------------- ### Configure Static IP and Default Gateway Source: https://docs.gns3.com/docs/using-gns3/advanced/connect-gns3-internet Manually assign an IP address and set the default route to the local network gateway. ```text R1# configure terminal R1(config)# interface FastEthernet 0/0 R1(config-if)# ip address 192.168.1.123 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# exit ``` ```text R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.249 R1(config)# end ``` -------------------------------- ### Add Docker repository Source: https://docs.gns3.com/docs/getting-started/installation/linux Adds the stable Docker repository for Ubuntu. ```bash sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo $VERSION_CODENAME) stable" ``` -------------------------------- ### Create GNS3 user Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Create a dedicated user account for running the GNS3 server. ```bash sudo adduser gns3 ``` -------------------------------- ### Clone GNS3 Web UI repository Source: https://docs.gns3.com/docs/contribute/how-to-debug-web-ui-guide Use this command to clone the GNS3 Web UI project to your local machine. ```bash git clone https://github.com/GNS3/gns3-web-ui.git ``` -------------------------------- ### Verify Kernel Version Source: https://docs.gns3.com/docs/getting-started/setup-wizard-gns3-vm Check the currently running kernel version to confirm the upgrade. ```bash gns3@gns3vm:~$ uname -r 5.2.2-050202-generic ``` -------------------------------- ### List available GNS3 versions Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon View all available tags to identify the correct version branch. ```bash git tag ``` -------------------------------- ### Testing Connectivity Source: https://docs.gns3.com/docs/emulators/vpcs Commands for verifying network reachability using ping and traceroute. ```text PC1> ping 192.168.1.2 84 bytes from 192.168.1.2 icmp_seq=1 ttl=64 time=0.576 ms 84 bytes from 192.168.1.2 icmp_seq=2 ttl=64 time=0.512 ms 84 bytes from 192.168.1.2 icmp_seq=3 ttl=64 time=0.473 ms 84 bytes from 192.168.1.2 icmp_seq=4 ttl=64 time=0.453 ms 84 bytes from 192.168.1.2 icmp_seq=5 ttl=64 time=1.182 ms ``` ```text PC1> trace 192.168.1.2 trace to 192.168.1.2, 8 hops max, press Ctrl+C to stop 1 *192.168.1.2 0.398 ms (ICMP type:3, code:3, Destination port unreachable) ``` -------------------------------- ### Configure GNS3 server SSL in gns3_server.conf Source: https://docs.gns3.com/docs/using-gns3/administration/client-server-ssl-encryption Add these settings to the [Server] section of your gns3_server.conf file to enable SSL persistence. ```ini [Server] certfile=/Users/noplay/.config/GNS3/ssl/server.cert certkey=/Users/noplay/.config/GNS3/ssl/server.key ssl=True ``` -------------------------------- ### Publish to Docker Hub Source: https://docs.gns3.com/docs/emulators/create-a-docker-container-for-gns3 Commands to authenticate and push a container image to the Docker Hub registry. ```bash docker login docker push joe/hello ``` -------------------------------- ### Save IOS Configuration Source: https://docs.gns3.com/docs/troubleshooting-faq/troubleshoot-gns3 Use this command to persist device configurations before powering off. ```text R1# write memory ``` -------------------------------- ### Configure VMware Default VM Path Source: https://docs.gns3.com/docs/troubleshooting-faq/troubleshoot-gns3 Add this line to the preferences.ini file to resolve directory issues with VMware Player. ```ini prefvmx.defaultvmpath = "F:\My Documents\Virtual Machines" ``` -------------------------------- ### Checkout Specific Release Source: https://docs.gns3.com/docs/contribute/development-of-gns3 Commands to switch to a specific release branch in the repositories. ```bash git checkout NEXT_RELEASE ``` ```bash git checkout 2.0 ``` -------------------------------- ### View license information Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Displays the current system license status. ```text > show system license. ``` -------------------------------- ### Inject GNS3 dependencies into pipx Source: https://docs.gns3.com/docs/getting-started/installation/linux Injects the GNS3 server and PyQt6 into the GNS3 GUI virtual environment. ```bash pipx inject gns3-gui gns3-server PyQt6 ``` -------------------------------- ### Configuring IP Addresses Source: https://docs.gns3.com/docs/emulators/vpcs Methods for assigning IP addresses manually or via DHCP. ```text PC1> ip 192.168.1.1 Checking for duplicate address... PC1 : 192.168.1.1 255.255.255.0 ``` ```text PC1> dhcp ``` -------------------------------- ### Verify VQFX Chassis and Interface Status Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Commands to check the status of the FPC/PIC and verify interface availability after the PFE has finished loading. ```text root> show chassis fpc pic-status root > show interfaces xe-* terse. ``` -------------------------------- ### Save VPCS Configuration Source: https://docs.gns3.com/docs/troubleshooting-faq/troubleshoot-gns3 Use this command to save the current VPCS configuration. ```text PC1> save ``` -------------------------------- ### Verify VLAN configuration Source: https://docs.gns3.com/docs/using-gns3/beginners/switching-and-gns3 Commands to verify VLANs since the standard show vlan command is unavailable. ```text sh vlan-switch brief # or vl ``` -------------------------------- ### Assign IP Address to PC Source: https://docs.gns3.com/docs/getting-started/your-first-gns3-topology Configures an IP address and subnet mask on a virtual PC. ```text PC-3> ip 10.1.1.3 255.255.255.0 Checking for duplicate address... PC1 : 10.1.1.3 255.255.255.0 PC-3> ``` -------------------------------- ### Download Kernel Packages Source: https://docs.gns3.com/docs/getting-started/setup-wizard-gns3-vm Download specific Linux kernel 5.2.2 deb packages from the Ubuntu mainline PPA. ```bash cd /tmp/ wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2.2/linux-headers-5.2.2-050202_5.2.2-050202.201907231250_all.deb wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2.2/linux-headers-5.2.2-050202-generic_5.2.2-050202.201907231250_amd64.deb wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2.2/linux-image-unsigned-5.2.2-050202-generic_5.2.2-050202.201907231250_amd64.deb wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2.2/linux-modules-5.2.2-050202-generic_5.2.2-050202.201907231250_amd64.deb ``` -------------------------------- ### Clone GNS3 server repository Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Download the GNS3 server source code from the official GitHub repository. ```bash git clone https://github.com/GNS3/gns3-server.git ``` -------------------------------- ### Configure IP Addresses on VPCS Nodes Source: https://docs.gns3.com/docs/getting-started/your-first-gns3-topology Assign static IP addresses and subnet masks to PC-1 and PC-2 via the console. ```text PC-1> ip 10.1.1.1 255.255.255.0 Checking for duplicate address... PC1 : 10.1.1.1 255.255.255.0 PC-1> PC-2> ip 10.1.1.2 255.255.255.0 Checking for duplicate address... PC1 : 10.1.1.2 255.255.255.0 PC-2> ``` -------------------------------- ### Configure IOS Archive Feature Source: https://docs.gns3.com/docs/using-gns3/advanced/configuration-transfer-qemu-vms Enables automatic configuration backups to the specified flash path whenever the running configuration is saved. ```text archive path flash1:$h write-memory ``` -------------------------------- ### GNS3 Architecture Diagram Source: https://docs.gns3.com/docs/using-gns3/design/architecture A visual representation of the interaction between the GNS3 GUI, controller, compute servers, and emulators. ```text +---------------+ +----------+ +------+ | | | COMPUTE +-----> QEMU | | GNS3 GUI | +---> SERVER 1 | +------+ | QT interface +-----+ | +----------+ | | | | +---+ +---------------+ +v--------++ +--->IOU| |CONTROLLER| | +---+ +---------+ +^--------++ +---------+ | | GNS3 WEB+-----+ | | COMPUTE +--+ +---------+ +---> SERVER 2+--+ +--------+ +---------+ +--->DYNAMIPS| +--------+ ``` -------------------------------- ### Checkout specific GNS3 version Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Switch to a specific version branch to ensure compatibility with client software. ```bash git checkout tags/branch_version -b branch_version ``` ```bash git checkout tags/v2.2.1 -b v2.2.1 ``` -------------------------------- ### Reboot GNS3 VM Source: https://docs.gns3.com/docs/getting-started/setup-wizard-gns3-vm Reboot the virtual machine to apply kernel changes. ```bash sudo reboot ``` -------------------------------- ### Add user to groups Source: https://docs.gns3.com/docs/getting-started/installation/linux Adds the current user to the necessary groups for GNS3 and Docker functionality. ```bash sudo usermod -aG ubridge,libvirt,kvm,wireshark,docker $(whoami) ``` -------------------------------- ### Configure vCP Network Interfaces Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Naming convention for vCP network interfaces to ensure correct mapping to management and internal ports. ```text fxp0 ``` ```text em{port1} ``` -------------------------------- ### Configure vFP Network Interfaces Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Naming convention for vFP network interfaces to ensure correct mapping to management and internal ports. ```text Eth{port1} ``` -------------------------------- ### Configure OSPF Routing Source: https://docs.gns3.com/docs/getting-started/your-first-cisco-topology Enables OSPF on all interfaces using a wildcard mask shortcut for lab environments. ```Cisco IOS R1(config)#router ospf 1 R1(config-router)#router-id 1.1.1.1 R1(config-router)#network 0.0.0.0 255.255.255.255 area 0 R1(config-router)#end R1# ``` ```Cisco IOS R2#conf t Enter configuration commands, one per line. End with CNTL/Z. R2(config)#router ospf 1 R2(config-router)#router-id 2.2.2.2 R2(config-router)#network 0.0.0.0 255.255.255.255 area 0 R2(config-router)#end R2# *Mar 1 00:15:54.155: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done R2# *Mar 1 00:15:57.271: %SYS-5-CONFIG_I: Configured from console by console R2# ``` -------------------------------- ### Refresh Debian apt Source: https://docs.gns3.com/docs/getting-started/installation/linux Updates the local package index for Debian-based systems. ```bash sudo apt update ``` -------------------------------- ### Set root authentication password Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Configures the root password required for committing configuration changes. ```text root# set system root-authentication plain-text-password New password: Retype new password: ``` -------------------------------- ### Verify Router Interfaces Source: https://docs.gns3.com/docs/getting-started/your-first-cisco-topology Displays the status and IP configuration of all interfaces on the Cisco router. ```text R1# sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down Serial0/0 unassigned YES unset administratively down down FastEthernet0/1 unassigned YES unset administratively down down Serial0/1 unassigned YES unset administratively down down Serial0/2 unassigned YES unset administratively down down Serial0/3 unassigned YES unset administratively down down Serial0/4 unassigned YES unset administratively down down Serial0/5 unassigned YES unset administratively down down FastEthernet1/0 unassigned YES unset administratively down down FastEthernet2/0 unassigned YES unset administratively down down R1# ``` ```text R2# sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 unassigned YES unset administratively down down Serial0/0 unassigned YES unset administratively down down FastEthernet0/1 unassigned YES unset administratively down down Serial0/1 unassigned YES unset administratively down down Serial0/2 unassigned YES unset administratively down down Serial0/3 unassigned YES unset administratively down down Serial0/4 unassigned YES unset administratively down down Serial0/5 unassigned YES unset administratively down down FastEthernet1/0 unassigned YES unset administratively down down FastEthernet2/0 unassigned YES unset administratively down down R2# ``` -------------------------------- ### Disable KVM in gns3_server.conf Source: https://docs.gns3.com/docs/troubleshooting-faq/troubleshoot-gns3 Add this configuration to the GNS3 server file to bypass errors when hardware acceleration is unavailable. ```ini [Qemu] enable_kvm = false ``` -------------------------------- ### Verify Connectivity with Ping Source: https://docs.gns3.com/docs/getting-started/your-first-gns3-topology Test network reachability between configured nodes using the ping command. ```text PC-1> ping 10.1.1.2 84 bytes from 10.1.1.2 icmp_seq=1 ttl=64 time=0.985 ms 84 bytes from 10.1.1.2 icmp_seq=2 ttl=64 time=0.982 ms 84 bytes from 10.1.1.2 icmp_seq=3 ttl=64 time=0.000 ms 84 bytes from 10.1.1.2 icmp_seq=4 ttl=64 time=0.981 ms 84 bytes from 10.1.1.2 icmp_seq=5 ttl=64 time=0.982 ms ``` -------------------------------- ### Verify Connectivity via Ping Source: https://docs.gns3.com/docs/using-gns3/advanced/connect-gns3-internet Test the connection to the default gateway to ensure the topology is correctly bridged to the local network. ```text R1# ping 192.168.1.249 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.249, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 8/17/36 ms R1# ``` -------------------------------- ### Save IOS Configuration Source: https://docs.gns3.com/docs/troubleshooting-faq/troubleshoot-gns3 Use this command within the router console to persist configuration changes before powering off the device. ```text R1# write memory ``` -------------------------------- ### Configure Persistent Volume Source: https://docs.gns3.com/docs/emulators/create-a-docker-container-for-gns3 Dockerfile configuration to enable data persistence using the VOLUME directive. ```dockerfile FROM ubuntu:16.04 RUN mkdir /test RUN echo "hello" > /test/world VOLUME /test WORKDIR /test ``` -------------------------------- ### Ping Connectivity Test Source: https://docs.gns3.com/docs/getting-started/your-first-gns3-topology Verifies network reachability between virtual PCs using the ping command. ```text PC-2> ping 10.1.1.1 84 bytes from 10.1.1.1 icmp_seq=1 ttl=64 time=0.980 ms 84 bytes from 10.1.1.1 icmp_seq=2 ttl=64 time=0.982 ms 84 bytes from 10.1.1.1 icmp_seq=3 ttl=64 time=0.997 ms 84 bytes from 10.1.1.1 icmp_seq=4 ttl=64 time=1.029 ms 84 bytes from 10.1.1.1 icmp_seq=5 ttl=64 time=0.996 ms ``` ```text PC-1> ping 10.1.1.2 84 bytes from 10.1.1.2 icmp_seq=1 ttl=64 time=0.985 ms 84 bytes from 10.1.1.2 icmp_seq=2 ttl=64 time=0.982 ms 84 bytes from 10.1.1.2 icmp_seq=3 ttl=64 time=0.000 ms 84 bytes from 10.1.1.2 icmp_seq=4 ttl=64 time=0.981 ms 84 bytes from 10.1.1.2 icmp_seq=5 ttl=64 time=0.982 ms PC-1> ping 10.1.1.3 84 bytes from 10.1.1.3 icmp_seq=1 ttl=64 time=0.000 ms 84 bytes from 10.1.1.3 icmp_seq=2 ttl=64 time=1.001 ms 84 bytes from 10.1.1.3 icmp_seq=3 ttl=64 time=0.982 ms 84 bytes from 10.1.1.3 icmp_seq=4 ttl=64 time=0.984 ms 84 bytes from 10.1.1.3 icmp_seq=5 ttl=64 time=0.988 ms ``` ```text PC-2> ping 10.1.1.1 84 bytes from 10.1.1.1 icmp_seq=1 ttl=64 time=0.980 ms 84 bytes from 10.1.1.1 icmp_seq=2 ttl=64 time=0.982 ms 84 bytes from 10.1.1.1 icmp_seq=3 ttl=64 time=0.997 ms 84 bytes from 10.1.1.1 icmp_seq=4 ttl=64 time=1.029 ms 84 bytes from 10.1.1.1 icmp_seq=5 ttl=64 time=0.996 ms PC-2> ping 10.1.1.3 84 bytes from 10.1.1.3 icmp_seq=1 ttl=64 time=0.999 ms 84 bytes from 10.1.1.3 icmp_seq=2 ttl=64 time=0.985 ms 84 bytes from 10.1.1.3 icmp_seq=3 ttl=64 time=0.000 ms 84 bytes from 10.1.1.3 icmp_seq=4 ttl=64 time=0.980 ms 84 bytes from 10.1.1.3 icmp_seq=5 ttl=64 time=0.000 ms ``` ```text PC-3> ping 10.1.1.1 84 bytes from 10.1.1.1 icmp_seq=1 ttl=64 time=0.999 ms 84 bytes from 10.1.1.1 icmp_seq=2 ttl=64 time=0.000 ms 84 bytes from 10.1.1.1 icmp_seq=3 ttl=64 time=0.980 ms 84 bytes from 10.1.1.1 icmp_seq=4 ttl=64 time=0.997 ms 84 bytes from 10.1.1.1 icmp_seq=5 ttl=64 time=0.000 ms PC-3> ping 10.1.1.2 84 bytes from 10.1.1.2 icmp_seq=1 ttl=64 time=0.999 ms 84 bytes from 10.1.1.2 icmp_seq=2 ttl=64 time=0.988 ms 84 bytes from 10.1.1.2 icmp_seq=3 ttl=64 time=0.999 ms 84 bytes from 10.1.1.2 icmp_seq=4 ttl=64 time=0.981 ms 84 bytes from 10.1.1.2 icmp_seq=5 ttl=64 time=0.980 ms ``` -------------------------------- ### Verify R1 Interface Status Source: https://docs.gns3.com/docs/getting-started/your-first-cisco-topology Check the status of all interfaces on R1 after enabling FastEthernet0/0. ```text R1#sh ip int br Interface IP-Address OK? Method Status Protocol FastEthernet0/0 10.1.1.1 YES manual up up Serial0/0 unassigned YES unset administratively down down FastEthernet0/1 unassigned YES unset administratively down down Serial0/1 unassigned YES unset administratively down down Serial0/2 unassigned YES unset administratively down down Serial0/3 unassigned YES unset administratively down down Serial0/4 unassigned YES unset administratively down down Serial0/5 unassigned YES unset administratively down down FastEthernet1/0 unassigned YES unset administratively down down FastEthernet2/0 unassigned YES unset administratively down down Loopback0 1.1.1.1 YES manual up up R1# ``` -------------------------------- ### Configure Cisco Router Interface Source: https://docs.gns3.com/docs/emulators/adding-vmware-vms-to-gns3-topologies Commands to set an IP address and enable a FastEthernet interface on a Cisco router. ```text R1# configure terminal R1(config)# interface fastEthernet 0/0 R1(config-if)# ip address 10.1.1.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# end R1# ``` -------------------------------- ### Check Systemd daemon status Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Verify that the GNS3 service is active and running correctly. ```bash sudo systemctl status gns3 ``` -------------------------------- ### Verify DHCP Address Assignment Source: https://docs.gns3.com/docs/using-gns3/advanced/connect-gns3-internet Check the console output to confirm the router has successfully received an IP address. ```text R1# *Mar 1 00:03:14.831: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 192.168.1.29, mask 255.255.255.0, hostname R1 ``` -------------------------------- ### Verify Cisco IOS Version Source: https://docs.gns3.com/docs/getting-started/your-first-cisco-topology Displays the software image and version details of the Cisco router. ```Cisco IOS R2#sh ver Cisco IOS Software, 3700 Software (C3725-ADVENTERPRISEK9-M), Version 12.4(15)T14, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2010 by Cisco Systems, Inc. Compiled Tue 17-Aug-10 12:08 by prod_rel_team ROM: ROMMON Emulation Microcode ROM: 3700 Software (C3725-ADVENTERPRISEK9-M), Version 12.4(15)T14, RELEASE SOFTWARE (fc2) ``` -------------------------------- ### Allow GNS3 port in firewall Source: https://docs.gns3.com/docs/using-gns3/administration/running-gns3-server-as-daemon Open TCP port 3080 in the UFW firewall to allow GNS3 traffic. ```bash sudo ufw allow 3080/tcp ``` -------------------------------- ### Configure DNS on GNS3 Router Source: https://docs.gns3.com/docs/using-gns3/advanced/connect-gns3-internet Sets up domain lookup and specifies a public DNS server for name resolution. ```Cisco IOS R1# configure terminal R1(config)# ip domain-lookup R1(config)# ip name-server 8.8.8.8 R1(config)# end R1# ``` ```Cisco IOS R2# configure terminal R2(config)# ip domain-lookup R2(config)# ip name-server 8.8.8.8 R2(config)# end R2# ``` -------------------------------- ### Configure DHCP on Cisco Router Source: https://docs.gns3.com/docs/using-gns3/advanced/connect-gns3-internet Use this configuration to obtain an IP address automatically from the local network DHCP server. ```text R1# configure terminal R1(config)# interface FastEthernet 0/0 R1(config-if)# ip address dhcp R1(config-if)# no shutdown R1(config-if)# end R1# ``` -------------------------------- ### Configure OSPF Routing Source: https://docs.gns3.com/docs/using-gns3/advanced/connect-gns3-internet Enables OSPF on routers and advertises a default route for network reachability. ```Cisco IOS R1R1(config)# router ospf 1 R1(config-router)# network 10.0.0.0 0.255.255.255 area 0 R1(config-router)# default-information originate R1(config-router)# end R1# R2R2(config)# router ospf 1 R2(config-router)# network 10.0.0.0 0.255.255.255 area 0 R2(config-router)# end R2# Result OSPF neighbor relationships are established: R1*Mar 1 00:19:24.431: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.2 on FastEthernet0/1 from LOADING to FULL, Loading Done R1# R2*Mar 1 00:19:24.467: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.123 on FastEthernet0/0 from LOADING to FULL, Loading Done R2# ``` -------------------------------- ### Disable chassis auto-image-upgrade Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Stops the system from attempting to auto-update the image and spamming the console. ```text root# delete chassis auto-image-upgrade ``` -------------------------------- ### Configure NAT on R1 Source: https://docs.gns3.com/docs/using-gns3/advanced/connect-gns3-internet Sets up Network Address Translation on the edge router to allow internal devices to access the internet. ```Cisco IOS R1# configure terminal R1(config)# interface FastEthernet 0/0 R1(config-if)# ip nat outside R1(config-if)# interface FastEthernet 0/1 R1(config-if)# ip nat inside R1(config)# ip nat inside source list 1 interface FastEthernet 0/0 overload R1(config)# access-list 1 permit 10.0.0.0 0.255.255.255 R1(config)# end R1# write memory ``` -------------------------------- ### Delete DHCP from interface Source: https://docs.gns3.com/docs/how-to-guides/importing-vmx-and-vqfx-into-gns3 Removes DHCP configuration from a specific interface. ```text delete interfaces ge-0/0/0.0 family inet dhcp ```