Free — no signup required

BGP Attributes: Making the Decision

2 min read

The BGP Decision Checklist

When a BGP router receives multiple different paths to the same destination IP block (from different peers), it must select exactly one best path to install in its routing table and advertise onward. It does this by evaluating a strict, ordered list of BGP path attributes — comparing all candidate paths at step 1, and only moving to step 2 if there's a tie, and so on.

The full decision process has about a dozen steps, but the ones that matter most in practice — and in interviews — are:

Priority Attribute Rule Scope
1 Weight (Cisco-proprietary) Higher is better Local router only
2 Local Preference Higher is better Within the AS (iBGP)
3 Locally Originated Prefer routes originated locally —
4 AS-Path Length Shorter is better Global
5 Origin IGP > EGP > Incomplete —
6 MED Lower is better Between adjacent ASes
7+ eBGP over iBGP, router ID, etc. Tiebreakers —

The three attributes you'll encounter most often in real-world BGP engineering and interviews are Local Preference, AS-Path, and MED. The following three concepts cover each in depth.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free