Border Gateway Protocol
Border Gateway Protocol
Border Gateway Protocol
(BGP)
Ejaz Ahmed
BGP
Border Gateway Protocol (BGP) is an interdomain routing
protocol using path vector routing. It first appeared in 1989
and has gone through four versions.
BGP
Characteristics
BGP
Characteristics
Next-hop Paradigm
Like distance-vector routing protocols, BGP supplies
next hop information for each destination.
Policy Support
BGP can implement policies.
A router running BGP can be configured to distinguish
between the set of destinations reachable by computers
inside the AS and the set of destinations advertised to
other autonomous systems.
BGP Characteristics
Incremental Updates
To conserve network bandwidth, BGP does not pass full
information in each update.
Full information is only passed once, and latter only
updates are sent (deltas).
Classless Addressing
BGP supports CIDR addresses.
A mask is sent along each address.
Route Aggregation
BGP allows multiple related destinations to be grouped
into one entry.
BGP Characteristics
Authentication
Authentication is also provided in BGP.
Sender is verified using an authentication code.
Different authentication codes can be used.
Reliable Transport
BGP is unusual among routing protocols because it uses
TCP for all communication.
This eliminates the need to implement explicit
fragmentation, retransmission, Acks, and sequencing.
Uses TCP port 179.
Loc-RIB
Store local routing information that has been selected by applying
local policies to the information contained in Adj-RIB-In.
Routes that would be used by the local BGP speaker are present in
the Loc-RIB.
Adj-RIB-Out
Store routing information that the BGP speaker has selected for
advertisement to its peers (external links). This information will be
carried out in the UPDATE message to the peers.
Establish session on
TCP port 179
AS1
BGP session
Exchange all
active routes
Exchange incremental
updates
AS2
While connection
is ALIVE exchange
route UPDATE messages
14
Open message
Update message
Attribute Type
Flags
Code
Attribute Length
Attribute Value
Flag Bits
Description
1 optional/ 0 Welknown
1 if length field is 2
4-7
Unused
TYPE CODE
Description
Note:
BGP supports classless addressing
and CIDR.
BGP Attributes
Value
----1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
...
255
Code
--------------------------------ORIGIN
AS_PATH
NEXT_HOP
MULTI_EXIT_DISC
LOCAL_PREF
ATOMIC_AGGREGATE
AGGREGATOR
COMMUNITY
ORIGINATOR_ID
CLUSTER_LIST
DPA
ADVERTISER
RCID_PATH / CLUSTER_ID
MP_REACH_NLRI
MP_UNREACH_NLRI
EXTENDED COMMUNITIES
Reference
--------[RFC1771]
[RFC1771]
[RFC1771]
[RFC1771]
[RFC1771]
[RFC1771]
[RFC1771]
[RFC1997]
[RFC2796]
[RFC2796]
[Chen]
[RFC1863]
[RFC1863]
[RFC2283]
[RFC2283]
[Rosen]
Most
important
attributes
192.0.2.0/24
pick me!
192.0.2.0/24
pick me!
192.0.2.0/24
pick me!
Given multiple
routes to the same
prefix, a BGP speaker
must pick at most
one best route
(Note: it could reject
them all!)
ASPATH Attribute
AS 1129
135.207.0.0/16
AS Path = 1755 1239 7018 6341
135.207.0.0/16
AS Path = 1239 7018 6341
AS 1239
Sprint
AS 1755
135.207.0.0/16
AS Path = 1129 1755 1239 7018 6341
Ebone
AS 12654
AS 6341
AT&T Research
RIPE NCC
RIS project
135.207.0.0/16
AS Path = 7018 6341
AS7018
135.207.0.0/16
AS Path = 6341
Global Access
135.207.0.0/16
AS Path = 3549 7018 6341
AT&T
135.207.0.0/16
AS Path = 7018 6341
AS 3549
Global Crossing
135.207.0.0/16
Prefix Originated
30
Keepalive message
Notification message
Error codes
Reading Guidelines
RFC 1771