OcNOS-SP : Layer 3 Guide : Border Gateway Protocol Command Reference : BGP Commands : bgp bestpath med
bgp bestpath med
Use this command to specify two MED (Multi Exit Discriminator) attributes, confed and missing-as-worst.
The confed attribute enables MED comparison along paths learned from confederation peers. The MEDs are compared only if there is no external Autonomous System (an AS not within the confederation) in the path. If there is an external autonomous system in the path, the MED comparison is not made. For example in the following paths, the MED is not compared with Route3 as it is not in the confederation. MED is compared for Route1 and Route2 only.
Path1 = 32000 32004, med=4
Path2 = 32001 32004, med=2
Path3 = 32003 1, med=1
The missing-as-worst attribute to consider 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 missing-as-worst is disabled, the missing MED is assigned the value of 0, making the path with the missing MED attribute the best path.
Use the no parameter with this command to prevent BGP from considering the MED attribute in comparing paths.
Command Syntax
bgp bestpath med confed missing-as-worst
bgp bestpath med (confed|missing-as-worst|remove-recv-med|remove-send-med)
bgp bestpath med missing-as-worst confed
no bgp bestpath med confed missing-as-worst
no bgp bestpath med (confed|missing-as-worst|remove-recv-med|remove-send-med)
no bgp bestpath med missing-as-worst confed
Parameters
confed
Compare MED along confederation paths
missing-as-worst
 
Treat missing MED as the least preferred one
remove-recv-med
Remove received MED attribute
remove-send-med
 
Remove sent MED attribute
Command Mode
Router mode
Default
By default, MED value is zero.
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#router bgp 100
(config-router)#bgp bestpath med missing-as-worst
 
(config)#router bgp 100
(config-router)#bgp bestpath med remove-recv-med
(config-router)#no bgp bestpath med remove-recv-med
 
(config)#router bgp 100
(config-router)#bgp bestpath med remove-send-med
(config-router)#no bgp bestpath med remove-send-med
Last modified date: 08/28/2023