< Home

Configuring the MED Attribute

The Multi_Exit Discriminator (MED) attribute serves as the metric used by an IGP. After MED attributes are set, EBGP peers select the route with the smallest MED value for the traffic that enters an AS.

Procedure

  1. Access the system view.

    system-view

  2. Access the BGP view.

    bgp { as-number-plain | as-number-dot }

  3. Access the BGP IPv6 unicast address family view.

    ipv6-family unicast

  4. Run the following commands to configure the BGP4+ MED attribute as required:

    • Set the default MED attribute.

      default med med

    • Compare the MED values from different ASs.

      compare-different-as-med

    • Enable Deterministic-MED.

      deterministic-med

      If this command is not configured, when an optimal route is to be selected from among routes which are received from different ASs and which carry the same prefix, the sequence in which routes are received is relevant to the result of route selection. After the command is configured, however, when an optimal route is to be selected from among routes which are received from different ASs and which carry the same prefix, routes are first grouped according to the leftmost AS in the AS_Path. Routes with the same leftmost AS are grouped together, and after comparison, an optimal route is selected for the group. The group optimal route is then compared with optimal routes from other groups to determine the final optimal route. This mode of route selection ensures that the sequence in which routes are received is no longer relevant to the result of route selection.

    • Use the maximum MED value when the current MED is not available.

      bestroute med-none-as-maximum

    • Compare the MED values of routes advertised in the local confederation.

      bestroute med-confederation

      The commands in Step 4 can be used regardless of the order.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >