Skip to content

Instantly share code, notes, and snippets.

@rwestphal
Created March 9, 2018 21:46
Show Gist options
  • Save rwestphal/ff95e88a2defef96ac8a08106ee5c305 to your computer and use it in GitHub Desktop.
Save rwestphal/ff95e88a2defef96ac8a08106ee5c305 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:
rt1-lo1:
ipv4: 1.1.1.1/32
rt1-eth0:
peer: [rt2, rt2-eth0]
ipv4: 10.0.1.1/24
frr:
zebra:
config: |
ip route 10.0.2.0/24 10.0.1.2
bfdd:
args: "--bfdctl /var/run/frr/ebfdd.sock"
config: |
bfd
peer 10.0.1.2
receive-interval 50
transmit-interval 50
no shutdown
!
bgpd:
config: |
router bgp 1
neighbor 10.0.1.2 remote-as 1
neighbor 10.0.1.2 bfdd
!
address-family ipv4 unicast
network 1.1.1.1/32
exit-address-family
!
!
shell: |
ebfdd -C /var/run/frr/ebfdd.sock >/dev/null 2>&1 &
rt2:
links:
rt2-lo1:
ipv4: 2.2.2.2/32
rt2-eth0:
peer: [rt1, rt1-eth0]
ipv4: 10.0.1.2/24
rt2-eth1:
peer: [sw1, sw1-1]
ipv4: 10.0.2.2/24
frr:
zebra:
config: |
bfdd:
args: "--bfdctl /var/run/frr/ebfdd.sock"
config: |
bfd
peer 10.0.1.2
receive-interval 50
transmit-interval 50
no shutdown
exit
!
peer 10.0.2.3
receive-interval 50
transmit-interval 50
no shutdown
exit
!
peer 10.0.2.4
receive-interval 50
transmit-interval 50
no shutdown
exit
!
!
bgpd:
config: |
router bgp 1
neighbor 10.0.1.1 remote-as 1
neighbor 10.0.1.1 bfdd
neighbor 10.0.2.3 remote-as 1
neighbor 10.0.2.3 bfdd
neighbor 10.0.2.4 remote-as 1
neighbor 10.0.2.4 bfdd
!
address-family ipv4 unicast
network 2.2.2.2/32
neighbor 10.0.1.1 route-reflector-client
neighbor 10.0.2.3 route-reflector-client
neighbor 10.0.2.4 route-reflector-client
exit-address-family
!
!
shell: |
ebfdd -C /var/run/frr/ebfdd.sock >/dev/null 2>&1 &
rt3:
links:
rt3-lo1:
ipv4: 3.3.3.3/32
rt3-eth0:
peer: [sw1, sw1-2]
ipv4: 10.0.2.3/24
frr:
zebra:
config: |
ip route 10.0.1.0/24 10.0.2.2
bfdd:
args: "--bfdctl /var/run/frr/ebfdd.sock"
config: |
bfd
peer 10.0.2.2
receive-interval 50
transmit-interval 50
no shutdown
!
bgpd:
config: |
router bgp 1
neighbor 10.0.2.2 remote-as 1
neighbor 10.0.2.2 bfdd
!
address-family ipv4 unicast
network 3.3.3.3/32
exit-address-family
!
!
shell: |
ebfdd -C /var/run/frr/ebfdd.sock >/dev/null 2>&1 &
rt4:
links:
e0-0:
peer: [sw1, sw1-3]
iou:
image: l3-adventerprisek9-15.4.1T
config: |
ip route 10.0.1.0 255.255.255.0 10.0.2.2
!
interface lo1
ip address 4.4.4.4 255.255.255.255
!
interface e0/0
ip address 10.0.2.4 255.255.255.0
bfd interval 50 min_rx 50 multiplier 3
no shutdown
!
router bgp 1
neighbor 10.0.2.2 remote-as 1
neighbor 10.0.2.2 fall-over bfd
!
address-family ipv4 unicast
network 4.4.4.4/32
exit-address-family
!
!
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
bgpd: |
debug bgp zebra
iou:
base-config: |
hostname %(node)
no ip domain lookup
!
line con 0
exec-timeout 0 0
logging synchronous
privilege level 15
no login
!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment