Compare commits

...

2 commits

Author SHA1 Message Date
Nico Schottelius
edeb72ddf1 [openwrt/nat64] add babel->kernel support
Needed for local ibgp routes
2024-07-26 11:04:35 +02:00
Nico Schottelius
a84ffc49e9 [openwrt/nat64] only use prefix, nt 2024-07-26 10:43:17 +02:00

View file

@ -9,19 +9,19 @@
# 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 [ $# -lt 7 ] ; then if [ $# -lt 8 ] ; then
echo $0 "address hostname nat64prefix nat64route ipv4address ipv4gw asn routerid iBGPpeer1 [iBGPpeer2...]" echo $0 "address hostname nat64prefix ipv4address ipv4gw asn routerid babelpw iBGPpeer1 [iBGPpeer2...]"
exit 1 exit 1
fi fi
address=$1; shift address=$1; shift
hostname=$1; shift hostname=$1; shift
nat64prefix=$1; shift nat64prefix=$1; shift
nat64route=$1; shift
ipv4address=$1; shift ipv4address=$1; shift
ipv4gw=$1; shift ipv4gw=$1; shift
asn=$1; shift asn=$1; shift
routerid=$1; shift routerid=$1; shift
babelpw=$1; shift
ibgp_peers="$@" ibgp_peers="$@"
# Now $@ only contains iBGP peers # Now $@ only contains iBGP peers
@ -30,8 +30,8 @@ cat <<EOF | ssh -t "root@${address}"
set -x set -x
opkg update opkg update
# add jool + bird2 # add jool + bird2 + tcpdump
opkg install jool-tools-netfilter bird2 bird2c opkg install jool-tools-netfilter bird2 bird2c tcpdump tmux
# 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
@ -73,9 +73,21 @@ cat > /etc/bird.conf <<BBB
log syslog all; log syslog all;
router id ${routerid}; router id ${routerid};
protocol device { }
protocol bfd { }
# Just announce, no kernel interaction
protocol static static6 { protocol static static6 {
ipv6; ipv6;
route ${nat64route} unreachable; route ${nat64prefix} unreachable;
}
# for getting iBGP routes
protocol babel {
interface "br-lan", "wan" { type wired; authentication mac; password "${babelpw}"; };
ipv6 { export where (source = RTS_DEVICE) || (source = RTS_BABEL); };
}
protocol kernel kernel_v6 {
ipv6 { export export where source ~ [ RTS_BABEL ]; };
} }
BBB BBB