Provided by Colasoft Co., Ltd.

BGP ( Border Gateway Protocol )

Home > Protocols > BGP Update: 2006-01-12 13:51:29    I have words to say about this protocol
On this page
SUMMARY
Protocol : Border Gateway Protocol
Protocol suite : TCP/IP
Layer : Network Layer
Type : Distance vector routing protocol
SNMP MIBs : iso.org.dod.internet.mgmt.mib-2.bgp (1.3.6.1.2.1.15)
Working groups : Bgp, Border Gateway Protocol.
Idr, Inter-Domain Routing
DESCRIPTION
BGP (Border Gateway Protocol) is a protocol for exchanging routing information between gateway hosts (each with its own router) in a network of autonomous systems. BGP is often the protocol used between gateway hosts on the Internet. The routing table contains a list of known routers, the addresses they can reach, and a cost metric associated with the path to each router so that the best available route is chosen.

BGP uses TCP as its transport protocol, on port 179. On connection start, BGP peers exchange complete copies of their routing tables, which can be quite large. However, only changes (deltas) are then exchanged, which makes long running BGP sessions more efficient than shorter ones.

BGP's basic unit of routing information is the BGP path, a route to a certain set of CIDR prefixes. Paths are tagged with various path attributes, of which the most important are AS_PATH and NEXT_HOP.

BGP was created to replace the EGP£¨Exterior Gateway Protocol£© routing protocol to allow fully decentralized routing in order to allow the removal of the NSFNET£¨National Science Foundation Network£© Internet backbone network. This allowed the Internet to become a truly decentralized system.

Very large private IP networks can also make use of BGP; an example would be the joining of a number of large OSPF£¨Open Shortest Path First£© networks where OSPF by itself would not scale to size. Another reason to use BGP would be multihoming a network for better redundancy.

BGP has proven to be scalable, stable and provides the mechanisms needed to support complex routing policies. When people talk about BGP today, they implicitly mean BGP4. There is no need to specify the -4 version number because no one uses earlier versions, and very few vendors even still support them.

The Border Gateway Protocol is an inter-Autonomous System routing protocol. The primary function of a BGP speaking system is to exchange network reachability information with other BGP systems. This network reachability information includes information on the list of Autonomous Systems (ASs) that reachability information traverses. This information is sufficient to construct a graph of AS connectivity from which routing loops may be pruned and some policy decisions at the AS level may be enforced.

The planned use of BGP in the Internet environment, including such issues as topology, the interaction between BGP and IGPs, and the enforcement of routing policy rules is presented in a companion document [5]. This document is the first of a series of documents planned to explore various aspects of BGP application.


BGP-4
This version redefines the previously class-based network layer reachability portion of the updates to specify prefixes of arbitrary length in order to represent multiple classful networks in a single entry. The AS_PATH attribute has been modified so that sets of autonomous systems, as well as individual ASs may be described. In addition, The INTER-AS METRIC attribute has been redefined as the MULTI-EXIT DISCRIMINATOR. The LOCAL-PREFERENCE and AGGREGATOR attributes have been added.
  • Message size varies from 19 to 4096 bytes.
  • Supports CIDR.


BGP-4 header
16 2 1 bytes
Marker Length Type
  • Marker
    This 16-octet field contains a value that the receiver of the message can predict. If the Type of the message is OPEN, or if the OPEN message carries no Authentication Information (as an Optional Parameter), then the Marker must be all ones. Otherwise, the value of the marker can be predicted by some a computation specified as part of the authentication mechanism (which is specified as part of the Authentication Information) used. The Marker can be used to detect loss of synchronization between a pair of BGP peers, and to authenticate incoming BGP messages.

  • Length
    This 2-octet unsigned integer indicates the total length of the message, including the header, in octets. Thus, e.g., it allows one to locate in the transport-level stream the (Marker field of the) next message. The value of the Length field must always be at least 19 and no greater than 4096, and may be further constrained, depending on the message type. No "padding" of extra data after the message is allowed, so the Length field must have the smallest value required given the rest of the message.


  • Type
    This 1-octet unsigned integer indicates the type code of the message. The following type codes are defined.
    TypeDescription
    1OPEN.
    2UPDATE.
    3NOTIFICATION.
    4KEEPALIVE.
    5ROUTE-REFRESH.

    • OPEN Message Format
      After a transport protocol connection is established, the first message sent by each side is an OPEN message. If the OPEN message is acceptable, a KEEPALIVE message confirming the OPEN is sent back. Once the OPEN is confirmed, UPDATE, KEEPALIVE, and NOTIFICATION messages may be exchanged.


    • UPDATE Message Format
      UPDATE messages are used to transfer routing information between BGP peers. The information in the UPDATE packet can be used to construct a graph describing the relationships of the various Autonomous Systems. By applying rules to be discussed, routing information loops and some other anomalies may be detected and removed from inter-AS routing.


    • NOTIFICATION Message Format
      A NOTIFICATION message is sent when an error condition is detected. The BGP connection is closed immediately after sending it.


    • KEEPALIVE Message Format
      BGP does not use any transport protocol-based keep-alive mechanism to determine if peers are reachable. Instead, KEEPALIVE messages are exchanged between peers often enough as not to cause the Hold Timer to expire. A reasonable maximum time between KEEPALIVE messages would be one third of the Hold Time interval. KEEPALIVE messages MUST NOT be sent more frequently than one per second. An implementation MAY adjust the rate at which it sends.



