BGP Commands
©2008 Allied Telesis Inc. All rights reserved.
Software Version 5.2.1
AlliedWare Plus
TM
Operating System Software Reference C613-50003-00 REV E
31.7
bgp always-compare-med
This command enables BGP to compare the Multi Exit Discriminator (MED) for paths from
neighbors in different autonomous systems. By default this feature is disabled.
Multi Exit Discriminator (MED) is used in best path selection by BGP. MED is compared after
BGP attributes weight, local preference, AS-path and origin have been compared and are equal.
MED comparison is done only among paths from the same autonomous system (AS). Use
bgp
always-compare-med
command to allow comparison of MEDs from different ASs. The MED
parameter is used to select the best path. A path with lower MED is preferred. If the bgp table
shows the following and the always-compare-med is enabled:
Route1: as-path 400, med 300
Route2: as-path 200, med 200
Route3: as-path 400, med 250
Route1 is compared to Route2. Route2 is best of the two (lower MED). Next, Route2 is
compared to Route3 and Route2 is chosen best path again (lower MED). If
always-compare-
med
was disabled, MED is not taken into account when Route1 and Route2 are compared,
because of different ASs and MED is compared for only Route1 and Route3. In this case,
Route3 would be the best path. The selected route is also affected by the
bgp deterministic-
med
command. See the
bgp deterministic-med
command for details.
If this command is used to compare MEDs for all paths, it should be configured on every BGP
router in the AS.
The
no
form disallows the comparison.
Syntax
bgp always-compare-med
no bgp always-compare-med
Mode
Router mode
Examples
Related Commands
bgp bestpath med
bgp bestpath as-path ignore
bgp bestpath compare-routerid
bgp deterministic med
awplus#
configure terminal
awplus(config)#
router bgp 100
awplus(config-router)#
bgp always-compare-med