< Home

compare-different-as-med (BGP)

Function

The compare-different-as-med command compares the Multi_Exit Discriminator (MED) values of routes among peers from different ASs.

The undo compare-different-as-med command disables the comparison.

By default, the comparison of the MED values of routes among peers from different ASs is disabled.

Format

compare-different-as-med

undo compare-different-as-med

Parameters

None

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-IPv6 unicast address family view, BGP-IPv4 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The command is used to control the MEDs to change the policy of BGP route selection. If the compare-different-as-med command is run, BGP will compare the MEDs of the routes from different ASs. If there are multiple reachable paths to the same destination, BGP prefers the route with the smallest MED.

Configuration Impact

After the compare-different-as-med command is run, the system compares the MEDs in the routes of peers in different ASs.

Precautions

Do not use this command unless different ASs use the same IGP and route selection mode.

Example

# Enable the comparison of the MED values of routes among peers from different ASs.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] compare-different-as-med
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >