© 2006 Cisco Systems, Inc. All rights reserved. BSCI v3.06-1 Implementing BGP Selecting a BGP Path.

Презентация:



Advertisements
Похожие презентации
© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Implementing BGP Using Route Maps to Manipulate Basic BGP Paths.
Advertisements

© 2005 Cisco Systems, Inc. All rights reserved. BGP v BGP Overview Understanding BGP Path Attributes.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v BGP Overview Processing BGP Routes.
© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Implementing BGP Explaining BGP Concepts and Terminology.
© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Implementing BGP Explaining EBGP and IBGP.
© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Module Summary BGP is a path-vector routing protocol that allows routing policy decisions.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v BGP Transit Autonomous Systems Forwarding Packets in a Transit AS.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Customer-to-Provider Connectivity with BGP Connecting a Multihomed Customer to Multiple Service.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Attributes Setting BGP Local Preferences.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v BGP Transit Autonomous Systems Working with a Transit AS.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Policy Controls Applying Route-Maps as BGP Filters.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Route Selection Using Policy Controls Using Multihomed BGP Networks.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Module Summary BGP has reliable transport provided by TCP, a rich set of metrics called BGP.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v Determining IP Routes Introducing Distance Vector Routing.
© 2006 Cisco Systems, Inc. All rights reserved. MPLS v MPLS VPN Technology Introducing the MPLS VPN Routing Model.
© 2006 Cisco Systems, Inc. All rights reserved. MPLS v MPLS VPN Implementation Configuring Small-Scale Routing Protocols Between PE and CE Routers.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Scaling Service Provider Networks Scaling IGP and BGP in Service Provider Networks.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v BGP Transit Autonomous Systems Configuring a Transit AS.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Scaling Service Provider Networks Introducing Confederations.
© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Configuring EIGRP Configuring Advanced EIGRP Options.
Транксрипт:

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Implementing BGP Selecting a BGP Path

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v BGP Path Attributes BGP metrics are called path attributes. Characteristics of path attributes include: –Well-known versus optional –Mandatory versus discretionary –Transitive versus nontransitive –Partial

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Well-Known Attributes Well-known attributes –Must be recognized by all compliant BGP implementations –Are propagated to other neighbors Well-known mandatory attributes –Must be present in all update messages Well-known discretionary attributes –May be present in update messages

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Optional Attributes Optional attributes –They are recognized by some implementations (could be private); but expected not to be recognized by all BGP routers. –Recognized optional attributes are propagated to other neighbors based on their meaning. Optional transitive attributes –If not recognized, marked as partial and propagated to other neighbors Optional nontransitive attributes –Discarded if not recognized

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v BGP Attributes BGP attributes include the following: AS path * Next-hop * Origin * Local preference MED Others * Well-known mandatory attribute

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v AS Path Attribute A list of autonomous systems that a route has traversed: –For example, on router B, the path to is the AS sequence (65500, 64520). The AS path attribute is well-known, mandatory.

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Next-Hop Attribute The IP address of the next AS to reach a given network: Router A advertises network to router B in EBGP, with a next hop of Router B advertises in IBGP to router C, keeping as the next-hop address. The next-hop attribute is well-known, mandatory.

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Origin Attribute IGP (i) –network command EGP (e) –Redistributed from EGP Incomplete (?) –Redistributed from IGP or static The origin attribute informs all autonomous systems in the internetwork how the prefixes were introduced into BGP. The origin attribute is well-known, mandatory.

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Example: Origin Attribute RouterA# show ip bgp BGP table version is 14, local router ID is Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> / i * i i *> / i *>i / i *> / i * i * i i *> / i * i * i i r> / i r i r i i *> / i

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Local Preference Attribute Paths with highest local preference value are preferred: Local preference is used to advertise to IBGP neighbors about how to leave their AS. The local preference is sent to IBGP neighbors only (that is, within the AS only). The local preference attribute is well-known and discretionary. Default value is 100.

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v The paths with the lowest MED (also called the metric) value are the most desirable: –MED is used to advertise to EBGP neighbors how to exit their AS to reach networks owned by this AS. The MED attribute is optional and nontransitive. MED Attribute

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Paths with the highest weight value are preferred Weight not sent to any BGP neighbors; local to this router only Weight Attribute (Cisco Only)

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v BGP Path Selection The BGP forwarding table usually has multiple paths from which to choose for each network. BGP is not designed to perform load balancing: –Paths are chosen because of policy. –Paths are not chosen based on bandwidth. The BGP selection process eliminates any multiple paths through attrition until a single best path is left. That best path is submitted to the routing table manager process and evaluated against the methods of other routing protocols for reaching that network (using administrative distance). The route from the source with the lowest administrative distance is installed in the routing table.

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Route Selection Decision Process Consider only (synchronized) routes with no AS loops and a valid next hop, and then: 1. Prefer highest weight (local to router). 2. Prefer highest local preference (global within AS). 3. Prefer route originated by the local router (next hop = ). 4. Prefer shortest AS path. 5. Prefer lowest origin code (IGP < EGP < incomplete). 6. Prefer lowest MED (exchanged between autonomous systems). 7. Prefer EBGP path over IBGP path. 8. Prefer the path through the closest IGP neighbor. 9. Prefer oldest route for EBGP paths. 10. Prefer the path with the lowest neighbor BGP router ID. 11. Prefer the path with the lowest neighbor IP address.

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Summary BGP metrics are called path attributes and describe the paths to reach each network. These attributes are categorized as well- known mandatory, well-known discretionary, optional transitive, and optional nontransitive. The AS path attribute is a well-known mandatory attribute that lists the AS numbers that a route has traversed to reach a destination. The BGP next-hop attribute is a well-known mandatory attribute that indicates the next-hop IP address to use to reach a destination. The origin attribute is a well-known mandatory attribute that defines the origin of the path information. The local preference attribute is a well-known discretionary attribute that provides an indication to routers in the AS about which path is preferred to exit the AS.

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Summary (Cont.) The MED attribute, also called the metric, is an optional nontransitive attribute that is an indication to EBGP neighbors about the preferred path into an AS. The MED is sent to EBGP peers; those routers propagate the MED within their AS. The routers within the AS use the MED, but do not pass it on to the next AS. The weight attribute is an attribute that Cisco defines for the path selection process. Routes with a higher weight are preferred when multiple routes exist to the same destination. Paths for a network that are determined not to be the best are eliminated from the selection criteria but are still kept in the BGP forwarding table in case the best path becomes inaccessible. BGP follows a multiple-step process when selecting the best route to reach a destination.

© 2006 Cisco Systems, Inc. All rights reserved. BSCI v