CCNP ROUTE (Version 7) – Chapter 7: BGP Implementation

CCNP Enterprise Routing & Switching Original source

Topics

BGP Terminology, Concepts, and Operation

BGP Use Between Autonomous Systems

Comparison with Other Scalable Routing Protocols

BGP Path Vector Characteristics

For AS 64512 to reach networks in AS 64700 through AS 64520, some possible paths are:

Autonomous system 64512 does not see all these possibilities. AS 64520 only announce its bets path

BGP Characteristics

BGP Tables

BGP keeps a neighbor table containing a list of neighbors with which it has a BGP connection.

A router running BGP also keeps its own table for storing BGP information received from and sent to other routers. Also called:

BGP Message Types

BGP defines the following message types:

Open and Keepalive Messages

An open message includes the following information:

Update Messages

An update message has information on one path only. multiple paths require multiple messages.

All the attributes in the update message refer to that path, and the networks are those that can be reached through that path.

An update message might include the following fields:

Notification Messages

When to Use BGP

BGP use in an autonomous system is most appropriate when the effects of BGP are well understood and at least one of the following conditions exists:

When Not to Use BGP

Do not use BGP if one or more of the following conditions exist:

Implementing Basic BGP

BGP Neighbor Relationships

External BGP Neighbors

Internal BGP Neighbors

When BGP is running between routers within the same autonomous system, it is called internal BGP.

There are several requirements for an iBGP neighbor relationship:

Routers running iBGP do not have to be directly connected to each other.

A loopback address is usually used in the BGP neighbor command to establish the iBGP sessions.

iBGP in a Transit Autonomous System

iBGP in a Nontransit Autonomous System

TCP and Full Mesh

BGP Partial-Mesh and Full-Mesh Examples

Basic BGP Configuration Requirements

Basic BGP configuration requires the following main steps:

Entering BGP Configuration Mode

Defining BGP Neighbors and Activating BGP Sessions

Use the neighbor ip-address remote-as *autonomous-*system router configuration command

The ip-address must be reachable.

The autonomous-system field determines if the communication with the peer is and eBGP or iBGP session.

Basic BGP Configuration and Verification

The first part of the show ip bgp summary command output describes the local router:

The next part of this command output describes the BGP table:

The rest of this command output describes the current neighbor status, one for each configured neighbor:

Configuring and Verifying an iBGP Session

Advertising Networks in BGP and Verifying That They Are Propagated

Using the Next-Hop-Self Feature

Understanding and Troubleshooting BGP Neighbor States

After the TCP handshake is complete, the BGP application tries to set up a session with the neighbor.

BGP is a state machine that takes a router through the following states with its neighbors:

Idle State Troubleshooting

The idle state indicates that the router does not know how to reach the IP address listed in the neighbor statement.

Check the following two conditions to troubleshoot this problem:

Active State Troubleshooting

BGP Session Resilience

Sourcing BGP from Loopback Address

eBGP Multihop

Resetting BGP Sessions

Hard Reset of BGP Sessions

Soft Reset or Route Refresh

BGP Attributes and the Path-Selection Process

BGP Path Selection

BGP Path Selection Process

The Path-Selection Decision Process with a Multihomed Connection

BGP Attributes

Well-Known Attributes

A well-known attribute is one that all BGP implementations must recognize and propagate to BGP neighbors.

There are two types of well-known attributes:

Note If a well-known attribute is missing from an update message, a notification error is generated. This ensures that all BGP implementations agree on a standard set of  attributes.

Optional Attributes

BGP routers that implement an optional attribute might propagate it to other BGP neighbors, depending on its meaning.

Defined BGP Attributes

In addition, Cisco has defined a weight attribute for BGP. The weight is configured locally on a router and is not propagated to any other BGP routers.

The AS-Path Attribute

The Next-Hop Attribute

The Origin Attribute

The origin is a well-known mandatory attribute that defines the origin of the path information. The origin attribute can be one of three values:

IGP:

EGP:

Incomplete:

The Local-Preference Attribute

Routers A and B are iBGP neighbors in AS 64520 and both receive updates about network 172.16.0.0 from different directions.

Because the local preference for router A is higher, it is selected as the preferred exit point from AS 64520.

The Community Attribute

The MED Attribute

The MED attribute, also called the metric, is an optional nontransitive attribute.

The MED indicates to external neighbors the preferred path into an autonomous system.

This is a dynamic way for an autonomous system to try to influence another autonomous system as to which way it should choose to reach a certain route if there are multiple entry points  into the autonomous system.

A lower metric value is preferred.

Unlike local preference, the MED is exchanged between autonomous systems

The MED is sent to eBGP peers; those routers propagate the MED within their autonomous system.

MED influences inbound traffic to an autonomous system, whereas local preference influences outbound traffic from an autonomous system.

Keep in mind that there is no guarantee that neighboring autonomous system will take the MED attribute into account; it may have already decided on the path based on other attributes.

By default, a router compares the MED attribute only for paths from neighbors in the same autonomous system.

The Weight Attribute (Cisco Only)

Changing the Weight for All Updates from a Neighbor

The neighbor ip-address weight weight router configuration command is used to assign a weight to updates from a neighbor connection

Changing the Weight Using Route Maps

Influencing BGP Path Selection

Changing the Weight

Changing Local Preference

Setting the AS-Path

Controlling BGP Routing Updates

Filtering BGP Routing Updates

BGP allows you to filter updates that are received from a neighbor or that are sent to a neighbor.

The primary route filtering tools include route maps, distribute lists and prefix lists.

A common scenario where update filtering is used is in dual-homed enterprise environments.

In this environment, an enterprise should advertise only its own address space to the ISPs.

BGP Filtering Using Prefix Lists

The neighbor ip-address prefix-list prefix-list-name {in | out} router configuration command is used to apply a prefix list to routes from or to a neighbor.

BGP Filtering Using AS-Path Access Lists

When a BGP route is sourced as a result of a network command in a BGP process or redistribution into a BGP process, the AS-path attribute is created and is empty.

Each time the route is advertised by an egress router to another autonomous system, the AS-path attribute is modified, with the egress AS number being prepended.

Routers can filter incoming routes based on their AS-path attributes.

When routers filter BGP updates based on the content of the AS-path attribute, they use regular expressions.

The autonomous system path access list is defined by the ip as-path access-list accesslist-number {permit | deny} regexp global configuration command.

The neighbor ip-address filter-list access-list-number {in | out} router configuration command is used to apply an AS- path access list to routes from or to a neighbor.

Routes that are permitted by the AS-path access list are permitted to be received from or sent to the neighbor, and those that are denied are not included.

*These commands avoid AS6500 to be used as a transit network.

BGP Filtering Using Route Maps

A route map can match and set several different BGP attributes, including the following:

Route maps can match based on other items, including the following:

When used for BGP filtering, a deny means that the route is ignored and a permit means that the route is processed further and the set clauses are applied.

The set clauses allow one or more attributes to be changed or set to specific values before the route passes the route map.

To apply a route map to filter incoming or outgoing BGP routes, use the neighbor routemap router configuration command.

AS6500 only accepts a default route and uses AS 65100 as their primary link

Filtering Order

The incoming filter list, prefix list (or distribute list) and route map (in this order) must all permit the routes that are received from a neighbor before they will be accepted into  the BGP table.

Similarly, outgoing routes must pass the outgoing filter list, route map, and prefix list (or distribute list) (in this order) before they will be sent to the neighbor.

Note: The order in which BGP filtering mechanisms are processed may differ in different IOS versions.

Clearing the BGP Session

Recall from the earlier “Resetting BGP Sessions” section that if you want a policy change, such as a BGP filter, to be applied, you must trigger an update.

You can do either a hard reset or a route refresh (soft reset).

BGP Peer Groups

In BGP, many neighbors are often configured with the same update policies.

On a Cisco IOS router, neighbors with the same update policies can be grouped into peer groups to simplify configuration and, more important, to make updating more  efficient and improve performance.

When a BGP router has many peers, this approach is highly recommended.

Peer Group Operation

The policies of the peer group are similar to a template; the template is then applied to the individual members of the peer group.

Members of the peer group inherit all the peer group’s configuration options.

The router can also be configured to override these options, but only options that affects inbound updates.

The actual TCP transmission still has to be done on a per- neighbor basis because of the connection-oriented characteristics of BGP sessions.

Peer Group Configuration

The neighbor peer-group-name peer-group router configuration command is used to create a BGP peer group.

The neighbor ip-address peer-group peer-group-name router configuration command, is used to assign neighbors as part of the group after the group has been created.

The clear ip bgp peer-group peer-group-name EXEC command is used to reset the BGP connections for all members of a BGP peer group.

Peer Group Configuration Example

Implementing  BGP for IPv6  Internet  Connectivity

MP-BGP is capable of carrying a rich set of routed protocols,  including IPv4 and IPv6, over a transport protocol, such as IPv4  or IPv6.This section covers the following topics:

MP-BGP Support for IPv6

Multiprotocol extensions are defined as new attributes.

IPv6-specific extensions incorporated into MBGP include the following:

In an all-IPv4 environment, BGP establishes sessions using IPv4. IPv4 is the carrier protocol. The routes that BGP advertises, which is the passenger protocol, are also IPv4.

Protocols other than IPv4, including IPv6, also need to advertise reachability information.

MP-BGP extensions allow these other protocols to be carried using BGP.

In an all-IPv6 environment, BGP can be used as both the carrier and passenger protocol.

Exchanging IPv6 Routes over an IPv4 Session

Existing IPv4 TCP sessions can carry IPv6 routing information when adding IPv6 support to a network.

MP-BGP allows the use of many address families to define the type of addresses being carried.

The address-family {ipv4 | ipv6} [unicast | multicast] router configuration command enters address family configuration mode for configuring BGP routing sessions.

In an IPv6 address family, a neighbor needs to be activated using the neighbor {IPv4 address | IPv6 address} activate address- family configuration command.

The network ipv6-address/prefix-length command, this time in address family configuration mode, is used to specify the networks to be advertised.

Exchanging IPv6 Routes over an IPv6 Session

MP-BGP also supports exchanging IPv6 routes over an IPv6 session.

By default, BGP sets its router ID to the IPv4 address of the highest address of the loopback interface, or if no loopback exists, to the highest IP address of the physical interface.

If a router running BGP over IPv6 transport has no IPv4 addresses configured, you need to manually specify BGP router ID.

The bgp router-id ip-address router configuration command configures a fixed router ID for the local BGP routing process.

The ip-address parameter is an IPv4-address format 32-bit dotted-decimal number.

BGP for IPv6 Configuration and Verification

Initial State of Routers

Enable eBGP IPv6 Route Exchange

*Notice that the configuration is  automatically updated to the  address-family style.

*Notice that the route received  from R2 is not marked as best.

*Notice that the R2 has a valid IPv6 next hop address to R1.

Enable iBGP IPv6 Route Exchange

When IPv6 routes are exchanged over an IPv6 BGP session, the next- hop parameter is correctly configured automatically and there is no need for a route map to modify it.

Comparing IPv4 to Dual (IPv4/IPv6) BGP Transport

Both IPv4 and IPv6 address families can use a single IPv4 neighbor or two separate sessions can be established, one for each address family.

Using a single IPv4 neighbor reduces the number of neighbor sessions. This can significantly reduce the size and complexity of configuration.

However, running IPv6 over an IPv4 session requires modification of the next-hop attribute.

In contrast, when using two separate sessions for IPv4 and IPv6, there is no need to implement route maps to overwrite the next-hop parameter.

Exchange of IPv4 and IPv6 routes is completely independent; neighbor configuration and handling is duplicated.

BGP Filtering Mechanisms for IPv6

MP-BGP offers the same set of IPv6 filtering and route manipulation capabilities that exist for IPv4.

The mechanisms include incoming and outgoing prefix-lists, filter lists (for AS-path matching), and route maps.

The order of incoming and outgoing filtering process is identical to IPv4.

IPv6 Prefix List Filtering

IPv6 Path Selection with BGP Local Preference

← All CCNP articles Home