From 5c84884874256026fa39698382a4d5b67ee5fef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20K=C3=BCthe?= Date: Mon, 2 Jan 2023 17:48:52 +0100 Subject: [PATCH] add docs for creating a dummy interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marek Küthe --- docs/routing/create-dummy-interface.md | 43 ++++++++++++++++++++++++++ docs/routing/index.md | 1 + 2 files changed, 44 insertions(+) create mode 100644 docs/routing/create-dummy-interface.md diff --git a/docs/routing/create-dummy-interface.md b/docs/routing/create-dummy-interface.md new file mode 100644 index 0000000..cd811df --- /dev/null +++ b/docs/routing/create-dummy-interface.md @@ -0,0 +1,43 @@ + +# Create a dummy interface + +For routes to be installed into the kernel, the source IP must be bound to an interface. Often the CRXN address is not on any interface. Therefore one creates a dummy interface. Alternatively, you can bind the CRXN IP address to the loopback interface. If the CRXN IP address is not bound to an interface, the `Netlink: Invalid argument` error can occur at bird. + +You can create a dummy interface with the following command: +``` +ip link add crxn type dummy +ip link set dev crxn up +``` +Here `crxn` is the name of the interface. + +To bind the CRXN IP address to the interface you can use the following command: +``` +ip addr add dev crxn /128 +``` +Replace `` with the CRXN IP address. + +To delete the dummy interface you can use the following command: +``` +ip link del crxn +``` + +## Automatic start with ifupdown + +``` +auto crxn +iface crxn inet6 manual + pre-up ip link add crxn type dummy + up ip addr add dev crxn /128 + post-down ip link del crxn +``` + +Alternatively, you can use the following configuration: +``` +auto crxn +iface crxn inet6 static + address + netmask 128 + pre-up ip link add crxn type dummy + post-down ip link del crxn +``` +Here the assignment of the IP address is delegated to ifupdown. diff --git a/docs/routing/index.md b/docs/routing/index.md index 609d418..7c26bf9 100644 --- a/docs/routing/index.md +++ b/docs/routing/index.md @@ -3,3 +3,4 @@ - [Forwarding](forwarding) - [Setting up Bird](bird) +- [Create a dummy interface](create-dummy-interface)