Border Gateway Protocol is the only routing protocol in operation today that uses Transmission Control Protocol (TCP) for the reliable movement of its update information. TCP is the connection-oriented protocol defined at the Transport layer of the OSI reference model that provides reliable delivery of data. Routers that are configured with the BGP routing protocol are commonly called BGP speakers . Any two routers that have generated a TCP connection for sharing BGP routing information are called peers, or neighbors. These BGP peers exchange different types of messages to open and maintain the connection. BGP speakers exchange network reachability information in the form of the full paths (BGP AS numbers ) that a route should take to get to a destination network. This information is vital for building a loop-free topology where routing policies can be used to manage the routing behavior. BGP can route between multiple autonomous systems (or domains), as well as exchange routing and reachability information with other BGP systems. BGP is often referred to as a path -vector protocol because it transports a sequence of AS numbers in its packets for loop- avoidance and designates a path to a remote network. An AS utilizes BGP to find out about other routes' reachability by gathering information from other ASs. The rules for maintaining and exchanging information are called policies and each AS can have specific policies for the different points to external networks. BGP provides for making decisions based on rules enforced at the AS level through policy-based routing. This mechanism controls how the data is transported through the AS and is based on BGP attributes covered throughout this chapter. BGP peers exchange their full routing tables at the outset. After the initial exchange, peers send incremental updates whenever there is a change to the routing table. BGP also stores a version number of the BGP table, which should be identical for all its peers. Whenever BGP updates the table because of a routing information change, the version number is also changed. Keepalive messages are also used to make certain that the connection is alive between the BGP peers. Notification messages are sent to respond to network errors or special situations. BGP has four different types of messages that are exchanged between BGP routers: open, keepalive, update, and notification. Table 8.1 displays the four message types that BGP-4 uses to guarantee that updates are transmitted and neighbors remain active. Table 8.1. BGP-4 Message Types
Each enterprise network or ISP on the Internet is identified by an autonomous system number (ASN) that provides a hierarchy for managing route information. The Internet Assigned Numbers Authority (IANA) is the consortium that doles out ASNs to ISPs and other organizations that use BGP (or another EGP) to connect to the Internet. The ASN is a 16-bit number (1 “65535). As with IP addresses, a range of ASNs is reserved for private use. These reside at the top of the address space from 64512 through 65535. The guidelines for ASNs are defined in RFC 1930.
There are two modes of BGP: Interior Border Gateway Protocol (IBGP) and Exterior Border Gateway Protocol (EBGP). IBGP is used to exchange BGP information between BGP routers within the same AS. IGRP and OSPF are both IGPs that can be used within a BGP AS. Implementing an internal routing protocol within the AS removes the requirement that all BGP neighbors within the same AS be directly connected to one another. EBGP allows for the sharing of routing information between BGP neighbors across AS boundaries. EBGP demands that there be a direct link between neighbors that reside in different ASs, as shown in Figure 8.1. Figure 8.1. IGPs and EGPs operating together in an internetwork design.
Here is a list of the most important features of BGP-4:
There is a difference between a regular autonomous system, such as Company ABC AS 65534, and one configured with a BGP transit policy, such as the ISP AS 64512. These distinctions will become much clearer over the course of this chapter and Chapter 9, "Scaling BGP Networks." However, Table 8.2 provides a good overview of the different BGP AS types. Table 8.2. BGP AS Types
You should strongly consider implementing BGP when
You should not use BGP when
Static routes or an IGP can be used if your organization cannot implement BGP for one of the preceding reasons.
As you recall, when there are multiple routes to a destination network, it is the administrative distance value that determines what routes are ultimately injected into the routing table. The AD value of a static route is set to 1 if the route is designated with the next-hop address parameter. The AD value of a status route designated by the interface parameter is 0. A "floating" static route is often implemented to override a dynamically learned route. It can be used to generate a path of last resort that can be used when no dynamic route data exists. A floating static route is a sort of "path of last resort" that kicks in when no dynamic routing information is available. You can establish a floating static route by using an AD value that is higher than the default AD of the routing protocol being used. It is statically configured to be explicitly overridden by dynamically learned information. A router running BGP maintains information concerning neighbor routers in the BGP routing table. In fact, a BGP router actually maintains two separate tables. It has the BGP routing table and the IP routing table. The BGP routing table is filled with routes obtained by the BGP protocol and the IP routing table is proliferated by routes that are obtained by IGPs running on the router. Even though these two tables are managed independently, your BGP router can be configured to exchange information between the tables. If you want to display detailed information about BGP neighbor routers, you can use the following EXEC-mode command: RouterA(config)# show ip bgp neighbors. Listing 8.1 shows an example of the show ip bgp neighbors command on a Cisco router running BGP. Listing 8.1 A Sample show ip bgp neighbors CommandRouter#show ip bgp neighbors BGP neighbor is 172.16.11.1, remote AS 1, external link Index 3, Offset 0, Mask 0x8 BGP version 4, remote router ID 172.16.15.1 BGP state = Established, table version = 1, up for 01:07:28 Last read 00:00:28, hold time is 180, keepalive interval is 60 seconds Minimum time between advertisement runs is 30 seconds Received 70 messages, 0 notifications, 0 in queue Sent 70 messages, 0 notifications, 0 in queue Prefix advertised 0, suppressed 0, withdrawn 0 Default weight 10 Connections established 1; dropped 0 Last reset never 0 accepted prefixes consume 0 bytes 0 history paths consume 0 bytes Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Local host: 172.16.11.2, Local port: 11000 Foreign host: 172.16.11.1, Foreign port: 179 Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) Event Timers (current time is 0x18AE8E0): Timer Starts Wakeups Next Retrans 71 0 0x0 TimeWait 0 0 0x0 AckHold 70 45 0x0 SendWnd 0 0 0x0 KeepAlive 0 0 0x0 GiveUp 0 0 0x0 PmtuAger 0 0 0x0 DeadWait 0 0 0x0 iss: 1359248693 snduna: 1359250034 sndnxt: 1359250034 sndwnd: 15044 irs: 1979028943 rcvnxt: 1979030284 rcvwnd: 15044 delrcvwnd: 1340 SRTT: 300 ms, RTTO: 607 ms, RTV: 3 ms, KRTT: 0 ms minRTT: 20 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: higher precedence, nagle Datagrams (max data segment is 1460 bytes): Rcvd: 97 (out of order: 0), with data: 70, total data bytes: 1340 Sent: 117 (retransmit: 0), with data: 70, total data bytes: 1340 BGP neighbor is 172.16.40.2, remote AS 2, external link Index 2, Offset 0, Mask 0x4 BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, table version = 0 Last read 00:00:11, hold time is 180, keepalive interval is 60 seconds Minimum time between advertisement runs is 30 seconds Received 0 messages, 0 notifications, 0 in queue Sent 0 messages, 0 notifications, 0 in queue Prefix advertised 0, suppressed 0, withdrawn 0 Connections established 0; dropped 0 Last reset never 0 accepted prefixes consume 0 bytes 0 history paths consume 0 bytes External BGP neighbor not directly connected. No active TCP connection RouterB# BGP information is transported inside of TCP segments with the default TCP port designator of 179. BGP routers that have generated a BGP TCP connection-oriented communication are peers or neighbors, either internal or external. IBGP peers are routers running BGP and exchanging information within a single AS to be eventually passed on to other ASs. BGP routers communicating between disparate ASs are directly connected and run EBGP. Before it exchanges routing table or BGP table information with a peer in an external AS, BGP makes certain that networks within the AS are reachable. This is done by a combination of internal BGP peering among routers within the AS and then redistributing BGP routing information to IGPs running within the AS, such as IGRP, IS-IS, RIP, or OSPF, as shown in Figure 8.2. Figure 8.2. Internal and external BGP neighbors.
|