“Path Hunting” in BGP

“Path Hunting” in BGP

2 minutes read time Author: Justin Wilson

Path hunting in BGP shows up when the network loses a route and has to figure out what comes next. You do not usually notice it during steady state. You notice it when traffic starts taking odd paths, and latency does not line up with what you expect. The control plane is busy, and the network appears to be second-guessing itself.

At a basic level, path hunting is BGP walking through alternate paths one at a time instead of finding the best one right away. In a previous article, I explained how BGP makes decisions.  When a best path is withdrawn, the router may not immediately select the true next-best path. It may try another path that looks valid based on what it knows at that moment. That path is advertised, other routers react, and then it’s replaced again when a better option shows up.

Each router only sees its local view of the network. It does not have a global map, and it does not know which alternative path will hold up once the rest of the network reacts. So it picks a path, shares it, and then corrects course when new information arrives.  It’s on the hunt, so to speak.  

A fiber cut or a peer drop is enough to trigger it. Instead of a clean move from a primary path to a backup, the route may bounce through one or two temporary paths before settling on one. Each change triggers updates, which spread across the network. This can lead to long convergence times that customers notice.  Web-sites may time out.  Traffic follows those temporary decisions while the network converges. That can mean longer paths or brief packet loss, depending on how the alternative paths behave. It is not random, but it can feel that way

There are two practical ways to keep this under control. The first is timer tuning. Slowing down how quickly updates move can reduce path churn, but it also means convergence takes longer.

The second is policy design. The network edge is the doorway into your routing domain and must be treated as such. If you define clear primary and backup paths with consistent attributes, BGP has fewer decisions to make. When the choices are obvious, the hunt is shorter and less visible. This can be a moving target, though.  Since you have no control over your upstreams, their BGP decisions affect you.

Path hunting is how BGP searches for stability after a change. You cannot remove it, but you can make it predictable. Clean policy and reasonable timers keep it from turning into something your users notice.

j2networks family of sites
https://j2sw.com
https://startawisp.info
https://indycolo.net
#packetsdownrange #routethelight