BGP Peers, BGP Sessions, BGP Messages

bgp-ibgp-ebgp

What is BGP peer?

To use BGP, the neighbourship between BGP routers must be established. This is named as BGP neighbourship or BGP peer. In this lesson, we will learn how to build a BGP Session, What is BGP Session Establishment, What are the jused BGP Messages for this process.

 

There are two types of BGP peer. These are iBGP(interior BGP) peer and eBGP(exterior BGP) peer. iBGP peer is the neighbour within the same AS. eBGP peer is the neighbour within another AS.

bgp (border gataway protocol) ibgp (internal BGP) ebgp (external BGP)
BGP, IBGP (Internal BGP) and EBGP (External BGP)
In the topology above, these peering types are showned. As an example, here, router A and router B are iBGP peers. Because they are in the same AS. But router A and Router X are eBGP peers, because they are member of different ASs.

 


To learn how to configure BGP, you can BGP Configuration Lesson.


 

BGP Session Establishment and Session States

Without any connection attemp, the session is firstly in the idle state. With the first TCP message, the state changes to connect.

bgp (border gataway protocol) session establishment
 

BGP Session Establishment
For BGP, firstly TCP connection must be established. This is called three-way handshake. This messages are SYN,SYN-ACK and ACK as you know.

 

After TCP connection, one peer send Open Message and the other peer respond with another Open Message. During this process the state become OpenSent .

 


You can test your BGP Knowledge on BGP Practice Tests Page!


 

Upon receipt of Open Messages, neighbours generates Keepalive Messages. The name of this state which one peer waiting the other for reply keepalive is OpenConfirm.

 

Lastly, after the receiving response keepalive, point-to-point connection is established.And the name of this last state is Established.

 

During this processes, if any IP connectivity problem occurs or any neighbour missconfiguraion or any other problem occurs, the state become Active. Do not think that this word is good for BGP. In BGP world, Active means there is a problem on connection.

 

bgp (border gataway protocol) session states summary
BGP Session States Summary
In BGP process, full routing table are sent to each neighbour after neighbourship. After this time, only incremental updates sent to each neighbour.

 

BGP keeps a version number of the BGP table. The version number changes whenever BGP updates the table with routing information changes.

 

BGP maintains a separate routing table based on shortest AS Path and various other Path Attributes, as opposed to IGP metrics like distance or cost. We will discuss these Path Attributes in the following posts.

 


BGP Messages

We have learned the steps of BGP Session Establishment. Now, let’s learn a little more about BGP Messages used in this mechanims. Before learning BGP Messages and their fields, let’s firsly check the common BGP Header. Below, you can find common BGP header with its fileds.

common-bgp-header-ipcisco

 

BGP has four types of message if we do not include TCP messages. These messages are given below:

  • Open messages
  • Update messages
  • Keepalieve messages
  • Notification messages

 

bgp-messages-ipcisco.com

 

Let’s check these BGP Messages one by one with their fields.

 


 

BGP Open Message

Open Messages are used to create BGP connection. With the Open messages the following values exchanged:

  • AS Number
  • BGP Version
  • BGP Router ID
  • Keepalive
  • Hold Time

bgp-open-message-bgp-messages-2

 


BGP Update Message

Update Messages are used to send routing updates to peers. After the BGP session start, update messages are sent until the complete BGP table has been exchanged. After that at every update message, the BGP route table is updated and the BGP route table version number is incremented by one.

bgp-update-message-bgp-messages-4

 


 

BGP Keepalive Message

Keepalive Messages are to check the availability of the link. This also prevents hold time expire. This message has only BGP header. Keepalive messages are sent every 60 seconds. If no response during 3 keepalive time(hold time), 180 seconds, then it is realized that the connection is lost.

bgp-keepalive-message-bgp-messages-3

 


 

BGP Notification Message

Notification Messages are used when an error detected. After receiving this messages, BGP and TCP connection is closed. Notification messages consist of the BGP header, error code, subcode and the data that describes the error.

bgp-notification-message-bgp-messages-1

Lesson tags: BGP, routing
Back to: CCNP Enterprise 350-401 ENCOR > BGP

Leave a Reply

Your email address will not be published.

IPCisco is the Winner of 2019 “Best Certification Study Journey” Category! We are also Finalist of 2020 & 2021 in Cisco IT Blog Awards!

Cisco-ITBlogAwards-2019-Winner-IPCisco-k
ITBlogAwards_2020_Badge-Finalist-BestCertStudy-ipcisco
ITBlogAwars-2021-ipcisco

CCNP Enterprise 350-401 ENCOR

Collapse
Expand
IPCisco on Social Media!

Latest Blog Posts

global-mobile-data-traffic-2027-2026
14-Ways-To-Study-CCNA-Online
top-ten-network-certifications-ipcisco
metaverse-jobs-ipcisco.com
Wifi-6-vs-wifi-5-ipcisco.com