The multi-exit discriminator (MED) helps determine the optimal route for the incoming traffic of an AS, and is similar to the metric used in IGP. When a BGP device obtains multiple routes to the same destination address but with different next hops from EBGP peers, the BGP device selects the route with the smallest MED value as the optimal route.
set protocols bgp med <value>
delete protocols bgp med
•<value> Med value,[0..4294967295]
• This example sets bgp med value as 1: