gont

module
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2022 License: Apache-2.0

README

Gont - A Go network testing toolkit

GitHub Workflow Status (master) Codacy grade Codacy coverage libraries.io DOI License GitHub go.mod Go version Go Reference

Gont is a package to create realistic virtual network, running real kernel, switch and application code, on a single machine (VM, cloud or native).

Gont is heavily inspired by Mininet. It allows the user to build virtual network topologies using Go code. Under to hood the network is then constructed using Linux virtual bridges and network namespaces.

Getting started

Have a look at our slide set to get you started.

Features

  • L3 Routers
  • L2 Switches
  • L3 NAT Routers
  • L3 NAT to host networks
  • Hostname resolution for test nodes (using /etc/hosts)
  • Execution of sub-processes, Go code & functions in the network namespace of test nodes
  • Support for multiple simultaneous and isolated networks
  • Ideal for Golang unit tests
  • Can run in workflows powered by GitHub's runners
  • Lean code thanks to functional options
  • Full IPv6 support
  • Per link network emulation and bandwidth limiting via for netem and tbf qdiscs
  • Use of existing network namespaces as nodes
  • Configuration of per-host nftables firewall rules
  • Built-in Ping & Traceroute diagnostic tools
  • Built-in packet tracing with PCAPng output

Examples

Have a look at the unit tests for usage examples:

Prerequisites

  • traceroute (for testing)
  • libpcap (for compiling BPF filter expressions of packet tracing feature)

Architecture

Credits

Funding acknowledment

European Flag The development of Gont has been supported by the ERIGrid 2.0 project
of the H2020 Programme under Grant Agreement No. 870620

Directories

Path Synopsis
cmd
gontc
gontc is a command line interface for inspecting and managing networks created by Gont
gontc is a command line interface for inspecting and managing networks created by Gont
pkg
options
Package options contains all the general options for configuring the general objects like hosts, switches, routers and interfaces
Package options contains all the general options for configuring the general objects like hosts, switches, routers and interfaces
options/capture
Package capture contains the options to configure to packet capturing
Package capture contains the options to configure to packet capturing
options/filters
Package filters contains the options for configuring NFTables filtering
Package filters contains the options for configuring NFTables filtering
options/tc
Package tc contains the options for configuring per-interface Traffic Control (TC) queuing disciplines
Package tc contains the options for configuring per-interface Traffic Control (TC) queuing disciplines

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL