LogicMonitor + Catchpoint: Enter the New Era of Autonomous IT

Learn more

Validate your routing policy is working as intended.

LogicMonitor offers network teams visibility into active paths, routing table changes, and BGP attribute states so you can confirm your traffic engineering policies are producing the outcomes you designed.

How does BGP path selection work?

BGP path selection is a sequential comparison of route attributes. When multiple paths exist to the same destination, BGP evaluates them in order: highest WEIGHT (Cisco-specific), highest LOCAL_PREF, locally originated routes, shortest AS_PATH, lowest ORIGIN code, lowest MED (when comparable), eBGP over iBGP, lowest IGP metric to NEXT_HOP, and finally tiebreakers like oldest eBGP route and lowest router ID. The first attribute that produces a winner ends the comparison.

What is the most important BGP attribute for traffic engineering?

 For outbound traffic engineering (influencing which path your AS uses to reach other networks), LOCAL_PREF is the most powerful attribute because it’s evaluated early and shared across all iBGP peers within the AS. For inbound traffic engineering (influencing how other ASes route traffic to you), AS_PATH prepending is the most widely supported technique, though MED can also be used when agreed upon with a neighboring AS.

Why does BGP prefer eBGP routes over iBGP routes?

 BGP prefers eBGP routes over iBGP routes because routes learned from external peers are generally assumed to be closer to their destination. An eBGP route has already left the local AS and is being propagated by an external neighbor, while an iBGP route represents a path that must still exit the AS via some internal path. This preference is evaluated after LOCAL_PREF, AS_PATH, ORIGIN, and MED, so it can be overridden by policy.

Can I change the BGP path selection algorithm?

You cannot change the fundamental order of attribute evaluation in the BGP algorithm, but you can influence which path wins by manipulating the attributes themselves through routing policy. Techniques include setting LOCAL_PREF via route maps, using AS_PATH prepending, setting MED for inbound traffic management, and using communities to signal peers. Some vendors also offer vendor-specific attributes (like Cisco’s WEIGHT) that are evaluated before the standard attributes.