Table of Contents
- About the Author
- Chapter 1. Internet Protocol
- Chapter 2. Routing Principles
- Chapter 3. Basic Open Shortest Path First
- Chapter 4. Advanced OSPF and Integrated Intermediate System-to-Intermediate System
- Chapter 5. Enhanced Interior Gateway Routing Protocol
Chapter 6. Basic Border Gateway Protocol
- Basic Border Gateway Protocol (BGP4) Defined
- BGP Attributes
- Configuring BGP
- Scenario 6-1: EBGP and IBGP
- Scenario 6-2: BGP and Static Routes
- Scenario 6-3: BGP with Policy-Based Routing
- Scenario 6-4: BGP with Communities and Peer Groups
- Scenario 6-5: Verifying BGP Operation
- Practical Exercise: EBGP and Attributes
- Review Questions
- Chapter 7. Advanced BGP
- Chapter 8. Route Redistribution and Optimization
- Chapter 9. CCNP Routing Self-Study Lab
- A. Study Tips
- B. What to Do After CCNP?
- C. Answers to Review Questions
- D. CCIE Preparation—Sample Multiprotocol Lab
BGP has a number of complex attributes used to determine a path to a remote network. These attributes allow greater flexibility and enable a complex routing decision to ensure that the path to a remote network is the best possible path.
The network designer can also manipulate these attributes. BGP, when supplied with multiple paths to a remote network, always chooses a single path to a specific destination. (Load balancing is possible with static routes.) BGP always propagates the best path to any peers.
BGP attributes are carried in update packets.
Table 6-1 describes the well-known and optional attributes used in BGP4.
Table 6-1. Well-Known and Optional BGP Attributes
|Origin||This attribute is mandatory and defines the origin of the path and can have three different values:
|AS_Path||This attribute describes the sequence of autonomous systems that the packet has traversed.|
|Next Hop||This attribute describes the next hop address taken to a remote path, typically the BGP peer.|
|Local Preference||This attribute indicates to the AS the preferred path to exit the AS. A higher local preference is always preferred.|
|MED||Multiexit Discriminator informs BGP peers in other autonomous systems which path to take to a remote network. A lower MED is always preferred.|
|Weight||This Cisco-only attribute is used in local router selection. Weight is not sent to other BGP peers, and a higher weight value is always preferred. The weight value is between 0–294967295.|
|Atomic||This attribute advises BGP routers that aggregation has taken place and is not used in the router-selection process.|
|Aggregator||This is the router ID responsible for aggregation and is not used in the router-selection process.|
|Community||Communities allow routes to be tagged for use with a group of routers sharing the same characteristics.|
|Originator ID||This attribute is used to prevent routing loops. This information is not used for router selection.|
|Cluster-List||This attribute is used in route-reflector environments. This information is not used for router selection.|
Internal BGP (IBGP) and External BGP (EBGP) are the two types of BGP sessions. IBGP is a connection between two BGP speakers in the same AS. EBGP is a connection between two BGP speakers in different autonomous systems.
Figure 6-1 displays a simple three-router BGP topology and the different BGP connection types: IBGP and EBGP.
Figure 6-1 and
IBGP peers also make certain that routing loops cannot occur by ensuring that any routes sent to another AS are known through an interior routing protocol, such as Open Shortest Path First (OSPF), before sending the route information. In other words, the routers must be synchronized. The benefit of this additional rule in IBGP TCP sessions is that information is not sent unless the remote path is reachable, which reduces any unnecessary traffic, and, therefore, saves bandwidth. You can disable this feature with the no synchronization command, which is covered later in this chapter.
The BGP routing decision is quite complex and takes into account the attributes listed in Table 6-1.
The process a Cisco router running BGP4 takes is as follows:
- If the next hop address is reachable, consider it.
- Prefer the route with the highest weight (Cisco IOS routers only).
- If the weight is the same, prefer the largest local preference attribute.
- If the local preference is the same, prefer the route this local router originated.
- Prefer the route with the shortest AS path.
- If this is equal, prefer the route with the origin set to originated (through BGP); IGP is preferred to EGP followed by incomplete.
- If the origin codes are the same, prefer the route with the lowest MED.
- If the MED is the same, prefer EBGP over IBGP.
- Prefer the closest path.
- Finally, if all paths are equal, prefer the path with lowest BGP router ID.