[openwrt/nat64] add babel->kernel support
Needed for local ibgp routes
This commit is contained in:
parent
a84ffc49e9
commit
edeb72ddf1
1 changed files with 13 additions and 1 deletions
|
@ -10,7 +10,7 @@
|
||||||
# - do not provide IPv4 or IPv6 dhcp/ra on any interface
|
# - do not provide IPv4 or IPv6 dhcp/ra on any interface
|
||||||
|
|
||||||
if [ $# -lt 8 ] ; then
|
if [ $# -lt 8 ] ; then
|
||||||
echo $0 "address hostname nat64prefix ipv4address ipv4gw asn routerid iBGPpeer1 [iBGPpeer2...]"
|
echo $0 "address hostname nat64prefix ipv4address ipv4gw asn routerid babelpw iBGPpeer1 [iBGPpeer2...]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ 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
|
||||||
|
@ -72,11 +73,22 @@ 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
|
# Just announce, no kernel interaction
|
||||||
protocol static static6 {
|
protocol static static6 {
|
||||||
ipv6;
|
ipv6;
|
||||||
route ${nat64prefix} 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
|
||||||
|
|
||||||
for ibgp_peer in ${ibgp_peers}; do
|
for ibgp_peer in ${ibgp_peers}; do
|
||||||
|
|
Loading…
Reference in a new issue