InfraBGPSession references InfraBGPPeerGroup via peer_group HFID, so peer groups must be committed before sessions are created. Split 09-bgp.yml into: - 09-bgp.yml: InfraBGPRouterConfig + InfraBGPPeerGroup - 10-bgp-sessions.yml: InfraBGPSession + InfraBGPAddressFamily Renamed: 10-vrfs→11, 11-mlag→12. Now 12 object files total.
386 lines
12 KiB
YAML
386 lines
12 KiB
YAML
# BGP: RouterConfig, PeerGroups, Sessions, AddressFamilies
|
|
# Depends on: 01-foundation (ASNs), 02-devices, 04-ipam
|
|
#
|
|
# Spine BGP: no named peer-groups in config (neighbors defined directly),
|
|
# but evpn peer-group is defined. Underlay neighbors are direct.
|
|
# Leaf BGP: underlay, underlay_ibgp, evpn peer-groups.
|
|
---
|
|
apiVersion: infrahub.app/v1
|
|
kind: Object
|
|
spec:
|
|
kind: InfraBGPRouterConfig
|
|
data:
|
|
# ============================================================
|
|
# Spine1 BGP — AS 65000, router-id 10.0.250.1
|
|
# ============================================================
|
|
- device: ["spine1"]
|
|
router_id: "10.0.250.1"
|
|
local_asn: ["65000"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
# ============================================================
|
|
# Spine2 BGP — AS 65000, router-id 10.0.250.2
|
|
# ============================================================
|
|
- device: ["spine2"]
|
|
router_id: "10.0.250.2"
|
|
local_asn: ["65000"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
# ============================================================
|
|
# Leaf1 BGP — AS 65001, router-id 10.0.250.11
|
|
# ============================================================
|
|
- device: ["leaf1"]
|
|
router_id: "10.0.250.11"
|
|
local_asn: ["65001"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
# ============================================================
|
|
# Leaf2 BGP — AS 65001, router-id 10.0.250.12
|
|
# ============================================================
|
|
- device: ["leaf2"]
|
|
router_id: "10.0.250.12"
|
|
local_asn: ["65001"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
# ============================================================
|
|
# Leaf3 BGP — AS 65002, router-id 10.0.250.13
|
|
# ============================================================
|
|
- device: ["leaf3"]
|
|
router_id: "10.0.250.13"
|
|
local_asn: ["65002"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
# ============================================================
|
|
# Leaf4 BGP — AS 65002, router-id 10.0.250.14
|
|
# ============================================================
|
|
- device: ["leaf4"]
|
|
router_id: "10.0.250.14"
|
|
local_asn: ["65002"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
# ============================================================
|
|
# Leaf5 BGP — AS 65003, router-id 10.0.250.15
|
|
# ============================================================
|
|
- device: ["leaf5"]
|
|
router_id: "10.0.250.15"
|
|
local_asn: ["65003"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
# ============================================================
|
|
# Leaf6 BGP — AS 65003, router-id 10.0.250.16
|
|
# ============================================================
|
|
- device: ["leaf6"]
|
|
router_id: "10.0.250.16"
|
|
local_asn: ["65003"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
# ============================================================
|
|
# Leaf7 BGP — AS 65004, router-id 10.0.250.17
|
|
# ============================================================
|
|
- device: ["leaf7"]
|
|
router_id: "10.0.250.17"
|
|
local_asn: ["65004"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
# ============================================================
|
|
# Leaf8 BGP — AS 65004, router-id 10.0.250.18
|
|
# ============================================================
|
|
- device: ["leaf8"]
|
|
router_id: "10.0.250.18"
|
|
local_asn: ["65004"]
|
|
default_ipv4_unicast: false
|
|
log_neighbor_changes: true
|
|
ecmp_max_paths: 4
|
|
ecmp_max_ecmp: 64
|
|
ebgp_distance: 20
|
|
ibgp_distance: 200
|
|
local_distance: 200
|
|
---
|
|
apiVersion: infrahub.app/v1
|
|
kind: Object
|
|
spec:
|
|
kind: InfraBGPPeerGroup
|
|
data:
|
|
# ============================================================
|
|
# Spine peer-groups (evpn only — underlay neighbors are direct)
|
|
# ============================================================
|
|
# Spine1 — evpn peer-group
|
|
- bgp_config: ["spine1"]
|
|
name: evpn
|
|
description: EVPN overlay to leaf loopbacks
|
|
peer_group_type: evpn
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
next_hop_unchanged: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
# Spine2 — evpn peer-group
|
|
- bgp_config: ["spine2"]
|
|
name: evpn
|
|
description: EVPN overlay to leaf loopbacks
|
|
peer_group_type: evpn
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
next_hop_unchanged: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
# ============================================================
|
|
# Leaf peer-groups (underlay, underlay_ibgp, evpn)
|
|
# ============================================================
|
|
# Leaf1
|
|
- bgp_config: ["leaf1"]
|
|
name: underlay
|
|
description: Underlay eBGP to spines
|
|
peer_group_type: underlay
|
|
remote_asn: ["65000"]
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf1"]
|
|
name: underlay_ibgp
|
|
description: MLAG iBGP peering
|
|
peer_group_type: underlay_ibgp
|
|
remote_asn: ["65001"]
|
|
next_hop_self: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf1"]
|
|
name: evpn
|
|
description: EVPN overlay to spines
|
|
peer_group_type: evpn
|
|
remote_asn: ["65000"]
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
# Leaf2
|
|
- bgp_config: ["leaf2"]
|
|
name: underlay
|
|
description: Underlay eBGP to spines
|
|
peer_group_type: underlay
|
|
remote_asn: ["65000"]
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf2"]
|
|
name: underlay_ibgp
|
|
description: MLAG iBGP peering
|
|
peer_group_type: underlay_ibgp
|
|
remote_asn: ["65001"]
|
|
next_hop_self: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf2"]
|
|
name: evpn
|
|
description: EVPN overlay to spines
|
|
peer_group_type: evpn
|
|
remote_asn: ["65000"]
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
# Leaf3
|
|
- bgp_config: ["leaf3"]
|
|
name: underlay
|
|
description: Underlay eBGP to spines
|
|
peer_group_type: underlay
|
|
remote_asn: ["65000"]
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf3"]
|
|
name: underlay_ibgp
|
|
description: MLAG iBGP peering
|
|
peer_group_type: underlay_ibgp
|
|
remote_asn: ["65002"]
|
|
next_hop_self: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf3"]
|
|
name: evpn
|
|
description: EVPN overlay to spines
|
|
peer_group_type: evpn
|
|
remote_asn: ["65000"]
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
# Leaf4
|
|
- bgp_config: ["leaf4"]
|
|
name: underlay
|
|
description: Underlay eBGP to spines
|
|
peer_group_type: underlay
|
|
remote_asn: ["65000"]
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf4"]
|
|
name: underlay_ibgp
|
|
description: MLAG iBGP peering
|
|
peer_group_type: underlay_ibgp
|
|
remote_asn: ["65002"]
|
|
next_hop_self: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf4"]
|
|
name: evpn
|
|
description: EVPN overlay to spines
|
|
peer_group_type: evpn
|
|
remote_asn: ["65000"]
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
# Leaf5
|
|
- bgp_config: ["leaf5"]
|
|
name: underlay
|
|
description: Underlay eBGP to spines
|
|
peer_group_type: underlay
|
|
remote_asn: ["65000"]
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf5"]
|
|
name: underlay_ibgp
|
|
description: MLAG iBGP peering
|
|
peer_group_type: underlay_ibgp
|
|
remote_asn: ["65003"]
|
|
next_hop_self: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf5"]
|
|
name: evpn
|
|
description: EVPN overlay to spines
|
|
peer_group_type: evpn
|
|
remote_asn: ["65000"]
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
# Leaf6
|
|
- bgp_config: ["leaf6"]
|
|
name: underlay
|
|
description: Underlay eBGP to spines
|
|
peer_group_type: underlay
|
|
remote_asn: ["65000"]
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf6"]
|
|
name: underlay_ibgp
|
|
description: MLAG iBGP peering
|
|
peer_group_type: underlay_ibgp
|
|
remote_asn: ["65003"]
|
|
next_hop_self: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf6"]
|
|
name: evpn
|
|
description: EVPN overlay to spines
|
|
peer_group_type: evpn
|
|
remote_asn: ["65000"]
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
# Leaf7
|
|
- bgp_config: ["leaf7"]
|
|
name: underlay
|
|
description: Underlay eBGP to spines
|
|
peer_group_type: underlay
|
|
remote_asn: ["65000"]
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf7"]
|
|
name: underlay_ibgp
|
|
description: MLAG iBGP peering
|
|
peer_group_type: underlay_ibgp
|
|
remote_asn: ["65004"]
|
|
next_hop_self: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf7"]
|
|
name: evpn
|
|
description: EVPN overlay to spines
|
|
peer_group_type: evpn
|
|
remote_asn: ["65000"]
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
# Leaf8
|
|
- bgp_config: ["leaf8"]
|
|
name: underlay
|
|
description: Underlay eBGP to spines
|
|
peer_group_type: underlay
|
|
remote_asn: ["65000"]
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf8"]
|
|
name: underlay_ibgp
|
|
description: MLAG iBGP peering
|
|
peer_group_type: underlay_ibgp
|
|
remote_asn: ["65004"]
|
|
next_hop_self: true
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
- bgp_config: ["leaf8"]
|
|
name: evpn
|
|
description: EVPN overlay to spines
|
|
peer_group_type: evpn
|
|
remote_asn: ["65000"]
|
|
update_source: Loopback0
|
|
ebgp_multihop: 3
|
|
send_community: extended
|
|
maximum_routes: 12000
|
|
maximum_routes_warning_only: true
|
|
|