Reference
MED
MED suggests an inter-AS entry preference; comparison scope and policy determine its effect.
Meaning and purpose
MED suggests an inter-AS entry preference; comparison scope and policy determine its effect.
Reading the fields and applying the rules
MED is an optional non-transitive attribute often used to suggest an entry point to a neighboring AS. Lower MED is normally preferred where MED comparison applies, but implementations and configuration control which candidate routes are compared. It should not be treated as a globally meaningful distance.
Compare paths from the relevant neighboring AS and inspect missing-MED behavior and any always-compare or deterministic options supported by the router. MED does not override a remote operator’s higher-priority policy such as its LOCAL_PREF.
Entry A from AS64496: MED 50
Entry B from AS64496: MED 100
# Preference depends on the applicable comparison and other policy
How it works in context
AS_PATH records traversed autonomous systems; NEXT_HOP identifies the next forwarding destination. LOCAL_PREF expresses preference inside an AS; MED can influence entry-point choice under particular comparison rules. Policy and implementation affect best-path selection, so “shortest path always wins” is incorrect. Communities carry policy labels whose meanings are agreed by operators.
Operational checks and security
Check session state, accepted prefixes, policy and next-hop reachability separately. Filter unexpected prefixes and AS paths, set prefix limits and monitor changes. RPKI origin validation checks authorization of an origin/prefix combination, not the legitimacy of every AS in the path.
Read-only example
These commands inspect the surrounding system or protocol. They do not automatically change its configuration or establish every property of this term. Replace example targets only with destinations you are authorized to inspect.
# Read-only FRRouting example; command availability depends on version
vtysh -c "show bgp summary"
vtysh -c "show bgp ipv4 unicast 192.0.2.0/24"
Sources and further reading
These explanations are educational. Implementations, policies and standards evolve; check the current specification and software version before changing a system.