default med
Use default med to specify a default MED value.
Use undo default med to restore the default.
Syntax
default med med-value
undo default med
Default
The default MED value is 0.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
Predefined user roles
network-admin
Parameters
med-value: Specifies the default MED value in the range of 0 to 4294967295.
Usage guidelines
BGP selects a MED value in the following order:
MED set by the apply cost command.
MED set by the med keyword in the import-route command.
MED set by the default med command.
Original MED of a BGP route, or MED changed from the metric of a redistributed IGP route.
Examples
# In BGP IPv4 unicast address family view, set the default MED to 25.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp-default] address-family ipv4 unicast [Sysname-bgp-default-ipv4] default med 25
Related commands
apply cost
import-route
route-policy