Skip to content

Commit

Permalink
yolo: /sigh
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Oct 1, 2024
1 parent e1ddc0a commit fc7352d
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
no enable password
no aaa root
!
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!
vlan internal order ascending range 1006 1199
!
transceiver qsfp default-mode 4x10G
Expand All @@ -20,7 +13,7 @@ hostname MLAG_PEER_WITHOUT_L3_INTERFACE
no spanning-tree vlan-id 4093-4094
!
vlan 3665
name MLAG_iBGP_VRF
name MLAG_L3_VRF_VRF
trunk group MLAG
!
vlan 4093
Expand All @@ -35,6 +28,13 @@ vrf instance MGMT
!
vrf instance VRF
!
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!
interface Port-Channel5
description MLAG_MLAG_PEER_WITH_L3_INTERFACE_Port-Channel5
no shutdown
Expand Down Expand Up @@ -69,7 +69,7 @@ interface Management1
ip address 192.168.201.117/24
!
interface Vlan3665
description MLAG_PEER_L3_iBGP: vrf VRF
description MLAG_L3_VRF_VRF
no shutdown
mtu 9214
vrf VRF
Expand Down Expand Up @@ -103,6 +103,9 @@ ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
seq 10 permit 192.168.255.0/24 eq 32
seq 20 permit 192.168.254.0/24 eq 32
!
ip prefix-list PL-MLAG-PEER-VRFS
seq 10 permit 10.10.224.4/31
!
mlag configuration
domain-id MLAG_ATTRACT_VRF_ON_PEER
local-interface Vlan4094
Expand All @@ -114,6 +117,11 @@ mlag configuration
route-map RM-CONN-2-BGP permit 10
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
!
route-map RM-CONN-2-BGP-VRFS deny 10
match ip address prefix-list PL-MLAG-PEER-VRFS
!
route-map RM-CONN-2-BGP-VRFS permit 20
!
route-map RM-MLAG-PEER-IN permit 10
description Make routes learned over MLAG Peer-link less preferred on spines to ensure optimal routing
set origin incomplete
Expand Down Expand Up @@ -143,7 +151,7 @@ router bgp 923
neighbor MLAG-IPv4-UNDERLAY-PEER maximum-routes 12000
neighbor MLAG-IPv4-UNDERLAY-PEER route-map RM-MLAG-PEER-IN in
neighbor 10.10.224.4 peer group MLAG-IPv4-UNDERLAY-PEER
neighbor 10.10.224.4 description MLAG_PEER_WITH_L3_INTERFACE
neighbor 10.10.224.4 description MLAG_PEER_WITH_L3_INTERFACE_Vlan4093
redistribute connected route-map RM-CONN-2-BGP
!
address-family evpn
Expand All @@ -161,7 +169,7 @@ router bgp 923
router-id 192.168.255.36
update wait-install
neighbor 10.10.224.4 peer group MLAG-IPv4-UNDERLAY-PEER
neighbor 10.10.224.4 description MLAG_PEER_WITH_L3_INTERFACE
redistribute connected
neighbor 10.10.224.4 description MLAG_PEER_WITH_L3_INTERFACE_Vlan3665
redistribute connected route-map RM-CONN-2-BGP-VRFS
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
no enable password
no aaa root
!
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!
vlan internal order ascending range 1006 1199
!
transceiver qsfp default-mode 4x10G
Expand All @@ -20,7 +13,7 @@ hostname MLAG_PEER_WITH_L3_INTERFACE
no spanning-tree vlan-id 4093-4094
!
vlan 3665
name MLAG_iBGP_VRF
name MLAG_L3_VRF_VRF
trunk group MLAG
!
vlan 4093
Expand All @@ -35,6 +28,13 @@ vrf instance MGMT
!
vrf instance VRF
!
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!
interface Port-Channel5
description MLAG_MLAG_PEER_WITHOUT_L3_INTERFACE_Port-Channel5
no shutdown
Expand Down Expand Up @@ -75,7 +75,7 @@ interface Management1
ip address 192.168.201.116/24
!
interface Vlan3665
description MLAG_PEER_L3_iBGP: vrf VRF
description MLAG_L3_VRF_VRF
no shutdown
mtu 9214
vrf VRF
Expand Down Expand Up @@ -109,6 +109,9 @@ ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
seq 10 permit 192.168.255.0/24 eq 32
seq 20 permit 192.168.254.0/24 eq 32
!
ip prefix-list PL-MLAG-PEER-VRFS
seq 10 permit 10.10.224.4/31
!
mlag configuration
domain-id MLAG_ATTRACT_VRF_ON_PEER
local-interface Vlan4094
Expand All @@ -120,6 +123,11 @@ mlag configuration
route-map RM-CONN-2-BGP permit 10
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
!
route-map RM-CONN-2-BGP-VRFS deny 10
match ip address prefix-list PL-MLAG-PEER-VRFS
!
route-map RM-CONN-2-BGP-VRFS permit 20
!
route-map RM-MLAG-PEER-IN permit 10
description Make routes learned over MLAG Peer-link less preferred on spines to ensure optimal routing
set origin incomplete
Expand Down Expand Up @@ -149,7 +157,7 @@ router bgp 923
neighbor MLAG-IPv4-UNDERLAY-PEER maximum-routes 12000
neighbor MLAG-IPv4-UNDERLAY-PEER route-map RM-MLAG-PEER-IN in
neighbor 10.10.224.5 peer group MLAG-IPv4-UNDERLAY-PEER
neighbor 10.10.224.5 description MLAG_PEER_WITHOUT_L3_INTERFACE
neighbor 10.10.224.5 description MLAG_PEER_WITHOUT_L3_INTERFACE_Vlan4093
redistribute connected route-map RM-CONN-2-BGP
!
address-family evpn
Expand All @@ -167,7 +175,7 @@ router bgp 923
router-id 192.168.255.35
update wait-install
neighbor 10.10.224.5 peer group MLAG-IPv4-UNDERLAY-PEER
neighbor 10.10.224.5 description MLAG_PEER_WITHOUT_L3_INTERFACE
redistribute connected
neighbor 10.10.224.5 description MLAG_PEER_WITHOUT_L3_INTERFACE_Vlan3665
redistribute connected route-map RM-CONN-2-BGP-VRFS
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ hostname bgp-from-network-services-2
spanning-tree mode none
no spanning-tree vlan-id 4093-4094
!
vlan 3099
name MLAG_L3_VRF_default
trunk group MLAG
!
vlan 4094
name MLAG
trunk group MLAG
Expand Down Expand Up @@ -49,6 +53,13 @@ interface Management1
vrf MGMT
ip address 10.1.1.2/24
!
interface Vlan3099
description MLAG_L3_VRF_default
no shutdown
mtu 9214
vrf default
ip address 10.10.20.1/31
!
interface Vlan4094
description MLAG
no shutdown
Expand All @@ -59,6 +70,9 @@ interface Vlan4094
ip routing
no ip routing vrf MGMT
!
ip prefix-list PL-MLAG-PEER-VRFS
seq 10 permit 10.10.20.0/31
!
mlag configuration
domain-id GROUP1
local-interface Vlan4094
Expand All @@ -67,4 +81,38 @@ mlag configuration
reload-delay mlag 300
reload-delay non-mlag 330
!
route-map RM-CONN-2-BGP-VRFS deny 10
match ip address prefix-list PL-MLAG-PEER-VRFS
!
route-map RM-CONN-2-BGP-VRFS permit 20
!
route-map RM-MLAG-PEER-IN permit 10
description Make routes learned over MLAG Peer-link less preferred on spines to ensure optimal routing
set origin incomplete
!
router bgp 65001
router-id 192.0.255.2
maximum-paths 4 ecmp 4
update wait-install
no bgp default ipv4-unicast
neighbor MLAG-IPv4-UNDERLAY-PEER peer group
neighbor MLAG-IPv4-UNDERLAY-PEER remote-as 65001
neighbor MLAG-IPv4-UNDERLAY-PEER next-hop-self
neighbor MLAG-IPv4-UNDERLAY-PEER description bgp-from-network-services-1
neighbor MLAG-IPv4-UNDERLAY-PEER send-community
neighbor MLAG-IPv4-UNDERLAY-PEER maximum-routes 12000
neighbor MLAG-IPv4-UNDERLAY-PEER route-map RM-MLAG-PEER-IN in
neighbor MYPEERGROUP peer group
neighbor MYPEERGROUP remote-as 65991
neighbor MYPEERGROUP next-hop-self
neighbor MYPEERGROUP bfd
neighbor 10.10.1.2 peer group MYPEERGROUP
neighbor 10.10.20.0 peer group MLAG-IPv4-UNDERLAY-PEER
neighbor 10.10.20.0 description bgp-from-network-services-1_Vlan3099
redistribute connected route-map RM-CONN-2-BGP-VRFS
!
address-family ipv4
neighbor MLAG-IPv4-UNDERLAY-PEER activate
neighbor 10.10.1.2 activate
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ router_bgp:
- ip_address: 10.10.224.4
peer_group: MLAG-IPv4-UNDERLAY-PEER
peer: MLAG_PEER_WITH_L3_INTERFACE
description: MLAG_PEER_WITH_L3_INTERFACE
description: MLAG_PEER_WITH_L3_INTERFACE_Vlan4093
redistribute_routes:
- source_protocol: connected
route_map: RM-CONN-2-BGP
Expand All @@ -66,10 +66,11 @@ router_bgp:
router_id: 192.168.255.36
redistribute_routes:
- source_protocol: connected
route_map: RM-CONN-2-BGP-VRFS
neighbors:
- ip_address: 10.10.224.4
peer_group: MLAG-IPv4-UNDERLAY-PEER
description: MLAG_PEER_WITH_L3_INTERFACE
description: MLAG_PEER_WITH_L3_INTERFACE_Vlan3665
updates:
wait_install: true
service_routing_protocols_model: multi-agent
Expand Down Expand Up @@ -117,7 +118,7 @@ vlans:
trunk_groups:
- MLAG
- id: 3665
name: MLAG_iBGP_VRF
name: MLAG_L3_VRF_VRF
trunk_groups:
- MLAG
tenant: TENANT
Expand All @@ -137,7 +138,7 @@ vlan_interfaces:
tenant: TENANT
type: underlay_peering
shutdown: false
description: 'MLAG_PEER_L3_iBGP: vrf VRF'
description: MLAG_L3_VRF_VRF
vrf: VRF
mtu: 9214
ip_address: 10.10.224.5/31
Expand Down Expand Up @@ -191,6 +192,14 @@ route_maps:
type: permit
match:
- ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
- name: RM-CONN-2-BGP-VRFS
sequence_numbers:
- sequence: 10
type: deny
match:
- ip address prefix-list PL-MLAG-PEER-VRFS
- sequence: 20
type: permit
loopback_interfaces:
- name: Loopback0
description: ROUTER_ID
Expand All @@ -207,6 +216,10 @@ prefix_lists:
action: permit 192.168.255.0/24 eq 32
- sequence: 20
action: permit 192.168.254.0/24 eq 32
- name: PL-MLAG-PEER-VRFS
sequence_numbers:
- sequence: 10
action: permit 10.10.224.4/31
router_bfd:
multihop:
interval: 300
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ router_bgp:
- ip_address: 10.10.224.5
peer_group: MLAG-IPv4-UNDERLAY-PEER
peer: MLAG_PEER_WITHOUT_L3_INTERFACE
description: MLAG_PEER_WITHOUT_L3_INTERFACE
description: MLAG_PEER_WITHOUT_L3_INTERFACE_Vlan4093
redistribute_routes:
- source_protocol: connected
route_map: RM-CONN-2-BGP
Expand All @@ -66,10 +66,11 @@ router_bgp:
router_id: 192.168.255.35
redistribute_routes:
- source_protocol: connected
route_map: RM-CONN-2-BGP-VRFS
neighbors:
- ip_address: 10.10.224.5
peer_group: MLAG-IPv4-UNDERLAY-PEER
description: MLAG_PEER_WITHOUT_L3_INTERFACE
description: MLAG_PEER_WITHOUT_L3_INTERFACE_Vlan3665
updates:
wait_install: true
service_routing_protocols_model: multi-agent
Expand Down Expand Up @@ -117,7 +118,7 @@ vlans:
trunk_groups:
- MLAG
- id: 3665
name: MLAG_iBGP_VRF
name: MLAG_L3_VRF_VRF
trunk_groups:
- MLAG
tenant: TENANT
Expand All @@ -137,7 +138,7 @@ vlan_interfaces:
tenant: TENANT
type: underlay_peering
shutdown: false
description: 'MLAG_PEER_L3_iBGP: vrf VRF'
description: MLAG_L3_VRF_VRF
vrf: VRF
mtu: 9214
ip_address: 10.10.224.4/31
Expand Down Expand Up @@ -198,6 +199,14 @@ route_maps:
type: permit
match:
- ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
- name: RM-CONN-2-BGP-VRFS
sequence_numbers:
- sequence: 10
type: deny
match:
- ip address prefix-list PL-MLAG-PEER-VRFS
- sequence: 20
type: permit
loopback_interfaces:
- name: Loopback0
description: ROUTER_ID
Expand All @@ -214,6 +223,10 @@ prefix_lists:
action: permit 192.168.255.0/24 eq 32
- sequence: 20
action: permit 192.168.254.0/24 eq 32
- name: PL-MLAG-PEER-VRFS
sequence_numbers:
- sequence: 10
action: permit 10.10.224.4/31
router_bfd:
multihop:
interval: 300
Expand Down
Loading

0 comments on commit fc7352d

Please sign in to comment.