Home  >  Blog  >   CCNP

BGP Interview Questions

BGP is a protocol that allows autonomous systems on the Internet to share routing and reachability information. This post covers the frequently asked BGP Interview Questions and Answers in detail for basic, intermediate, and advanced BGP professionals.

Rating: 4.7
  
 
458

The Internet's global routing system is based on the BGP (Border Gateway Protocol) protocol. It manages how packets are routed from network to network by exchanging routing and reachability information among edge routers.

We have categorized BGP Interview Questions - 2023 (Updated) into 2 levels they are:

Most Commonly Asked BGP Interview Questions

Frequently requested BGP questions, such as scenario-based BGP interview questions and BGP troubleshooting interview questions and answers, have been addressed in this blog.

BGP Interview Questions and Answers for Freshers

1. What exactly is BGP?

Border Gateway Protocol (BGP) is a protocol that allows two networks to communicate with one other. BGP is a standardized outside gateway protocol that allows autonomous systems (AS) on the Internet to share routing and reachability information. A route vector protocol is what the protocol is called. The Border Gateway Protocol is engaged in fundamental routing choices and determines routing decisions depending on pathways, network regulations, or rule sets a network administrator provides.

Within an autonomous system, BGP may be utilized for routing. Interior Border Gateway Protocol, often known as Internal BGP or iBGP, is used in this application. The protocol's Internet implementation, on the other hand, is known as Exterior Border Gateway Protocol, External BGP, or eBGP.

2. What distinguishes the Border Gateway Protocol (BGP) from other protocols?

  • The Border Gateway Protocol's primary purpose is to allow communication between two autonomous systems.
  • The Border Gateway Protocol supports the Next-Hop Paradigm.
  • There is cooperation among various BGP speakers inside the autonomous system.
  • Information about the path: BGP advertising includes route information and the accessible destination and next destination pair.
  • Numerous characteristics are employed in the BGP routing-decision process.
  • BGP is used to transmit external neighbours amongst autonomous systems.
  • BGP is used by internal neighbours inside the same autonomous system.
  •  It uses weight to change the outbound traffic routing from a single locally configured router.
  • The Border Gateway Protocol can apply policies set up by the administrator. For example, a BGP router can be configured to distinguish between routes known within the autonomous system and outes known from outside the autonomous system.
  • TCP (Transmission Control Protocol) and BGP (Border Gateway Protocol) are used.
  • The Border Gateway Protocol (BGP) is a protocol that helps networks conserve bandwidth.
  • BGP supports Classless Inter-Domain Routing (CIDR).
  • BGP also helps with security.

3. What do you mean by split-horizon in the context of BGP? 

A strategy used by distance vector protocols to prevent network routing loops is the split horizon. The core idea is simple: routing information should never be sent back in the same direction it came from.

A split-horizon is essential because distance vector protocols like Routing Information Protocol (RIP) are prone to routing loops, which occur when a data packet is locked in an unending loop and routed via the same routers over and again. Split horizon is a technique for avoiding loops in protocols. Other protocols, such as Open Shortest Path First, employ various ways to eliminate packet looping. When split horizon is enabled, a router cannot advertise a route back to learn. To put it another way, if a router gets routing information from another router, the first router will not broadcast it back, eliminating routing loops.

If you want to enrich your career and become a professional in CCNP, then enroll in "CCNP Online Training" - This course will help you to achieve excellence in this domain.

4. In the context of BGP, what do you understand by poison reverse?

The Poison Reverse method is a distance-vector routing technique that is commonly utilised. Poison reverse is used to solve the count-to-infinity issue. Poison reverse is the inverse of the split horizon, to put it another way. Route advertising that would be silenced by split horizon is instead advertised with poison reverse at a distance of infinity. Poison reverse is based on the RIP (Routing Information Protocol).

Routers do not immediately erase erroneous path information from the routing database; instead, they broadcast a hop-count of 16, an unreachable metric value. This enhances the routing table's size while also assisting in the reduction of loops. It can immediately break any loop between neighbouring routers. Poison reverse's primary goal is to prevent a path from returning to the same node if the network's cost has changed.

5. What are the many sorts of Timers available in BGP?

The following are the many types of Timers found in BGP:

Keep-Alive Timer: This is the heartbeat timer. A local neighbour periodically sends a BGP heartbeat packet to a distant neighbour to monitor reachability and availability. This interval is set to '30' seconds by default.

Hold down timer: This is the amount of time the local neighbour must wait before declaring the far neighbour unavailable. This interval is set at "90" seconds by default, three times the Keep-Alive Interval.

In other words, if a local neighbour misses three Keep-Alive packets in a row from a remote neighbour, the local neighbour considers the remote neighbour unavailable and changes the neighbourship's status and removes all associated routes advertised by the neighbour from the routing table/BGP table—the BGP neighbour status changes before and after the hold-down timeout end. By default, the hold-down period is set to 90 seconds, after which the local neighbour proceeds through stages such as 'idle,' 'connect,' and 'functional.' After a few seconds, the status changes to 'Idle,' then to 'Connect,' then to 'Active,' after 10 seconds.

The Advertisement Interval timer is a timer that defines how much time must pass between the time a route is advertised and the time it is deleted from a BGP Peer. The default is 30 seconds for eBGP peers and 5 seconds for iBGP peers. On a per-neighbour basis, this can be changed.

MindMajix Youtube Channel

6. Mention some of the well-known characteristics of the BGP metric?

The values of the following characteristics are used to choose BGP paths:

  • Weight
  • Local Preference (highest local value will be preferred, the default value is 100)
  • Originate
  • AS path length
  • Origin code
  • Multi-Exit Discriminator (MED)
  • eBGP path over iBGP path
  • Shortest IGP path to BGP next-hop
  • Oldest path
  • Router ID
  • Neighbor IP address.

7. What are the different BGP Path Attributes?

BGP provides several Path Attributes that may be used to evaluate competing BGP paths (routes) in the BGP table to find the optimum path (route).

Some BGP Path Attributes are as follows:

  • Next Hop: The Following Hop, The IP address of the prefix's next hop, is displayed using Path Attributes. It decides whether or not the Next Hop may be completed. If no alternative route can reach Next Hop, the router does not use this one.
  • When you get updates from a router, the weight Path Attributes is a numeric number that the router gives you to influence the route for a prefix. It isn't well-known among BGP colleagues, favouring larger weights favoured.
  • Local Preference is also a set of numeric values. It's sent within a single autonomous system so that all routers in that system May figure out the best path to a particular network. It is preferable if the value is more significant.
  • Locally injected routes are routes injected with the network command. These are better than iBGP/eBGP.
  • The Multi-Exit Discriminator (MED) is a device that allows one autonomous system to notify another autonomous system about the best path to follow for packet forwarding. The more compact, the better.
  • The AS-Path specifies the ASNs (Autonomous System Numbers) in the AS Path. The more compact, the better.

8. In the context of BGP, how do you interpret communities?

A BGP community is an optional transitive BGP attribute recognised and communicated between BGP peers. A BGP community is added to BGP routes sent between two BGP peers.

A community is made up of two 16-bit portions of a 32-bit integer. The first 16 bits contain the AS number for the community, while the next 16 bits constitute a unique number assigned by the AS. Because each AS number is unique, each online community is also unique. This means that an AS with the ASN 9999 (or 0x270F in hex) might have communities ranging from 0x270F0000 to 0x270FFFFF.

9. Describe the BGP path selection criteria?

BGP aims to minimise the number of potential pathways to only one optimal path; by default, it does not load balance. To do so, it examines the path attributes of every loop-free, synchronised (if synchronisation is enabled) route with an available next-hop:

  • Choose the path with the highest weight.
  • If no weight is supplied, use the route with the highest Local Preference.
  • Pick routes that started with this router.
  • The shortest Autonomous System path should be chosen.
  • Choose the path with the lowest origin code (I, followed by e, and finally?).
  • If the available routes are advertised by the exact Autonomous System, pick the one with the lowest MED.
  • Instead of taking an IBGP route, use an EBGP route.
  • Select the path that takes you via the IGP neighbour with the lowest IGP metric.
  • Choose the oldest path.
  • The way that runs through the neighbour with the shortest router ID is the best choice.
  • Choose the path that includes the neighbour with the minor IP address.

10. What are the various loop prevention mechanisms found in BGP?

The following are the various loop avoidance strategies used in BGP:

  • When one iBGP peer provides routes, the router does not publish the identical routes to another iBGP peer.
  • When using AS-PATH, you may accomplish the following: When we advertise to an eBGP peer, a BGP router adds its own ASN to the AS-PATH. The route is disregarded when a BGP router receives an update, and the route announcement contains an AS-PATH with its ASN.

11. What is the best way to configure BGP with a loopback address?

  • A loopback interface assures that the neighbor remains up and running despite any hardware failures.
  • When establishing a BGP peering session, BGP defaults to using the IP address specified on the physical interface immediately linked to the BGP peer as the source address. To modify this behavior, use the neighbour IP address> update-source interface> command and configure the BGP that talks to the router to create peering with a loopback address as the source address.

12. What are the different communities, and why are they used?

Other four well-known communities can be mentioned by name:

  • No-export– prohibits the route from being broadcast to eBGP peers outside of the local AS.
  • No-advertise: This option prohibits the route from being advertised to internal or external peers.
  • The route may be publicised outside of the local AS via the Internet.
  • Local-AS – restricts the route from being broadcast to eBGP or confederate peers outside the local AS.

13. Is it possible to tune the BGP ConnectRetry timer? What is the default BGP ConnectRetry timer?

The BGP ConnectRetry timeout is set to 120 seconds by default. The BGP procedure checks to determine if the passive TCP session is formed only after this time has passed. If the passive TCP session fails, the BGP process initiates a new active TCP connection attempt with the distant BGP speaker. The remote BGP peer can establish a BGP session during the ConnectRetry timer's idle 120 seconds. The Cisco IOS ConnectRetry timeout cannot be adjusted from its default setting of 120 seconds.

14. Distinguish between OSPF (Open Shortest Path First) and BGP (Border Gateway Protocol) (BGP)?

Border Gateway Protocol (BGP) Open Shortest Path First (OSPF)
The BGP protocol is a sluggish concurrency protocol.OSPF is a short concurrency protocol.
It employs a mesh topology or design in some way.OSPF is a hierarchical network architecture or design.
An external gateway protocol is what it's called.Another term for it is internal gateway protocol.
BGP implementation is complex.OSPF is a simple protocol to implement
It uses port 179 for communication.It establishes a connection with port 89.
In this case, the Transmission Control Protocol is used.OSPF makes use of the internet protocol.
BGP is a kind of Vector State.OSPF is a Link State protocol.
In this scenario, the best route algorithm is used.OSPF makes use of the Dijkstra algorithm.

BGP Interview Questions and Answers for Experienced

15. How much Memory should my router have to get my ISP's whole BGP routing table?

The amount of Memory needed to hold BGP routes is determined by various parameters, including the router, the number of alternate pathways accessible, route dampening, community, the number of full paths defined, BGP characteristics, and VPN configurations. It's impossible to estimate the amount of RAM needed to keep a specific number of BGP routes without knowing these factors.

To store a whole global BGP routing table from one BGP peer, Cisco typically recommends a router with at least 512 MB of RAM. However, it's critical to comprehend how to save Memory and accomplish effective routing without acquiring the entire Internet routing table.

16. Do iBGP (internal BGP) sessions change the next hop?

The next-hop property learnt from eBGP peers is preserved in iBGP sessions. This is why having an internal route to the next hop is critical. Otherwise, the BGP route is inaccessible. Include the network that the next hop belongs to in the IGP or use the next-hop-self neighbor command to compel the router to promote itself as the next hop rather than the external peer.

17. What is the BGP AD value?

Administrative Distance (AD) is a metric used by routers to determine the optimum path.

When there are two or more distinct routes to the same destination from two different routing protocols, it assists the router in selecting the optimum way.

The AD value is used to rate routes in Preference, from most desired to least liked.

The AD value for the most-preferred route is the lowest, while the AD value for the least-preferred route is the highest.

18. What are the different LSA types?

OSPF uses link State Advertisement (LSA) to communicate for the Internet Protocol (IP). OSPF makes use of a Link State Database (LSDB), which is filled with LSA.

LSAs in OSPF come in a variety of shapes and sizes. Here are several examples:

  • LSA Type 1:            Router LSA

This LSA contains a list of all of this router's directly linked connections. These routers are always kept inside the confines of the region.

  • LSA Type 2:            Network LSA

This LSA is designed for use in multi-access networks. DR creates network LSAs.

  • LSA Type 3:            Summary LSA

The ABR is in charge of creating the summary LSA. As a result, ABR will provide a summary of ASBR LSA. It will be made up of the ASBR's router ID.

  • LSA Type 4:            Summary ASBR LSA

The ASBR LSA contains the ASBR's router ID in the link-state routing field. It facilitates the discovery of ASBR by other routers.

  • LSA Type 5:            Autonomous system external LSA

The external ASBR is responsible for generating these.

  • LSA Type 6:            Multicast OSPF LSA

It is neither used nor supported.

  • LSA Type 7:            Not-so-stubby area LSA

It's also known as NSSA LSA (not-so-stubby LSA). External Type 5 LSAs are not permitted in NSSAs. You can allow them to use LSA Type 7.

  • LSA Type 8:            External attribute LSA for BGP

19. What does the next hop of 0.0.0.0 mean in the show IP BGP command output?

A network in the BGP table with the following hop address of 0.0.0.0 indicates that the network was created locally through IGP redistribution into BGP or by a network or aggregation command in the BGP setup.

20. What is synchronization, and how does it affect the IP routing table's BGP routes?

If your AS is responsible for routing traffic from another AS to a third AS, BGP should not announce a route until all routers in your AS have learned about it through IGP. BGP waits for the route to propagate within the AS before advertising it to external peers. If a BGP router with synchronization enabled cannot validate iBGP learnt routes in its IGP, it does not install them into its routing table.

To disable synchronization, issue the no synchronization command under router BGP. BGP cannot validate iBGP routes in IGP due to this.

21. What Exactly is IS-IS?

  • Intermediate system to Intermediate system is abbreviated as IS-IS.
  • It is a protocol for managing routing in Connectionless Network Protocol (CLNP) networks that ISO created as part of the OSI protocol stack.
  • The derivation of the original IS-IS, which was created to support the IP protocol, is Integrated IS-IS.
  • IS-IS offers the same fundamental capabilities as OSPF as a link-state routing protocol, including link-state advertising, which sends link status information throughout the network, allowing routers to have a current image of network topology. VLSM (Variable Length Subnet Masking) is another option.

22. What is the meaning of the term "keepalive"?

It's used to maintain track of BGP neighbors and detect inactive neighbors. Only the packet header appears in keepalive messages (19 octets in length). Keepalive messages are not delivered when the frequency of sending them is set to 0.

23. What Exactly is DUAL?

The acronym DUAL refers to the Diffusing Update Algorithm. EIGRP uses the DUAL to determine the optimal routes to a destination. It allows for classless routing. As a result, subnet mask information will be included in EIGRP routing updates. This enables discontinuous networks and variable-length subnet masks (VLSM).

24. What Exactly is EGP?

Exterior Gateway Protocol (EGP) stands for "Exterior Gateway Protocol." It's one of the protocols for exchanging data between gateway hosts in autonomous systems close to one another.

25. What is the EIGRP protocol?

EIGRP stands for Enhanced Interior Gateway Routing Protocol and is a distance vector routing protocol for IP, AppleTalk, and NetWare networks.

26.  What are the many sorts of self-contained systems?

Autonomous systems may be divided into three categories:

  1. A multi-homed AS links to two or more ASes to keep its Internet connection if one of them goes down.
  2. A stub AS has just one other AS connected to it, yet it may have private connections that are not accessible to the rest of the Internet.
  3. A transit AS serves as a connection between two or more other ASes, enabling data from unrelated networks to travel through. ISPS, for example, provide access to other networks and the Internet via transit AS to their customers and their customers' networks.

27. What is BGP MED, and how does it work?

The goal of MED is to control how other autonomous systems enter your AS to reach a specific prefix. BGP MED is a network attribute that is only propagated to adjacent ASs rather than the entire network. The lower the MED, the more likely the path is to be chosen.

28. What is the BGP Weight Attribute?

When there are many routes to the same destination, the weight attribute is a Cisco proprietary attribute employed in the path selection process. It is preferable to take the path with the more excellent weight value. Weight is set to 0 by default. Weight is a router-specific property that is not propagated to BGP peers. When a router receives updates, it sets the weight property, influencing its prefix route.

29. What is recursive lookup, and how does it work?

To reach a location in the distant AS, the router searches for the BGP route and the next hop. The router then searches up the path to the next hop. The technique is called recursive lookup since the router must execute lookup twice to reach a destination.

30. What is the local preference of BGP?

Local preference informs the AS which path prefers exiting the AS to access a particular network. A path with a stronger liking for the local environment is desired more. Local preference is set to 100 by default and may be modified manually. Unlike the weight parameter, which is only relevant to local routers, the local preference attribute is conveyed throughout an AS to determine the optimum exit path decision.

Conclusion

We've addressed the most frequently asked interview questions about Border Gateway Protocol in this post (BGP). We hope the information will be more helpful for clearing BGP interviews.

Join our newsletter
inbox

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
NameDates
CCNP TrainingApr 20 to May 05View Details
CCNP TrainingApr 23 to May 08View Details
CCNP TrainingApr 27 to May 12View Details
CCNP TrainingApr 30 to May 15View Details
Last updated: 04 Apr 2023
About Author

 

Madhuri is a Senior Content Creator at MindMajix. She has written about a range of different topics on various technologies, which include, Splunk, Tensorflow, Selenium, and CEH. She spends most of her time researching on technology, and startups. Connect with her via LinkedIn and Twitter .

read more