@ -18,6 +18,19 @@ ensure_started() {
test -e state/$mach/$netns || machines/$mach/start.sh
}
setup_for_router4() {
sysctl net.ipv4.conf.all.forwarding=1
setup_for_router6() {
sysctl net.ipv6.conf.all.forwarding=1
setup_for_router() {
setup_for_router4
setup_for_router6
attach() {
machines/$mach/attach.sh "$@"
@ -1,9 +1,13 @@
#!/bin/sh
set -eu
. ./lib.shs
# typically: bring up the networks
ip link set dev lo up
setup_for_router
# uplink
# glue networks for both AFs
ip addr add 100.64.224.2/30 dev up_ve
# some random address in the internet :-P
ip link add somewhere type dummy
ip addr add 100.111.0.1/32 dev somewhere