Last active
January 26, 2022 16:17
-
-
Save gdhaworth/9f1819d46e0af989dcae87aa6cf3e429 to your computer and use it in GitHub Desktop.
My raspberry pi setup to peer with calico (BGP) using frrouting (in docker) and pass routes to the router (so that metallb can peer directly with the router). *.conf and daemons go in /etc/frr. I used host networking in docker, couldn't find a way to do it without. 10.8.0.1 is the router, 10.8.0.2/3 are the k8s nodes running calico/metallb. Rasp…
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
router bgp 64512 | |
bgp router-id 10.8.0.10 | |
no bgp ebgp-requires-policy | |
neighbor 10.8.0.1 remote-as 64567 | |
neighbor 10.8.0.2 remote-as 64512 | |
neighbor 10.8.0.3 remote-as 64512 | |
! | |
address-family ipv4 unicast | |
neighbor 10.8.0.2 route-reflector-client | |
neighbor 10.8.0.3 route-reflector-client | |
exit-address-family | |
! |
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
bgpd=yes | |
ospfd=no | |
ospf6d=no | |
ripd=no | |
ripngd=no | |
isisd=no | |
pimd=no | |
ldpd=no | |
nhrpd=no | |
eigrpd=no | |
babeld=no | |
sharpd=no | |
pbrd=no | |
bfdd=no | |
fabricd=no | |
vrrpd=no | |
pathd=no | |
vtysh_enable=yes | |
zebra_options=" -A 127.0.0.1 -s 90000000" | |
bgpd_options=" -A 127.0.0.1 -n -p 179" | |
ospfd_options=" -A 127.0.0.1" | |
ospf6d_options=" -A ::1" | |
ripd_options=" -A 127.0.0.1" | |
ripngd_options=" -A ::1" | |
isisd_options=" -A 127.0.0.1" | |
pimd_options=" -A 127.0.0.1" | |
ldpd_options=" -A 127.0.0.1" | |
nhrpd_options=" -A 127.0.0.1" | |
eigrpd_options=" -A 127.0.0.1" | |
babeld_options=" -A 127.0.0.1" | |
sharpd_options=" -A 127.0.0.1" | |
pbrd_options=" -A 127.0.0.1" | |
staticd_options="-A 127.0.0.1" | |
bfdd_options=" -A 127.0.0.1" | |
fabricd_options="-A 127.0.0.1" | |
vrrpd_options=" -A 127.0.0.1" | |
pathd_options=" -A 127.0.0.1" |
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
#!/bin/bash -ex | |
docker run --rm \ | |
--name frr \ | |
--network host \ | |
--privileged \ | |
-v /etc/frr:/etc/frr:ro \ | |
-v /lib/modules:/lib/modules:ro \ | |
frrouting/frr:v8.1.0 |
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
[Unit] | |
Description=frrouting in docker | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
Type=exec | |
ExecStartPre=-docker kill frr | |
ExecStartPre=-docker rm frr | |
ExecStart=/bin/bash /usr/local/bin/frr-docker.sh | |
ExecStop=docker stop frr | |
ExecStop=-docker kill frr | |
Restart=on-failure | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment