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

Feat(eos_cli_config_gen): Option to set RCF for route bgp ipv4/ipv6 mulit-cast and VRF #3821

Merged
merged 22 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a9586f2
Feat(eos_cli_config_gen): Option to set RCF route bgp ipv4/ipv6 mulit…
Vibhu-gslab Apr 8, 2024
b6501a7
Fixing cli_config_gen errors
Vibhu-gslab Apr 8, 2024
7fb670e
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Apr 16, 2024
db60614
Merge branch 'devel' into rcf_vrf_multicast
Vibhu-gslab Apr 22, 2024
5cc0bbc
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Apr 22, 2024
f3c209e
Adding description for multicast
Vibhu-gslab Apr 22, 2024
5ef59db
changing description and adding () in inputs
Vibhu-gslab Apr 23, 2024
b8a8a9c
adding route-map testcase in bgp vrf
Vibhu-gslab Apr 24, 2024
daec060
Merge branch 'devel' into rcf_vrf_multicast
Vibhu-gslab Apr 24, 2024
4d0ac69
fixing pre-commit
Vibhu-gslab Apr 24, 2024
ad8e2a0
Merge branch 'devel' into rcf_vrf_multicast
Vibhu-gslab Apr 25, 2024
ef2eef1
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Apr 25, 2024
102f678
Merge branch 'devel' into rcf_vrf_multicast
Vibhu-gslab May 2, 2024
d3a9ed7
Merge branch 'devel' into rcf_vrf_multicast
Vibhu-gslab May 3, 2024
60fcbbc
addressing review comments
Vibhu-gslab May 6, 2024
3eaef91
fixing molecule
Vibhu-gslab May 6, 2024
4c0e43f
Merge branch 'devel' into rcf_vrf_multicast
Vibhu-gslab May 8, 2024
5cf326e
changing order
Vibhu-gslab May 8, 2024
ff4cc13
fixing molecule
Vibhu-gslab May 8, 2024
7caec97
Merge branch 'devel' into rcf_vrf_multicast
Vibhu-gslab May 9, 2024
57d0a6d
keeping valid values for 5.0
Vibhu-gslab May 10, 2024
ce6379d
Merge branch 'devel' into rcf_vrf_multicast
Vibhu-gslab May 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ ASN Notation: asplain

| VRF | Route-Distinguisher | Redistribute |
| --- | ------------------- | ------------ |
| TENANT_A_PROJECT01 | 192.168.255.3:11 | connected |
| TENANT_A_PROJECT01 | 192.168.255.3:11 | connected<br>static<br>isis |
MaheshGSLAB marked this conversation as resolved.
Show resolved Hide resolved
| TENANT_A_PROJECT02 | 192.168.255.3:12 | connected |

#### Router BGP Device Configuration
Expand Down Expand Up @@ -182,11 +182,15 @@ router bgp 65101
vrf TENANT_A_PROJECT01
rd 192.168.255.3:11
route-target import evpn 11:11
route-target import evpn rcf RT_IMPORT_AF_RCF()
route-target export evpn 11:11
route-target export evpn rcf RT_EXPORT_AF_RCF()
router-id 192.168.255.3
neighbor 10.255.251.1 peer group MLAG-IPv4-UNDERLAY-PEER
neighbor 10.255.251.1 rib-in pre-policy retain
redistribute connected
redistribute isis route-map Router_BGP_Isis
redistribute static rcf Router_BGP_Static()
!
vrf TENANT_A_PROJECT02
rd 192.168.255.3:12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,14 @@ router bgp 65101
neighbor 10.2.3.6 next-hop address-family ipv6
neighbor 10.2.3.7 next-hop address-family ipv6 originate
no neighbor 10.2.3.8 next-hop address-family ipv6
neighbor 10.2.3.9 activate
neighbor 10.2.3.9 rcf in VRF_AFIPV4_RCF_IN()
neighbor 10.2.3.10 activate
neighbor 10.2.3.10 rcf out VRF_AFIPV4_RCF_OUT()
network 10.0.0.0/8
network 100.64.0.0/10 route-map RM-10.2.3.4
redistribute connected rcf VRF_AFIPV4_RCF_CONNECTED()
redistribute static route-map VRF_AFIPV4_RM_STATIC
!
vrf TENANT_A_PROJECT02
rd 192.168.255.3:12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ router bgp 65100
neighbor IPV4-UNDERLAY activate
neighbor IPV4-UNDERLAY-MLAG activate
redistribute attached-host
redistribute isis rcf Router_BGP_Isis()
!
address-family ipv6
neighbor IPV6-UNDERLAY route-map RM-HIDE-AS-PATH in
Expand All @@ -246,7 +247,11 @@ router bgp 65100
rd 10.50.64.15:30001
route-target import evpn 1:30001
route-target import evpn route-map RM-DENY-DEFAULT
route-target import vpn-ipv4 1:30011
route-target import vpn-ipv4 rcf RT_IMPORT_AF_RCF() vpn-route filter-rcf RT_IMPORT_AF_RCF_FILTER()
route-target import vpn-ipv4 route-map RT_IMPORT_AF_RM
route-target export evpn 1:30001
route-target export evpn rcf RT_EXPORT_AF_RCF()
redistribute connected
!
vrf Tenant_B
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ASN Notation: asplain
| --- | ------------------- | ------------ |
| VRF01 | - | - |
| VRF02 | - | - |
| VRF03 | - | - |
| VRF03 | - | dynamic |

