GNS3 server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
grossmj e897ab6163
Uvicorn version 0.17.6 does not support Python 3.6
2 years ago
.github/workflows Merge branch 'master' into 3.0 3 years ago
conf Change default config settings 3 years ago
docs Make Swagger Ui the default for API documentation 4 years ago
gns3server Merge branch '2.2' into 3.0 2 years ago
init Simpler Systemd service file. Ref #1996 3 years ago
scripts Update Docker image for tests 3 years ago
tests Drop Windows support 2 years ago
.coveragerc Fix coveralls configuration 9 years ago
.gitattributes Keep the version.py untouched when merging 8 years ago
.gitignore Rename ssl and auth configuration file settings. 3 years ago
.whitesource Add .whitesource configuration file 4 years ago
AUTHORS Adjust AUTHORS. 9 years ago
CHANGELOG Release v2.2.31 2 years ago
CONTRIBUTING.md Merge branch 'master' into 1.5 8 years ago
Dockerfile Update Docker image for tests 3 years ago
LICENSE Project structure & tools (pytest, tox etc.) 11 years ago
MANIFEST.in Remove tox and update dependencies 4 years ago
README.md Convert README to markdown 2 years ago
dev-requirements.txt Merge branch '2.2' into 3.0 2 years ago
docker-compose.yml Refactor tests and start work on database integration. 4 years ago
gns3server.bat Made the gns3server.bat successfully start the server independent of the CWD at the time of running. It's now relative to the location of the .bat file itself. 9 years ago
mac-requirements.txt Upgrade packages to latest versions 4 years ago
readthedocs.yml Use Python3.6 to build the API documentation. 6 years ago
requirements.txt Uvicorn version 0.17.6 does not support Python 3.6 2 years ago
setup.py Drop Windows support 2 years ago
win-requirements.txt Merge branch '2.2' into 3.0 2 years ago

README.md

GNS3-server

Style GitHub Actions tests Latest PyPi version Snyk scanning

This is the GNS3 server repository.

The GNS3 server manages emulators such as Dynamips, VirtualBox or Qemu/KVM. Clients like the GNS3 GUI and the GNS3 Web UI control the server using a HTTP REST API.

Software dependencies

In addition to Python dependencies listed in a section below, other software may be required, recommended or optional.

  • uBridge is required, it interconnects the nodes.
  • Dynamips is required for running IOS routers (using real IOS images) as well as the internal switches and hubs.
  • VPCS is recommended, it is a builtin node simulating a very simple computer to perform connectivity tests using ping, traceroute etc.
  • Qemu is strongly recommended on Linux, as most node types are based on Qemu, for example Cisco IOSv and Arista vEOS.
  • libvirt is recommended (Linux only), as it's needed for the NAT cloud.
  • Docker is optional (Linux only), some nodes are based on Docker.
  • mtools is recommended to support data transfer to/from QEMU VMs using virtual disks.
  • i386-libraries of libc and libcrypto are optional (Linux only), they are only needed to run IOU based nodes.

Docker support

Docker support needs the script program (bsdutils or util-linux package), when running a docker VM and a static busybox during installation (python3 setup.py install / pip3 install / package creation).

Branches

master

master is the next stable release, you can test it in your day-to -day activities. Bug fixes or small improvements pull requests go here.

3.x Development brand for the next major release

Never use this branch for production. Pull requests for major new features go here.

Linux

GNS3 is perhaps packaged for your distribution:

Linux (Debian based)

The following instructions have been tested with Ubuntu and Mint. You must be connected to the Internet in order to install the dependencies.

Dependencies:

The following commands will install some of these dependencies:

sudo apt-get install python3-setuptools

Finally, these commands will install the server as well as the rest of the dependencies:

cd gns3-server-master
python3 -m venv venv-gns3server
source venv-gns3server/bin/activate
sudo python3 setup.py install
python3 -m gns3server --local

To run tests use:

python3 -m pytest tests

Docker container

For development, you can run the GNS3 server in a container

bash scripts/docker_dev_server.sh

Run as daemon (Unix only)

You will find init sample scripts for various systems inside the init directory.

Useful options:

  • --daemon: start process as a daemon
  • --log logfile: store output in a logfile
  • --pid pidfile: store the pid of the running process in a file and prevent double execution

All init scripts require the creation of a GNS3 user. You can change it to another user.

sudo adduser gns3

systemd

You need to copy init/gns3.service.systemd to /lib/systemd/system/gns3.service

sudo chown root /lib/systemd/system/gns3.service
sudo systemctl start gns3

Windows

Please use our Windows installer to install the stable build along with the GNS3 VM

Mac OS X

Please use our DMG package for a simple installation along with the GNS3 VM (VMware Fusion is recommended)

SSL

If you want enable SSL support on GNS3 you can generate a self-signed certificate:

bash gns3server/cert_utils/create_cert.sh

This command will put the files in ~/.config/GNS3/ssl

After you can start the server in SSL mode with:

python gns3server/main.py --certfile ~/.config/GNS3/ssl/server.cert --certkey ~/.config/GNS3/ssl/server.key --ssl

Or in your gns3_server.conf by adding in the Server section:

[Server]
certfile=/Users/noplay/.config/GNS3/ssl/server.cert
certkey=/Users/noplay/.config/GNS3/ssl/server.key
ssl=True

Running tests

First, install the development dependencies

python3 -m pip install -r dev-requirements.txt

Then run the tests using pytest

python3 -m pytest -vv tests/

Security issues

Please contact us at security@gns3.net