[Contents] [Prev] [Next] [Index] [Report an Error]


Configure Routing Table Path Selection

By default, only the MEDs of routes that have the same peer ASs are compared. You can configure routing table path selection options to get different behaviors. To configure routing table path selection behavior, include the path-selection statement at the [edit protocols bgp] hierarchy level (for routing instances, include the statement at the [edit routing-instances routing-instance-name protocols bgp] hierarchy level):

[edit protocols bgp]
path-selection (cisco-non-deterministic | always-compare-med); 

Routing table path selection can be configured in one of two ways:

These two effects cause the system to only sometimes compare the MEDs between paths that it should otherwise compare. Because of this, we recommend that you not configure nondeterministic behavior.

For an example of always comparing MEDs, see Example: Always Compare MEDs.

For a description of the algorithm used to determine the active path, see How the Active Route Is Determined.

Example: Always Compare MEDs

In this example, paths learned from 208.197.169.15 have their MED values compared to the sum of 4 and the MED values of the same paths learned from 208.197.169.14.

[edit]
protocols {
    bgp {
        path-selection always-compare-med;
        group ref {
            type external;
            import math;
            peer-as 10458;
            neighbor 208.197.169.14;
        }
        group ref {
            type external;
            peer-as 10;
            neighbor 208.197.169.15;
        }
    }
}

policy-options {
    policy-statement math {
        then {
            metric add 4;
        }
    }
}

[Contents] [Prev] [Next] [Index] [Report an Error]