Ramblings of an aging IT geek
← Ramblings of an aging IT geek
networking

i am now running bgp at home and i regret nothing

Running BGP between a couple of homelab boxes with FRR, ostensibly for failover, mostly to learn it properly.

Network cables in a rack

I now have BGP running in my house. Not because anything I own remotely needs a routing protocol designed for the internet, but because I have spent years reading about it for work and never actually configured it in anger, and a homelab is exactly the place to be wrong about something safely.

The pretext was failover. I have a couple of boxes that both advertise the same service address, and I wanted traffic to follow whichever one is actually up rather than relying on a health check somewhere noticing and reconfiguring something. With FRR speaking BGP to my router, the box that holds the route is the box that gets the traffic, and when it goes away the route is withdrawn and the other one takes over. It is the same trick the big CDNs use to anycast a single address across the planet, just running between two machines in a garage.

The config is almost insultingly short once it works:

router bgp 64512
 neighbor 10.0.0.1 remote-as 64512
 address-family ipv4 unicast
  network 10.0.99.10/32
 exit-address-family

The fun was in watching show ip bgp actually converge, pulling a cable, and seeing the route move on its own with nothing scripted in between. I learned more about route maps and prefix lists in one evening of breaking it than in a year of reading.

Do you need this at home? No. Absolutely not. But the next time BGP comes up at work it will not be an abstraction, and that was the whole point.