If only one route exists to a particular destination, BGP installs that route. If multiple
routes exist for a destination, BGP uses tie-breaking rules to decide which one of the
routes to install in the BGP routing table.
BGP Path Decision Algorithm
BGP determines the best path to each destination for a BGP speaker by comparing
path attributes according to the following selection sequence:
1.
Select a path with a reachable
next hop
.
2.
Select the path with the highest
weight
.
3.
If path weights are the same, select the path with the highest
local preference
value.
4.
Prefer locally originated routes (network routes, redistributed routes, or aggregated
routes) over received routes.
5.
Select the route with the shortest
AS-path
length.
6.
If all paths have the same AS-path length, select the path based on
origin
: IGP is
preferred over EGP; EGP is preferred over Incomplete.
7.
If the origins are the same, select the path with lowest
MED
value.
8.
If the paths have the same MED values, select the path learned by means of
EBGP over one learned by means of IBGP.
9.
Select the path with the lowest IGP cost to the next hop.
10.
Select the path with the shortest route reflection cluster list. Routes without a
cluster list are treated as having a cluster list of length 0.
11.
Select the path received from the peer with the lowest BGP router ID.
12.
Select the path that was learned from the neighbor with the lowest peer remote
address.
The following sections discuss the attributes evaluated in the path decision process.
Examples show how you might configure these attributes to influence routing
decisions.
Configuring Next-Hop Processing
Routes sent by BGP speakers include the next-hop attribute. The next hop is the IP
address of a node on the network that is closer to the advertised prefix. Routers that
have traffic destined for the advertised prefix send the traffic to the next hop. The
next hop can be the address of the BGP speaker sending the update or of a third-party
node. The third-party node does not have to be a BGP speaker.
The next-hop attributes conform to the following rules:
■
The next hop for EBGP sessions is the IP address of the peer that advertised the
route.
■
The next hop for IBGP sessions is one of the following:
Selecting the Best Path
■
107
Chapter 1: Configuring BGP Routing
Summary of Contents for JUNOSE
Page 6: ...vi...
Page 8: ...viii JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 24: ...xxiv Table of Contents JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 37: ...Part 1 Border Gateway Protocol Configuring BGP Routing on page 3 Border Gateway Protocol 1...
Page 38: ...2 Border Gateway Protocol JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 234: ...198 Monitoring BGP JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 236: ...200 Multiprotocol Layer Switching JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 298: ...262 Point to Multipoint LSPs Configuration JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 536: ...500 Monitoring BGP MPLS VPNs JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 538: ...502 Layer 2 Services Over MPLS JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 604: ...568 Virtual Private LAN Service JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 618: ...582 VPLS References JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 674: ...638 Virtual Private Wire Service JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 718: ...682 Monitoring MPLS Forwarding Table for VPWS JUNOSe 11 0 x BGP and MPLS Configuration Guide...
Page 719: ...Part 6 Index Index on page 685 Index 683...
Page 720: ...684 Index JUNOSe 11 0 x BGP and MPLS Configuration Guide...