-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from Drumato/add-simple-bgp-gr-with-frr8.1
simple ipv4 unicast bgp-gr
- Loading branch information
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
examples/basic_bgp/graceful_restart/simple_ipv4_unicast/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Simple IPv4 unicast BGP-GR | ||
|
||
``` | ||
$ tinet up -c spec.yaml | sudo sh | ||
$ docker exec -it R2 bash | ||
R2# tcpdump -nnli net0 # another shell | ||
$ tinet conf -c spec.yaml | sudo sh | ||
$ docker exec R1 pkill -9 bgpd | ||
``` | ||
|
Binary file added
BIN
+9.26 KB
examples/basic_bgp/graceful_restart/simple_ipv4_unicast/r2/r2-kill-bgpd.pcap
Binary file not shown.
85 changes: 85 additions & 0 deletions
85
examples/basic_bgp/graceful_restart/simple_ipv4_unicast/spec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
nodes: | ||
- name: C1 | ||
image: alpine:latest | ||
interfaces: | ||
- { name: net1, type: direct, args: R1#net1 } | ||
- name: R1 | ||
image: frrouting/frr:v8.1.0 | ||
docker_run_extra_args: --entrypoint bash | ||
interfaces: | ||
- { name: net0, type: direct, args: R2#net0 } | ||
- { name: net1, type: direct, args: C1#net1 } | ||
sysctls: | ||
- sysctl: net.ipv6.conf.all.disable_ipv6=0 | ||
- sysctl: net.ipv6.conf.default.disable_ipv6=0 | ||
- sysctl: net.ipv4.ip_forward=1 | ||
- name: R2 | ||
image: frrouting/frr:v8.1.0 | ||
docker_run_extra_args: --entrypoint bash | ||
interfaces: | ||
- { name: net0, type: direct, args: R1#net0 } | ||
sysctls: | ||
- sysctl: net.ipv6.conf.all.disable_ipv6=0 | ||
- sysctl: net.ipv6.conf.default.disable_ipv6=0 | ||
- sysctl: net.ipv4.ip_forward=1 | ||
node_configs: | ||
- name: R1 | ||
cmds: | ||
- cmd: sed -i -e 's/bgpd=no/bgpd=yes/g' /etc/frr/daemons | ||
- cmd: /usr/lib/frr/frrinit.sh start | ||
- cmd: >- | ||
vtysh -c 'conf t' | ||
-c 'interface net0' | ||
-c ' ip address 10.255.0.1/16' | ||
-c '!' | ||
-c 'interface net1' | ||
-c ' ip address 192.168.10.1/16' | ||
-c '!' | ||
-c 'ip prefix-list PL1 permit 192.168.0.0/16' | ||
-c '!' | ||
-c 'route-map RM1 permit 10' | ||
-c ' match ip address prefix-list PL1' | ||
-c '!' | ||
-c 'router bgp 65001' | ||
-c ' bgp router-id 10.255.0.1' | ||
-c ' bgp graceful-restart' | ||
-c ' bgp graceful-restart preserve-fw-state' | ||
-c ' bgp graceful-restart restart-time 1800' | ||
-c ' bgp graceful-restart stalepath-time 1800' | ||
-c ' neighbor 10.255.0.2 remote-as 65002' | ||
-c ' neighbor 10.255.0.2 route-map RM1 out' | ||
-c ' address-family ipv4 unicast' | ||
-c ' redistribute connected' | ||
-c ' exit-address-family' | ||
- cmd: vtysh -c 'write mem' | ||
- name: R2 | ||
cmds: | ||
- cmd: sed -i -e 's/bgpd=no/bgpd=yes/g' /etc/frr/daemons | ||
- cmd: /usr/lib/frr/frrinit.sh start | ||
- cmd: >- | ||
vtysh -c 'conf t' | ||
-c 'interface net0' | ||
-c ' ip address 10.255.0.2/16' | ||
-c '!' | ||
-c 'ip prefix-list PL1 permit 192.168.0.0/16' | ||
-c '!' | ||
-c 'route-map RM1 permit 10' | ||
-c ' match ip address prefix-list PL1' | ||
-c '!' | ||
-c 'router bgp 65002' | ||
-c ' bgp router-id 10.255.0.2' | ||
-c ' bgp graceful-restart' | ||
-c ' bgp graceful-restart preserve-fw-state' | ||
-c ' bgp graceful-restart restart-time 1800' | ||
-c ' bgp graceful-restart stalepath-time 1800' | ||
-c ' neighbor 10.255.0.1 remote-as 65001' | ||
-c ' neighbor 10.255.0.1 route-map RM1 in' | ||
- cmd: vtysh -c 'write mem' | ||
- name: C1 | ||
cmds: | ||
- cmd: ip addr add 192.168.10.254/16 dev net1 | ||
- cmd: route add default gw 192.168.10.1 | ||
test: | ||
- cmds: | ||
- cmd: docker exec R1 ping -c2 192.168.10.254 | ||
- cmd: docker exec R2 ping -c2 192.168.10.254 |