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, eos_designs): Improve BGP VRF Address Families Model #2808

Merged
merged 10 commits into from May 19, 2023
@@ -0,0 +1,126 @@
# router-bgp-vrf-address-families

## Table of Contents

- [Management](#management)
- [Management Interfaces](#management-interfaces)
- [Routing](#routing)
- [Router BGP](#router-bgp)

## Management

### Management Interfaces

#### Management Interfaces Summary

##### IPv4

| Management Interface | description | Type | VRF | IP Address | Gateway |
| -------------------- | ----------- | ---- | --- | ---------- | ------- |
| Management1 | oob_management | oob | MGMT | 10.73.255.122/24 | 10.73.255.2 |

##### IPv6

| Management Interface | description | Type | VRF | IPv6 Address | IPv6 Gateway |
| -------------------- | ----------- | ---- | --- | ------------ | ------------ |
| Management1 | oob_management | oob | MGMT | - | - |

#### Management Interfaces Device Configuration

```eos
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
```

## Routing

### Router BGP

#### Router BGP Summary

| BGP AS | Router ID |
| ------ | --------- |
| 65001| 1.0.1.1 |

#### Router BGP VRFs

| VRF | Route-Distinguisher | Redistribute |
| --- | ------------------- | ------------ |
| VRF01 | - | - |
| VRF02 | - | - |
| VRF03 | - | - |

#### Router BGP Device Configuration

```eos
!
router bgp 65001
router-id 1.0.1.1
!
vrf VRF01
!
address-family flow-spec ipv4
bgp missing-policy direction in action permit
bgp missing-policy direction out action permit
neighbor 1.2.3.4 activate
!
address-family flow-spec ipv6
bgp missing-policy direction in action permit
bgp missing-policy direction out action deny
neighbor aa::1 activate
!
address-family ipv4
bgp missing-policy direction in action deny
bgp missing-policy direction out action permit
bgp additional-paths install ecmp-primary
bgp additional-paths receive
bgp additional-paths send ecmp limit 4
neighbor FOOBAR activate
neighbor 1.2.3.4 activate
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
!
address-family ipv4 multicast
bgp missing-policy direction in action permit
bgp missing-policy direction out action permit
bgp additional-paths receive
neighbor FOOBAR activate
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
!
address-family ipv6
bgp missing-policy direction in action deny-in-out
bgp missing-policy direction out action deny-in-out
bgp additional-paths install
bgp additional-paths receive
bgp additional-paths send any
no neighbor FOOBAR activate
neighbor aa::1 activate
neighbor aa::1 route-map FOO in
neighbor aa::1 route-map BAR out
network aa::/64
!
address-family ipv6 multicast
bgp missing-policy direction in action deny
bgp missing-policy direction out action deny
no neighbor FOOBAR activate
network ff08:1::/64
!
vrf VRF02
!
address-family ipv4
bgp additional-paths send backup
!
address-family ipv6
bgp additional-paths send limit 3
!
vrf VRF03
!
address-family ipv4
bgp additional-paths send ecmp
```
@@ -0,0 +1,82 @@
!RANCID-CONTENT-TYPE: arista
!
transceiver qsfp default-mode 4x10G
!
hostname router-bgp-vrf-address-families
!
no enable password
no aaa root
!
interface Management1
description oob_management
vrf MGMT
ip address 10.73.255.122/24
!
router bgp 65001
router-id 1.0.1.1
!
vrf VRF01
!
address-family flow-spec ipv4
bgp missing-policy direction in action permit
bgp missing-policy direction out action permit
neighbor 1.2.3.4 activate
!
address-family flow-spec ipv6
bgp missing-policy direction in action permit
bgp missing-policy direction out action deny
neighbor aa::1 activate
!
address-family ipv4
bgp missing-policy direction in action deny
bgp missing-policy direction out action permit
bgp additional-paths install ecmp-primary
bgp additional-paths receive
bgp additional-paths send ecmp limit 4
neighbor FOOBAR activate
neighbor 1.2.3.4 activate
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
!
address-family ipv4 multicast
bgp missing-policy direction in action permit
bgp missing-policy direction out action permit
bgp additional-paths receive
neighbor FOOBAR activate
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
!
address-family ipv6
bgp missing-policy direction in action deny-in-out
bgp missing-policy direction out action deny-in-out
bgp additional-paths install
bgp additional-paths receive
bgp additional-paths send any
no neighbor FOOBAR activate
neighbor aa::1 activate
neighbor aa::1 route-map FOO in
neighbor aa::1 route-map BAR out
network aa::/64
!
address-family ipv6 multicast
bgp missing-policy direction in action deny
bgp missing-policy direction out action deny
no neighbor FOOBAR activate
network ff08:1::/64
!
vrf VRF02
!
address-family ipv4
bgp additional-paths send backup
!
address-family ipv6
bgp additional-paths send limit 3
!
vrf VRF03
!
address-family ipv4
bgp additional-paths send ecmp
!
end
Expand Up @@ -152,32 +152,34 @@ router_bgp:
always: true
route_map: RM-10.2.3.4-SET-NEXT-HOP-OUT
route_map_out: RM-10.2.3.4-SET-NEXT-HOP-OUT
address_families:
- address_family: ipv4
bgp:
missing_policy:
direction_in_action: permit
direction_out_action: deny
additional_paths:
- install
- receive
- send ecmp
neighbors:
- ip_address: 10.2.3.4
activate: true
route_map_out: RM-10.2.3.4-SET-NEXT-HOP-OUT
- ip_address: 10.2.3.5
activate: true
route_map_in: RM-10.2.3.5-SET-NEXT-HOP-IN
networks:
- prefix: 10.0.0.0/8
- prefix: 100.64.0.0/10
route_map: RM-10.2.3.4
peer_groups:
- name: TEST_PEER_GRP
activate: true
next_hop:
address_family_ipv6_originate: true
address_family_ipv4:
bgp:
missing_policy:
direction_in_action: permit
direction_out_action: deny
additional_paths:
install: true
receive: true
send:
ecmp: true
neighbors:
- ip_address: 10.2.3.4
activate: true
route_map_out: RM-10.2.3.4-SET-NEXT-HOP-OUT
- ip_address: 10.2.3.5
activate: true
route_map_in: RM-10.2.3.5-SET-NEXT-HOP-IN
networks:
- prefix: 10.0.0.0/8
- prefix: 100.64.0.0/10
route_map: RM-10.2.3.4
peer_groups:
- name: TEST_PEER_GRP
activate: true
next_hop:
address_family_ipv6:
enabled: true
originate: true
redistribute_routes:
- source_protocol: connected
- source_protocol: static
Expand Down
@@ -0,0 +1,116 @@
router_bgp:
as: 65001
router_id: 1.0.1.1
vrfs:
- name: VRF01
address_family_ipv4:
bgp:
missing_policy:
direction_in_action: deny
direction_out_action: permit
additional_paths:
install_ecmp_primary: true
receive: true
send:
ecmp_limit: 4
neighbors:
- ip_address: 1.2.3.4
activate: true
route_map_in: FOO
route_map_out: BAR
peer_groups:
- name: FOOBAR
activate: true
next_hop:
address_family_ipv6:
enabled: true
originate: true
networks:
- prefix: 2.3.4.0/24
route_map: BARFOO
address_family_ipv6:
bgp:
missing_policy:
direction_in_action: deny-in-out
direction_out_action: deny-in-out
additional_paths:
install: true
receive: true
send:
any: true
neighbors:
- ip_address: aa::1
activate: true
route_map_in: FOO
route_map_out: BAR
peer_groups:
- name: FOOBAR
activate: false
networks:
- prefix: aa::/64
address_family_ipv4_multicast:
bgp:
missing_policy:
direction_in_action: permit
direction_out_action: permit
additional_paths:
receive: true
neighbors:
- ip_address: 1.2.3.4
activate: false
route_map_in: FOO
route_map_out: BAR
peer_groups:
- name: FOOBAR
activate: true
networks:
- prefix: 239.0.0.0/24
route_map: BARFOO
address_family_ipv6_multicast:
bgp:
missing_policy:
direction_in_action: deny
direction_out_action: deny
neighbors:
- ip_address: aa::1
activate: false
peer_groups:
- name: FOOBAR
activate: false
networks:
- prefix: ff08:1::/64
address_family_flow_spec_ipv4:
bgp:
missing_policy:
direction_in_action: permit
direction_out_action: permit
neighbors:
- ip_address: 1.2.3.4
activate: true
address_family_flow_spec_ipv6:
bgp:
missing_policy:
direction_in_action: permit
direction_out_action: deny
neighbors:
- ip_address: aa::1
activate: true

- name: VRF02
address_family_ipv4:
bgp:
additional_paths:
send:
backup: true
address_family_ipv6:
bgp:
additional_paths:
send:
limit: 3

- name: VRF03
address_family_ipv4:
bgp:
additional_paths:
send:
ecmp: true
Expand Up @@ -111,6 +111,7 @@ router-bgp-v4-evpn
router-bgp-v4-v6-evpn
router-bgp-vpn-ipv4-vpn-ipv6
router-bgp-vpws
router-bgp-vrf-address-families
router-bgp-vrf-lite
router-general
router-isis
Expand Down