Skip to content

Commit

Permalink
Links (#29)
Browse files Browse the repository at this point in the history
* Interfaces

* Normalized, Batfish tests/assertions all passing on containerlab
  • Loading branch information
h4ndzdatm0ld authored Jan 16, 2023
1 parent ef02a31 commit eb32fa3
Show file tree
Hide file tree
Showing 72 changed files with 423 additions and 404 deletions.
139 changes: 139 additions & 0 deletions .spauto-clab.yml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# clab/clab@123
# admin/admin
---
name: "spauto"

mgmt:
network: "spauto"
ipv4_subnet: "172.100.100.0/24"
ipv6_subnet: "2001:172:100:100::/80"

topology:
defaults:
kinds:
ceos:
image: "h4ndzdatm0ld/ceosimage:4.28.0F"
vr-xrv:
image: "h4ndzdatm0ld/vr-xrv:6.1.3"
vr-csr:
image: "h4ndzdatm0ld/vr-csr:17.03.02"

nodes:
# CE Nodes - AS65001 - West
vr-csr-ce-1:
kind: "vr-csr"
mgmt_ipv4: 172.100.100.15
mgmt_ipv6: 2001:172:100:100::15
vr-csr-ce-2:
kind: "vr-csr"
mgmt_ipv4: 172.100.100.20
mgmt_ipv6: 2001:172:100:100::20
ceos_sw_1:
kind: ceos
mgmt_ipv4: 172.100.100.180
mgmt_ipv6: 2001:172:100:100::180
xrv-h1:
kind: "vr-xrv"
mgmt_ipv4: 172.100.100.150
mgmt_ipv6: 2001:172:100:100::150
# CE Nodes - AS65001 - East
vr-csr-ce-3:
kind: "vr-csr"
mgmt_ipv4: 172.100.100.25
mgmt_ipv6: 2001:172:100:100::25
vr-csr-ce-4:
kind: "vr-csr"
mgmt_ipv4: 172.100.100.30
mgmt_ipv6: 2001:172:100:100::30
xrv-h2:
kind: "vr-xrv"
mgmt_ipv4: 172.100.100.155
mgmt_ipv6: 2001:172:100:100::155
# CORE / PE Nodes
xrv-pe1:
kind: "vr-xrv"
mgmt_ipv4: 172.100.100.11
mgmt_ipv6: 2001:172:100:100::11
xrv-pe2:
kind: "vr-xrv"
mgmt_ipv4: 172.100.100.22
mgmt_ipv6: 2001:172:100:100::22
xrv-pe3:
kind: "vr-xrv"
mgmt_ipv4: 172.100.100.33
mgmt_ipv6: 2001:172:100:100::33
xrv-pe4:
kind: "vr-xrv"
mgmt_ipv4: 172.100.100.44
mgmt_ipv6: 2001:172:100:100::44
xrv-p1:
kind: "vr-xrv"
mgmt_ipv4: 172.100.100.101
mgmt_ipv6: 2001:172:100:100::101
xrv-p2:
kind: vr-xrv
mgmt_ipv4: 172.100.100.102
mgmt_ipv6: 2001:172:100:100::102
xrv-rr-1:
kind: "vr-xrv"
mgmt_ipv4: 172.100.100.201
mgmt_ipv6: 2001:172:100:100::201
xrv-rr-2:
kind: "vr-xrv"
mgmt_ipv4: 172.100.100.202
mgmt_ipv6: 2001:172:100:100::202

links:
# PE1 <> P1
- endpoints: ["xrv-pe1:eth5", "xrv-p1:eth2"]
# PE1 <> PE2
- endpoints: ["xrv-pe1:eth4", "xrv-pe2:eth3"]
# PE2 <> P2
- endpoints: ["xrv-pe2:eth4", "xrv-p2:eth1"]
# PE3 <> P1
- endpoints: ["xrv-pe3:eth2", "xrv-p1:eth7"]
# PE3 <> P4
- endpoints: ["xrv-pe3:eth3", "xrv-pe4:eth2"]
# PE4 <> P2
- endpoints: ["xrv-pe4:eth1", "xrv-p2:eth6"]

# P1 TO P2 CORE LINKS
# P1 <> P2
- endpoints: ["xrv-p1:eth5", "xrv-p2:eth4"]
- endpoints: ["xrv-p1:eth4", "xrv-p2:eth3"]

# Route Reflectors R1
# RR1 <> P1
- endpoints: ["xrv-rr-1:eth2", "xrv-p1:eth3"]
# RR1 <> P2
- endpoints: ["xrv-rr-1:eth4", "xrv-p2:eth2"]
# Route Reflectors R2
# RR2 <> P1
- endpoints: ["xrv-rr-2:eth1", "xrv-p1:eth6"]
# RR2 <> P2
- endpoints: ["xrv-rr-2:eth3", "xrv-p2:eth5"]

# CORE LINK BETWEEN RRs
# RR1 <> RR2
- endpoints: ["xrv-rr-1:eth3", "xrv-rr-2:eth2"]

# CE NODES - AS 65001 [CE1]
- endpoints: ["vr-csr-ce-1:eth1", "xrv-pe1:eth2"]
- endpoints: ["vr-csr-ce-1:eth2", "ceos_sw_1:eth1"]
# CE NODES - AS 65001 [CE2]
- endpoints: ["vr-csr-ce-2:eth1", "xrv-pe2:eth2"]
- endpoints: ["vr-csr-ce-2:eth2", "ceos_sw_1:eth2"]
# CE NODES - AS 65001 [CE3]
- endpoints: ["vr-csr-ce-3:eth1", "xrv-pe3:eth4"]
# H2 NODE TO CE3
- endpoints: ["xrv-h2:eth1", "vr-csr-ce-3:eth2"]
# CE NODES - AS 65001 [CE4]
- endpoints: ["vr-csr-ce-4:eth2", "xrv-pe4:eth3"]
# H2 NODE TO CE4
- endpoints: ["xrv-h2:eth2", "vr-csr-ce-4:eth1"]
# H1 NODE TO SW 1
- endpoints: ["xrv-h1:eth1", "ceos_sw_1:eth3"]
- endpoints: ["xrv-h1:eth2", "ceos_sw_1:eth4"]
- endpoints: ["xrv-h1:eth3", "ceos_sw_1:eth5"]
- endpoints: ["xrv-h1:eth4", "ceos_sw_1:eth6"]

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ poetry shell
Locate the Nornir playground

```bash
cd spauto/spauto_nornir
cd spauto/nornir
```

Deploy configs with Nornir
Expand Down
9 changes: 8 additions & 1 deletion spauto-clab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ topology:
# CE NODES - AS 65001 [CE2]
- endpoints: ["vr-csr-ce-2:eth1", "xrv-pe2:eth2"]
- endpoints: ["vr-csr-ce-2:eth2", "ceos_sw_1:eth2"]

# CE NODES - AS 65001 [CE3]
- endpoints: ["vr-csr-ce-3:eth1", "xrv-pe3:eth4"]
# H2 NODE TO CE3
- endpoints: ["xrv-h2:eth1", "vr-csr-ce-3:eth2"]
# CE NODES - AS 65001 [CE4]
- endpoints: ["vr-csr-ce-4:eth2", "xrv-pe4:eth3"]
# H2 NODE TO CE4
- endpoints: ["xrv-h2:eth2", "vr-csr-ce-4:eth1"]
# H1 NODE TO SW 1
- endpoints: ["xrv-h1:eth1", "ceos_sw_1:eth3"]
- endpoints: ["xrv-h1:eth2", "ceos_sw_1:eth4"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ inventory:
defaults_file: "inventory/defaults.yml"

logging:
log_file: logs/nornir.log
log_file: nornir.log
level: DEBUG
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
base:
lldp: true
ip_interfaces:
- interface: GigabitEthernet3
description: TO_H1
Expand All @@ -12,11 +10,6 @@ ip_interfaces:
description: TO_PE1
ip_address: 10.1.0.0
mask: 255.255.255.254
# - interface: GigabitEthernet3
# description: TO_PE2
# ip_address: 10.1.0.4
# mask: 255.255.255.254
# sub_int: false
- interface: Loopback0
description: SYSTEM_LO_IP
ip_address: 192.168.10.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
base:
lldp: true

ip_interfaces:
- interface: GigabitEthernet3
admin_status: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
base:
lldp: true
ip_interfaces:
- interface: GigabitEthernet1.1001
description: TO_PE
- interface: GigabitEthernet2
description: TO_PE3
ip_address: 10.2.0.3
mask: 255.255.255.0
sub_int: true
vlan: 1001
- interface: GigabitEthernet3
description: TO_H2_0/0/0/0
ip_address: 10.201.0.2
mask: 255.255.255.0
- interface: Loopback0
description: SYSTEM_LO_IP
ip_address: 192.168.10.3
Expand All @@ -19,7 +19,7 @@ bgp:
neighbors:
- remote_as: 65000
neighbor: 10.2.0.33
update_source: GigabitEthernet1.1001
update_source: GigabitEthernet2
afi: ipv4 unicast
route_policy:
- PL-EBGP-PE3-OUT out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
base:
lldp: true
ip_interfaces:
- interface: GigabitEthernet1.1001
- interface: GigabitEthernet2
description: TO_H2
ip_address: 10.202.0.2
mask: 255.255.255.0
- interface: GigabitEthernet3
description: TO_PE4
ip_address: 10.2.0.4
mask: 255.255.255.0
sub_int: true
vlan: 1001
vrf: VRF-A
- interface: Loopback0
description: SYSTEM_LO_IP
ip_address: 192.168.10.4
Expand All @@ -20,7 +19,7 @@ bgp:
neighbors:
- remote_as: 65000
neighbor: 10.2.0.44
update_source: GigabitEthernet1.1001
update_source: GigabitEthernet3
afi: ipv4 unicast
route_policy:
- PL-EBGP-PE4-OUT out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
base:
lldp: true
ip_interfaces:
- interface: GigabitEthernet0/0/0/1
description: "Parent INT to PE1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
base:
lldp: true

ip_interfaces:
- interface: GigabitEthernet0/0/0/0
description: "Parent INT to PE2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
base:
lldp: true
vrfs:
- name: VRF-A
family: address-family ipv4 unicast
Expand Down Expand Up @@ -50,13 +48,11 @@ bgp:
asn: 65000
router_id: 172.16.0.11
add_paths: true
add_pe_policy: true
route_reflector: false
route_reflectors:
- 172.16.0.201
- 172.16.0.202
add_pe_policy: true
add_65001_in_out: false
add_65001_in: true
CE1_MED: 100
vrf_neighbors:
- vrf: VRF-A
Expand All @@ -66,9 +62,6 @@ bgp:
- remote_as: 65001
neighbor: 10.1.0.0
update_source: GigabitEthernet0/0/0/1
route_policy:
- PL-EBGP-65001-IN in
- PL-EBGP-CE1-OUT out
static_routes:
- dst: 0.0.0.0/0
next_hop: Null0
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
base:
lldp: true
vrfs:
- name: VRF-A
family: address-family ipv4 unicast
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
base:
lldp: true
ip_interfaces:
- interface: GigabitEthernet0/0/0/0
description: TO_CORE_PE4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
base:
lldp: true
vrfs:
- name: VRF-A
family: address-family ipv4 unicast
Expand Down Expand Up @@ -73,14 +71,12 @@ bgp:
asn: 65000
router_id: 172.16.0.22
add_paths: true
add_pe_policy: true
route_reflector: false
route_reflectors:
- 172.16.0.201
- 172.16.0.202
cluster_id:
add_pe_policy: true
add_65001_in_out: false
add_65001_in: true
CE2_MED: 100
vrf_neighbors:
- vrf: VRF-A
Expand All @@ -90,9 +86,6 @@ bgp:
- remote_as: 65001
neighbor: 10.1.0.2
update_source: GigabitEthernet0/0/0/1
route_policy:
- PL-EBGP-65001-IN in
- PL-EBGP-CE2-OUT out
static_routes:
- dst: 0.0.0.0/0
next_hop: Null0
Loading

0 comments on commit eb32fa3

Please sign in to comment.