To characterize the set of policy decisions that can be enforced using BGP, one must focus on the rule that a BGP speaker advertise to its peers (other BGP speakers which it communicates with) in neighboring ASs only those routes that it itself uses. This rule reflects the "hop-by-hop" routing paradigm generally used throughout the current Internet. Note that some policies cannot be supported by the "hop-by-hop" routing paradigm and thus require techniques such as source routing to enforce. For example, BGP does not enable one AS to send traffic to a neighboring AS intending that the traffic take a different route from that taken by traffic originating in the neighboring AS. On the other hand, BGP can support any policy conforming to the "hop-by-hop" routing paradigm. Since the current Internet uses only the "hop-by-hop" routing paradigm and since BGP can support any policy that conforms to that paradigm, BGP is highly applicable as an inter-AS routing protocol for the current Internet.

A more complete discussion of what policies can and cannot be enforced with BGP is outside the scope of this document (but refer to the companion document discussing BGP usage [5]).

BGP runs over a reliable transport protocol. This eliminates the need to implement explicit update fragmentation, retransmission, acknowledgement, and sequencing. Any authentication scheme used by the transport protocol may be used in addition to BGP's own authentication mechanisms. The error notification mechanism used in BGP assumes that the transport protocol supports a "graceful" close, i.e., that all outstanding data will be delivered before the connection is closed.

BGP uses TCP [4] as its transport protocol. TCP meets BGP's transport requirements and is present in virtually all commercial routers and hosts. In the following descriptions the phrase "transport protocol connection" can be understood to refer to a TCP connection. BGP uses TCP port 179 for establishing its connections.

