This chapter describes
Border Gateway Protocol (BGP Configuration).
For a complete description of the BGP commands in this chapter, refer to the “BGP Commands” chapter of the Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols. To locate documentation of other commands that appear in this chapter, use the command reference master index, or search online. For multiprotocol BGP configuration information and examples, refer to the “Configuring Multiprotocol BGP Extensions for IP Multicast” chapter of the Cisco IOS IP Configuration Guide. For multiprotocol BGP command descriptions, refer to the “Multiprotocol BGP Extensions for IP Multicast Commands” chapter of the Cisco IOS IP Command Reference.
BGP, as defined in RFCs 1163 and 1267, is an Exterior Gateway Protocol (EGP). It allows you to set up an interdomain routing system that automatically guarantees the loop-free exchange of routing information between autonomous systems.
For protocol-independent features, see the chapter “Configuring IP Routing Protocol-Independent Features” in this book.
To identify the hardware platform or software image information associated with a feature, use the Feature Navigator on Cisco.com to search for information about the feature or refer to the software release notes for a specific release. For more information, see the “Identifying Supported Platforms” section in the “Using Cisco IOS Software” chapter in this book.
The Cisco BGP Implementation
In BGP, each route consists of a network number, a list of autonomous systems that information has passed through (called the autonomous system path), and a list of other path attributes. We support BGP Versions 2, 3, and 4, as defined in RFCs 1163, 1267, and 1771, respectively.
The primary function of a BGP system is to exchange network reachability information with other BGP systems, including information about the list of autonomous system paths. This information can be used to construct a graph of autonomous system connectivity from which routing loops can be pruned and with which autonomous system-level policy decisions can be enforced.
You can configure the value for the Multi Exit Discriminator (MED) metric attribute using route maps. (The name of this metric for BGP Versions 2 and 3 is INTER_AS_METRIC.) When an update is sent to an internal BGP (iBGP) peer, the MED is passed along without any change. This action enables all the peers in the same autonomous system to make a consistent path selection.
A next hop router address is used in the NEXT_HOP attribute, regardless of the autonomous system of that router. The Cisco IOS software automatically calculates the value for this attribute.
Transitive, optional path attributes are passed along to other BGP-speaking routers.
BGP Version 4 supports classless interdomain routing (CIDR), which lets you reduce the size of your routing tables by creating aggregate routes, resulting in supernets. CIDR eliminates the concept of network classes within BGP and supports the advertising of IP prefixes. CIDR routes can be carried by Open Shortest Path First (OSPF), Enhanced IGRP (EIGRP), and Intermediate System-to-Intermediate System (ISIS)-IP, and Routing Information Protocol (RIP).
See the “BGP Route Map Examples” section at the end of this chapter for examples of how to use route maps to redistribute BGP Version 4 routes.
How BGP Selects Paths
A router running Cisco IOS Release 12.0 or later does not select or use an iBGP route unless both of the following conditions are true:
The router has a route available to the next hop router:
The router has received synchronization via an IGP (unless IGP synchronization has been disabled).
Basic BGP Configuration Task List
The BGP configuration tasks are divided into basic and advanced tasks, which are described in the following sections. The basic tasks described in the first two sections are required to configure BGP; the basic and advanced tasks in the remaining sections are optional:
Enabling BGP Routing (Required)Configuring BGP Neighbors (Required)Managing Routing Policy Changes (Optional)
Verifying BGP Soft Reset (Optional)
Configuring BGP Interactions with IGPs (Optional)
Configuring BGP Weights (Optional)
Disabling Autonomous System Path Comparison (Optional)
Configuring BGP Route Filtering by Neighbor (Optional)
Configuring BGP Filtering Using Prefix Lists (Optional)
Configuring BGP Path Filtering by Neighbor (Optional)
Disabling Next Hop Processing on BGP Updates (Optional)
Configuring the BGP Version (Optional)
Configuring the MED Metric (Optional)
Advanced BGP Configuration Task List
Advanced, optional BGP configuration tasks are described in the following sections:
Using Route Maps to Modify Updates (Optional)
Resetting eBGP Connections Immediately upon Link Failure (Optional)
Configuring Aggregate Addresses (Optional)
Disabling Automatic Summarization of Network Numbers (Optional)
Configuring BGP Community Filtering (Optional)
Configuring BGP Conditional Advertisement (Optional)
Configuring a Routing Domain Confederation (Optional)
Configuring a Route Reflector (Optional)
Configuring BGP Peer Groups (Optional)
Disabling a Peer or Peer Group (Optional)
Indicating Backdoor Routes (Optional)
Modifying Parameters While Updating the IP Routing Table (Optional)
Setting Administrative Distance (Optional)
Adjusting BGP Timers (Optional)
Changing the Default Local Preference Value (Optional)
Redistributing Network 0.0.0.0 (Optional)
Configuring the Router to Consider a Missing MED as Worst Path (Optional)
Selecting Path Based on MEDs from Other Autonomous Systems (Optional)
Configuring the Router to Use the MED to Choose a Path from Subautonomous System Paths (Optional)
Configuring the Router to Use the MED to Choose a Path in a Confederation (Optional)
Configuring Route Dampening (Optional)
For information on configuring features that apply to multiple IP routing protocols (such as redistributing routing information), see the chapter “Configuring IP Routing Protocol-Independent Features.”
BGP ConfigurationRead more…