Merge pull request 'add docs for creating a dummy interface' (#16) from mark22k/docs:dummy into master

Reviewed-on: https://codeberg.org/CRXN/docs/pulls/16
This commit is contained in:
Marek Küthe 2023-01-03 10:32:19 +00:00
commit 2c49366481
2 changed files with 44 additions and 0 deletions

View File

@ -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 <ip>/128
```
Replace `<ip>` 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 <ip>/128
post-down ip link del crxn
```
Alternatively, you can use the following configuration:
```
auto crxn
iface crxn inet6 static
address <ip>
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.

View File

@ -3,3 +3,4 @@
- [Forwarding](forwarding)
- [Setting up Bird](bird)
- [Create a dummy interface](create-dummy-interface)