Border Gateway Protocol - Wikipedia
Border Gateway Protocol - Wikipedia
Protocol
Page issues
History
The current version of BGP is version 4
(BGP4), which was published as RFC
4271 in 2006,[3] after progressing through
20 drafts from documents based on RFC
1771 version 4. RFC 4271 corrected
errors, clarified ambiguities and updated
the specification with common industry
practices. The major enhancement was
the support for Classless Inter-Domain
Routing and use of route aggregation to
decrease the size of routing tables.
BGP4 has been in use on the Internet since
1994.[4]
Operation
BGP neighbors, called peers, are
established by manual configuration
among routers to create a TCP session on
port 179. A BGP speaker sends 19-byte
keep-alive messages every 60 seconds[5]
to maintain the connection.[6] Among
routing protocols, BGP is unique in using
TCP as its transport protocol.
When BGP runs between two peers in the
same autonomous system (AS), it is
referred to as Internal BGP (iBGP or Interior
Border Gateway Protocol). When it runs
between different autonomous systems, it
is called External BGP (eBGP or Exterior
Border Gateway Protocol). Routers on the
boundary of one AS exchanging
information with another AS are called
border or edge routers or simply eBGP
peers and are typically connected directly,
while iBGP peers can be interconnected
through other intermediate routers. Other
deployment topologies are also possible,
such as running eBGP peering inside a
VPN tunnel, allowing two remote sites to
exchange routing information in a secure
and isolated manner. The main difference
between iBGP and eBGP peering is in the
way routes that were received from one
peer are propagated to other peers. For
instance, new routes learned from an
eBGP peer are typically redistributed to all
iBGP peers as well as all other eBGP peers
(if transit mode is enabled on the router).
However, if new routes are learned on an
iBGP peering, then they are re-advertised
only to all eBGP peers. These route-
propagation rules effectively require that
all iBGP peers inside an AS are
interconnected in a full mesh.
Idle State:
Refuse all incoming BGP
connections.
Start the initialization of event
triggers.
Initiates a TCP connection with its
configured BGP peer.
Listens for a TCP connection from
its peer.
Changes its state to Connect.
If an error occurs at any state of the
FSM process, the BGP session is
terminated immediately and
returned to the Idle state. Some of
the reasons why a router does not
progress from the Idle state are:
TCP port 179 is not open.
A random TCP port over 1023
is not open.
Peer address configured
incorrectly on either router.
AS number configured
incorrectly on either router.
Connect State:
Waits for successful TCP
negotiation with peer.
BGP does not spend much time in
this state if the TCP session has
been successfully established.
Sends Open message to peer and
changes state to OpenSent.
If an error occurs, BGP moves to the
Active state. Some reasons for the
error are:
TCP port 179 is not open.
A random TCP port over 1023
is not open.
Peer address configured
incorrectly on either router.
AS number configured
incorrectly on either router.
Active State:
If the router was unable to establish
a successful TCP session, then it
ends up in the Active state.
BGP FSM tries to restart another
TCP session with the peer and, if
successful, then it sends an Open
message to the peer.
If it is unsuccessful again, the FSM
is reset to the Idle state.
Repeated failures may result in a
router cycling between the Idle and
Active states. Some of the reasons
for this include:
TCP port 179 is not open.
A random TCP port over 1023
is not open.
BGP configuration error.
Network congestion.
Flapping network interface.
OpenSent State:
BGP FSM listens for an Open
message from its peer.
Once the message has been
received, the router checks the
validity of the Open message.
If there is an error it is because one
of the fields in the Open message
does not match between the peers,
e.g., BGP version mismatch, the
peering router expects a different
My AS, etc. The router then sends a
Notification message to the peer
indicating why the error occurred.
If there is no error, a Keepalive
message is sent, various timers are
set and the state is changed to
OpenConfirm.
OpenConfirm State:
The peer is listening for a Keepalive
message from its peer.
If a Keepalive message is received
and no timer has expired before
reception of the Keepalive, BGP
transitions to the Established state.
If a timer expires before a Keepalive
message is received, or if an error
condition occurs, the router
transitions back to the Idle state.
Established State:
In this state, the peers send Update
messages to exchange information
about each route being advertised
to the BGP peer.
If there is any error in the Update
message then a Notification
message is sent to the peer, and
BGP transitions back to the Idle
state.
Communities
BGP communities are attribute tags that
can be applied to incoming or outgoing
prefixes to achieve some common goal
(RFC 1997 ). While it is common to say
that BGP allows an administrator to set
policies on how prefixes are handled by
ISPs, this is generally not possible, strictly
speaking. For instance, BGP natively has
no concept to allow one AS to tell another
AS to restrict advertisement of a prefix to
only North American peering customers.
Instead, an ISP generally publishes a list of
well-known or proprietary communities
with a description for each one, which
essentially becomes an agreement of how
prefixes are to be treated. Examples of
common communities include local
preference adjustments, geographic or
peer type restrictions, DoS avoidance
(black holing), and AS prepending options.
An ISP might state that any routes
received from customers with community
XXX:500 will be advertised to all peers
(default) while community XXX:501 will
restrict advertisement to North America.
The customer simply adjusts their
configuration to include the correct
community or communities for each route,
and the ISP is responsible for controlling
who the prefix is advertised to. The end
user has no technical ability to enforce
correct actions being taken by the ISP,
though problems in this area are generally
rare and accidental.
Multi-exit discriminators
bit
0–15 16–23 24–31
offset
32
Marker
64
96
route oscillation
sub-optimal routing
increase of BGP convergence time[16]
Stability
The routing tables managed by a BGP
implementation are adjusted continually to
reflect actual changes in the network, such
as links breaking and being restored or
routers going down and coming back up.
In the network as a whole it is normal for
these changes to happen almost
continuously, but for any particular router
or link, changes are supposed to be
relatively infrequent. If a router is
misconfigured or mismanaged then it may
get into a rapid cycle between down and
up states. This pattern of repeated
withdrawal and re-announcement known
as route flapping can cause excessive
activity in all the other routers that know
about the broken link, as the same route is
continually injected and withdrawn from
the routing tables. The BGP design is such
that delivery of traffic may not function
while routes are being updated. On the
Internet, a BGP routing change may cause
outages for several minutes.
Security
By design, routers running BGP accept
advertised routes from other BGP routers
by default. This allows for automatic and
decentralized routing of traffic across the
Internet, but it also leaves the Internet
potentially vulnerable to accidental or
malicious disruption, known as BGP
hijacking. Due to the extent to which BGP
is embedded in the core systems of the
Internet, and the number of different
networks operated by many different
organizations which collectively make up
the Internet, correcting this vulnerability
(such as by introducing the use of
cryptographic keys to verify the identity of
BGP routers) is a technically and
economically challenging problem.[31]
Extensions
An extension to BGP is the use of
multipathing – this typically requires
identical MED, weight, origin, and AS-path
although some implementations provide
the ability to relax the AS-path checking to
only expect an equal path length rather
than the actual AS numbers in the path
being expected to match too. This can
then be extended further with features like
Cisco's dmzlink-bw which enables a ratio
of traffic sharing based on bandwidth
values configured on individual links.
Uses
BGP4 is standard for Internet routing and
required of most Internet service providers
(ISPs) to establish routing between one
another. Very large private IP networks use
BGP internally. An example is the joining of
a number of large Open Shortest Path First
(OSPF) networks, when OSPF by itself
does not scale to the size required.
Another reason to use BGP is multihoming
a network for better redundancy, either to
multiple access points of a single ISP or to
multiple ISPs.
Implementations
Routers, especially small ones intended for
Small Office/Home Office (SOHO) use,
may not include BGP software. Some
SOHO routers simply are not capable of
running BGP / using BGP routing tables of
any size. Other commercial routers may
need a specific software executable image
that contains BGP, or a license that
enables it. Open source packages that run
BGP include GNU Zebra, Quagga,
OpenBGPD, BIRD, XORP, and Vyatta.
Devices marketed as Layer 3 switches are
less likely to support BGP than devices
marketed as routers, but high-end Layer 3
Switches usually can run BGP.
Simulators include:
BGP++,[33] a patch integrating GNU
Zebra software on ns-2 and GTNetS
network simulators
BGP is supported on ns-3 via direct
execution of Quagga code[34]
BGPlay,[35] a HTML widget that presents
a graphical visualization of BGP routes
and updates for any real AS on the
Internet
C-BGP,[36] a BGP simulator able to
perform large-scale simulation trying to
model the ASes of the Internet or
modelling ASes as large as Tier-1.[37]
ns-BGP,[38] a BGP extension for ns-2
simulator based on the SSFnet
implementation
NetViews,[39] a Java application that
monitors and visualizes BGP activity in
real time.
SSFnet[40] network simulator includes a
BGP implementation developed by BJ
Premore
Piranha[41] a BGP route collector for
realtime and offline analysis
Agilent Technologies
GNS3 open source network simulator
Ixia
Spirent Communications
See also
AS 7007 incident
Autonomous system (Internet)
Internet Assigned Numbers Authority
Open Shortest Path First
Private IP
QPPB
Regional Internet Registry
Route analytics
Route filtering
Routing
Routing Assets Database
References
1. Orbit-Computer-Solutions.Com(n.d),
Computer Training & CCNA Networking
Solutions, Orbit-Computer-Solutions.com,
retrieved 8 October 2013,<"Archived copy" .
Archived from the original on 2013-09-28.
Retrieved 2013-10-08.>
2. Sobrinho, João Luís (2003). "Network
Routing with Path Vector Protocols: Theory
and Applications" (PDF). Retrieved
March 16, 2018.
3. > "RFC 4271 - A Border Gateway Protocol
4 (BGP-4)" . ietf.org.
4. > "The History of Border Gateway
Protocol" . blog.datapath.io.
5. "BGP Keepalive Messages" .
InetDaemon's IT Tutorials.
6. RFC 4274
7. Capabilities Advertisement with BGP-4 ,
RFC 2842 , R. Chandra & J. Scudder, May
2000
8. Multiprotocol Extensions for BGP-4 , RFC
2858 , T. Bates et al., June 2000
9. BGP/MPLS VPNs. , RFC 2547 , E. Rosen
and Y. Rekhter, April 2004
10. "BGP Community Guides" . Retrieved
13 April 2015.
11. IANA registry for BGP Extended
Communities Types , IANA,2008
12. IETF drafts on BGP signalled QoS
Archived 2009-02-23 at the Wayback
Machine., Thomas Knoll,2008
13. BGP Route Reflection: An Alternative to
Full Mesh Internal BGP (iBGP) , RFC 4456 ,
T. Bates et al., April 2006
14. http://www.ietf.org/rfc/rfc5065.txt
15. http://www.ietf.org/rfc/rfc3345.txt
16. http://www.ietf.org/rfc/rfc4098.txt
17. "Route Flap Damping Exacerbates
Internet Routing Convergence" (PDF).
November 1998.
18. Zhang, Beichuan; Pei Dan; Daniel
Massey; Lixia Zhang (June 2005). "Timer
Interaction in Route Flap Damping" (PDF).
IEEE 25th International Conference on
Distributed Computing Systems. Retrieved
2006-09-26. "We show that the current
damping design leads to the intended
behavior only under persistent route
flapping. When the number of flaps is
small, the global routing dynamics deviates
significantly from the expected behavior
with a longer convergence delay."
19. "BGP Route Flap Damping" .
Tools.ietf.org.
20. 10 May 2006 (2006-05-10). "RIPE
Routing Working Group Recommendations
On Route-flap Damping" . RIPE Network
Coordination Centre. Retrieved 2013-12-04.
21. "draft-ymbk-rfd-usable-02 - Making
Route Flap Damping Usable" .
Tools.ietf.org. Retrieved 2013-12-04.
22. "BGP Reports" . potaroo.net.
23. "CAT 6500 and 7600 Series Routers and
Switches TCAM Allocation Adjustment
Procedures" . Cisco. 9 March 2015.
24. Jim Cowie. "Internet Touches Half
Million Routes: Outages Possible Next
Week" . Dyn Research.
25. Garside, Juliette; Gibbs, Samuel (14
August 2014). "Internet infrastructure
'needs updating or more blackouts will
happen' " . The Guardian. Retrieved 15 Aug
2014.
26.
https://www.nanog.org/meetings/nanog39
/presentations/bof-report.pdf
27. Greg Ferro. "TCAM — a Deeper Look
and the impact of IPv6" . EtherealMind.
28. "The IPv4 Depletion site" .
ipv4depletion.com.
29. "What caused today's Internet hiccup" .
bgpmon.net.
30. 16-bit Autonomus System Report ,
Geoff Huston 2011 (original archived at
https://web.archive.org/web/20110906085
724/http://www.potaroo.net/tools/asn16/ )
31. Craig Timberg (2015-05-31). "Quick fix
for an early Internet problem lives on a
quarter-century later" . The Washington
Post. Retrieved 2015-06-01.
32. "GNU Zebra" .
33. "BGP++ Home Page" . gatech.edu.
34. "Introduction -- DCE Quagga support" .
nsnam.org.
35. "RIPEstat — Internet Measurements and
Analysis" . ripe.net.
36. "C-BGP" . ucl.ac.be.
37. Quoitin, Bruno; Steve Uhlig (November
2005). "Modeling the Routing of an
Autonomous System with C-BGP" . IEEE
Network Magazine. 19 (6).
38. "ns-BGP" . sfu.ca.
39. "Networking Research Lab > Projects >
CRI: Building the Next-Generation Global
Routing Monitoring Systems" .
memphis.edu.
40. "Scalable Simulation Framework" .
41. "Piranha Route Collector" .
Further reading
Chapter "Border Gateway Protocol
(BGP)" in the Cisco "IOS Technology
Handbook"
RFC 1772 , Application of the Border
Gateway Protocol in the Internet
Protocol (BGP-4) using SMIv2
RFC 2439 , BGP Route Flap Damping
RFC 2918 , Route Refresh Capability for
BGP-4
RFC 3765 , NOPEER Community for
Border Gateway Protocol (BGP) Route
Scope Control
RFC 4271 , A Border Gateway Protocol 4
(BGP-4)
RFC 4272 , BGP Security Vulnerabilities
Analysis
RFC 4273 , Definitions of Managed
Objects for BGP-4
RFC 4274 , BGP-4 Protocol Analysis
RFC 4275 , BGP-4 MIB Implementation
Survey
RFC 4276 , BGP-4 Implementation
Report
RFC 4277 , Experience with the BGP-4
Protocol
RFC 4278 , Standards Maturity Variance
Regarding the TCP MD5 Signature
Option (RFC 2385 ) and the BGP-4
Specification
RFC 4456 , BGP Route Reflection – An
Alternative to Full Mesh Internal BGP
(iBGP)
RFC 4724 , Graceful Restart Mechanism
for BGP
RFC 4760 , Multiprotocol Extensions for
BGP-4
RFC 4893 , BGP Support for Four-octet
AS Number Space
RFC 5065 , Autonomous System
Confederations for BGP
RFC 5492 , Capabilities Advertisement
with BGP-4
RFC 7911 , Advertisement of Multiple
Paths in BGP
draft-ietf-idr-custom-decision-08 – BGP
Custom Decision Process, Feb 3, 2017
RFC 3392 , Obsolete – Capabilities
Advertisement with BGP-4
RFC 2796 , Obsolete – BGP Route
Reflection – An Alternative to Full Mesh
iBGP
RFC 3065 , Obsolete – Autonomous
System Confederations for BGP
RFC 1965 , Obsolete – Autonomous
System Confederations for BGP
RFC 1771 , Obsolete – A Border
Gateway Protocol 4 (BGP-4)
RFC 1657 , Obsolete – Definitions of
Managed Objects for the Fourth Version
of the Border Gateway
RFC 1655 , Obsolete – Application of
the Border Gateway Protocol in the
Internet
RFC 1654 , Obsolete – A Border
Gateway Protocol 4 (BGP-4)
RFC 1105 , Obsolete – Border Gateway
Protocol (BGP)
RFC 2858 , Obsolete – Multiprotocol
Extensions for BGP-4
External links
Cyclops A BGP network audit tool
(prefix hijack, route leakage) by UCLA
BGP Routing Resources (includes a
dedicated section on BGP & ISP Core
Security )
BGP table statistics
bgpTables A global BGP visibility
analysis tool by Merit Networks
ASNumber Firefox Extension showing
the AS number and additional
information of the website currently
open
RIPE Routing Information Service
collecting over 550 IPv4 and IPv6 BGP
feeds at 14 sites around the world
RIS Looking Glass into the Default Free
Routing zone of the Internet
LookinGlass list of external Looking
Glass services
Retrieved from
"https://en.wikipedia.org/w/index.php?
title=Border_Gateway_Protocol&oldid=872170057"