Why does BGP use path vector rather than link state or plain distance vector?
Show the answer
Say this first
Between organizations, the problems are scale, privacy and policy, not shortest paths. Link state would flood every network's internal topology to the whole internet. Plain distance vector has only a metric, so it cannot express business policy and suffers count to infinity. Path vector carries the list of ASes a route crossed: a router that sees its own AS drops the route, and operators choose paths with attributes and policy instead of a single cost.
Go deeper
What the AS path gives you
- Loop prevention without timers. If AS 64500 appears in the path of a route arriving at AS 64500, the route is discarded.
- Policy. Prefer one provider, avoid an AS, prefer customer routes over peer routes. A single metric cannot express "cheaper" or "contractually allowed".
- Privacy. An AS reveals its prefixes and that it can reach them, not its internal links.
Why it scales
BGP sends incremental updates over TCP, only changes after the initial exchange. The internet table is around a million IPv4 prefixes, far too many to model as a link state topology.
The cost
BGP converges slowly compared with IGPs, and the path it picks is the policy-preferred one, not necessarily the fastest. Inside an AS you still run an IGP for fast convergence and next hop reachability.
They will ask next
What does iBGP use for loop prevention, since the AS path does not change inside the AS?
The iBGP split horizon rule: a route learned from an iBGP peer is not advertised to another iBGP peer. That is why iBGP needs a full mesh, route reflectors or confederations.
Traps
- Saying BGP picks the shortest or fastest path. It picks the best path by attributes and policy.