Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Border Gateway Protocol
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Extensions negotiation === During the peering handshake, when OPEN messages are exchanged, BGP speakers can negotiate optional capabilities of the session,<ref>{{cite IETF |rfc=2842 |title=Capabilities Advertisement with BGP-4 |author1=R. Chandra |author2=J. Scudder |date=May 2000}}</ref> including [[Multiprotocol BGP|multiprotocol extensions]]<ref>{{cite IETF |rfc=2858 |title=Multiprotocol Extensions for BGP-4 |author=T. Bates |display-authors=etal |date=June 2000}}</ref> and various recovery modes. If the multiprotocol extensions to BGP are negotiated at the time of creation, the BGP speaker can prefix the Network Layer Reachability Information (NLRI) it advertises with an address family prefix. These families include the IPv4 (default), IPv6, IPv4/IPv6 Virtual Private Networks and multicast BGP. Increasingly, BGP is used as a generalized signaling protocol to carry information about routes that may not be part of the global Internet, such as VPNs.<ref>{{cite IETF |rfc=2547 |title=BGP/MPLS VPNs |author1=E. Rosen |author2=Y. Rekhter |date=April 2004}}</ref> In order to make decisions in its operations with peers, a BGP peer uses a simple [[finite-state machine]] (FSM) that consists of six states: Idle; Connect; Active; OpenSent; OpenConfirm; and Established. For each peer-to-peer session, a BGP implementation maintains a state variable that tracks which of these six states the session is in. The BGP defines the messages that each peer should exchange in order to change the session from one state to another. The first state is the Idle state. In the Idle state, BGP initializes all resources, refuses all inbound BGP connection attempts and initiates a TCP connection to the peer. The second state is Connect. In the Connect state, the router waits for the TCP connection to complete and transitions to the OpenSent state if successful. If unsuccessful, it starts the ConnectRetry timer and transitions to the Active state upon expiration. In the Active state, the router resets the ConnectRetry timer to zero and returns to the Connect state. In the OpenSent state, the router sends an Open message and waits for one in return in order to transition to the OpenConfirm state. Keepalive messages are exchanged and, upon successful receipt, the router is placed into the Established state. In the Established state, the router can send and receive: Keepalive; Update; and Notification messages to and from its peer. * '''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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)