Skip to content

Instantly share code, notes, and snippets.

@rwestphal
Created April 25, 2019 20:15
Show Gist options
  • Save rwestphal/414ce64e2c45fbf7482d128444bff40f to your computer and use it in GitHub Desktop.
Save rwestphal/414ce64e2c45fbf7482d128444bff40f to your computer and use it in GitHub Desktop.
# +---------+
# | |
# | RT1 |
# | 1.1.1.1 |
# | |
# +---------+
# |rt1-eth0 (.1)
# |
# |10.0.1.0/24
# |
# |rt2-eth0 (.2)
# +---------+
# | |
# | RT2 |
# | 2.2.2.2 |
# | |
# +---------+
# |rt2-eth1 (.2)
# |
# |
# +----------+----------+
# | 10.0.2.0/24 |
# | |
# |rt3-eth0 (.3) |rt4-eth0 (.4)
# +---------+ +---------+
# | | | |
# | RT3 | | RT4 |
# | 3.3.3.3 | | 4.4.4.4 |
# | | | |
# +---------+ +---------+
---
routers:
rt1:
links:
lo:
mpls: yes
rt1-eth0:
peer: [rt2, rt2-eth0]
mpls: yes
ipv4: 10.0.1.1/24
frr:
zebra:
config: |
interface lo
ip address 1.1.1.1/32
ospfd:
config: |
interface lo
ip ospf area 0.0.0.0
!
interface rt1-eth0
ip ospf network point-to-point
ip ospf area 0.0.0.0
ip ospf hello-interval 1
ip ospf dead-interval 3
!
router ospf
router-id 1.1.1.1
capability opaque
router-info area 0.0.0.0
segment-routing on
segment-routing prefix 1.1.1.1/32 index 1 no-php-flag
!
rt2:
links:
lo:
mpls: yes
rt2-eth0:
peer: [rt1, rt1-eth0]
mpls: yes
ipv4: 10.0.1.2/24
rt2-eth1:
peer: [sw1, sw1-1]
mpls: yes
ipv4: 10.0.2.2/24
frr:
zebra:
config: |
interface lo
ip address 2.2.2.2/32
ospfd:
config: |
interface lo
ip ospf area 0.0.0.0
!
interface rt2-eth0
ip ospf network point-to-point
ip ospf area 0.0.0.0
ip ospf hello-interval 1
ip ospf dead-interval 3
!
interface rt2-eth1
ip ospf area 0.0.0.0
ip ospf bfd
ip ospf hello-interval 1
ip ospf dead-interval 3
!
router ospf
router-id 2.2.2.2
capability opaque
router-info area 0.0.0.0
segment-routing on
segment-routing prefix 2.2.2.2/32 index 2
!
bfdd:
config: |
bfd
!
rt3:
links:
lo:
mpls: yes
rt3-eth0:
peer: [sw1, sw1-2]
mpls: yes
ipv4: 10.0.2.3/24
frr:
zebra:
config: |
interface lo
ip address 3.3.3.3/32
ospfd:
config: |
interface lo
ip ospf area 0.0.0.0
!
interface rt3-eth0
ip ospf area 0.0.0.0
ip ospf bfd
ip ospf hello-interval 1
ip ospf dead-interval 3
!
router ospf
router-id 3.3.3.3
capability opaque
router-info area 0.0.0.0
segment-routing on
segment-routing prefix 3.3.3.3/32 index 3
!
bfdd:
config: |
bfd
!
rt4:
links:
lo:
mpls: yes
rt4-eth0:
peer: [sw1, sw1-3]
mpls: yes
ipv4: 10.0.2.4/24
frr:
zebra:
config: |
interface lo
ip address 4.4.4.4/32
ospfd:
config: |
interface lo
ip ospf area 0.0.0.0
!
interface rt4-eth0
ip ospf area 0.0.0.0
ip ospf bfd
ip ospf hello-interval 1
ip ospf dead-interval 3
!
router ospf
router-id 4.4.4.4
capability opaque
router-info area 0.0.0.0
segment-routing on
segment-routing prefix 4.4.4.4/32 index 4
!
bfdd:
config: |
bfd
!
switches:
sw1:
links:
sw1-1:
peer: [rt2, rt2-eth1]
sw1-2:
peer: [rt3, rt3-eth0]
sw1-3:
peer: [rt4, rt4-eth0]
frr:
base-configs:
all: |
hostname %(node)-%(daemon)
password 1
log file %(logdir)/%(node)-%(daemon).log
zebra: |
debug zebra kernel
ospfd: |
debug ospf zebra
debug ospf sr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment