From 9dcb4bd61bd7e54454292daca50994396ca02b49 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Wed, 15 Jul 2026 07:47:03 +0200 Subject: [PATCH] Rename binary linux-network-namespace-labs to lnnl The old name was a bit too long. --- .gitignore | 2 +- README.adoc | 23 +++++++++++------------ ci/examples | 14 +++++++------- examples/bird-ospf/README.adoc | 4 ++-- examples/bird-ospf/lab.conf | 2 +- examples/layer3/README.adoc | 4 ++-- examples/layer3/lab.conf | 2 +- examples/podman-frr/README.adoc | 2 +- examples/podman-frr/run.sh | 2 +- examples/readme/lab.conf | 2 +- go.mod | 2 +- 11 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index 7661a79..e90d63c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/linux-network-namespace-labs +/lnnl diff --git a/README.adoc b/README.adoc index acb60fa..b5afc37 100644 --- a/README.adoc +++ b/README.adoc @@ -1,11 +1,11 @@ = README -linux-network-namespace-labs is a small program to easily create networking -lab setups based on Linux network namespaces. It provides a quick way to set -up labs using a text file describing the architecture (networks, nodes, links, -commands). This is much simpler than running each node in a separate virtual -machine or manually allocating the IP addresses for each node. It is licensed -under GPLv3+. +linux-network-namespace-labs (lnnl) is a small program to easily create +networking lab setups based on Linux network namespaces. It provides a quick +way to set up labs using a text file describing the architecture (networks, +nodes, links, commands). This is much simpler than running each node in a +separate virtual machine or manually allocating the IP addresses for each +node. It is licensed under GPLv3+. == Requirements @@ -24,8 +24,7 @@ under GPLv3+. $ go build -Then copy the binary `linux-network-namespace-labs` to a directory in your -`$PATH`. +Then copy the binary `lnnl` to a directory in your `$PATH`. == Usage @@ -57,7 +56,7 @@ cmd ./setup.sh $1 Then set up the lab by running (as root): # cd examples/readme - # linux-network-namespace-labs up lab.conf + # lnnl up lab.conf [...] Now you can enter the network namespace of each router and test a simple @@ -89,18 +88,18 @@ well: When you change the configuration you can simply rerun "up" and it will remove the lab (and kill all processes inside it) before restarting it: - # linux-network-namespace-labs up lab.conf + # lnnl up lab.conf [...] When you're done you can remove the lab with: - # linux-network-namespace-labs down lab.conf + # lnnl down lab.conf [...] To get an overview of the network you can create a https://en.wikipedia.org/wiki/DOT_(graph_description_language)[DOT] file: - $ linux-network-namespace-labs dot lab.conf lab.dot + $ lnnl dot lab.conf lab.dot $ dot -Tpng lab.dot > lab.png image::examples/readme/lab.png[DOT style diagram of network nodes and links] diff --git a/ci/examples b/ci/examples index 945cb3d..3a04d0e 100755 --- a/ci/examples +++ b/ci/examples @@ -29,22 +29,22 @@ test -z "$(ip netns)" # No `cd` here to test that relative paths work -linux-network-namespace-labs up "$examples/bird-ospf/lab.conf" +lnnl up "$examples/bird-ospf/lab.conf" # Wait until OSPF is ready wait_for_route r1 3fff::1 wait_for_route r1 3fff::2 ip netns exec r1 ping -c1 r1-loop ip netns exec r1 ping -c1 r2-loop ip netns exec r1 ping -c1 r3-loop -linux-network-namespace-labs down "$examples/bird-ospf/lab.conf" +lnnl down "$examples/bird-ospf/lab.conf" test -z "$(ip netns)" test "$(cd /etc/netns; find)" = "." # directory empty cd "$examples/layer3" -linux-network-namespace-labs up lab.conf +lnnl up lab.conf ip netns exec r1 ip route add 3fff::1/128 dev r2 ip netns exec r1 ping -c1 3fff::1 -linux-network-namespace-labs down lab.conf +lnnl down lab.conf test -z "$(ip netns)" test "$(cd /etc/netns; find)" = "." # directory empty @@ -52,15 +52,15 @@ cd "$examples/podman-frr" ./run.sh wait_for_route r1 3fff::1 ip netns exec r1 ping -c1 r1-loop -linux-network-namespace-labs down lab.conf +lnnl down lab.conf test -z "$(ip netns)" test "$(cd /etc/netns; find)" = "." # directory empty cd "$examples/readme" -linux-network-namespace-labs up lab.conf +lnnl up lab.conf ip netns exec r1 ping -c1 r1-loop ip netns exec r1 ping -c1 r2-loop ip netns exec r1 ping -c1 r3-loop -linux-network-namespace-labs down lab.conf +lnnl down lab.conf test -z "$(ip netns)" test "$(cd /etc/netns; find)" = "." # directory empty diff --git a/examples/bird-ospf/README.adoc b/examples/bird-ospf/README.adoc index cba8f6d..d693c5d 100644 --- a/examples/bird-ospf/README.adoc +++ b/examples/bird-ospf/README.adoc @@ -10,7 +10,7 @@ directory `/run/bird/` exist. To start the lab use (as root): - # linux-network-namespace-labs up lab.conf + # lnnl up lab.conf You can use the following shell function to connect to the bird running on the current node: @@ -26,4 +26,4 @@ For example: To stop the lab use: - # linux-network-namespace-labs down lab.conf + # lnnl down lab.conf diff --git a/examples/bird-ospf/lab.conf b/examples/bird-ospf/lab.conf index d486108..544253d 100644 --- a/examples/bird-ospf/lab.conf +++ b/examples/bird-ospf/lab.conf @@ -1,4 +1,4 @@ -# Start lab with: linux-network-namespace-labs up lab.conf +# Start lab with: lnnl up lab.conf # r1 <-> r2 <-> r3 diff --git a/examples/layer3/README.adoc b/examples/layer3/README.adoc index 8ac8c49..c1d7963 100644 --- a/examples/layer3/README.adoc +++ b/examples/layer3/README.adoc @@ -7,7 +7,7 @@ You need kernel 6.7 and iproute2 6.8. Then start the lab (as root) with: - # linux-network-namespace-labs up lab.conf + # lnnl up lab.conf To enter the node use: @@ -37,4 +37,4 @@ To enter the node use: To stop the lab use: - # linux-network-namespace-labs down lab.conf + # lnnl down lab.conf diff --git a/examples/layer3/lab.conf b/examples/layer3/lab.conf index 9a67eed..01426f4 100644 --- a/examples/layer3/lab.conf +++ b/examples/layer3/lab.conf @@ -1,4 +1,4 @@ -# Start lab with: linux-network-namespace-labs up lab.conf +# Start lab with: lnnl up lab.conf # r1 <-> r2 diff --git a/examples/podman-frr/README.adoc b/examples/podman-frr/README.adoc index af38be8..545baf2 100644 --- a/examples/podman-frr/README.adoc +++ b/examples/podman-frr/README.adoc @@ -16,4 +16,4 @@ Connect to FRR in the container with: To stop the lab use: - # linux-network-namespace-labs down lab.conf + # lnnl down lab.conf diff --git a/examples/podman-frr/run.sh b/examples/podman-frr/run.sh index 3076556..a4d935f 100755 --- a/examples/podman-frr/run.sh +++ b/examples/podman-frr/run.sh @@ -25,7 +25,7 @@ podman_stop() { podman_stop r1 || true podman_stop r2 || true -linux-network-namespace-labs up lab.conf +lnnl up lab.conf podman_run r1 podman_run r2 diff --git a/examples/readme/lab.conf b/examples/readme/lab.conf index 3a47787..dd02d7a 100644 --- a/examples/readme/lab.conf +++ b/examples/readme/lab.conf @@ -1,4 +1,4 @@ -# Start lab with: linux-network-namespace-labs up lab.conf +# Start lab with: lnnl up lab.conf # Network range for loopback addresses of the nodes diff --git a/go.mod b/go.mod index 0860777..954835b 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module linux-network-namespace-labs +module lnnl go 1.26 -- 2.55.0