Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Option to set RCF address-family ipv4, ipv6…
Browse files Browse the repository at this point in the history
… and evpn (#3814)
  • Loading branch information
Vibhu-gslab authored May 10, 2024
1 parent d6410fe commit 6c2307b
Show file tree
Hide file tree
Showing 15 changed files with 648 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,21 +230,30 @@ router bgp 65101
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 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 prefix-list PL-FOO-v4-IN in
neighbor 192.0.2.1 prefix-list PL-FOO-v4-OUT out
network 10.0.0.0/8
network 172.16.0.0/12
network 192.168.0.0/16 route-map RM-FOO-MATCH
redistribute bgp leaked
redistribute connected include leaked rcf Address_Family_IPV4_Connected()
redistribute dynamic route-map Address_Family_IPV4_Dynamic_RM
redistribute static rcf Address_Family_IPV4_Static()
!
address-family ipv6
neighbor baz prefix-list PL-BAR-v6-IN in
neighbor baz prefix-list PL-BAR-v6-OUT out
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::2 rcf in Address_Family_IPV6_In()
neighbor 2001:db8::2 rcf out Address_Family_IPV6_Out()
network 2001:db8:100::/40
network 2001:db8:200::/40 route-map RM-BAR-MATCH
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
redistribute ospf include leaked
redistribute connected rcf Address_Family_IPV6_Connected()
redistribute ospfv3 include leaked
redistribute static route-map RM-IPV6-STATIC-TO-BGP
session tracker ST1
recovery delay 666 seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,6 @@ router bgp 65101
next-hop mpls resolution ribs tunnel-rib-colored system-colored-tunnel-rib tunnel-rib test-rib system-connected
neighbor EVPN-OVERLAY-PEERS activate
neighbor 192.168.255.3 activate
neighbor 192.168.255.4 rcf in Address_Family_EVPN_In()
neighbor 192.168.255.4 rcf out Address_Family_EVPN_Out()
```
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ ASN Notation: asplain
| Peer Group | Activate | Encapsulation |
| ---------- | -------- | ------------- |
| EVPN-OVERLAY | True | default |
| RCF_TEST | False | default |

#### Router BGP VLANs

Expand Down Expand Up @@ -224,12 +225,16 @@ router bgp 65100
neighbor EVPN-OVERLAY route-map RM-HIDE-AS-PATH in
neighbor EVPN-OVERLAY route-map RM-HIDE-AS-PATH out
neighbor EVPN-OVERLAY activate
neighbor RCF_TEST rcf in Address_Family_EVPN_In()
neighbor RCF_TEST rcf out Address_Family_EVPN_Out()
!
address-family ipv4
neighbor IPV4-UNDERLAY route-map RM-HIDE-AS-PATH in
neighbor IPV4-UNDERLAY route-map RM-HIDE-AS-PATH out
neighbor IPV4-UNDERLAY activate
neighbor IPV4-UNDERLAY-MLAG activate
neighbor TEST_RCF rcf in Address_Family_IPV4_In()
neighbor TEST_RCF rcf out Address_Family_IPV4_Out()
!
address-family ipv4 multicast
neighbor IPV4-UNDERLAY activate
Expand All @@ -241,6 +246,8 @@ router bgp 65100
neighbor IPV6-UNDERLAY route-map RM-HIDE-AS-PATH out
neighbor IPV6-UNDERLAY activate
neighbor IPV6-UNDERLAY-MLAG activate
neighbor TEST_RCF rcf in Address_Family_IPV6_In()
neighbor TEST_RCF rcf out Address_Family_IPV6_Out()
!
vrf Tenant_A
rd 10.50.64.15:30001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,30 @@ router bgp 65101
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 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 prefix-list PL-FOO-v4-IN in
neighbor 192.0.2.1 prefix-list PL-FOO-v4-OUT out
network 10.0.0.0/8
network 172.16.0.0/12
network 192.168.0.0/16 route-map RM-FOO-MATCH
redistribute bgp leaked
redistribute connected include leaked rcf Address_Family_IPV4_Connected()
redistribute dynamic route-map Address_Family_IPV4_Dynamic_RM
redistribute static rcf Address_Family_IPV4_Static()
!
address-family ipv6
neighbor baz prefix-list PL-BAR-v6-IN in
neighbor baz prefix-list PL-BAR-v6-OUT out
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::2 rcf in Address_Family_IPV6_In()
neighbor 2001:db8::2 rcf out Address_Family_IPV6_Out()
network 2001:db8:100::/40
network 2001:db8:200::/40 route-map RM-BAR-MATCH
redistribute bgp leaked route-map RM-REDISTRIBUTE-BGP
redistribute ospf include leaked
redistribute connected rcf Address_Family_IPV6_Connected()
redistribute ospfv3 include leaked
redistribute static route-map RM-IPV6-STATIC-TO-BGP
session tracker ST1
recovery delay 666 seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ router bgp 65101
next-hop mpls resolution ribs tunnel-rib-colored system-colored-tunnel-rib tunnel-rib test-rib system-connected
neighbor EVPN-OVERLAY-PEERS activate
neighbor 192.168.255.3 activate
neighbor 192.168.255.4 rcf in Address_Family_EVPN_In()
neighbor 192.168.255.4 rcf out Address_Family_EVPN_Out()
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,16 @@ router bgp 65100
neighbor EVPN-OVERLAY route-map RM-HIDE-AS-PATH in
neighbor EVPN-OVERLAY route-map RM-HIDE-AS-PATH out
neighbor EVPN-OVERLAY activate
neighbor RCF_TEST rcf in Address_Family_EVPN_In()
neighbor RCF_TEST rcf out Address_Family_EVPN_Out()
!
address-family ipv4
neighbor IPV4-UNDERLAY route-map RM-HIDE-AS-PATH in
neighbor IPV4-UNDERLAY route-map RM-HIDE-AS-PATH out
neighbor IPV4-UNDERLAY activate
neighbor IPV4-UNDERLAY-MLAG activate
neighbor TEST_RCF rcf in Address_Family_IPV4_In()
neighbor TEST_RCF rcf out Address_Family_IPV4_Out()
!
address-family ipv4 multicast
neighbor IPV4-UNDERLAY activate
Expand All @@ -106,6 +110,8 @@ router bgp 65100
neighbor IPV6-UNDERLAY route-map RM-HIDE-AS-PATH out
neighbor IPV6-UNDERLAY activate
neighbor IPV6-UNDERLAY-MLAG activate
neighbor TEST_RCF rcf in Address_Family_IPV6_In()
neighbor TEST_RCF rcf out Address_Family_IPV6_Out()
!
vrf Tenant_A
rd 10.50.64.15:30001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ router_bgp:
- ip_address: 192.0.2.1
prefix_list_in: PL-FOO-v4-IN
prefix_list_out: PL-FOO-v4-OUT
- ip_address: 10.2.3.8
rcf_in: Address_Family_IPV4_In()
- ip_address: 10.2.3.9
rcf_out: Address_Family_IPV4_Out()
redistribute_routes:
- source_protocol: connected
include_leaked: true
rcf: Address_Family_IPV4_Connected()
- source_protocol: bgp
- source_protocol: static
rcf: Address_Family_IPV4_Static()
- source_protocol: dynamic
route_map: Address_Family_IPV4_Dynamic_RM
address_family_ipv6:
networks:
- prefix: 2001:db8:100::/40
Expand All @@ -114,15 +127,20 @@ router_bgp:
- ip_address: 2001:db8::1
prefix_list_in: PL-FOO-v6-IN
prefix_list_out: PL-FOO-v6-OUT
- ip_address: 2001:db8::2
rcf_in: Address_Family_IPV6_In()
rcf_out: Address_Family_IPV6_Out()
redistribute_routes:
- source_protocol: static
route_map: RM-IPV6-STATIC-TO-BGP
- source_protocol: ospf
- source_protocol: ospfv3
include_leaked: true
- source_protocol: bgp
route_map: RM-REDISTRIBUTE-BGP
# this should not do anything as leaked is generated when source protocol is bgp
include_leaked: true
- source_protocol: connected
rcf: Address_Family_IPV6_Connected()
neighbors:
- ip_address: 192.0.3.1
remote_as: 65432
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ router_bgp:
neighbors:
- ip_address: 192.168.255.3
activate: true
- ip_address: 192.168.255.4
rcf_in: Address_Family_EVPN_In()
rcf_out: Address_Family_EVPN_Out()
peer_groups:
- name: EVPN-OVERLAY-PEERS
activate: true
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ router_bgp:
route_map_in: RM-HIDE-AS-PATH
route_map_out: RM-HIDE-AS-PATH
activate: true
- name: RCF_TEST
rcf_in: Address_Family_EVPN_In()
rcf_out: Address_Family_EVPN_Out()
address_family_ipv4:
peer_groups:
- name: IPV4-UNDERLAY
Expand All @@ -85,6 +88,9 @@ router_bgp:
route_map_out: RM-HIDE-AS-PATH
- name: IPV4-UNDERLAY-MLAG
activate: true
- name: TEST_RCF
rcf_in: Address_Family_IPV4_In()
rcf_out: Address_Family_IPV4_Out()
address_family_ipv4_multicast:
peer_groups:
- name: IPV4-UNDERLAY
Expand All @@ -101,6 +107,9 @@ router_bgp:
route_map_out: RM-HIDE-AS-PATH
- name: IPV6-UNDERLAY-MLAG
activate: true
- name: TEST_RCF
rcf_in: Address_Family_IPV6_In()
rcf_out: Address_Family_IPV6_Out()
vlans:
- id: 24
rd: "10.50.64.15:10024"
Expand Down
Loading

0 comments on commit 6c2307b

Please sign in to comment.