We don't have a proper review platform for jnt, so going with a task for now.
eqsin has special routing needs to avoid routes that include a round trip through the US or (less often) the EU.
those changes have not been reflected into JNT yet.
Here are the changes that needs to be done but reviewed first.
- Move the logic of policy-statement BGP_avoid_long_RTT_in to policy-statement BGP_community_actions with a conditional if site == "eqsin"
- Move the logic of policy-statement BGP_avoid_long_RTT_out to policy-statement BGP(6)_outfilter with a conditional if site == "eqsin"
Those seems cleaner to implement that way rather than adding an import/export policy-statement. But also increase the complexity of the critical policy-statement BGP(6)_outfilter.
diff --git a/templates/cr/policy-options.conf b/templates/cr/policy-options.conf index 7f025b3..8d31e20 100644 --- a/templates/cr/policy-options.conf +++ b/templates/cr/policy-options.conf @@ -152,7 +152,16 @@ policy-statement BGP6_outfilter { protocol aggregate; prefix-list bgp6-out; } + {% if site == "eqsin" %} + then { + community add PREPEND_3_NA; + community add PREPEND_3_EU; + accept; + } + {% else %} then accept; + {% endif %} + } term customers { from community PEER_CUSTOMER; @@ -410,6 +419,16 @@ policy-statement BGP_community_actions { next policy; } } + {% if site == "eqsin" %} + /* De-pref transit routes learned in NA & EU - T190559 */ + term BGP_depref_NA_EU { + from community [ AS1299:CUSTS_US AS1299:PEERS_US AS2914:PEERS_US AS6453:PEERS_US AS3491:CUSTS_US AS3491:PEERS_US AS1299:CUSTS_EU AS1299:PEERS_EU AS6453:PEERS_EU AS2914:PEERS_EU AS2914:CUSTS_EU AS2914:CUSTS_US ]; + then { + local-preference 80; + next policy; + } + } + {% endif %} term peer-internal { from community PEER_INTERNAL; then { @@ -467,7 +486,15 @@ policy-statement BGP_outfilter { protocol aggregate; prefix-list bgp-out; } + {% if site == "eqsin" %} + then { + community add PREPEND_3_NA; + community add PREPEND_3_EU; + accept; + } + {% else %} then accept; + {% endif %} } term customers { from community PEER_CUSTOMER; @@ -475,6 +502,7 @@ policy-statement BGP_outfilter { } then reject; } policy-statement BGP_prepend1_out { term prepend { from { @@ -662,7 +690,19 @@ policy-statement ospf_export { } then reject; } +community AS1299:CUSTS_EU members 1299:30000; +community AS1299:CUSTS_US members 1299:35000; +community AS1299:PEERS_EU members 1299:20000; +community AS1299:PEERS_US members 1299:25000; community AS{{ asn }}:ALL members "^{{ asn }}:[0-9]+$"; +community AS2914:CUSTS_EU members 2914:3275; +community AS2914:CUSTS_US members 2914:3075; +community AS2914:PEERS_EU members 2914:3200; +community AS2914:PEERS_US members 2914:3000; +community AS3491:CUSTS_US members 3491:200; +community AS3491:PEERS_US members 3491:2000; +community AS6453:PEERS_EU members 6453:2000; +community AS6453:PEERS_US members 6453:1000; community AVOIDED_PATH members {{ asn }}:0; community GRACEFUL_SHUTDOWN members 65535:0; community PARTIAL_TRANSIT_ROUTE members {{ asn }}:5; @@ -672,6 +712,8 @@ community PEER_INTERNAL members {{ asn }}:6; community PEER_PRIVATE_PEER members {{ asn }}:8; community PEER_PUBLIC_PEER members {{ asn }}:9; community PREFERRED_TRANSIT members {{ asn }}:10; +community PREPEND_3_EU members [ 1299:2003 65103:2000 2914:4223 2914:4213 ]; +community PREPEND_3_NA members [ 2914:4023 65103:1000 1299:5003 2914:4013 ]; community SELECTED_PATH members {{ asn }}:11; community TRANSIT_ROUTE members {{ asn }}:4; as-path too-many-hops ".{100,}";
In addition we need to do the following on parts of the config that are not managed by jnt:
delete protocols bgp group Transit6 import BGP_avoid_long_RTT_in delete protocols bgp group Transit4 import BGP_avoid_long_RTT_in delete protocols bgp group Private-Peer4 import BGP_avoid_long_RTT_in delete protocols bgp group Private-Peer6 import BGP_avoid_long_RTT_in delete protocols bgp group Transit6 export BGP_avoid_long_RTT_out delete protocols bgp group Transit4 export BGP_avoid_long_RTT_out
Then, until T204281 is tested, either:
- Move PCCW from private-peer to transit (preferred option)
- keep term peer-private-peer removed from BGP_community_actions
- Accept to give a higher priority to PCCW (least preferred option)