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.
bgp { as-number-plain | as-number-dot }
ipv6-family unicast
Set the default MED attribute.
default med med
Compare the MED values from different ASs.
Enable 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.
Compare the MED values of routes advertised in the local confederation.
The commands in Step 4 can be used regardless of the order.