Cisco Nexus 6000 Series NX-OS Unicast Routing Command Reference
B Commands
Downloads: This chapterpdf (PDF - 81.0KB) The complete bookPDF (PDF - 4.5MB) | Feedback

B Commands

Table Of Contents

B Commands

bestpath (BGP)

B Commands

This chapter describes the Cisco NX-OS Border Gateway Protocol (BGP) commands that begin with B.

bestpath (BGP)

To change the default best-path selection algorithm, use the bestpath command. To return the Border Gateway Protocol (BGP) routing process to the default operation, use the no form of this command.

bestpath {always-compare-med | compare-routerid | {med {missing-as-worst | non-deterministic}}

no bestpath {always-compare-med | compare-routerid | {med {missing-as-worst | non-deterministic}}

Syntax Description


Compares the Multi-Exit Discriminator (MED) on paths from a different autonomous system (AS).


Configures a Border Gateway Protocol (BGP) routing process to compare identical routes received from different external peers during the best path selection process and to select the route with the lowest router ID as the best path.

med missing-as-worst

Assigns the value of infinity to received routes that do not carry the MED attribute, making these routes the least desirable.

med non-deterministic

Specifies that the best-MED path among paths is not picked from the same AS.

Command Default

The default settings are as follows:
med missing-as-worst: A value of 0 is assigned to the missing MED
med non-deterministic: Disabled

Command Modes

Router BGP configuration mode

Command History



This command was introduced.

Usage Guidelines

Before you use this command, ensure that BGP is enabled on the switch by using the feature bgp command.

To enable the comparison of the MED for paths from neighbors in different autonomous systems, use the bgp always-compare-med command.

This command requires the LAN Enterprise Services license.


This example shows how to change the default best-path selection algorithm to compare the MED on paths from different autonomous systems:

switch(config)# router bgp 64496
switch(config-router)# bestpath always-compare-med

Related Commands


feature bgp

Enables BGP globally.

show ip bgp

Displays information about BGP routes.