BGP BEST PATH SELECTION PREREQUISITES
-next hop value must be in the routing table
prevents route recursion failure
-synchronization rule must be met or disabled
legacy black-hole prevention technique
-as-path must not contain local-as
normal ebgp loop prevention
can be disabled with allow-as in
-first asn in path must be neighbors ASN
bgp enforce-first-as command
1-PRE-BESTPATH COMMUNITY
WEIGHT
cisco propietary
locally significant
higher value is preferred
LOCAL PREFERENCE
higher value preferred
not advertised to ebgp peers
carried through confederation ebgp
LOCALLY ORIGINATED
locally originated gets Weight of 32768
AS_PATH
smaller length is preferred
ORIGIN
IGP is over EGP over incomplete
status codes I > E > ?
MED
smaller values is preferred
only compared when peering to the same provider by default
EBGP over IBGP
if you learned it via EBGP it´s not your prefix
IGP Metric to Next-Hop
can use multi-path if all equal after this step
Hidden commands to allow multipath if AS_PATH is not the same (has to be same length)
bgp bestpath as-path multipath-relax
TIE BREAKERS
oldest
lowest RID
Shortest CLuster List
Lowest Neighbor Address
Best Path Slection Exceptions
AS_PATH
bgp bestpath as-path ignore
MED
bgp always-compare-med
bgp bestpath med-confed
- compares MED for routes locally originated in the confederation
bgp bestpath med missing-as-worst
-Assign MED of 4,294,967,294 to NULL MED
bgp deterministic med
-compare MED against all possible paths
IGP METRIC
bgp nestpath igp-metric ignore - Introduced IOS-XE 3.4S
ROUTER_ID
No bgp bestpath compare-routerid
ATTRIBUTES TO INFLUENCE OUTBOUND PATH SELECTION
WEIGHT & LOCAL PREFERENCE
-Set Inbound
-Affects Outbound traffic
ATTRIBUTES TO INFLUENCE UNBOUND PATH SELECTION
AS_PATH & MED
-Set outbound
-Affects inbound traffic