Share:
Notifications
Clear all

MED vs. AS Path Length

1 Posts
1 Users
0 Reactions
455 Views
(@worldlovely)
Posts: 97
Trusted Member
Topic starter
 

The Multi-Exit Discriminator (MED) and AS Path Length are both BGP attributes used to influence routing decisions, but they operate in different contexts and have different implications for route selection. Here's a detailed comparison:

AS Path Length

  • Definition: The AS Path Length is the number of Autonomous Systems (ASes) a route has traversed. It is a fundamental BGP attribute that is used to measure the distance to the destination in terms of the number of ASes involved.
  • Usage: AS Path Length is used to select the shortest route to a destination. BGP prefers routes with the fewest AS hops because they represent a shorter path and generally imply a more direct route.
  • Scope: AS Path Length is a mandatory attribute and is used in every BGP route exchange. It is visible to all BGP routers and is used in the basic path selection process.
  • Impact: A shorter AS Path Length is preferred over a longer one. This helps in selecting routes that are more direct and potentially more reliable.

Multi-Exit Discriminator (MED)

  • Definition: MED is an optional, non-transitive BGP attribute used to suggest to external ASes the preferred path into the advertising AS when multiple entry points are available.
  • Usage: MED is used to influence how external ASes choose between multiple routes into the AS. It helps control which of the multiple links between ASes should be preferred for inbound traffic.
  • Scope: MED is only considered by the neighboring AS that receives it. It is not propagated beyond the AS where it is set, making it a local decision attribute for inter-AS routing.
  • Impact: Routes with a lower MED value are preferred over those with higher MED values. It allows an AS to signal its preferred entry point to neighboring ASes.

Comparison

  1. Scope of Influence:

    • AS Path Length: Affects route selection for all BGP routes based on the number of ASes the route has traversed.
    • MED: Affects route selection for neighboring ASes, indicating the preferred entry point into the AS.
  2. Propagation:

    • AS Path Length: Propagated to all BGP peers and used in path selection universally.
    • MED: Non-transitive; only used by the neighboring AS that receives the MED attribute.
  3. Preference Mechanism:

    • AS Path Length: Shorter AS Paths are preferred to minimize the number of ASes that traffic has to pass through.
    • MED: Lower MED values are preferred, indicating which path into the AS should be chosen.
  4. Usage Context:

    • AS Path Length: Primarily used to select the best route based on distance in terms of AS hops.
    • MED: Used to influence inbound traffic preferences between multiple connections to the same AS.
  5. Interaction:

    • AS Path Length: Evaluated before MED in the BGP path selection process. If multiple routes have the same AS Path Length, MED may be used as a secondary criterion.
 
Posted : 29/08/2024 11:00 pm
Share: