PyNet Labs- Network Automation Specialists

Top 10 Most Asked BGP Interview Questions and Answers

Last Updated : June 9, 2022
BGP Interview Questions and Answers

BGP stands for Border Gateway Protocol. It is a common EGP (exterior gateway protocol) that is designed to transfer information on reachability and routing between autonomous systems (AS) via the Internet. This protocol is one of the favourite topics of interviewers. Hence, we came up with the top BGP interview questions and answers to help everyone with their interviews. 

Here are the top 10 BGP Interview questions and answers. If you are looking for BGP Interview questions and answers PDF, then you can skip directly to the end of this blog. 

BGP Interview Questions and Answers

Question 1 – What is BGP Protocol? 

Answer - BGP can be described as a path-vector routing method that makes routing decisions based upon paths and network policies or rules set by the network administrator. 

Interior Border Gateway Protocol otherwise known as Internal BGP or iBGP is when BGP is used for routing within an autonomous system. Whereas, External BGP or eBGP is the internet application of the BGP. 

Watch this video for more information on BGP.

Question 2 - What are the features of BGP? 

Answer – Some of the best features of BGP are as follows: 

  • It is Open standard Path-vector protocol. 
  • It is a classless routing protocol. 
  • It uses the Path vector algorithm. 
  • Administrative distance for eBGP is 20, iBGP-200 
  • It is employed to exchange router information between autonomous system. 
  • The hello timer for BGP is 60 sec whereas the hold on timer is 180 sec. 
  • TCP port number 179 is used by BGP.

Question 3 - What is the difference between eBGP & iBGP neighbors? 

Answer - The major difference between eBGP and iBGP neighbors is: 

  • The routers within the same AS (autonomous system) forms an iBGP neighborship. 
  • The routers in different AS (autonomous system) forms an eBGP neighborship. 

Question 4 - Can Router on different subnet become BGP Neighbors? 

Answer – It is not an essential condition for BGP that neighbors need to be attached to the same subnet. In fact, a TCP connection between the routers is applied by BGP to pass the BGP message. This allows routers to be anywhere. 

So, yes routers on different subnets can become BGP neighbors. 

Question 5 - What is the Loop prevention mechanism in BGP? 

Answer - Two mechanisms are used by BGP to prevent loops: 

1. When an iBGP peer provides a route to a router, the same route is not shared with any another iBGP peer by that router. 

2. Using AS_PATH - A BGP router adds its own ASN to the AS_PATH when it advertises to an eBGP peer. A route gets ignored if BGP router receives an update where router advertisement lists it an AS_PATH with its own ASN. 

Note: ASN is not added by the BGP router when it is advertising to an iBGP peer. 

Question 6 - What is the difference between the hard reset and soft rest in BGP? 

Answer -  

Hard Reset – The local router, in case of hard reset will bring down: 

  • The neighborship 
  • The underlying TCP Connection 
  • All the BGP table 

In hard reset, it also removes the entire learning from the neighbor and the command used for hard reset is #clear ip bgp

Soft Reset – In a soft reset event, the router will not drop the BGP neighborship or the TCP connection. In this reset, the local router will resend all the outgoing updates and processes the incoming updates again. 

It will also readjust the BGP table on the current configuration. The command used for soft reset is #clear ip bgp * soft. 

Question 7 - What are different BGP Message Types? 

Answer – Different BGP message types are as follows: 

  • Open - Open message is utilized to establish a neighbor connection and to establish exchange parameter, such as the autonomous system number as well as the authentication value. 
  • Keepalive - These messages are periodically sent (every 60 seconds, by default) to make sure that the remote server is in operation. If a router doesn't receive a KEEPALIVE from the peer for a Hold-time interval (by default, it is 180 seconds) the router will announce that the peer is dead. 
  • Update - It is used to exchange Path Attributes as well as the length/prefix (NLRI) which use these characteristics. 
  • Notification – It is utilized to inform of BGP error. This causes a reset of the neighbour relationship. 

Question 8 – What are the different states of BGP? 

BGP Interview questions and answers

Answer – Here are the various states of BGP: 

  • Idle – It is the initial state of BGP. 
  • Connect – If the TCP connection gets completed, the BGP process will continue to the Open Sent State whereas, if it fails, it will go to the active state. 
  • Active – BGP will again try TCP three-way handshake in order to establish a connection with remote BGP neighbor. It will move to the Open Sent State if it is successful. 
  • Open sent – When the BGP has established the TCP connection and has sent an OPEN Message. It awaits a reply of the OPEN Message. If it receives the message, a KEEPALIVE message will be sent by the BGP peer. 
  • Open confirm - BGP waits for a reply of the KEEPALIVE message. 
  • Established – At this state, all the neighbor parameters have matches, the relationship between neighbors have been established and update message can now be exchanged between the peers. 

Question 9 - Explain BGP Path Attributes? 

Answer - Various attributes are used by BGP to determine the best path to a destination. 

  1. Next Hop – It is used to list the next-hop IP address that can be used to reach the prefix. The router can’t use this router if no route is available to reach the next-hop. 
  1. Weight – It is used to give advantage to the path with the highest weight. It is locally significant to the router and is Cisco proprietary. 
  1. Local Preference – It is used to give advantage to the path with highest local preference. It is used within an AS and exchanged between iBGP routers. Default is set to 100. 
  1. Locally injected routes - Routes that are injected using network command are called Locally injected routes. These routes are better than iBGP/eBGP learned. 
  1. AS Path - It is applied to outbound routes. It helps in deciding the best inbound path. With the AS-Path attribute, two things can be accomplished that are: prepend or filter. Smaller is preferred. 
  1. Origin - This attribute is used to identify the originating source of the route. The origin codes are as follows (listed in order of preference for route selection): 
  • i (IGP) – It is emerged from an IGP (interior gateway protocol), such as OSPF. This usually indicates that network command under the BGP process was used to inject the route into BGP. An origin code that has "i" is most desired. 
  • e (EGP) – It is originated from an EGP (external gateway protocol). 
  • ? (incomplete) - It means the origin of it is Unknown. This specifies that the route was redistributed into BGP from either connected, static, or IGP routes. An origin code that has "?" is the least desired. 
  1. Multi-Exit Discriminator (MED) - This attribute is applied to the outbound routes. It finds the best inbound path into the AS. When viewing the BGP routing table, MED is seen as the BGP metric. 

By default, the MED value is 0 and a smaller/lower value is preferred. 

  1. Neighbour type – In this, the eBGP is preferred over iBGP 
  1. IGP metric – With this attribute, the route with nearest IGP neighbour (lowest IGP metric) is preferred. 
  1.  eBGP route – The Oldest route is preferred. 
  1. Neighbour Router ID - Lowest is preferred. 
  1. Neighbour IP Address - Lowest is preferred. 

Question 10 - What is BGP Local preference? 

Answer - The BGP local preference attribute is the second attribute. It is used in an AS to select the exit route from a local perspective. By default, its value is set to 100 and the path having highest local preference becomes more desired. This attribute is not shared between routers. 

BGP Interview Questions and Answers PDF

If you are looking for a PDF with more BGP interview questions and answers, or a complete list of CCNA Interview questions and answers then check out our other blogs.

CCNA Interview questions and answers, 

SD-WAN Interview Questions and Answers

BGP is an important part of our CCNA course if you focus on learning CCNA. You can go to our official CCNA course page by clicking here. We hope you like this blog; subscribe to our free newsletter for more interview questions. 

We would love to hear from you, so do comment your feedback/suggestions. 

Leave a Reply

Your email address will not be published. Required fields are marked *

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram