From 48abb08b5a3afbbd46cb20c314b938a47f467c27 Mon Sep 17 00:00:00 2001 From: toby Date: Mon, 4 Feb 2019 18:09:28 -0800 Subject: [PATCH] setting loopback source IP on all bgp routes for IPv6 as well - did this on ipv4 but may need patching as I wanted to use only the public IP for public routes on IPv4. may still break if for whatever reason it prefers the mgmtgw/ipmigw IP like it just happened on ipv6 --- debian/wit-network-config.postinst | 1 + files/frr.conf.wit | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/wit-network-config.postinst b/debian/wit-network-config.postinst index 0005508..88e549d 100755 --- a/debian/wit-network-config.postinst +++ b/debian/wit-network-config.postinst @@ -354,6 +354,7 @@ case "$1" in -e "s/BASTION-PUBLIC-IP/$BASTIONPUBLICIP/" \ -e "s/FRR_GRE_ASN/${FRR_GRE_ASN:=$NODEASN}/" \ -e "s/FRRROUTERID/${LOOPBACKv4}/" \ + -e "s/LOOPBACK-IPV6/${LOOPBACKv6}/" \ -e "s/NODEASN/${NODEASN}/" \ $FRRCONFIG [ -z $FRR_EDGE_NEIGH ] || sed -i -e 's/!!! //' $FRRCONFIG diff --git a/files/frr.conf.wit b/files/frr.conf.wit index adaffce..a063087 100644 --- a/files/frr.conf.wit +++ b/files/frr.conf.wit @@ -270,15 +270,20 @@ route-map LOCALNETSv6 permit 5 !!! ! -!!BASTION route-map BASTION permit 5 +!!BASTION route-map BASTIONv4 permit 5 !!BASTION match ip address prefix-len 0 !!BASTION set src BASTION-PUBLIC-IP -!!BASTION route-map BASTION permit 10 +!!BASTION route-map BASTIONv4 permit 10 !!BASTION match ip address prefix-list ALL -!!BASTION ip protocol bgp route-map BASTION +!!BASTION ip protocol bgp route-map BASTIONv4 +!!BASTION route-map BASTIONv6 permit 5 +!!BASTION match ipv6 address prefix-list ALL +!!BASTION set src LOOPBACK-IPV6 + +!!BASTION ipv6 protocol bgp route-map BASTIONv6 ! line vty