C613-50631-01 Rev A Command Reference for IE340 Series 1320
AlliedWare Plus™ Operating System - Version 5.5.3-0.x
BGP AND BGP4+ COMMANDS
BGP
BESTPATH MED
bgp bestpath med
Overview This command controls how the Multi Exit Discriminator (MED) attribute
comparison is performed.
Use the no variant of this command to prevent BGP from considering the MED
attribute when comparing paths.
Syntax
bgp bestpath med {[confed] [missing-as-worst]}
Mode Router Configuration
Usage The confed parameter enables MED comparison among paths learned from
confederation peers. The MED attributes are compared only if there is no external
AS (Autonomous System), where an external AS is one that is not within the
confederation. If there is an external AS in the path, then the MED comparison is
not made.
For example, in the following paths the MED value is not compared with Path3
since it is not in the confederation. MED is compared for Path1 and Path2 only.
• Path1 = 32000 32004, med=4
• Path2 = 32001 32004, med=2
• Path3 = 32003 1, med=1
The effect of the missing-as-worst parameter is to treat a missing MED attribute
in a path as having a value of infinity, making the path without a MED value the
least desirable path. If the missing-as-worst parameter is not configured, the
missing MED attribute is assigned the value of 0, making the path with the missing
MED attribute the best path.
Examples
awplus# configure terminal
awplus(config)# router bgp 100
awplus(config-router)# bgp bestpath med missing-as-worst
awplus# configure terminal
awplus(config)# router bgp 100
awplus(config-router)# bgp bestpath med confed
awplus# configure terminal
awplus(config)# router bgp 100
awplus(config-router)# bgp bestpath med confed missing-as-worst
Parameter Description
confed Compares MED among confederation paths.
missing-as-worst Treats missing MED as the least preferred one.