From 0eceabfe1d40d520c01e53fd41217720845b3b66 Mon Sep 17 00:00:00 2001 From: toby Date: Sat, 20 Oct 2018 17:51:53 +0200 Subject: [PATCH] implementing some ad-hoc patches I did yesterday to get it going --- debian/wit-network-config.postinst | 8 ++++++++ files/frr.conf.wit | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/wit-network-config.postinst b/debian/wit-network-config.postinst index 6da3c97..d314cf6 100755 --- a/debian/wit-network-config.postinst +++ b/debian/wit-network-config.postinst @@ -89,6 +89,13 @@ case "$1" in local=$(dig_txt local.${ifname}.${HOSTNAME}) remote=$(dig_txt remote.${ifname}.${HOSTNAME}) + + ## for the GRE tunnel to not have to deal with ibgp/full-mesh or reflectors prepending a private AS + TIER_ID=$(echo $LOOPBACKv4 | cut -d . -f 3) + NODE_ID=$(echo $LOOPBACKv4 | cut -d . -f 4) + FRR_GRE_ASN="4200$(printf "%03d" $TIER_ID)$(printf "%03d" $NODE_ID)" + + ## build FRR interface config to enable ND adv for ipv6 unmanaged FRR_IFS="${FRR_IFS}interface $ifname\n" FRR_IFS="${FRR_IFS} description $ifalias\n" @@ -284,6 +291,7 @@ case "$1" in -e "s/^!!! FRR_IPV6_CUSTOMERS_PFLIST/$FRR_IPV6_CUSTOMERS_PFLIST/" \ -e "s/^!!! FRR_IPV4_LOOPBACK_PFLIST/$FRR_IPV4_LOOPBACK_PFLIST/" \ -e "s/^!!! FRR_IPV6_LOOPBACK_PFLIST/$FRR_IPV6_LOOPBACK_PFLIST/" \ + -e "s/FRR_GRE_ASN/${FRR_GRE_ASN}/" \ -e "s/FRRROUTERID/${LOOPBACKv4}/" \ -e "s/NODEASN/${NODEASN}/" \ $FRRCONFIG diff --git a/files/frr.conf.wit b/files/frr.conf.wit index bcbcbda..ac2b96a 100644 --- a/files/frr.conf.wit +++ b/files/frr.conf.wit @@ -27,7 +27,7 @@ router bgp NODEASN neighbor feth2 interface peer-group fabric !!! neighbor GRE peer-group !!! neighbor GRE remote-as external - !!! neighbor GRE local-as NODEDEFAULTASN + !!! neighbor GRE local-as FRR_GRE_ASN !!! neighbor GRE password wIt2Go !!! neighbor GRE ebgp-multihop 255 !!! neighbor eBGPv4 peer-group @@ -189,6 +189,10 @@ route-map LOCALNETSv6 permit 5 !!! description "allow WIT customer IPs" !!! match ip address prefix-list WITv4-CUSTOMERS !!! ! +!!! route-map FABRICv4-OUT permit 15 +!!! description "allow WIT loopback IPs" +!!! match ip address prefix-list LOOPBACKv4 +!!! ! !!! route-map FABRICv6-OUT permit 5