Configuring BGP

Configuring Advanced BGP Features

Configuring the Router to Consider a Missing MED as Worst Path

To configure the router to consider a path with a missing MED attribute as the worst path, use the following command in router configuration mode:

Command

Purpose

 

 

Router(config-router)# bgp bestpath med

Configures the router to consider a missing MED as having a

missing-as-worst

value of infinity, making the path without a MED value the

 

least desirable path.

 

 

Selecting Path Based on MEDs from Other Autonomous Systems

The MED is one of the parameters that is considered when selecting the best path among many alternative paths. The path with a lower MED is preferred over a path with a higher MED.

By default, during the best path selection process, MED comparison is done only among paths from the same autonomous system. You can allow comparison of MEDs among paths regardless of the autonomous system from which the paths are received. To do so, use the following command in router configuration mode:

Command

Purpose

 

 

Router(config-router)# bgp always-compare-med

Allows the comparison of MEDs for paths from neighbors in

 

different autonomous systems.

 

 

Configuring the Router to Use the MED to Choose a Path from Subautonomous System Paths

To configure the router to consider the MED value in choosing a path, use the following command in router configuration mode:

Command

Purpose

 

 

Router(config-router)# bgp bestpath med confed

Configures the router to consider the MED in choosing a path

 

from among those advertised by different subautonomous

 

systems within a confederation.

 

 

The comparison between MEDs is only made if there are no external autonomous systems in the path (an external autonomous system is an autonomous system that is not within the confederation). If there is an external autonomous system in the path, then the external MED is passed transparently through the confederation, and the comparison is not made.

The following example compares route A with these paths:

path= 65000 65004, med=2 path= 65001 65004, med=3 path= 65002 65004, med=4 path= 65003 1, med=1

Cisco IOS IP Configuration Guide

IPC-327

Page 373
Image 373
Cisco Systems 78-11741-02 manual Selecting Path Based on MEDs from Other Autonomous Systems, IPC-327