What’s new in LogicMonitor? Explore the latest innovations advancing Autonomous IT

Read more

    See exactly how your inbound traffic is flowing.

    LogicMonitor’s network observability provides your team visibility into active BGP paths, attribute states, and traffic distribution across your peering points so you can validate inbound routing policy and detect unexpected changes.

    What is BGP MED?

    BGP MED (Multi Exit Discriminator) is an optional, non-transitive BGP attribute used to influence how a neighboring AS routes inbound traffic to your network. When you have multiple connections to the same neighboring AS, setting different MED values on each connection suggests which one the neighbor should prefer. A lower MED value is preferred. MED is sometimes called the BGP metric.

    When is MED compared in BGP path selection?

    MED is evaluated relatively late in the BGP path selection process, after WEIGHT (Cisco-specific), LOCAL_PREF, locally originated routes, AS_PATH length, and ORIGIN code. This means MED only influences path selection when all preceding attributes are equal. By default, MED is only compared between routes learned from the same neighboring AS; the always-compare-med option (available on most platforms) enables MED comparison across different ASes.

    Why is MED only compared between routes from the same AS?

    The default restriction to same-AS MED comparison is a safety measure. Different ASes may use different MED scales or semantics, so comparing MEDs across ASes could produce unintuitive or incorrect routing decisions. For example, AS A might use MED to indicate link bandwidth while AS B uses it for geographic preference, comparing them directly would be meaningless. The restriction ensures MED is only used as intended: as a hint from a specific neighbor about its own entry points.

    No. MED is a suggestion, not a guarantee. Neighboring ASes are free to ignore MED values or use routing policies that override them. Factors like the neighbor’s own routing policy, their LOCAL_PREF settings, or their AS_PATH length preferences may take precedence over your MED hints. For predictable inbound traffic engineering, coordination with your neighboring AS about how they handle MED is essential.

    By Denton Chikura

    Technical Writer