before it stops and waits for an acknowledgment.
For example, if 1000-byte packets are being sent, BGP would
stop and wait for an acknowledgment only when 65 packets had
not been acknowledged, when using the maximum window size. TCP
is designed to use a sliding window in which the receiver
acknowledges at the halfway point of the sending window. This
method allows any TCP application, such as BGP, to continue to
stream packets without having to stop and wait as OSPF or EIGRP
would require.
Content 6.1 BGP Concepts
and Terminology 6.1.10 BGP Databases A
router running BGP keeps several tables to store BGP
information that it receives from and sends to other routers.
These tables include a neighbor table, a BGP table (also called
a forwarding database or topology database), and an IP routing
table. For BGP to establish an adjacency, you must configure it
explicitly for each neighbor. BGP uses TCP as its transport
protocol (port 179). It forms a TCP connection with each of the
configured neighbors and keeps track of the state of these
relationships by periodically sending a BGP TCP keepalive
message. Note
BGP sends TCP keepalives every 60
seconds by default. Routers that run a BGP routing process are
often referred to as BGP speakers. Two BGP speakers that form a
TCP connection between one another for the purpose of
exchanging routing information are referred to as neighbors or
peers. After establishing an adjacency, the neighbors exchange
the BGP routes that are in their IP routing table. Each router
collects these routes from each neighbor that successfully
establishes an adjacency and then places them in its BGP
forwarding database. All routes that have been learned from
each neighbor are placed into the BGP forwarding database. The
best routes for each network are selected from the BGP
forwarding database using the BGP route selection process and
then offered to the IP routing table. Each router compares the
offered BGP routes to any other possible paths to those
networks, and the best route, based on administrative distance,
is installed in the IP routing table. EBGP routes (BGP routes
learned from an external autonomous system) have an
administrative distance of 20. IBGP routes (BGP routes learned
from within the autonomous system) have an administrative
distance of 200.
Content 6.1 BGP
Concepts and Terminology 6.1.11 BGP Message
Types The four BGP message types are open, keepalive,
update, and notification. After a TCP connection is
established, the first message sent by each side is an open
message. If the open message is acceptable, the side that
receives the message sends a keepalive message confirming the
open message. After the receiving side confirms the open
message and establishes the BGP connection, the BGP peers can
exchange any update, keepalive, and notification messages. BGP
peers initially exchange their full BGP routing tables.
Incremental updates are sent only after topology changes in the
network. BGP peers send keepalive messages to ensure that the
connection between the BGP peers still exists. They send
notification packets in response to errors or special
conditions. Here are more details about the different types of
BGP messages: - Open message: An open message
includes the following information:
- Version
number: The highest common version that both routers
support is used. All BGP implementations today use BGP4.
- AS number: The AS number of the local router. The
peer router verifies this information. If it is not the AS
number that is expected, the BGP session is torn down.
- Hold time: Maximum number of seconds that can
elapse between the successive keepalive and update messages
from the sender. On receipt of an open message, the router
calculates the value of the hold timer by using whichever is
smaller: its configured hold time or the hold time that was
received in the open message.
- BGP router ID:
32-bit field indicating the BGP ID of the sender. The BGP ID is
an IP address that is assigned to that router, and it is
determined at startup. The BGP router ID is chosen in the same
way that the OSPF router ID is chosen: it is the highest active
IP address on the router, unless a loopback interface with an
IP address exists. In this case, the router ID is the highest
loopback IP address. The router ID can also be statically
configured.
- Optional parameters: These
parameters are Type, Length, and Value (TLV)-encoded. An
example of an optional parameter is session
authentication.
- Keepalive message:
BGP keepalive messages are exchanged between BGP peers often
enough to keep the hold timer from expiring. If the negotiated
hold-time interval is 0, periodic keepalive messages are not
sent. A keepalive message consists of only a message header.
- Update message: A BGP update message has
information on one path only; multiple paths require multiple
update messages. All the attributes in the update message refer
to that path, and the networks are those that can be reached
through it. An update message can include the following
fields:
- Withdrawn routes: This list displays IP
address prefixes for routes that are withdrawn from service, if
any.
- Path attributes: These attributes
include the AS path, origin, local preference, and so on (as
described later in this module). Each path attribute includes
the attribute TLV. The attribute type consists of the attribute
flags, followed by the attribute type code.
-
Network-layer reachability information: This field
contains a list of IP address prefixes that are reachable by
this path.
- Notification message: A
BGP notification message is sent when an error condition is
detected. The BGP connection is closed immediately after this
is sent. Notification messages include an error code, an error
subcode, and data related to the error. Figure displays the
field for error codes that can be used to troubleshoot BGP
connections.
Interactive Media Activity
Drag and Drop: BGP Message Types Upon completion of this
activity, the student will be able to identify the properties
of BGP messages types.
Content 6.2 EBGP
and IBGP 6.2.1 BGP Neighbor Relationships
No one router can handle every connection with all the routers
that run BGP. Tens of thousands of routers run BGP and are
connected to the Internet, representing more than 21,000
autonomous systems. A BGP router forms a direct neighbor
relationship with a limited number of other BGP routers.
Through these BGP neighbors, a BGP router learns of the paths
through the Internet to reach any advertised network. Any
router that runs BGP is known as a BGP speaker. The term “BGP
peer” has a specific meaning: a BGP speaker that is configured
to form a neighbor relationship with another BGP speaker for
the purpose of directly exchanging BGP routing information with
each other. A BGP speaker has a limited number of BGP neighbors
with which it peers and forms a TCP-based relationship. BGP
peers are also known as BGP neighbors and can be either
internal or external to the autonomous system. A BGP peer must
be configured with the BGP neighbor command. The
administrator instructs the BGP speaker to establish a
relationship with the address listed in the neighbor
command and to exchange the BGP routing updates with that
neighbor.
Content 6.2 EBGP and IBGP
6.2.2 Establishing a Connection Between
External BGP Neighbors Recall that when BGP is running
between routers in different autonomous systems, it is called
EBGP. Generally, routers running EBGP are directly connected to
each other. For two routers to exchange BGP routing updates,
the TCP-reliable transport layer on each side must successfully
pass the TCP three-way handshake before the BGP session can be
established. Therefore, the IP address used in the BGP