Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Redo the model for additional-paths in BGP (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
laxmikantchintakindi authored Oct 3, 2024
1 parent 5de2b52 commit d61c8f9
Show file tree
Hide file tree
Showing 53 changed files with 1,389 additions and 708 deletions.
54 changes: 54 additions & 0 deletions ansible_collections/arista/avd/docs/porting-guides/5.x.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,60 @@ port_channel_interfaces:
+ encapsulation: unmatched
```

### Data models for BGP additional-paths under `router_bgp` has been changed

In AVD 5.0.0, the following data models have been changed and will require updates to the inventory:

- `router_bgp.vrfs[].address_family_ipv4.bgp.additional_paths`
- `router_bgp.vrf[].address_family_ipv6.bgp.additional_paths`
- `router_bgp.address_family_evpn.bgp.peer_groups[].additional_paths`
- `router_bgp.address_family_evpn.bgp_additional_paths`
- `router_bgp.address_family_path_selection.bgp.additional_paths`
- `router_bgp.address_family_path_selection.neighbors[].additional_paths`

The key `additional_paths.send` is a now a string instead of dictionary, and extra keys have been added for the various related arguments.

The difference shown below keeps the previous configurations.

```diff
router_bgp:
address_family_path_selection:
bgp:
additional_paths:
- send:
- any: true
+ send: any
<...>
vrfs:
address_family_ipv4:
bgp:
additional_paths:
- send:
- ecmp_limit: 100
+ send: ecmp
+ send_limit: 100
<...>
address_family_ipv6:
bgp:
additional_paths:
- send:
- limit: 100
+ send: limit
+ send_limit: 100
<...>
address_family_evpn:
bgp_additional_paths:
receive: true
- send:
- ecmp
+ send: ecmp
peer_groups:
additional_paths:
- send:
- any: false
+ send: disabled
```

### Fix issues with flags, source/destination ports, and field set for TCP/UDP protocol under traffic-policies

The change has been incorporated into `traffic-policies.j2` eos template.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,20 @@ router bgp 65101
redistribute static rcf Router_BGP_Static()
!
address-family ipv4
bgp additional-paths install
bgp additional-paths receive
bgp additional-paths send ecmp limit 20
neighbor foo additional-paths receive
neighbor foo prefix-list PL-BAR-v4-IN in
neighbor foo prefix-list PL-BAR-v4-OUT out
neighbor foo default-originate route-map RM-FOO-MATCH always
neighbor foo additional-paths send ecmp limit 20 prefix-list PL1
neighbor 10.2.3.8 rcf in Address_Family_IPV4_In()
neighbor 10.2.3.9 rcf out Address_Family_IPV4_Out()
neighbor 192.0.2.1 additional-paths receive
neighbor 192.0.2.1 prefix-list PL-FOO-v4-IN in
neighbor 192.0.2.1 prefix-list PL-FOO-v4-OUT out
neighbor 192.0.2.1 additional-paths send limit 20 prefix-list PL1
network 10.0.0.0/8
network 172.16.0.0/12
network 192.168.0.0/16 route-map RM-FOO-MATCH
Expand All @@ -257,10 +264,17 @@ router bgp 65101
redistribute static rcf Address_Family_IPV4_Static()
!
address-family ipv6
bgp additional-paths install ecmp-primary
bgp additional-paths receive
bgp additional-paths send any
neighbor baz additional-paths receive
neighbor baz prefix-list PL-BAR-v6-IN in
neighbor baz prefix-list PL-BAR-v6-OUT out
neighbor baz additional-paths send ecmp limit 20
neighbor 2001:db8::1 additional-paths receive
neighbor 2001:db8::1 prefix-list PL-FOO-v6-IN in
neighbor 2001:db8::1 prefix-list PL-FOO-v6-OUT out
neighbor 2001:db8::1 additional-paths send ecmp limit 20
neighbor 2001:db8::2 rcf in Address_Family_IPV6_In()
neighbor 2001:db8::2 rcf out Address_Family_IPV6_Out()
network 2001:db8:100::/40
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ router bgp 65101
neighbor ADDITIONAL-PATH-PG-5 activate
neighbor ADDITIONAL-PATH-PG-5 additional-paths send limit 42
neighbor ADDITIONAL-PATH-PG-6 activate
no neighbor ADDITIONAL-PATH-PG-6 additional-paths send any
no neighbor ADDITIONAL-PATH-PG-6 additional-paths send
neighbor EVPN-OVERLAY-PEERS default-route
neighbor EVPN-OVERLAY-PEERS activate
neighbor EVPN-OVERLAY-PEERS domain remote
Expand All @@ -299,7 +299,9 @@ router bgp 65101
neighbor TEST-ENCAPSULATION-2 activate
neighbor TEST-ENCAPSULATION-2 encapsulation path-selection
neighbor 10.100.100.1 activate
neighbor 10.100.100.1 additional-paths receive
neighbor 10.100.100.1 default-route
neighbor 10.100.100.1 additional-paths send any
neighbor 10.100.100.2 activate
neighbor 10.100.100.2 default-route route-map RM_DEFAULT_ROUTE
neighbor 10.100.100.3 activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ ASN Notation: asplain
| ------ | --------- |
| 65001 | 1.0.1.1 |

#### BGP Neighbors

| Neighbor | Remote AS | VRF | Shutdown | Send-community | Maximum-routes | Allowas-in | BFD | RIB Pre-Policy Retain | Route-Reflector Client | Passive | TTL Max Hops |
| -------- | --------- | --- | -------- | -------------- | -------------- | ---------- | --- | --------------------- | ---------------------- | ------- | ------------ |
| 1.1.1.1 | - | VRF02 | - | - | - | - | - | - | - | - | - |

#### Router BGP VRFs

| VRF | Route-Distinguisher | Redistribute |
Expand All @@ -73,19 +79,29 @@ router bgp 65001
neighbor FOOBAR activate
!
address-family ipv4 multicast
bgp additional-paths receive
neighbor FOOBAR activate
neighbor FOOBAR additional-paths receive
neighbor 10.1.1.1 activate
neighbor 10.1.1.1 additional-paths receive
!
address-family ipv6
no neighbor FOOBAR activate
!
address-family ipv6 multicast
bgp additional-paths receive
no neighbor FOOBAR activate
neighbor FOOBAR additional-paths receive
neighbor aa::1 additional-paths receive
redistribute isis rcf Router_BGP_Isis()
redistribute ospf match internal
redistribute ospfv3 match external
redistribute ospfv3 match nssa-external 2
!
vrf VRF01
bgp additional-paths install
bgp additional-paths receive
bgp additional-paths send any
no bgp redistribute-internal
redistribute attached-host route-map RM_VRF_ATTACHED-HOST
redistribute bgp leaked route-map RM_VRF_BGP
Expand Down Expand Up @@ -114,8 +130,10 @@ router bgp 65001
bgp additional-paths receive
bgp additional-paths send ecmp limit 4
neighbor 1.2.3.4 activate
neighbor 1.2.3.4 additional-paths receive
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
neighbor 1.2.3.4 additional-paths send any
network 2.3.4.0/24 route-map BARFOO
no bgp redistribute-internal
redistribute connected rcf VRF_AFIPV4_RCF_CONNECTED_1()
Expand All @@ -130,6 +148,7 @@ router bgp 65001
bgp additional-paths receive
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
neighbor 1.2.3.4 additional-paths receive
network 239.0.0.0/24 route-map BARFOO
redistribute connected
redistribute ospf match internal
Expand All @@ -144,8 +163,10 @@ router bgp 65001
bgp additional-paths receive
bgp additional-paths send any
neighbor aa::1 activate
neighbor aa::1 additional-paths receive
neighbor aa::1 route-map FOO in
neighbor aa::1 route-map BAR out
neighbor aa::1 additional-paths send any
neighbor aa::2 activate
neighbor aa::2 rcf in VRF_AFIPV6_RCF_IN()
neighbor aa::2 rcf out VRF_AFIPV6_RCF_OUT()
Expand All @@ -161,6 +182,8 @@ router bgp 65001
address-family ipv6 multicast
bgp missing-policy direction in action deny
bgp missing-policy direction out action deny
bgp additional-paths receive
neighbor aa::1 additional-paths receive
network ff08:1::/64
redistribute connected
redistribute ospf match external
Expand All @@ -169,6 +192,8 @@ router bgp 65001
redistribute static route-map VRF_AFIPV6MULTI_RM_STATIC
!
vrf VRF02
neighbor 1.1.1.1 additional-paths receive
neighbor 1.1.1.1 additional-paths send ecmp limit 24
redistribute attached-host
redistribute bgp leaked
redistribute connected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,20 @@ router bgp 65101
redistribute static rcf Router_BGP_Static()
!
address-family ipv4
bgp additional-paths install
bgp additional-paths receive
bgp additional-paths send ecmp limit 20
neighbor foo additional-paths receive
neighbor foo prefix-list PL-BAR-v4-IN in
neighbor foo prefix-list PL-BAR-v4-OUT out
neighbor foo default-originate route-map RM-FOO-MATCH always
neighbor foo additional-paths send ecmp limit 20 prefix-list PL1
neighbor 10.2.3.8 rcf in Address_Family_IPV4_In()
neighbor 10.2.3.9 rcf out Address_Family_IPV4_Out()
neighbor 192.0.2.1 additional-paths receive
neighbor 192.0.2.1 prefix-list PL-FOO-v4-IN in
neighbor 192.0.2.1 prefix-list PL-FOO-v4-OUT out
neighbor 192.0.2.1 additional-paths send limit 20 prefix-list PL1
network 10.0.0.0/8
network 172.16.0.0/12
network 192.168.0.0/16 route-map RM-FOO-MATCH
Expand All @@ -117,10 +124,17 @@ router bgp 65101
redistribute static rcf Address_Family_IPV4_Static()
!
address-family ipv6
bgp additional-paths install ecmp-primary
bgp additional-paths receive
bgp additional-paths send any
neighbor baz additional-paths receive
neighbor baz prefix-list PL-BAR-v6-IN in
neighbor baz prefix-list PL-BAR-v6-OUT out
neighbor baz additional-paths send ecmp limit 20
neighbor 2001:db8::1 additional-paths receive
neighbor 2001:db8::1 prefix-list PL-FOO-v6-IN in
neighbor 2001:db8::1 prefix-list PL-FOO-v6-OUT out
neighbor 2001:db8::1 additional-paths send ecmp limit 20
neighbor 2001:db8::2 rcf in Address_Family_IPV6_In()
neighbor 2001:db8::2 rcf out Address_Family_IPV6_Out()
network 2001:db8:100::/40
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ router bgp 65101
neighbor ADDITIONAL-PATH-PG-5 activate
neighbor ADDITIONAL-PATH-PG-5 additional-paths send limit 42
neighbor ADDITIONAL-PATH-PG-6 activate
no neighbor ADDITIONAL-PATH-PG-6 additional-paths send any
no neighbor ADDITIONAL-PATH-PG-6 additional-paths send
neighbor EVPN-OVERLAY-PEERS default-route
neighbor EVPN-OVERLAY-PEERS activate
neighbor EVPN-OVERLAY-PEERS domain remote
Expand All @@ -122,7 +122,9 @@ router bgp 65101
neighbor TEST-ENCAPSULATION-2 activate
neighbor TEST-ENCAPSULATION-2 encapsulation path-selection
neighbor 10.100.100.1 activate
neighbor 10.100.100.1 additional-paths receive
neighbor 10.100.100.1 default-route
neighbor 10.100.100.1 additional-paths send any
neighbor 10.100.100.2 activate
neighbor 10.100.100.2 default-route route-map RM_DEFAULT_ROUTE
neighbor 10.100.100.3 activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,29 @@ router bgp 65001
neighbor FOOBAR activate
!
address-family ipv4 multicast
bgp additional-paths receive
neighbor FOOBAR activate
neighbor FOOBAR additional-paths receive
neighbor 10.1.1.1 activate
neighbor 10.1.1.1 additional-paths receive
!
address-family ipv6
no neighbor FOOBAR activate
!
address-family ipv6 multicast
bgp additional-paths receive
no neighbor FOOBAR activate
neighbor FOOBAR additional-paths receive
neighbor aa::1 additional-paths receive
redistribute isis rcf Router_BGP_Isis()
redistribute ospf match internal
redistribute ospfv3 match external
redistribute ospfv3 match nssa-external 2
!
vrf VRF01
bgp additional-paths install
bgp additional-paths receive
bgp additional-paths send any
no bgp redistribute-internal
redistribute attached-host route-map RM_VRF_ATTACHED-HOST
redistribute bgp leaked route-map RM_VRF_BGP
Expand Down Expand Up @@ -59,8 +69,10 @@ router bgp 65001
bgp additional-paths receive
bgp additional-paths send ecmp limit 4
neighbor 1.2.3.4 activate
neighbor 1.2.3.4 additional-paths receive
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
neighbor 1.2.3.4 additional-paths send any
network 2.3.4.0/24 route-map BARFOO
no bgp redistribute-internal
redistribute connected rcf VRF_AFIPV4_RCF_CONNECTED_1()
Expand All @@ -75,6 +87,7 @@ router bgp 65001
bgp additional-paths receive
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
neighbor 1.2.3.4 additional-paths receive
network 239.0.0.0/24 route-map BARFOO
redistribute connected
redistribute ospf match internal
Expand All @@ -89,8 +102,10 @@ router bgp 65001
bgp additional-paths receive
bgp additional-paths send any
neighbor aa::1 activate
neighbor aa::1 additional-paths receive
neighbor aa::1 route-map FOO in
neighbor aa::1 route-map BAR out
neighbor aa::1 additional-paths send any
neighbor aa::2 activate
neighbor aa::2 rcf in VRF_AFIPV6_RCF_IN()
neighbor aa::2 rcf out VRF_AFIPV6_RCF_OUT()
Expand All @@ -106,6 +121,8 @@ router bgp 65001
address-family ipv6 multicast
bgp missing-policy direction in action deny
bgp missing-policy direction out action deny
bgp additional-paths receive
neighbor aa::1 additional-paths receive
network ff08:1::/64
redistribute connected
redistribute ospf match external
Expand All @@ -114,6 +131,8 @@ router bgp 65001
redistribute static route-map VRF_AFIPV6MULTI_RM_STATIC
!
vrf VRF02
neighbor 1.1.1.1 additional-paths receive
neighbor 1.1.1.1 additional-paths send ecmp limit 24
redistribute attached-host
redistribute bgp leaked
redistribute connected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ router_bgp:
additional_paths:
receive: false
send: ecmp
send_ecmp_limit: 30
send_limit: 30
Loading

0 comments on commit d61c8f9

Please sign in to comment.