< Home

bestroute med-confederation (BGP)

Function

The bestroute med-confederation command configures BGP to compare the Multi_Exit Discriminator (MED) values of routes in a confederation when BGP selects the optimal route.

The undo bestroute med-confederation command restores the default settings.

By default, BGP compares the MED values of the routes that are from the same AS.

Format

bestroute med-confederation

undo bestroute med-confederation

Parameters

None

Views

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

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

BGP AS_Path records the number of each AS from the local router to the destination according to a certain order. After the bestroute med-confederation command is configured, BGP compares MED values only when AS_Path does not contain the external AS (AS that is not in the confederation) number. Otherwise, BGP does not compare MED values.

For example, ASs 65000, 65001, 65002, and 65004 belong to the same confederation. The rules for selecting the optimal route from the four routes are as follows:

  • path1: AS_Path=65000 65004, med=2

  • path2: AS_Path=65001 65004, med=3

  • path3: AS_Path=65002 65004, med=4

  • path4: AS_Path=65003 1, med=1

After the bestroute med-confederation command is used, BGP selects path1. Although the MED value of path4 is smaller, the MED value cannot be compared. This is because AS_Path contains the external AS number.

Example

# Configure BGP to compare the MED values of routes only in the confederation when selecting the optimal route.

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