BGP - Part 2 (BGP Peers, BGP Sessions, BGP Messages) - :
Content Protection by

BGP Peers, BGP Sessions
and BGP Messages

What is BGP peer?

To use BGP, the neighbourship between the BGP routers must be established. You can use the statement BGP neighbour or BGP peer for this establishment.

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.

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 .

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

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

• Open messages
• Update messages
• Keepaliev messages
• Notification messages

Let’s check these messages briefly.

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

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.

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.

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 – Part 1
BGP – Part 2 (BGP Peers, BGP Sessions, BGP Messages)
BGP – Part 3 (IBGP, IBGP Topologies and EBGP)
BGP – Part 4 (BGP Administrative Distance and BGP Path Attributes)
BGP – Part 5 (Packet Tracer BGP Configuration Example)

About the Author
Gokhan Kosem is a telecommunation and network engineer. His ambition to IP networks and end-to-end system installation made him to prepare this web-site. By sharing his experiences about various networking protocols beside different system installation experiences and Cisco, Juniper, Alcatel-Lucent devices configurations, he is aimed to be helpful for his collegues in all over the world. He is currently lives in Istanbul, Turkey.

Leave a Reply

Copy Protected by Chetan's WP-Copyprotect.