BGP neighbor adjacency – Sass Learns https://sassenachlearns.com/ Thu, 08 Jun 2023 22:06:32 +0000 en-US hourly 1 https://wordpress.org/?v=6.2.2 BGP Neighbor Adjacency States: From IDLE to ESTABLISHED https://sassenachlearns.com/2017/11/10/bgp-neighbor-adjacency-states-from-idle-to-established/ https://sassenachlearns.com/2017/11/10/bgp-neighbor-adjacency-states-from-idle-to-established/#respond Fri, 10 Nov 2017 13:42:00 +0000 https://sassenachlearns.com/?p=70 BGP requires manual configuration of neighbors. Once neighbors are manually configured, it goes through 6 states until it is fully established. Knowing these states would help us determine the stage our connection is currently in. It is also very important in troubleshooting as it helps us understand what went wrong during adjacency.

BGP Neighbor Adjacency States:

1. IDLE – This is normally can be seen if BGP is down / administratively down or just waiting for the next attempt. At this stage, no BGP incoming sessions are permitted.

My BGP is established between Culloden and Stirling sites and Culloden and Fyvie sites. But when I shut down s2/2 link between Culloden and Fyvie, my BGP went to IDLE state.

Culloden(config)#int s2/2
Culloden(config-if)#shut
Culloden(config-if)#end

2. CONNECT – This is when BGP starts to do the TCP connection (TCP three-way handshake). Either of the BGP neighbors will initiate the BGP session. Once completed, it jumps towards the OPENSENT state. However, if there is a problem, it goes to ACTIVE state.

3. ACTIVE – At this stage, TCP connection is completed but no BGP messages have been sent to the BGP neighbor yet. There are many reasons why BGP is stuck in ACTIVE state. Usually, there are configuration issues that stop the BGP connection from getting established. It can be a wrong AS, misconfigured local IP / peer IP address, authentication issues, and others.

OPENSENT – BGP Open message is already been sent to the peer but not yet received to the other end. You won’t usually see BGP stuck in OPENSENT state. It will immediately toggle to OPENCONFIRM state and ESTABLISHED states.

5. OPENCONFIRM – BGP Open message and keepalive has been sent and received. It won’t take long until it goes to the ESTABLISHED state.

6. ESTABLISHED – Once all the BGP requirements of establishing neighbor adjacency are met, it goes to the ESTABLISHED state. You will see prefixes Once adjacency is established between BGP neighbors, they are going to start exchanging routing information.

Putting back my s2/2 link up, makes my BGP back to ESTABLISHED state:

Culloden(config)#int s2/2
Culloden(config-if)#no shut
Culloden(config-if)#end
Culloden#

]]>
https://sassenachlearns.com/2017/11/10/bgp-neighbor-adjacency-states-from-idle-to-established/feed/ 0
The Internet Protocol: Border Gateway Protocol (BGP) Overview https://sassenachlearns.com/2017/10/31/the-internet-protocol-border-gateway-protocol-bgp-overview/ https://sassenachlearns.com/2017/10/31/the-internet-protocol-border-gateway-protocol-bgp-overview/#respond Tue, 31 Oct 2017 22:05:00 +0000 https://sassenachlearns.com/?p=134 Border Gateway Protocol (BGP) is an exterior gateway protocol used on the internet and ISPs to exchange routing and reachability information. BGP is a layer 4 path vector routing protocol that uses port 179. It is the only EGP that is still in use today. The current BGP version is BGPv4 which was published as RFC 4271 in 2006.

Unlike other IGPs (OSPFEIGRP, or RIP), BGP has many metrics or attributes in choosing the best path in the network. These attributes are for path manipulation. We will check it one by one as those attributes influence either inbound or outbound traffic.

BGP is further classified into two: eBGP and iBGP. When peers that run BGP within the same AS, it is called iBGP (Internal Border Gateway Protocol) and peers that run BGP session in different AS, it is called eBGP (External Border Gateway Protocol). The iBGP and eBGP differ on how routes are propagated in other peers. Routes learned from an iBGP peer will never be learned or advertised to another iBGP peer because of a “Split Horizon Rule.” In order for a route to be learned from an iBGP neighbor, it must be first known via IGP. This is called the “Synchronization Rule.” This will be later explained as we progress to Split Horizon Rule solutions.

BGP is the slowest routing protocol but being the slowest makes it a perfect routing protocol on the internet. The 3 minute convergence time is designed that way in order to prevent constant link flap. Now, you might be thinking why do we have to use BGP. Aside from the fact that it is a slow protocol, EIGRP and OSPF can also do the routing of the traffic to the internet. I think the better question here is when to use BGP. It doesn’t make sense if we are going to use BGP if we have only one or a single connection to the ISP. There is only one exit path so a default route can do the job. This is called a single-homed connection. But what if we have a dual multihomed design, which means dual connections (dual links) to two different ISPs, then BGP is far more useful than IGP. BGP attributes can be configured to better manipulate the path to the destination.

BGP RELATED TOPICS:

  1. BGP Path Attributes Types
  2. AS Number Range
  3. BGP Neighbor States
  4. BGP Message Types
  5. BGP Attributes
  6. BGP Next-Hop-Self
  7. BGP Communities
  8. BGP Multipath
  9. BGP Route Reflector

BGP CONFIGURATION / LABS

  1. Basic BGP Configuration
  2. Configuring iBGP and eBGP
  3. BGP Confederation
  4. eBGP Multihop
  5. Redistributing OSPF into BGP
  6. BGP AS Path Attribute
  7. BGP Local Preference
  8. BGP MED
  9. BGP Authentication

]]>
https://sassenachlearns.com/2017/10/31/the-internet-protocol-border-gateway-protocol-bgp-overview/feed/ 0