We routing now (lol)

master
LEdoian 3 weeks ago
parent 22a1a23749
commit 7ec3c99ca3

@ -18,6 +18,19 @@ ensure_started() {
test -e state/$mach/$netns || machines/$mach/start.sh 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() { attach() {
machines/$mach/attach.sh "$@" machines/$mach/attach.sh "$@"
} }

@ -1,9 +1,13 @@
#!/bin/sh #!/bin/sh
set -eu set -eu
. ./lib.shs
# typically: bring up the networks # typically: bring up the networks
ip link set dev lo up ip link set dev lo up
setup_for_router
# uplink # uplink
# glue networks for both AFs # glue networks for both AFs
ip addr add 100.64.224.2/30 dev up_ve ip addr add 100.64.224.2/30 dev up_ve

@ -1,9 +1,13 @@
#!/bin/sh #!/bin/sh
set -eu set -eu
. ./lib.shs
# typically: bring up the networks # typically: bring up the networks
ip link set dev lo up ip link set dev lo up
setup_for_router
# some random address in the internet :-P # some random address in the internet :-P
ip link add somewhere type dummy ip link add somewhere type dummy
ip addr add 100.111.0.1/32 dev somewhere ip addr add 100.111.0.1/32 dev somewhere

Loading…
Cancel
Save