Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor(eos_cli_config_gen): Improved redistribute data models under router_bgp #4550

Merged
4 changes: 2 additions & 2 deletions ansible_collections/arista/avd/docs/porting-guides/5.x.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -1042,12 +1042,12 @@ As of AVD 5.0.0 the automatic conversion from both of the previous models has be
# New data model
router_bgp:
redistribute_routes:
- source_procol: connected
- source_protocol: connected
- source_protocol: static
vrfs:
- name: test
redistribute_routes:
- source_procol: connected
- source_protocol: connected
- source_protocol: static

# New data model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,12 @@ router bgp 65101
aggregate-address 1.1.1.0/24 advertise-only
aggregate-address 1.12.1.0/24 as-set summary-only attribute-map RM-ATTRIBUTE match-map RM-MATCH advertise-only
aggregate-address 2.2.1.0/24
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
redistribute connected rcf Router_BGP_Connected()
redistribute ospf include leaked
redistribute ospf match internal
redistribute ospf match external
redistribute ospf match nssa-external 1 include leaked route-map RM-REDISTRIBUTE-OSPF-NSSA-1
redistribute static rcf Router_BGP_Static()
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
!
address-family ipv4
bgp additional-paths install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,18 @@ router bgp 65101
neighbor 192.168.255.3 allowas-in 5
neighbor 192.168.255.3 maximum-routes 52000 warning-limit 2000 warning-only
neighbor 192.168.255.3 missing-policy address-family all direction in action deny
redistribute connected include leaked
redistribute isis level-2 include leaked route-map RM_BGP_EVPN
redistribute ospf match internal include leaked route-map RM_BGP_EVPN
redistribute ospf match external include leaked route-map RM_BGP_EVPN
redistribute ospfv3 include leaked route-map RM_BGP_EVPN
redistribute ospfv3 match external include leaked route-map RM_BGP_EVPN
redistribute ospfv3 match nssa-external include leaked route-map RM_BGP_EVPN
redistribute static include leaked
redistribute rip route-map RM_BGP_EVPN
redistribute attached-host route-map RM_BGP_EVPN
redistribute dynamic route-map RM_BGP_EVPN
redistribute user rcf RCF_BGP_EVPN()
!
vlan 2488
rd 145.245.21.0:1
Expand Down Expand Up @@ -319,6 +331,26 @@ router bgp 65101
!
address-family ipv4
no neighbor EVPN-OVERLAY-PEERS activate
redistribute attached-host route-map RM_BGP_EVPN_IPV4
redistribute bgp leaked route-map RM_BGP_EVPN_IPV4
redistribute connected route-map RM_BGP_EVPN_IPV4
redistribute dynamic rcf RCF_BGP_EVPN_IPV4()
redistribute user rcf RCF_BGP_EVPN_IPV4()
redistribute isis level-1 include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospf include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospfv3 include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospfv3 match external include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospfv3 match nssa-external 2 include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospf match external include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospf match nssa-external 1 include leaked route-map RM_BGP_EVPN_IPV4
redistribute rip route-map RM_BGP_EVPN_IPV4
redistribute static include leaked route-map RM_BGP_EVPN_IPV4
!
address-family ipv4 multicast
redistribute ospf route-map RM_BGP_EVPN_IPV4M
redistribute ospfv3 match internal route-map RM_BGP_EVPN_IPV4M
redistribute ospfv3 match external route-map RM_BGP_EVPN_IPV4M
redistribute ospfv3 match nssa-external 1 route-map RM_BGP_EVPN_IPV4M
!
vrf TENANT_A_PROJECT01
rd 192.168.255.3:11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ router bgp 65101
neighbor 192.168.255.1 peer group EVPN-OVERLAY-PEERS
neighbor 192.168.255.2 peer group EVPN-OVERLAY-PEERS
redistribute connected route-map RM-CONN-2-BGP
redistribute isis level-2 include leaked rcf RCF-CONN-2-BGP()
redistribute ospfv3 match internal include leaked route-map RM-CONN-2-BGP
redistribute ospfv3 match nssa-external include leaked route-map RM-CONN-2-BGP
redistribute dynamic rcf RCF-CONN-2-BGP()
!
vlan-aware-bundle B-ELAN-201
rd 192.168.255.3:20201
Expand Down Expand Up @@ -255,6 +259,9 @@ router bgp 65101
neighbor MLAG-IPv4-UNDERLAY-PEER activate
neighbor TEST_PEER_GRP next-hop address-family ipv6 originate
neighbor TEST_PEER_GRP activate
redistribute isis level-1 include leaked rcf Address_Family_IPV4_ISIS()
redistribute ospf match internal include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospfv3 match internal include leaked route-map RM_BGP_EVPN_IPV4
!
address-family ipv4 multicast
redistribute attached-host route-map AFIPV4M_ATTACHED_HOST
Expand All @@ -268,12 +275,25 @@ router bgp 65101
!
address-family ipv6
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
redistribute connected rcf Address_Family_IPV6_Connected()
redistribute connected include leaked rcf Address_Family_IPV6_Connected()
redistribute dynamic route-map RM-REDISTRIBUTE-DYNAMIC
redistribute isis level-1-2 rcf RCF_Address_Family_IPV6_ISIS()
redistribute ospfv3 match internal include leaked route-map RM-REDISTRIBUTE-OSPF-INTERNAL
redistribute ospfv3 match external include leaked
redistribute ospfv3 match nssa-external 1
redistribute ospfv3 match nssa-external 1 include leaked route-map RM-REDISTRIBUTE-OSPF-NSSA-EXTERNAL
redistribute static route-map RM-IPV6-STATIC-TO-BGP
!
address-family ipv6 multicast
redistribute connected route-map RM-address_family_ipv6_multicast-Connected
redistribute isis include leaked route-map RM-address_family_ipv6_multicast-ISIS
redistribute ospf route-map RM-address_family_ipv6_multicast-OSPF
redistribute ospfv3 route-map RM-address_family_ipv6_multicast-OSPFv3
redistribute ospfv3 match external route-map RM-address_family_ipv6_multicast-OSPFv3-External
redistribute ospfv3 match nssa-external 2 route-map RM-address_family_ipv6_multicast-OSPFv3-External
redistribute ospf match external route-map RM-address_family_ipv6_multicast-OSPF-External
redistribute ospf match nssa-external 2 route-map RM-address_family_ipv6_multicast-OSPF-External
redistribute static route-map RM-address_family_ipv6_multicast-Static
!
vrf TENANT_A_PROJECT01
rd 192.168.255.3:11
route-target import evpn 11:11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ router bgp 65001
redistribute bgp leaked route-map RM_VRF_BGP
redistribute connected include leaked rcf RCF_VRF_CONNECTED()
redistribute isis level-2 rcf RCF_VRF_ISIS()
redistribute ospf match nssa-external route-map RM_VRF_OSPFV3
redistribute ospf match internal include leaked route-map RM_VRF_OSPF
redistribute ospf match external include leaked route-map RM_VRF_OSPF
redistribute ospf match nssa-external 1 include leaked route-map RM_VRF_OSPF
redistribute ospfv3 match internal include leaked route-map RM_VRF_OSPF
redistribute rip route-map RM_VRF_RIP
redistribute static route-map RM_VRF_STATIC
Expand Down Expand Up @@ -136,11 +138,20 @@ router bgp 65001
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()
redistribute ospf match external
redistribute ospf match nssa-external 1
redistribute ospfv3 match internal
redistribute static route-map VRF_AFIPV4_RM_STATIC_1
redistribute attached-host route-map VRF_AFIPV4_RM_HOST
redistribute bgp leaked route-map VRF_AFIPV4_RM_BGP
redistribute connected include leaked rcf VRF_AFIPV4_RCF_CONNECTED_1()
redistribute dynamic route-map VRF_AFIPV4_RM_DYNAMIC
redistribute user rcf VRF_AFIPV4_RCF_USER()
redistribute isis level-1 include leaked rcf VRF_AFIPV4_RCF_ISIS()
redistribute ospf include leaked route-map VRF_AFIPV4_RM_OSPF
redistribute ospfv3 match internal include leaked route-map VRF_AFIPV4_RM_OSPF
redistribute ospfv3 match external include leaked route-map VRF_AFIPV4_RM_OSPF
redistribute ospfv3 match nssa-external 2 include leaked route-map VRF_AFIPV4_RM_OSPF
redistribute ospf match external include leaked route-map VRF_AFIPV4_RM_OSPF
redistribute ospf match nssa-external 1 include leaked route-map VRF_AFIPV4_RM_OSPF
redistribute rip route-map VRF_AFIPV4_RM_RIP
redistribute static include leaked route-map VRF_AFIPV4_RM_STATIC_1
!
address-family ipv4 multicast
bgp missing-policy direction in action permit
Expand All @@ -150,10 +161,15 @@ router bgp 65001
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
redistribute ospf match nssa-external 2
redistribute ospfv3 match external
redistribute attached-host route-map VRF_AFIPV4MULTI_RM_HOST
redistribute connected route-map VRF_AFIPV4MULTI_RM_CONNECTED
redistribute isis level-1 include leaked route-map VRF_AFIPV4MULTI_RM_ISIS
redistribute ospf match internal route-map VRF_AFIPV4MULTI_RM_OSPF
redistribute ospfv3 match internal route-map VRF_AFIPV4MULTI_RM_OSPFv3
redistribute ospfv3 match external route-map VRF_AFIPV4MULTI_RM_OSPFv3
redistribute ospfv3 match nssa-external 1 route-map VRF_AFIPV4MULTI_RM_OSPFv3
redistribute ospf match external route-map VRF_AFIPV4MULTI_RM_OSPF
redistribute ospf match nssa-external 2 route-map VRF_AFIPV4MULTI_RM_OSPF
redistribute static route-map VRF_AFIPV4MULTI_RM_STATIC
!
address-family ipv6
Expand All @@ -174,8 +190,8 @@ router bgp 65001
no bgp redistribute-internal
redistribute connected rcf VRF_AFIPV6_RCF_CONNECTED()
redistribute isis include leaked
redistribute ospfv3 match external
redistribute ospfv3 match internal include leaked
redistribute ospfv3 match external
redistribute ospfv3 match nssa-external
redistribute static route-map VRF_AFIPV6_RM_STATIC
!
Expand All @@ -185,24 +201,30 @@ router bgp 65001
bgp additional-paths receive
neighbor aa::1 additional-paths receive
network ff08:1::/64
redistribute connected
redistribute ospf match external
redistribute ospf match nssa-external
redistribute ospfv3 match internal
redistribute connected route-map VRF_AFIPV6MULTI_RM_CONNECTED
redistribute isis level-1-2 include leaked route-map VRF_AFIPV6MULTI_RM_ISIS
redistribute ospf route-map VRF_AFIPV6MULTI_RM_OSPF
redistribute ospfv3 match internal route-map VRF_AFIPV6MULTI_RM_OSPFv3
redistribute ospfv3 match external route-map VRF_AFIPV6MULTI_RM_OSPFv3
redistribute ospfv3 match nssa-external 1 route-map VRF_AFIPV6MULTI_RM_OSPFv3
redistribute ospf match external route-map VRF_AFIPV6MULTI_RM_OSPF
redistribute ospf match nssa-external 1 route-map VRF_AFIPV6MULTI_RM_OSPF
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
redistribute dynamic
redistribute isis level-2 route-map RM_VRF_ISIS
redistribute ospf include leaked
redistribute ospfv3 match external
redistribute attached-host route-map RM_VRF_HOST
redistribute bgp leaked route-map RM_VRF_BGP
redistribute connected include leaked route-map RM_VRF_CONNECTED
redistribute dynamic route-map RM_VRF_DYNAMIC
redistribute isis level-2 include leaked route-map RM_VRF_ISIS
redistribute ospf include leaked route-map RM_VRF_OSPF
redistribute ospfv3 include leaked route-map RM_VRF_OSPFv3
redistribute ospfv3 match external include leaked route-map RM_VRF_OSPFv3
redistribute ospfv3 match nssa-external 1 include leaked route-map RM_VRF_OSPFv3
redistribute rip
redistribute static
redistribute static include leaked
Shivani-gslab marked this conversation as resolved.
Show resolved Hide resolved
redistribute user
!
address-family ipv4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@ router bgp 65101
aggregate-address 1.1.1.0/24 advertise-only
aggregate-address 1.12.1.0/24 as-set summary-only attribute-map RM-ATTRIBUTE match-map RM-MATCH advertise-only
aggregate-address 2.2.1.0/24
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
redistribute connected rcf Router_BGP_Connected()
redistribute ospf include leaked
redistribute ospf match internal
redistribute ospf match external
redistribute ospf match nssa-external 1 include leaked route-map RM-REDISTRIBUTE-OSPF-NSSA-1
redistribute static rcf Router_BGP_Static()
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
!
address-family ipv4
bgp additional-paths install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ router bgp 65101
neighbor 192.168.255.3 allowas-in 5
neighbor 192.168.255.3 maximum-routes 52000 warning-limit 2000 warning-only
neighbor 192.168.255.3 missing-policy address-family all direction in action deny
redistribute connected include leaked
redistribute isis level-2 include leaked route-map RM_BGP_EVPN
redistribute ospf match internal include leaked route-map RM_BGP_EVPN
redistribute ospf match external include leaked route-map RM_BGP_EVPN
redistribute ospfv3 include leaked route-map RM_BGP_EVPN
redistribute ospfv3 match external include leaked route-map RM_BGP_EVPN
redistribute ospfv3 match nssa-external include leaked route-map RM_BGP_EVPN
redistribute static include leaked
redistribute rip route-map RM_BGP_EVPN
redistribute attached-host route-map RM_BGP_EVPN
redistribute dynamic route-map RM_BGP_EVPN
redistribute user rcf RCF_BGP_EVPN()
!
vlan 2488
rd 145.245.21.0:1
Expand Down Expand Up @@ -142,6 +154,26 @@ router bgp 65101
!
address-family ipv4
no neighbor EVPN-OVERLAY-PEERS activate
redistribute attached-host route-map RM_BGP_EVPN_IPV4
redistribute bgp leaked route-map RM_BGP_EVPN_IPV4
redistribute connected route-map RM_BGP_EVPN_IPV4
redistribute dynamic rcf RCF_BGP_EVPN_IPV4()
redistribute user rcf RCF_BGP_EVPN_IPV4()
redistribute isis level-1 include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospf include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospfv3 include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospfv3 match external include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospfv3 match nssa-external 2 include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospf match external include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospf match nssa-external 1 include leaked route-map RM_BGP_EVPN_IPV4
redistribute rip route-map RM_BGP_EVPN_IPV4
redistribute static include leaked route-map RM_BGP_EVPN_IPV4
!
address-family ipv4 multicast
redistribute ospf route-map RM_BGP_EVPN_IPV4M
redistribute ospfv3 match internal route-map RM_BGP_EVPN_IPV4M
redistribute ospfv3 match external route-map RM_BGP_EVPN_IPV4M
redistribute ospfv3 match nssa-external 1 route-map RM_BGP_EVPN_IPV4M
!
vrf TENANT_A_PROJECT01
rd 192.168.255.3:11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ router bgp 65101
neighbor 192.168.255.1 peer group EVPN-OVERLAY-PEERS
neighbor 192.168.255.2 peer group EVPN-OVERLAY-PEERS
redistribute connected route-map RM-CONN-2-BGP
redistribute isis level-2 include leaked rcf RCF-CONN-2-BGP()
redistribute ospfv3 match internal include leaked route-map RM-CONN-2-BGP
redistribute ospfv3 match nssa-external include leaked route-map RM-CONN-2-BGP
redistribute dynamic rcf RCF-CONN-2-BGP()
!
vlan-aware-bundle B-ELAN-201
rd 192.168.255.3:20201
Expand Down Expand Up @@ -83,6 +87,9 @@ router bgp 65101
neighbor MLAG-IPv4-UNDERLAY-PEER activate
neighbor TEST_PEER_GRP next-hop address-family ipv6 originate
neighbor TEST_PEER_GRP activate
redistribute isis level-1 include leaked rcf Address_Family_IPV4_ISIS()
redistribute ospf match internal include leaked route-map RM_BGP_EVPN_IPV4
redistribute ospfv3 match internal include leaked route-map RM_BGP_EVPN_IPV4
!
address-family ipv4 multicast
redistribute attached-host route-map AFIPV4M_ATTACHED_HOST
Expand All @@ -96,12 +103,25 @@ router bgp 65101
!
address-family ipv6
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
redistribute connected rcf Address_Family_IPV6_Connected()
redistribute connected include leaked rcf Address_Family_IPV6_Connected()
redistribute dynamic route-map RM-REDISTRIBUTE-DYNAMIC
redistribute isis level-1-2 rcf RCF_Address_Family_IPV6_ISIS()
redistribute ospfv3 match internal include leaked route-map RM-REDISTRIBUTE-OSPF-INTERNAL
redistribute ospfv3 match external include leaked
redistribute ospfv3 match nssa-external 1
redistribute ospfv3 match nssa-external 1 include leaked route-map RM-REDISTRIBUTE-OSPF-NSSA-EXTERNAL
redistribute static route-map RM-IPV6-STATIC-TO-BGP
!
address-family ipv6 multicast
redistribute connected route-map RM-address_family_ipv6_multicast-Connected
redistribute isis include leaked route-map RM-address_family_ipv6_multicast-ISIS
redistribute ospf route-map RM-address_family_ipv6_multicast-OSPF
redistribute ospfv3 route-map RM-address_family_ipv6_multicast-OSPFv3
redistribute ospfv3 match external route-map RM-address_family_ipv6_multicast-OSPFv3-External
redistribute ospfv3 match nssa-external 2 route-map RM-address_family_ipv6_multicast-OSPFv3-External
redistribute ospf match external route-map RM-address_family_ipv6_multicast-OSPF-External
redistribute ospf match nssa-external 2 route-map RM-address_family_ipv6_multicast-OSPF-External
redistribute static route-map RM-address_family_ipv6_multicast-Static
!
vrf TENANT_A_PROJECT01
rd 192.168.255.3:11
route-target import evpn 11:11
Expand Down
Loading
Loading