The default med command configures a MED for BGP routes.
The undo default med command restores the default value.
By default, the MED value of an imported route equals the cost of the imported route; the MED value carried in a route learned.
Usage Scenario
The default med command applies only to the routes imported using the import-route command and BGP summary routes.
After the default med command is run, the BGP routes that the local device sends to its BGP peers carry the MED, which helps control route selection for the traffic entering the local AS. If the other attributes of routes to the same destination are the same, BGP selects the route with the smallest MED as the optimal route.Configuration Impact
If more than one MED is configured for BGP routes, the latest configuration overrides the previous one.
Precautions
The MED attribute is transmitted only between two neighboring ASs. The AS that receives the MED attribute does not advertise it to a third AS.