hamnet70/impl/setup_tundev.sh
Thomas Kolb c1af786a70
Some checks failed
/ build-hamnet70 (push) Failing after 18s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
WIP: handle packets from the TUN device in digipeater
This is only a backup commit.
2024-11-10 23:13:54 +01:00

20 lines
415 B
Bash
Executable file

#!/bin/bash
if [ -z "$1" ]; then
echo "usage: $0 <device-id>"
echo
echo "device-id: Unique number of this device. Will go into the last byte of the IP address."
exit 1
fi
set -euo pipefail
HOSTID="$1"
DEV=hamnet70
sudo ip tuntap add dev $DEV mode tun pi user $(whoami)
sudo ip link set dev $DEV txqueuelen 16 # default is 500
sudo ip link set dev $DEV up
sudo ip address add dev $DEV fd73::$HOSTID/64