You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
994 B
Bash

#!/bin/sh
set -eu
# typically: bring up the networks
ip link set dev lo up
# uplink
# glue networks for both AFs
ip addr add 100.64.224.2/30 dev up_ve
ip addr add 2a01:4f8:c0c:36b8:ffe0::2/126 dev up_ve
# (cg)nat: TODO as we are (1) lazy and (2) wishing for public IPv4 address anyway
#nft add table ip nat
#nft add chain ip nat postrouting type nat hook postrouting priority srcnat
#nft add rule oifname \"up_ve\" ip saddr TODO masquerade
ip link set dev up_ve up
ip route add default via 100.64.224.1 dev up_ve
ip route add default via 2a01:4f8:c0c:36b8:ffe0::1 dev up_ve
# network to my home
# TODO: make this PPP(oE) in the future?
# It's silly to think that I would be the first customer, but the IP addresses do not care :-P
ip addr add 100.64.225.1/30 dev home_ve
ip addr add 2a01:4f8:c0c:36b8:ffe1::1/126 dev home_ve
ip link set dev home_ve up
# low-key delegated prefix :-P
ip route add 2a01:4f8:c0c:36b8:ffe1::/80 via 2a01:4f8:c0c:36b8:ffe1::2 dev home_ve
# TODO: DHCPv6 or IPv6CP