Border Gateway Protocol (BGP) is one of the core routing protocols used to route traffic across the Internet. It is an essential protocol for network engineers and administrators to understand.
In this comprehensive guide, we will cover 100 common BGP interview questions and answers to help you prepare for a technical interview or exam.
BGP Interview Questions and Answers
Let’s start with the BGP basics.
Interview Question Related to BGP Basics
1. What is BGP, and why is it important?
BGP (Border Gateway Protocol) is the routing protocol used for exchanging routing information between autonomous systems (AS) on the Internet. BGP allows routers in different AS to share network reachability information and choose the best path for routing traffic. This makes BGP critical for routing traffic across the global Internet.
2. What are the different types of BGP?
The two main types of BGP are:
- External BGP (eBGP) – Used for routing between different autonomous systems.
- Internal BGP (iBGP) – Used for routing within an autonomous system.
3. What is an Autonomous System Number (ASN)?
An ASN is a unique identifier assigned to an autonomous system (AS). ASNs allow BGP routers to distinguish between different networks and routing policies. Public ASNs are assigned by regional Internet registries like ARIN, while private ASNs can be used internally within an organization.
4. What is a BGP neighbor and peering?
A BGP neighbor is another BGP router with which the local router establishes a TCP connection to exchange routing information. This connection between BGP routers is called a BGP peering. Neighbors are configured manually and must be directly connected.
5. Explain the BGP neighbor states.
The different BGP neighbor states are:
- Idle – No connection exists.
- Connect – TCP connection is established.
- Active – Trying to start BGP peering.
- OpenSent – Open message sent to neighbor.
- OpenConfirm – Keepalive message received from neighbor.
- Established – Peering session established.
Interview Questions Related to BGP Route Advertisement
6. What is the Network Layer Reachability Information (NLRI)?
NLRI is the core BGP route advertisement. It contains the destination network prefix, prefix length, and next hop attributes. BGP routers send NLRI updates to advertise networks to neighbors.
7. What are the different address families supported by BGP?
The main address families are:
- IPv4 Unicast – Advertises IPv4 prefixes
- IPv6 Unicast – Advertises IPv6 prefixes
- VPNv4 – Used for MPLS/IP VPN networks
- VPNv6 – Used for IPv6 MPLS/IP VPNs
- EVPN – Ethernet VPN for data center interconnect
8. What is route aggregation and why is it used?
Route aggregation combines multiple specific routes into a single summary route advertisement. This reduces the number of routes in global BGP routing tables.
9. What is AS_PATH attribute and how is it used?
The AS_PATH attribute contains the list of ASNs that a route advertisement has traversed. This is used to prevent routing loops and enforce routing policies.
10. What are the different BGP path attributes?
The main BGP path attributes are:
- AS_PATH – Lists ASNs a route has traversed
- NEXT_HOP – Specifies next hop IP address
- LOCAL_PREF – Local preference value for route selection
- MED – Multi-Exit Discriminator for preferred route
- ORIGIN – Origin of route (IGP, EGP, Incomplete)
- COMMUNITY – Optional transitive attribute for routing policies
Interview Questions Related to BGP Route Selection
11. Explain the BGP decision process for selecting best routes.
The BGP decision process is:
- Highest LOCAL_PREF
- Lowest AS_PATH length
- Lowest ORIGIN type
- Lowest MED
- eBGP over iBGP paths
- Lowest IGP cost to BGP next hop
- Lowest router ID
- Shortest cluster list length
- Lowest neighbor address
12. How does LOCAL_PREF influence BGP route selection?
LOCAL_PREF is the first attribute considered in the BGP best path selection. It is used to prefer exit points from the local AS. Routes with higher LOCAL_PREF are preferred.
13. When would the MED attribute be used?
MED (Multi-Exit Discriminator) is used to select the best entry point into a neighboring AS. A lower MED value is preferred over a higher MED value. MED is only compared between routes from the same AS.
14. What is hot potato routing in BGP?
Hot potato routing refers to selecting the closest eBGP exit point based on lowest IGP cost. This minimizes the AS from having to carry transit traffic (the hot potato).
15. What is the difference between weight and LOCAL_PREF?
Weight and LOCAL_PREF both influence route preference locally, but weight is a Cisco-proprietary attribute while LOCAL_PREF is a standard BGP attribute. Weight is only used locally while LOCAL_PREF is sent to iBGP peers.
Interview Questions Related to BGP Configuration
16. What are the main BGP configuration steps?
The core BGP configuration involves:
- Enabling BGP routing process
- Defining BGP neighbors
- Establishing BGP peerings
- Advertising networks via NLRI updates
- Applying routing policies like filtering and attributes
17. How do you configure a BGP neighbor?
The main commands are:
router bgp <ASN> neighbor <IP> remote-as <ASN>
This defines a BGP neighbor with the specified IP address and ASN.
18. What BGP timers can be configured?
The main BGP timers that can configured are:
- Keepalive timer – Frequency of keepalive messages
- Hold timer – Maximum time to receive keepalive before declaring neighbor down
- Minimum route advertisement interval timer (MRAI) – Minimum time between route updates
19. What is a BGP peer group and what are the advantages?
A peer group allows grouping neighbors with the same update policies to simplify configuration. Peer group policies automatically apply to members instead of configuring each neighbor individually.
20. What are BGP route maps and how are they used?
Route maps allow applying policies like filtering and attributes to specific routes when advertising/receiving updates to/from neighbors. Route maps provide granular control over inbound and outbound policies.
Interview Questions Related to BGP Scaling Techniques
21. What is route reflector and how does it help scale iBGP?
Route reflector (RR) is a method to avoid having full iBGP mesh. RRs receive routes from clients and reflect them to other clients. This removes the need for all iBGP routers to be fully meshed.
22. What are BGP confederations and how do they help?
Confederations divide an AS into multiple sub-ASs. The sub-ASs form eBGP connections while maintaining iBGP within each sub-AS. This reduces the iBGP mesh.
23. What is AS path prepending and when is it used?
AS path prepending adds the local ASN multiple times to manipulate AS_PATH length. This can be used to make a route less preferred for traffic engineering.
24. What are the different types of route reflection topologies?
Route reflector topologies include:
- Full mesh of route reflectors
- Hierarchical route reflectors
- Clustered route reflectors
25. What is the purpose of BGP synchronization?
BGP synchronization ensures that an IGP route exists for the BGP next hop before using that route. This prevents black holes but increases convergence time. It is disabled by default.
Interview Questions Related to BGP Tuning and Troubleshooting
26. How does multi-path BGP routing help improve network performance?
BGP multi-path allows load balancing traffic across multiple equal-cost paths. This improves bandwidth utilization and redundancy.
27. What causes BGP route flapping and how can it be reduced?
Frequent route withdrawals/advertisements due to an unstable link can cause route flapping. Methods like route flap damping, hold timers, and tuning BGP timers help minimize flapping.
28. What are some common causes of a BGP neighbor not establishing?
Common causes include:
- Mismatched ASNs
- Access list blocking TCP 179
- Wrong BGP version
- Authentication failure
- Incompatible parameters between neighbors
- Physical link problem
Checkout our BGP troubleshooting guide.
29. How does BGP handle a network becoming unreachable?
BGP will advertise the network prefix with a maximum AS_PATH in order to make it least preferred. This is called a BGP poison reverse update.
30. What tools can be used to analyze and troubleshoot BGP issues?
Useful tools include:
- show ip bgp – View BGP routes and attributes
- show ip bgp neighbors – Verify neighbor state and prefixes
- Traceroute – Verify forwarding path
- BGP monitoring tools like MRTG
- Debugging commands like debug ip bgp
Interview Questions Related to BGP Design and Architecture
31. What are the different roles an ISP may play in Internet routing?
- Tier 1 ISP – Participates in default-free routing
- Tier 2 ISP – Pays for transit from Tier 1s
- Stub AS – Only originates own prefixes
- Content provider – Provides content networks
- Internet exchange point (IXP) – Peering fabric for ISPs
32. What factors influence hot potato routing?
- IGP metrics to egress points
- Traffic engineering requirements
- Capacity of egress links
- Commercial agreements between ISPs
33. What are the tradeoffs between a full BGP mesh vs. route reflectors?
Full mesh minimizes hop count but does not scale. Route reflectors require hop count tuning but eliminate full mesh scaling issues.
34. What are the advantages of using BGP confederations?
- Reduces iBGP mesh within each sub-AS
- Summarization of routes between sub-ASs
- Adds AS_CONFED attributes to prevent loops
35. When would you use eBGP multihop?
eBGP multihop allows establishing neighborship with non-directly connected peers, avoiding the need for back-to-back IGP links between points.
36. What are the scaling advantages of using 4-byte ASNs?
4-byte ASNs provide increased ASN allocation space, supporting over 4 billion ASNs. This removes previous 2-byte ASN limitation.
37. How does MD5 authentication work with BGP neighbors?
MD5 authentication uses a shared password that is used to generate a 128-bit MD5 hash. This hash is included in TCP packets to validate the sender.
38. What are some methods to protect against unauthorized BGP route advertisements?
- Infrastructure ACLs to permit only authorized prefixes
- Prefix filtering using route maps
- AS_PATH access lists to filter untrusted routes
- BGP TTL security to only allow directly connected eBGP peers
39. What considerations should be made when using route aggregation?
- Summarized routes hide instability in specific prefixes
- Can lead to suboptimal routing if aggregates are too large
- Careful design needed to maximize aggregation benefits
40. How does communities attribute support security?
Communities allow tagging routes to mark special handling requirements. Can be used to group prefixes for security controls like filtering.
Interview Questions Related to BGP and MPLS VPNs
41. What is MPLS and what benefits does it provide?
MPLS (Multi-Protocol Label Switching) provides connection-oriented switching over IP networks. Benefits include traffic engineering, QoS, and VPN capabilities.
42. Explain how MPLS VPNs use BGP.
MPLS VPNs use BGP to distribute VPN customer routes between provider edge (PE) routers using the VPNv4 address family. This allows building Layer 3 VPNs.
43. What is a route distinguisher in MPLS VPNs?
A route distinguisher (RD) is used to create a globally unique VPNv4 prefix to distinguish customer prefixes from different VPNs.
44. What is a route target used for in MPLS VPNs?
Route targets (RTs) control distribution of VPN routes between PE routers. Routing/forwarding tables are built by importing/exporting routes based on RTs.
45. What are the benefits of MPLS VPNs over traditional VPN technologies?
Benefits include end-to-end QoS, built-in traffic engineering, service provider managed backbone, and network scalability.
Interview Questions Related to BGP Optimization
46. What techniques can optimize BGP convergence times?
- Tuning BGP keepalive and hold timers
- Implementing BFD for fast failure detection
- Optimizing IGP convergence
- Using peer templates for consistent configuration
- Turning off synchronization
47. What are some tips for optimizing BGP scaling?
- Summarizing routes to minimize BGP table size
- Using route reflectors to avoid full mesh iBGP
- Filtering unnecessary prefixes
- Tuning keepalive and hold timers
- Using AS path prepending judiciously
- Setting maximum prefixes to rate limit announcements
48. What techniques can limit the impact of unstable external peers?Methods to isolate instability include:
- Using prefix lists and route maps for selective peering
- Implementing AS_PATH filters and maximum prefixes
- Configuring weight to prefer stable peers
- Lowering local preference for unstable paths
- Implementing BGP dampening to suppress flapping routes
49. What are some best practices for BGP route filtering?Best practices include:
- Filter routes at edge routers to minimize impact
- Allow only authorized/expected prefixes
- Filter private and bogon prefixes
- Use prefix lists for simple access rules
- Implement route maps for granular control
- Filter on both inbound and outbound
50. What are some tips for troubleshooting BGP neighbor establishment issues?
Tips for troubleshooting include:
- Checking interface status and IP connectivity
- Verifying compatible BGP parameters on both routers
- Confirming TCP 179 access through ACLs
- Checking ASN match between neighbors
- Validating password if MD5 authentication enabled
- Reviewing BGP logs and debugs
51. How does BGP graceful restart help improve network availability?
Graceful restart allows a router to keep forwarding traffic using old routes during a BGP restart. This eliminates route flapping and loss of connectivity.
52. What is the role of BGP in data center networking?
BGP is used for scalable routing between data center network tiers, exchange of external routes, and controlling traffic flow via attributes like communities.
53. What are some disadvantages of excessive BGP route aggregation?
Disadvantages include increased multi-pathing, suboptimal routing, and difficulty troubleshooting issues with specific prefixes. Careful design is required.
54. What is a BGP looking glass server and what is it used for?
A looking glass server allows the public to view an ISP’s BGP routing information in real-time. This helps debug connectivity issues and view changes in Internet routing.
55. What mechanisms does BGP use to prevent routing loops?
BGP uses AS_PATH to detect if an update has already traversed an AS to prevent loops. Route poisoning also marks failed routes as unusable.
56. What is BGP soft reconfiguration and when should it be used?
Soft reconfiguration uses stored route history to re-apply policy changes without resetting BGP sessions. This is useful for applying new filters without disrupting connectivity.
57. Explain the BGP attributes atomic aggregate and aggregator.
Atomic aggregate discards more specific routes when aggregating. Aggregator contains info about router that aggregated routes.
58. What is BGP additional-paths and what benefit does it provide?
Additional-paths allows routers to advertise multiple paths for the same prefix. This provides additional redundancy and load balancing options.
59. What is the role of BGP in MPLS L3VPNs?
BGP carries VPN-IPv4 routes between PE routers to build VPN forwarding tables. This enables each PE to learn customer routes from other PEs.
60. What are some disadvantages of iBGP compared to eBGP?
Disadvantages include requirement of full mesh, lack of loop prevention mechanism, and lack of policy controls for iBGP vs. eBGP.
Interview Questions Related to BGP and Convergence
61. How can BGP convergence be improved in a network?
Methods to improve BGP convergence:
- Tuning keepalive and hold timers
- Implementing BFD for failure detection
- Optimizing IGP convergence
- Disabling synchronization
- Using peer templates for consistency
62. What causes BGP route instability and oscillations?
Causes include flapping links, policy conflicts between peers, fast external state changes, and route reflector configurations without cluster lists.
63. What is BGP route dampening and when should it be used?
Route dampening minimizes route flaps by suppressing advertisements of unstable routes. Useful when dealing with unstable external peers.
64. What are some disadvantages of using BGP synchronization?
Disadvantages include slower convergence, increased memory usage, and complexity troubleshooting routing changes. It is generally not recommended.
65. How does BGP support faster convergence through forwarding plane hints?
BGP can signal forwarding plane to keep previous best path for a prefix to avoid drops during transitions to new path.
Interview Questions Related to BGP Monitoring and Troubleshooting
66. What are some useful show commands for troubleshooting BGP?
Useful show commands include:
- show ip bgp summary – Verify neighbor status
- show ip bgp – Examine RIB and FIB
- show ip bgp neighbors – Check prefixes learned and policies
- show ip route – Confirm best path installation
67. What logging and monitoring options are available for BGP?
- Logging neighbor changes, warnings, errors
- Using SNMP for tracking stats and traps
- Enabling netflow/sflow for visibility into traffic patterns
- Using MRTG for graphing trends over time
68. What steps would you take to troubleshoot flapping BGP routes?
Steps would include:
- Review stability of physical interfaces, IGP topology
- Check for policy conflicts or attribute manipulation
- Configure dampening to suppress unstable routes
- Selectively filter or lower preference of problematic routes
- Tune BGP timers for faster detection without excessive churn
69. What causes BGP routes to stay in table but not become active?
- Missing IGP route for next hop
- Route reflector processing error
- Higher admin distance set for BGP
- Import/export route target mismatch for VPN prefixes
70. What are some common causes of high BGP memory utilization?
Common causes include:
- Full BGP table downloads using ‘soft reconfiguration inbound’
- Large number of BGP peers and routes
- Excessive use of soft reconfiguration for policy changes
- Improper route aggregation increasing table size
Interview Questions Related to BGP Design Scenarios
71. You need to connect two routers in different AS. One router has 2 interfaces while the other has 1 interface. How should this be designed?
Use eBGP multihop to allow establishing the neighbor relationship over the single interface on the second router.
72. Your network uses both iBGP and eBGP. What mechanism should be used to set exit points from the AS?
Use LOCAL_PREF to set higher preference for eBGP learned routes from desired exit points.
73. You need to influence inbound traffic to prefer one link over another. How can this be accomplished?
Use AS path prepending on the less desired link to make it less attractive inbound. This will steer traffic to prefer the other link.
74. Your network has unstable external peers impacting internal stability. What solutions can mitigate this?
Implement prefix-based filtering, route dampening, and modify local preference to isolate and discourage use of flapping routes.
75. What considerations should be made in iBGP route reflector design?
- Using multiple route reflectors for redundancy
- Configuring cluster IDs to prevent loops
- Managing large iBGP mesh if needed between reflectors
Interview Questions Related to Advanced BGP Concepts
76. What is BGP PIC and how does it improve convergence?
BGP PIC (Prefix Independent Convergence) allows FIB to retain alternate next hops for prefixes to minimize traffic loss during transitions.
77. What is BGP add-path and what benefit does it provide?
BGP add-path allows routers to advertise multiple paths for the same prefix. This provides additional redundancy and load balancing options.
78. What is BGPsec and how does it improve BGP security?
BGPsec provides origin authentication and verification of the AS path using digital signatures. This protects against issues like prefix hijacking.
79. How does BGP Link-State (BGP-LS) build a network topology map?
BGP-LS distributes link-state information using BGP to build a network graph. This provides visibility into topology and traffic engineering policies.
80. What are the scaling and redundancy benefits of using BGP route reflectors?
Route reflectors avoid full mesh iBGP scaling issues. Making route reflectors fully redundant improves reliability and stability.
81. How does BGP handle IPv6 prefixes?BGP multiprotocol extensions carry IPv6 prefixes in the MP_REACH_NLRI attribute. The IPv6 decision process is the same as IPv4.
82. What is BGP maximum prefix limit and what issue does it help prevent?
Maximum prefix limit allows controlling number of prefixes accepted from neighbor. This helps prevent memory exhaustion attacks.
83. What mechanisms prevent routing loops when using iBGP?
iBGP does not have loop prevention like AS_PATH. Careful design is needed, using peer groups and route reflectors to manage iBGP scaling.
84. What are the benefits of using 4-byte AS numbers instead of 2-byte?
4-byte ASNs provide increased ASN allocation space, removing previous limitations. This supports Internet growth and new applications.
85. What is a BGP route server and when would one be used?
A route server centralizes peerings between routers to reduce meshing. Used at IXPs between many ISP routers to simplify interconnections.
Interview Questions Related to BGP Comparison
86. What are the main differences between BGP and IGPs like OSPF?
BGP is an EGP for inter-domain routing. OSPF is an IGP for intra-domain routing. BGP policies focus on selective path manipulation between AS.
87. Compare IBGP and EBGP regarding behavior and preferred path selection.
eBGP prefers external routes by default. IBGP requires extra policies to set exit points. IBGP lacks some loop prevention mechanisms like AS_PATH.
88. What are the main differences between BGP and MPLS VPNs?
BGP provides Internet routing between domains. MPLS VPNs use BGP for private WAN connectivity and advanced services like QoS and traffic engineering.
89. For connecting data centers, compare BGP and overlay protocols like VXLAN.
BGP provides policy control for traffic steering. Overlays focus on scalability and VM mobility. BGP integrates with the underlying network.
90. Compare BGP to link-state protocols like OSPF regarding architecture.
BGP has loose coupling between routers vs tight coupling in link-state protocols. This makes BGP more scalable while OSPF converges faster.
Interview Questions Related to BGP Case Studies
91. You need to migrate from 2-byte to 4-byte ASNs. What are the key steps?
Main steps are:
- Upgrade router software to support 4-byte ASNs
- Apply AS migrations techniques like AS confederations
- Coordinate with peers to migrate to 4-byte numbers
92. Two ISP networks need to interconnect. What key design aspects should be considered?Considerations include:
- Using private ASNs if possible
- Prefix filtering based on business needs
- Setting LOCAL_PREF for desired traffic flows
- Managing route advertisements to optimize Internet reachability
93. You need to integrate an acquired company’s network running EIGRP. What is needed to redistribute between EIGRP and BGP?
- Enabling EIGRP and BGP routing processes
- Configuring mutual route redistribution
- Setting admin distance to prefer internal EIGRP routes
- Filtering routes as needed between the protocols
94. Your network uses route reflectors and requires higher resiliency. What changes should be considered?
- Adding redundancy by using multiple route reflectors
- Configuring cluster IDs to prevent routing loops
- Managing iBGP mesh between reflectors if needed
- Advertising multiple paths using BGP add-path
95. A network needs to implement BGP route filtering. What strategies should be used?
- Applying inbound and outbound filters
- Using prefix lists for simple matching
- Implementing route maps for granular control
- Filtering towards edge routers to contain impact
- Allowing only expected/authorized routes
96. You need to tune BGP convergence times. What timer adjustments would optimize convergence?
Reducing keepalive interval to 10 seconds and hold timer to 30 seconds will speed failure detection. Smaller MRAI timer also allows faster updates.
97. Your network has unstable external peers. What solutions could reduce the impact?
- Prefix filtering to peer selectively
- Lowering local preference of unstable routes
- Implementing maximum prefixes
- Using AS_PATH filters to block problematic routes
- Configuring route dampening to suppress flapping
98. A network needs to summarize routes advertised to upstream transit providers. What considerations are needed?
- Summarizing at aggregate boundaries to optimize aggregation
- Setting summary admin distance lower than subnets
- Tracking summary reachability and performance
- Managing summary advertisement to avoid black holes
99. What mechanisms can prevent iBGP routing loops?
- Using route reflectors instead of full mesh iBGP
- Configuring cluster IDs on route reflectors
- Implementing peer groups to simplify configuration
- Careful design of iBGP to avoid loops
100. How does BGP handle sudden spikes in Internet routes?
- Route aggregation and filtering to minimize prefixes
- Rate limiting using BGP maximum prefix
- Turning on BGP scanning optimizations
- Tweaking recursion limits if needed
- Adding memory if table growth is steady
In summary, BGP is a foundational Internet routing protocol requiring expertise across a diverse range of architectural design, scaling, convergence, troubleshooting and security topics.
I hope these 100 sample questions have provided a comprehensive overview of key BGP concepts and helped reinforce your knowledge of BGP operations, best practices and real-world design considerations. Let me know if you have any other specific BGP interview questions I can help explain or expand upon further.
- How to Cancel Spectrum Internet, TV, Phone or Mobile? - February 22, 2024
- Can a WiFi Owner See What Sites I Visit on My Phone? - February 22, 2024
- Fix WiFi Not Working on iPhone But Working on Other Devices - February 22, 2024