#!/bin/sh set -e setup() { local mode=$1 local dev=$2 ip tuntap add $dev mode $mode ip l set up $dev ip a a 10.1.1.1/24 dev $dev ip r a 10.1.0.0/16 via 10.1.1.2 proto static ip a a 2001:470:de6f:5311::1/64 dev $dev ip r a 2001:470:de6f:5312::/64 via 2001:470:de6f:5311::2 proto static ip r a unreachable 2001:470:de6f:5310::/56 proto static || true } usage() { echo "Usage: $0 " exit 1 } if [ $# -ne 2 ]; then usage fi setup $1 $2