Introduction
Border Gateway Protocol (BGP), is a protocol used for exchanging routes on
a grand scale. It's old (latest version from 1995), slow (converging takes
forever) and extremely scalable (laughs at areas/levels of IGPs). Because of
its modularity it is also very flexible.
It's a path-vector type routing protocol, where traversed Autonomous
Systems (AS) are the path and the interface from which to send a packet is the
vector.
One of the most important characteristics of BGP is its scalability due to
rarity of advertisements between neighbors. Whole routing knowledge is
exchanged only during the session initiation. After that routes are advertised
on "need to know" basis - i.e. when new information is learned or old
information withdrawn.
BGP doesn't have its own connectivity protocol for communication between
peers. It uses TCP port 179 to achieve reliable connections. Because of that,
it's often argued that BGP isn't really a protocol per se, it's more of an
application running on TCP protocol (like Telnet).
BGP is
defined by:
- RFC 1771, "A Border Gateway Protocol (BGP-4)"
- RFC 1772, "Application of the Border Gateway Protocol in the Internet"
- RFC 1966, "BGP Route Reflection: An Alternative to Full-Mesh I-BGP"
- RFC 1997, "BGP Communities Attribute"
- RFC 2270, "Using a Dedicated AS for Sites Homed to a Single Provider"
- RFC 2385, "Protection of BGP Sessions through the TCP MD5 Signature Option"
- RFC 2439, "BGP Route Flap Damping"
- RFC 2842, "Capabilities Advertisement with BGP-4"
- RFC 2858, "Multiprotocol Extensions for BGP-4"
- RFC 2918, "Route Refresh Capability for BGP-4"
- RFC 3065, "AS Confederations for BGP"
Neighbors
EBGP vs IBGP
BGP forms two types of relationships - external (EBGP) and internal (IBGP).
External relationships are by default limited to immediate physical
connections by TTL equal 1. EBGP sessions are therefor set up using neighbor
facing interface IP address. Default TTL can be increased with multihop
command, which allows to establish remote relationships or use loopbacks to
maintain a single session over multiple redundant links.
EBGP has one simple advertising rule - forward all active BGP learned
routes to all BGP neighbors.
Internal relationships are usually setup over multiple hops - default TTL
is 64 (same value as multihop external sessions and confederations).
Suggested method of setting up session is using loopbacks to allow IGP to
reroute in case of interface failure, which aids stability.
Because IBGP doesn't have a mechanism for loop detection (like AS Path
attribute in EBGP) advertising rules were modified to avoid forming routing
loops - forward all active EBGP learned routes to all BGP neighbors, however
forward active IBGP learned routes only to EBGP neighbors.
Due to that rule, maintaining full mesh connectivity between internal peers
is a common practice.
Post a Comment