#### Router BGP Device Configuration

Expand All @@ -80,6 +80,7 @@ router bgp 65001
!
address-family ipv6 multicast
no neighbor FOOBAR activate
redistribute isis rcf Router_BGP_Isis()
!
vrf VRF01
!
Expand All @@ -103,6 +104,8 @@ router bgp 65001
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
network 2.3.4.0/24 route-map BARFOO
redistribute connected rcf VRF_AFIPV4_RCF_CONNECTED_1()
redistribute static route-map VRF_AFIPV4_RM_STATIC_1
!
address-family ipv4 multicast
bgp missing-policy direction in action permit
Expand All @@ -111,6 +114,8 @@ router bgp 65001
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
network 239.0.0.0/24 route-map BARFOO
redistribute connected
redistribute static route-map VRF_AFIPV4MULTI_RM_STATIC
!
address-family ipv6
bgp missing-policy direction in action deny-in-out
Expand All @@ -121,12 +126,20 @@ router bgp 65001
neighbor aa::1 activate
neighbor aa::1 route-map FOO in
neighbor aa::1 route-map BAR out
neighbor aa::2 activate
neighbor aa::2 rcf in VRF_AFIPV6_RCF_IN()
neighbor aa::2 rcf out VRF_AFIPV6_RCF_OUT()
network aa::/64
redistribute connected rcf VRF_AFIPV6_RCF_CONNECTED()
redistribute isis include leaked
redistribute static route-map VRF_AFIPV6_RM_STATIC
!
address-family ipv6 multicast
bgp missing-policy direction in action deny
bgp missing-policy direction out action deny
network ff08:1::/64
redistribute connected
redistribute static route-map VRF_AFIPV6MULTI_RM_STATIC
!
vrf VRF02
!
Expand All @@ -137,6 +150,7 @@ router bgp 65001
bgp additional-paths send limit 3
!
vrf VRF03
redistribute dynamic rcf VRF_RCF_DYNAMIC()
!
address-family ipv4
bgp additional-paths send ecmp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ router bgp 65101
vrf TENANT_A_PROJECT01
rd 192.168.255.3:11
route-target import evpn 11:11
route-target import evpn rcf RT_IMPORT_AF_RCF()
route-target export evpn 11:11
route-target export evpn rcf RT_EXPORT_AF_RCF()
router-id 192.168.255.3
ClausHolbechArista marked this conversation as resolved.
Show resolved Hide resolved
neighbor 10.255.251.1 peer group MLAG-IPv4-UNDERLAY-PEER
neighbor 10.255.251.1 rib-in pre-policy retain
redistribute connected
redistribute isis route-map Router_BGP_Isis
redistribute static rcf Router_BGP_Static()
!
vrf TENANT_A_PROJECT02
rd 192.168.255.3:12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,14 @@ router bgp 65101
neighbor 10.2.3.6 next-hop address-family ipv6
neighbor 10.2.3.7 next-hop address-family ipv6 originate
no neighbor 10.2.3.8 next-hop address-family ipv6
neighbor 10.2.3.9 activate
neighbor 10.2.3.9 rcf in VRF_AFIPV4_RCF_IN()
neighbor 10.2.3.10 activate
neighbor 10.2.3.10 rcf out VRF_AFIPV4_RCF_OUT()
network 10.0.0.0/8
network 100.64.0.0/10 route-map RM-10.2.3.4
redistribute connected rcf VRF_AFIPV4_RCF_CONNECTED()
redistribute static route-map VRF_AFIPV4_RM_STATIC
!
vrf TENANT_A_PROJECT02
rd 192.168.255.3:12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ router bgp 65100
neighbor IPV4-UNDERLAY activate
neighbor IPV4-UNDERLAY-MLAG activate
redistribute attached-host
redistribute isis rcf Router_BGP_Isis()
!
address-family ipv6
neighbor IPV6-UNDERLAY route-map RM-HIDE-AS-PATH in
Expand All @@ -111,7 +112,11 @@ router bgp 65100
rd 10.50.64.15:30001
route-target import evpn 1:30001
route-target import evpn route-map RM-DENY-DEFAULT
route-target import vpn-ipv4 1:30011
route-target import vpn-ipv4 rcf RT_IMPORT_AF_RCF() vpn-route filter-rcf RT_IMPORT_AF_RCF_FILTER()
route-target import vpn-ipv4 route-map RT_IMPORT_AF_RM
route-target export evpn 1:30001
route-target export evpn rcf RT_EXPORT_AF_RCF()
redistribute connected
!
vrf Tenant_B
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ router bgp 65001
!
address-family ipv6 multicast
no neighbor FOOBAR activate
redistribute isis rcf Router_BGP_Isis()
!
vrf VRF01
!
Expand All @@ -56,6 +57,8 @@ router bgp 65001
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
network 2.3.4.0/24 route-map BARFOO
redistribute connected rcf VRF_AFIPV4_RCF_CONNECTED_1()
redistribute static route-map VRF_AFIPV4_RM_STATIC_1
!
address-family ipv4 multicast
bgp missing-policy direction in action permit
Expand All @@ -64,6 +67,8 @@ router bgp 65001
neighbor 1.2.3.4 route-map FOO in
neighbor 1.2.3.4 route-map BAR out
network 239.0.0.0/24 route-map BARFOO
redistribute connected
redistribute static route-map VRF_AFIPV4MULTI_RM_STATIC
!
address-family ipv6
bgp missing-policy direction in action deny-in-out
Expand All @@ -74,12 +79,20 @@ router bgp 65001
neighbor aa::1 activate
neighbor aa::1 route-map FOO in
neighbor aa::1 route-map BAR out
neighbor aa::2 activate
neighbor aa::2 rcf in VRF_AFIPV6_RCF_IN()
neighbor aa::2 rcf out VRF_AFIPV6_RCF_OUT()
network aa::/64
redistribute connected rcf VRF_AFIPV6_RCF_CONNECTED()
redistribute isis include leaked
redistribute static route-map VRF_AFIPV6_RM_STATIC
!
address-family ipv6 multicast
bgp missing-policy direction in action deny
bgp missing-policy direction out action deny
network ff08:1::/64
redistribute connected
redistribute static route-map VRF_AFIPV6MULTI_RM_STATIC
!
vrf VRF02
!
Expand All @@ -90,6 +103,7 @@ router bgp 65001
bgp additional-paths send limit 3
!
vrf VRF03
redistribute dynamic rcf VRF_RCF_DYNAMIC()
!
address-family ipv4
bgp additional-paths send ecmp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,12 @@ router_bgp:
- address_family: evpn
route_targets:
- "11:11"
rcf: RT_IMPORT_AF_RCF()
export:
- address_family: evpn
route_targets:
- "11:11"
rcf: RT_EXPORT_AF_RCF()
neighbors:
- ip_address: 10.255.251.1
peer_group: MLAG-IPv4-UNDERLAY-PEER
Expand All @@ -103,6 +105,10 @@ router_bgp:
all: false
redistribute_routes:
- source_protocol: connected
- source_protocol: static
rcf: Router_BGP_Static()
- source_protocol: isis
route_map: Router_BGP_Isis
- name: TENANT_A_PROJECT02
router_id: 192.168.255.3
rd: "192.168.255.3:12"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,21 @@ router_bgp:
address_family_ipv6:
enabled: false
originate: true # this should not get added to the configuration
- ip_address: 10.2.3.9
activate: true
rcf_in: VRF_AFIPV4_RCF_IN()
- ip_address: 10.2.3.10
activate: true
rcf_out: VRF_AFIPV4_RCF_OUT()
networks:
- prefix: 10.0.0.0/8
- prefix: 100.64.0.0/10
route_map: RM-10.2.3.4
redistribute_routes:
- source_protocol: connected
rcf: VRF_AFIPV4_RCF_CONNECTED()
- source_protocol: static
route_map: VRF_AFIPV4_RM_STATIC
redistribute_routes:
- source_protocol: connected
- source_protocol: static
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ router_bgp:
activate: true
redistribute_routes:
- source_protocol: attached-host
- source_protocol: isis
rcf: Router_BGP_Isis()
address_family_ipv6:
peer_groups:
- name: IPV6-UNDERLAY
Expand Down Expand Up @@ -139,10 +141,17 @@ router_bgp:
route_targets:
- "1:30001"
route_map: RM-DENY-DEFAULT
- address_family: vpn-ipv4
route_targets:
- "1:30011"
rcf: RT_IMPORT_AF_RCF()
route_map: RT_IMPORT_AF_RM
vpn_route_filter_rcf: RT_IMPORT_AF_RCF_FILTER()
export:
- address_family: evpn
route_targets:
- "1:30001"
rcf: RT_EXPORT_AF_RCF()
redistribute_routes:
- source_protocol: connected
- name: Tenant_B
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ router_bgp:
peer_groups:
- name: FOOBAR
activate: false
redistribute_routes:
- source_protocol: isis
rcf: Router_BGP_Isis()
address_family_flow_spec_ipv4:
peer_groups:
- name: FOOBAR
Expand Down Expand Up @@ -49,6 +52,11 @@ router_bgp:
networks:
- prefix: 2.3.4.0/24
route_map: BARFOO
redistribute_routes:
- source_protocol: connected
rcf: VRF_AFIPV4_RCF_CONNECTED_1()
- source_protocol: static
route_map: VRF_AFIPV4_RM_STATIC_1
address_family_ipv6:
bgp:
missing_policy:
Expand All @@ -64,8 +72,19 @@ router_bgp:
activate: true
route_map_in: FOO
route_map_out: BAR
- ip_address: aa::2
activate: true
rcf_in: VRF_AFIPV6_RCF_IN()
rcf_out: VRF_AFIPV6_RCF_OUT()
networks:
- prefix: aa::/64
redistribute_routes:
- source_protocol: connected
rcf: VRF_AFIPV6_RCF_CONNECTED()
- source_protocol: static
route_map: VRF_AFIPV6_RM_STATIC
- source_protocol: isis
include_leaked: true
address_family_ipv4_multicast:
bgp:
missing_policy:
Expand All @@ -81,6 +100,11 @@ router_bgp:
networks:
- prefix: 239.0.0.0/24
route_map: BARFOO
redistribute_routes:
- source_protocol: connected
rcf: VRF_AFIPV4MULTI_RCF_CONNECTED()
- source_protocol: static
route_map: VRF_AFIPV4MULTI_RM_STATIC
address_family_ipv6_multicast:
bgp:
missing_policy:
Expand All @@ -91,6 +115,11 @@ router_bgp:
activate: false
networks:
- prefix: ff08:1::/64
redistribute_routes:
- source_protocol: connected
rcf: VRF_AFIPV6MULTI_RCF_CONNECTED()
- source_protocol: static
route_map: VRF_AFIPV6MULTI_RM_STATIC
address_family_flow_spec_ipv4:
bgp:
missing_policy:
Expand Down Expand Up @@ -126,3 +155,6 @@ router_bgp:
additional_paths:
send:
ecmp: true
redistribute_routes:
- source_protocol: dynamic
rcf: VRF_RCF_DYNAMIC()
Loading
Loading