Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Nanonet is a simple shell script that emulates a peer-to-peer network on one or many
physical servers using Linux qdisc and GRE tunnels.
The testbed should consist of one or multiple "servers" with IP connectivity to each
other. Each server should be assigned a globally-unique server ID from 1 to 65535.
On each server, there could be one or multiple "nodes". Each node should be assigned
a node ID from 1 to 127 that is unique on the server where the node resides.
Each server is assigned a /24 network determined by its server ID, and each node is
assigned a /31 network which is a subnet of the /24 network of the containing server.
The IP address of a node is fully-determined by the server ID of the containing
server, and the node ID. The kenrel must have IPv4 packet forwarding turned on. Run
sysctl -w net.ipv4.ip_forward=1
to turn it on. Servers maintain GRE tunnels to each other to route LAN packets across
the public internet. Be sure to allow relevant incoming traffic at iptabels or other
firewall. For example, ufw on Ubuntu will block the GRE traffic by default. Disable
it by running
ufw disable
or explicitly allow GRE traffic to pass.