This document uses the term `Autonomous System' (AS) throughout. The classic definition of an Autonomous System is a set of routers under a single technical administration, using an interior gateway protocol and common metrics to route packets within the AS, and using an exterior gateway protocol to route packets to other ASs. Since this classic definition was developed, it has become common for a single

AS to use several interior gateway protocols and sometimes several sets of metrics within an AS. The use of the term Autonomous System here stresses the fact that, even when multiple IGPs and metrics are used, the administration of an AS appears to other ASs to have a single coherent interior routing plan and presents a consistent picture of what destinations are reachable through it.

The planned use of BGP in the Internet environment, including such issues as topology, the interaction between BGP and IGPs, and the enforcement of routing policy rules is presented in a companion document [5]. This document is the first of a series of documents planned to explore various aspects of BGP application. Please send comments to the BGP mailing list.

Top of Page

EXAMPLES

Top of Page


PROTOCOL RELATIONS
Parent layer
Child layer
TCP
BGP
Top of Page

GLOSSARY
AS_PATH
AS_PATH is a well-known mandatory attribute.

Autonomous Systems
Autonomous system (AS) is the unit of router policy, either a single network or a group of networks that is controlled by a common network administrator (or group of administrators) on behalf of a single administrative entity.

CIDR
CIDR (Classless Inter-Domain Routing) is a new addressing scheme for the Internet which allows for more efficient allocation of IP addresses than the old Class A, B, and C address scheme. A CIDR IP address looks like a normal IP address except that it ends with a slash followed by a number, called the IP network prefix.

EGP
EGP (Exterior Gateway Protocol) is for exchanging routing information between two neighbor gateway hosts in a network of autonomous systems. An EGP is typically used between hosts on the Internet to share routing table information.

BGP is an example of an EGP.

NEXT_HOP
The IP address of the border router that should be used as the next hop to the destinations listed in the UPDATE message.

NSFNET
NSFnet is a wide-area network developed under the auspices of the National Science Foundation (NSF). NSFnet replaced ARPANET as the main government network linking universities and research facilities. In 1995, however, the NSF dismantled NSFnet and replaced it with a commercial Internet backbone. At the same time, the NSF implemented a new backbone called very high-speed Backbone Network Service (vBNS), which serves as a testing ground for the next generation of Internet technologies.

OSPF
OSPF is an interior gateway protocol which is used for routing within a group of routers. It uses link-state technology in which routers send each other information about the direct connections and links which they have to other routers.

Top of Page

REFERENCES
Related links:
                BGP parameters
                BGP Well-Known Communities
RFCs
[RFC 1265] BGP Protocol Analysis.
[RFC 1266] Experience with the BGP Protocol
[RFC 1267] A Border Gateway Protocol 3 (BGP-3).
                Defines BGP-3.
                Obsoletes: RFC 1105, RFC 1163.
[RFC 1269] Definitions of Managed Objects for the Border Gateway Protocol (Version 3).
[RFC 1397] Default Route Advertisement In BGP2 And BGP3 Versions Of The Border Gateway Protocol.
[RFC 1403] BGP OSPF Interaction.
                Obsoletes: RFC 1364.
[RFC 1657] Definitions of Managed Objects for the Fourth Version of the Border Gateway Protocol (BGP-4) using SMIv2.
[RFC 1745] BGP4/IDRP for IP---OSPF Interaction.
[RFC 1771] A Border Gateway Protocol 4 (BGP-4).
                Defines BGP version 4.
                Obsoletes: RFC 1654.
[RFC 1772] Application of the Border Gateway Protocol in the Internet.
                Obsoletes: RFC 1655.
[RFC 1773] Experience with the BGP-4 protocol.
                Obsoletes: RFC 1656.
[RFC 1774] BGP-4 Protocol Analysis.
[RFC 1812] Requirements for IP Version 4 Routers.
[RFC 1817] CIDR and Classful Routing.
[RFC 1863] A BGP/IDRP Route Server alternative to a full mesh routing.
[RFC 1930] Guidelines for creation, selection, and registration of an Autonomous System (AS).
[RFC 1966] BGP Route Reflection. An alternative to full mesh IBGP.
[RFC 1997] BGP Communities Attribute.
[RFC 1998] An Application of the BGP Community Attribute in Multi-home Routing.
[RFC 2042] Registering New BGP Attribute Types.
[RFC 2270] Using a Dedicated AS for Sites Homed to a Single Provider.
[RFC 2385] Protection of BGP Sessions via the TCP MD5 Signature Option.
[RFC 2439] BGP Route Flap Damping.
[RFC 2519] A Framework for Inter-Domain Route Aggregation.
[RFC 2545] Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain Routing.
[RFC 2547] BGP/MPLS VPNs.
[RFC 2791] Scalable Routing Design Principles.
[RFC 2796] BGP Route Reflection - An Alternative to Full Mesh IBGP.
                Updates: RFC 1966.
[RFC 2858] Multiprotocol Extensions for BGP-4.
                Obsoletes: RFC 2283.
[RFC 2918] Route Refresh Capability for BGP-4.
[RFC 3065] Autonomous System Confederations for BGP.
                Obsoletes: RFC 1965.
[RFC 3107] Carrying Label Information in BGP-4.
[RFC 3166] Request to Move RFC 1403 to Historic Status.
[RFC 3167] Request to Move RFC 1745 to Historic Status.
[RFC 3221] Commentary on Inter-Domain Routing in the Internet.
[RFC 3345] Border Gateway Protocol (BGP) Persistent Route Oscillation Condition.
[RFC 3392] Capabilities Advertisement with BGP-4.
                Obsoletes: RFC 2842.
[RFC 3765] NOPEER Community for Border Gateway Protocol (BGP) Route Scope Control.
                Defines BGP community (0xFFFFFF04) NOPEER.
[RFC 3882] Configuring BGP to Block Denial-of-Service Attacks.
Obsolete RFCs
[RFC 1105] A Border Gateway Protocol (BGP).
                Obsoleted by: RFC 1163.
                Defines BGP-1.
[RFC 1163] A Border Gateway Protocol (BGP).
                Obsoleted by: RFC 1267.
                Defines BGP-2.
                Obsoletes: RFC 1105.
[RFC 1164] Application of the Border Gateway Protocol in the Internet.
                Obsoleted by: RFC 1268.
[RFC 1268] Application of the Border Gateway Protocol in the Internet.
                Obsoleted by: RFC 1655.
                Obsoletes: RFC 1164.
[RFC 1364] BGP OSPF Interaction.
                Obsoleted by: RFC 1403.
[RFC 1654] A Border Gateway Protocol 4 (BGP-4).
                Obsoleted by: RFC 1771.
                Defines BGP-4.
[RFC 1655] Application of the Border Gateway Protocol in the Internet.
                Obsoleted by: RFC 1772.
                Obsoletes: RFC 1268.
[RFC 1656] BGP-4 Protocol Document Roadmap and Implementation Experience.
                Obsoleted by: RFC 1773.
[RFC 1965] Autonomous System Confederations for BGP.
                Obsoleted by: RFC 3065.
[RFC 2283] Multiprotocol Extensions for BGP-4.
                Obsoleted by: RFC 2858.
[RFC 2842] Capabilities Advertisement with BGP-4.
                Obsoleted by: RFC 3392.
Publications
[ISBN 0201379511] BGP4: Inter-Domain Routing in the Internet.
[ISBN 0321127005] Practical BGP.
                


Top of Page

OTHER PROTOCOLS OF TCP/IP SUITE
AARP   RRP   RTP Video   RTP Audio   RTP   COPS   Gopher   HSRP   ICP   MPLS   IEEE 802.2   CIP   FTP - Data   FTP - Ctrl   IMAPS   IP Fragment   LDAPS   PUP   MSSQL   RSH   SQL   POP3s   RTELNET   RSVP   STP   VLAN   MSN   H.323   MSRDP   HTTPS   WINS   LPD   GTP   ICMPv6   POP   TELNET   H.225   VRRP   PIM   RARP   SAP   OSPF   RLOGIN   SCTP   SIP   RTCP   PPPoE   Mobile IP   IMAP3   WhoIs   SLP   NCP   PPTP   MGCP   LDAP   L2TP   Kerberos   IPv6   GRE   Ethernet SNAP   AFP   CIFS   IEEE 802.3   Finger   NBDGM   NetBEUI   NBSSN   ESP   EIGRP   EGP   DHCP   CGMP   CDP   BOOTP   AH   NBNS   EthernetII   ICQ   PPP   ARP   RIP   IPX   IGRP   IGMP   SSH   RPC   NetBIOS   TFTP   SNMP   SNA   SMB   RADIUS   NTP   NNTP   UDP   TCP   BGP   DNS   SOCKS   IMAP   RTSP   NFS   ICMP   IP   FTP   Telnet   POP3   SMTP   HTTP  
Search RFCs:

Advanced Search
Search Glossary:
Exact search
Fuzzy search


All Protocols
Submit a Request

Recommend an Article

 Layer 7 Application Layer
  AFP
  BOOTP
  CIFS
  CIP
  COPS
  DHCP
  DNS
  Finger
  FTP
  FTP - Ctrl
  FTP - Data
  Gopher
  HSRP
  HTTP
  HTTPS
  ICP
  ICQ
  IMAP
  IMAP3
  IMAPS
  Kerberos
  LPD
  MGCP
  MSN
  MSRDP
  MSSQL
  NCP
  NFS
  NNTP
  NTP
  POP
  POP3
  POP3s
  RADIUS
  RLOGIN
  RRP
  RSH
  RTCP
  RTELNET
  RTP
  RTP Audio
  RTP Video
  RTSP
  SAP
  SIP
  SLP
  SMB
  SMTP
  SNA
  SNMP
  SOCKS
  SSH
  Telnet
  TELNET
  TFTP
  WhoIs
  WINS
 Layer 6 Presentation Layer
  NBNS
  NBSSN
  NCP
  NetBIOS
 Layer 5 Session Layer
  LDAP
  LDAPS
  NCP
  NetBEUI
  RPC
 Layer 4 Transport Layer
  H.225
  H.323
  NBDGM
  NetBEUI
  PUP
  SCTP
  TCP
  UDP
 Layer 3 Network Layer
  AARP
  AH
  BGP
  EGP
  EIGRP
  ESP
  GRE
  GTP
  ICMP
  ICMPv6
  IGMP
  IGRP
  IP
  IP Fragment
  IPv6
  IPX
  Mobile IP
  MPLS
  OSPF
  PIM
  PPPoE
  RIP
  RSVP
  STP
  VRRP
 Layer 2 Data Link Layer
  ARP
  CDP
  CGMP
  Ethernet SNAP
  EthernetII
  IEEE 802.2
  IEEE 802.3
  L2TP
  PPP
  PPTP
  RARP
  SQL
  VLAN
 Layer 1 Physical Layer
© 2006 - 2007 Colasoft Co., Ltd. All rights reserved.