openwrt/nat64: begin to introduce iBGP syntax
This commit is contained in:
parent
437fc066f7
commit
efb9b1ca0d
1 changed files with 10 additions and 5 deletions
|
@ -8,19 +8,24 @@
|
||||||
# Consequences
|
# Consequences
|
||||||
# - do not provide IPv4 or IPv6 dhcp/ra on any interface
|
# - do not provide IPv4 or IPv6 dhcp/ra on any interface
|
||||||
|
|
||||||
if [ $# -ne 3 ] ; then
|
if [ $# -lt 4 ] ; then
|
||||||
echo $0 address hostname nat64prefix
|
echo $0 "address hostname nat64prefix asn iBGPpeer1 [iBGPpeer2...]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
address=$1; shift
|
address=$1; shift
|
||||||
hostname=$1; shift
|
hostname=$1; shift
|
||||||
nat64=$1; shift
|
nat64=$1; shift
|
||||||
|
asn=$1; shift
|
||||||
|
|
||||||
|
# Now $@ only contains iBGP peers
|
||||||
|
|
||||||
cat <<EOF | ssh -t "root@${address}"
|
cat <<EOF | ssh -t "root@${address}"
|
||||||
set -x
|
set -x
|
||||||
opkg update
|
opkg update
|
||||||
opkg install kmod-jool jool-tools
|
|
||||||
|
# add jool + bird2
|
||||||
|
opkg install jool-tools-netfilter bird2
|
||||||
|
|
||||||
# Do not announce ULA - we have GUA
|
# Do not announce ULA - we have GUA
|
||||||
uci delete network.globals.ula_prefix
|
uci delete network.globals.ula_prefix
|
||||||
|
@ -28,11 +33,11 @@ uci delete network.globals.ula_prefix
|
||||||
# Set hostname
|
# Set hostname
|
||||||
uci set system.@system[0].hostname="${hostname}"
|
uci set system.@system[0].hostname="${hostname}"
|
||||||
|
|
||||||
# add jool
|
|
||||||
|
|
||||||
# Do something wireless (?)
|
# Do something wireless (?)
|
||||||
# disable?
|
# disable?
|
||||||
|
|
||||||
|
echo "Setting up ibgp for $@ .."
|
||||||
|
|
||||||
uci commit
|
uci commit
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Add table
Reference in a new issue