BGP Interview Questions

The Border Gateway Protocol (BGP) is often viewed as the Internet’s backbone. If you compare BGP to a mail delivery service, it’s the delivery service of data packets that figures out the best path for the packet to travel across multiple networks to reach its final destination.

BGP is an exterior gateway protocol (EGP) used to exchange routing information between autonomous systems (AS), essentially, different networks managed by distinct organizations. This makes it crucial for ISPs, large enterprises, and data centers.

Due to the function BGP plays in the network, it is a popular topic for technical interviews. Whether you are a recent college graduate working to find a job in network engineering, or an expert network engineer working on BGP interview preparation, understanding BGP is important! This guide captures popular BGP interview questions and answers, including explanations, examples, and tips to help you be successful in your interview.

Table of Contents:

BGP Interview Questions for Freshers

Before we get started on the more real-world BGP problems, let’s first get a solid understanding of the fundamental BGP technical interview questions.

1. What is BGP (Border Gateway Protocol)?

The Border Gateway Protocol (BGP) is a routing protocol that functions as the backbone of the Internet on a worldwide level. BGP exchanges routing information between networks, termed autonomous systems (AS), as opposed to routing within one network. In layman’s terms, BGP is the air traffic control of the Internet, determining IP packets’ best path from one AS to another reliable destination.

2. Why is BGP important?

BGP is important for the following reasons:

  • It interconnects autonomous systems on the Internet.
  • It provides a resilient, loop-free routing mechanism.
  • It offers a policy-based routing mechanism with an administrator to direct the path of traffic.
  • It handles Internet-scale networks, so it is a primary backbone protocol for global connectivity.

3. How does BGP work?

BGP routers communicate routing information with peers (neighbors) through TCP sessions over port 179. Each route includes a series of ASes (AS_PATH) that the route traverses. BGP will determine the best path based on routing attributes, including Local Preference, AS_PATH, MED, and others.

If your company connects to two ISPs, BGP will decide which ISP should be used for outgoing or incoming traffic based on policies and other path attributes.

4. What port does BGP use?

BGP uses TCP port 179 to establish sessions with peers. Using TCP allows reliable delivery of routing information.

5. What is an Autonomous System (AS)?

An AS is a collection of IP networks under one administrative domain that shares a common routing policy. Each AS has a unique Autonomous System Number (ASN).

Example:

An ISP with multiple office networks can form an AS to present a single routing identity to the Internet.

6. What are the key characteristics of BGP?

  • Path-vector protocol: BGP tracks the list of autonomous systems (AS) traversed by a route, making path selection more transparent and free of loops.
  • Classless routing: It supports CIDR (Classless Inter-Domain Routing) and variable-length subnet masks, allowing for optimized use of the IP address space.
  • Loop prevention: By utilizing the AS_PATH attribute, BGP can detect and prevent routing loops among many networks.
  • Policy-based routing: Network administrators can influence path selection using attributes such as Local Preference, Multi-Exit Discriminator (MED), and route maps.
  • Reliable transport: BGP runs over TCP (port 179), which means it can be relied on to deliver routing updates between peers reliably.
  • Scalability: It is designed to support the huge size of global Internet routing tables while maintaining stability.

7. What is the difference between eBGP and iBGP?

Feature eBGP iBGP
Neighbor location Different ASes Same AS
Purpose Exchange routes between ASes Exchange routes within an AS
Hop count / TTL Default TTL = 1 Can exceed 1
Route propagation Advertises learned routes to iBGP peers Does not advertise learned routes to other iBGP peers

8. What are BGP Neighbor Adjacency States?

When establishing a session, BGP routers go through a series of states:

  • Idle: The router is in its initial state, waiting to begin the TCP connection.
  • Connect: The router is attempting to establish a TCP connection.
  • Active: The router is actively trying to establish a TCP connection.
  • Open Sent / Open Confirm: OPEN messages are exchanged and validated between peers.
  • Established: The session is established, and updates can be exchanged between the valid peers.

9. Can routers on different subnets become BGP neighbors?

Yes, BGP neighbors are not required to be in the same subnet. They only need a TCP connection on 179 to send routing updates to each other. Even BGP routers in cities or in different ISPs could send a BGP session across the Internet.

10. What are BGP message types?

BGP uses four main message types:

  • OPEN: Establishes a neighbor session and exchanges AS numbers.
  • KEEPALIVE: Confirms that the neighbor is alive; sent periodically.
  • UPDATE: Shares routing information and attributes.
  • NOTIFICATION: Informs of errors and resets the session if necessary.

11. What is the purpose of BGP in networking?

The primary goal of BGP is to communicate routing information between autonomous systems while enabling the Internet to use active and loop-free paths. BGP is policy-based; this means that network administrators can make routing decisions based on their operational or business needs.

BGP Path Attributes & Loop Prevention Interview Questions

BGP does not randomly select routes. Instead, it uses path attributes to create the best path to route traffic between autonomous systems. These attributes also help with loop prevention and give network administrators control over routing policy.

12. What is the AS_PATH attribute, and how does it prevent loops?

The AS_PATH attribute lists all the Autonomous System Numbers (ASNs) that a route has passed through. It’s one of the most important BGP path attributes — and it’s also what helps BGP prevent routing loops.

When a BGP router receives a route update, it checks the AS_PATH.
If the router finds its own ASN in the AS_PATH list, it rejects that route. This ensures the route is not re-advertised in a loop.

Example:

If a route originates in AS200 and passes through AS150 before reaching AS100, the AS_PATH seen by AS100 will be:

200 150

If AS150 later receives an update that already includes 150 in the AS_PATH, it will drop it, preventing a routing loop.

13. What is Local Preference in BGP?

Local Preference (LocalPref) is an internal attribute that is used within an AS (Autonomous System) to select the preferred outbound path.

  • Higher LocalPref is more preferred.
  • Shared only within the AS (not advertised to external peers).

If a company has two ISPs, you can set LocalPref = 200 for ISP1 and LocalPref = 100 for ISP2 to prefer traffic through ISP1.

14. What is the BGP Origin attribute?

The Origin attribute indicates how a route was injected into BGP:

  • IGP (i): Route came from an internal gateway protocol (e.g., OSPF).
  • EGP (e): Route came from an external gateway protocol.
  • Incomplete (?): Route redistributed into BGP from other sources (static, connected, or unknown).

15. What is MED (Multi-Exit Discriminator), and how is it used?

MED is the optional attribute that suggests the preferred entry point into an AS where multiple exist.

  • Lower MED is preferred by default.
  • MED is sent to external neighbors only.

16. What are BGP Communities, and why are they useful?

BGP Communities are tags that are assigned to routes that allow operators to apply routing policies efficiently.

  • Can group routes for filtering, preference, or redistribution.
  • Well-known communities include NO_EXPORT, NO_ADVERTISE, etc.

Example:

A route tagged with NO_EXPORT will not be advertised to external peers.

17. What is the BGP Atomic Aggregate attribute?

Atomic Aggregate indicates that multiple routes have been summarized into one prefix.

  • It notifies downstream routers that some information has been lost during the summarization.
  • It helps to prevent loops or misrouting when prefixes are summarized.

18. What is the difference between BGP Communities and AS Path in routing policies?

Feature AS_PATH Communities
Purpose Prevent loops and influence the routing path Tag routes for policy-based actions
Scope Both internal and external Mostly internal; can influence export policies
Control Cannot be manually changed easily Can be assigned or modified by administrators
Examples Shorter AS_PATH preferred NO_EXPORT, CUSTOM_POLICY

19. What are Poison Reverse and Split Horizon, and how do they prevent loops?

  • Split Horizon: A router doesn’t send the route back to the neighbor from which it learned it. This is commonly used in iBGP.
  • Poison Reverse: A route is sent back to the source with a longer AS_PATH, or null route, to indicate it shouldn’t be used. This can help prevent a loop.

Intermediate BGP Interview Questions

These BGP interview questions are designed for candidates who have a basic understanding of BGP and are ready to dive into its operational and configuration concepts.

20. What is the BGP Route Selection Process?

BGP uses a specific path selection algorithm to choose the best route when multiple paths to a destination exist. The selection is based on attributes in the following order of preference:

  • Highest Weight (Cisco-specific, local to router)
  • Highest Local Preference (within an AS)
  • Shortest AS_PATH (least number of AS hops)
  • Lowest Origin Type (IGP > EGP > Incomplete)
  • Lowest Multi-Exit Discriminator (MED)
  • eBGP over iBGP routes
  • Lowest IGP cost to Next Hop
  • Oldest route (to stabilize routing)
  • Lowest Router ID

21. What are Route Reflectors, and how do they reduce iBGP full-mesh requirements?

In iBGP, all routers must form a full mesh to exchange routes, which is not scalable in large networks.

  • Route Reflectors (RRs) act as central routers that reflect routes to other iBGP peers.
  • iBGP peers connect to RRs instead of maintaining a full mesh.
  • Reduces the number of BGP sessions from N(N-1)/2* to linear scaling.

22. What are BGP Timers (Keepalive, Hold Down), and how do they work?

BGP uses timers to maintain stable sessions:

Keepalive Timer:

  • Periodically sends KEEPALIVE messages to confirm the neighbor is reachable.
  • Default: 60 seconds.

Hold Down Timer:

  • Defines how long to wait before declaring a BGP neighbor down if no KEEPALIVE is received.
  • Default: 180 seconds.

23. What is the difference between Soft Reset and Hard Reset in BGP?

Feature Hard Reset Soft Reset
TCP Connection Dropped Maintained
BGP Neighbor Relationship Flapped (down/up) Maintained
Route Table Cleared and rebuilt Incoming updates reprocessed
Use Case Rarely used; disruptive Preferred for minimal downtime

24. How does BGP handle route redistribution from other routing protocols?

BGP can redistribute routes from IGPs (like OSPF, EIGRP, RIP) or other BGP processes.

  • When redistributing, BGP assigns default attributes such as:
    • MED = 0
    • Origin = (Incomplete)
    • AS_PATH prepends the local ASN if required
  • Care must be taken to avoid routing loops and duplicate routes.
  • Use route-maps, prefix-lists, or filters to control redistribution.

Advanced BGP Interview Questions

These BGP interview questions are designed for experienced candidates and focus on scalability, performance, and real-world BGP problems.

25. How much memory is required for a full BGP routing table?

The memory requirement depends on several factors, including the number of routes, router hardware, and enabled features (such as route reflection or filtering).

In earlier years, a few hundred MBs of memory might have been sufficient. However, modern full Internet BGP tables (IPv4 + IPv6) have grown significantly — often exceeding 1.3 million routes combined.

Rule of thumb:

  • Plan for 2–4 GB of RAM (or more) to handle a full Internet routing table comfortably.
  • Memory usage can vary depending on hardware, route attributes, and policy complexity.
  • Techniques such as route aggregation, filtering, or default-only routing can reduce memory footprint when full Internet routes are not required.

26. What are BGP Confederations, and how do they help scalability?

BGP Confederations divide a large AS into multiple sub-ASes.

  • Internal iBGP within sub-ASes behaves normally.
  • Sub-ASes appear as a single AS externally, reducing the number of iBGP sessions.

Benefits:

  • Reduces full-mesh iBGP requirement
  • Improves scalability in large networks
  • Provides administrative flexibility while preserving loop-prevention

27. How is BGP used for traffic engineering?

BGP allows administrators to influence traffic paths using:

  • Local Preference: Prefers a specific exit point for outgoing traffic.
  • AS_PATH Prepending: Makes a path less preferred to steer incoming traffic.
  • MED: Suggests a preferred entry point to external ASes.
  • Communities: Group routes for policy-based traffic control.

28. What tools and techniques can monitor BGP performance?

  • Command-line tools: show ip bgp summary, show ip bgp neighbors, debug ip bgp
  • Network monitoring systems: SolarWinds, PRTG, Nagios, Zabbix
  • BGP-specific monitoring: BGP route analytics, prefix monitoring, and route convergence checks
  • Logging & alerts: Detect BGP session flaps, route leaks, or anomalies

29. Why is AS numbering important in BGP?

AS numbers (ASN) uniquely identify an Autonomous System and:

  • Prevent routing loops
  • Help BGP maintain path integrity via AS_PATH
  • Allow policy enforcement and traffic engineering

30. Can a router run multiple BGP processes?

Yes, a router can run multiple BGP processes to:

  • Handle different routing policies or VRFs (Virtual Routing and Forwarding)
  • Separate IPv4 and IPv6 BGP sessions
  • Maintain distinct BGP tables for administrative purposes

31. What are the differences between BGP, OSPF, EIGRP, and RIP?

Feature BGP OSPF EIGRP RIP
Protocol Type Exterior Gateway Protocol Interior Gateway Protocol Interior Gateway Protocol Interior Gateway Protocol
Metric Path-vector (policy-based) Cost Composite metric (bandwidth, delay) Hop count
Loop Prevention AS_PATH, Split Horizon, Poison Reverse SPF algorithm Diffusing Update Algorithm (DUAL) Hop count & Split Horizon
Use Case Internet, Multi-AS Enterprise networks Enterprise networks Small networks
Scalability Very high Medium Medium Low

32. What challenges arise with BGP in cloud or data center environments?

  • Large-scale iBGP sessions: a full mesh can become unmanageable
  • Route churn: frequent updates can cause instability
  • Multi-homing complexity: managing multiple ISPs or regions
  • Traffic engineering: balancing performance vs policy constraints
  • Security risks: route hijacks, leaks, or misconfigurations
  • Integration with overlay networks: e.g., EVPN, VXLAN, SD-WAN

Scenario-Based BGP Interview Questions

Learning how to apply theoretical knowledge to real-world BGP problems is a must during your BGP interview preparation. This shows hiring managers that you can add value to their team and solve business problems using your understanding of networking.

33. Two companies merge, both running BGP. What issues arise?

There are many issues that can arise during the merging process of two companies that both run BGP:

  • ASN conflicts: if both companies use the same private AS numbers.
  • Policy conflicts: mismatched route filtering or inconsistent prefix-lists.
  • Duplicate prefixes: overlapping IP ranges that need renumbering or NAT.
  • Scalability: sudden growth in iBGP sessions may require route reflectors.

34. BGP session is up, but routes are missing — what could cause this?

  • Inbound route filtering (prefix-lists, route-maps, or max-prefix limits).
  • Outbound policy from neighbor blocking advertisements.
  • Route not in neighbor’s BGP table (e.g., missing network or redistribute command).
  • Mismatch in address families (IPv4 unicast vs VPNv4, etc.).

35. BGP routes are present, but traffic flows incorrectly. How to check NEXT_HOP?

  • Use the show ip bgp command to verify the NEXT_HOP attribute.
  • If the NEXT_HOP is unreachable, then traffic goes blackhole.
  • Common fix: apply next-hop-self on route reflectors or border routers.

Example:

Router A advertises a route with NEXT_HOP = Router B, but Router C cannot reach Router B, and traffic drops.

36. How would you handle route leaks from a peer?

  • Detect leaks using monitoring tools, including RIPE RIS, BGPmon, or road collectors.
  • Filter inbound prefixes to only accept the anticipated ranges from the peer’s outbound advertisement.
  • Utilize BGP communities to tag the leaked routes and drop them at the same time.
  • Enable max-prefix limits to enable protection against full-table leaks.

37. Your company is migrating to a new data center with BGP WAN. What’s the plan?

  • Pre-deployment: Configure BGP sessions at the new DC with the same ISPs.
  • Testing: Advertise test prefixes and validate reachability.
  • Gradual migration: Use AS_PATH prepending or MED to slowly shift traffic.
  • Fallback: Keep the old DC active until stability is confirmed.
  • Cutover: Move production traffic once redundancy and monitoring are in place.

38. How do you troubleshoot slow BGP convergence?

  • Check BGP timers: Reduce hold-time and keepalive (with caution).
  • Route dampening: Ensure flapping prefixes aren’t delaying convergence.
  • iBGP full mesh or RR issues: Misconfigurations can delay updates.
  • Hardware limits: CPU/memory bottlenecks in large-scale routing.
  • Fast failover: Enable BFD (Bidirectional Forwarding Detection).

39. What security mechanisms prevent BGP hijacking and leaks?

  • Prefix filtering: only accept legitimate customer/peer prefixes.
  • AS_PATH filtering: block suspicious or unexpected AS paths.
  • Max-prefix limits: avoid accidental full-table advertisements.
  • RPKI (Resource Public Key Infrastructure): validates prefix ownership.
  • BGP communities: apply restrictive policies for route control.
  • MD5 authentication: protects BGP sessions against spoofing.

Practical BGP Interview Questions

These BGP interview questions cover the real-world BGP problems that engineers face when configuring, scaling, and troubleshooting BGP.

40. How do you troubleshoot common BGP issues like neighbor flapping, routes not installing, or session drops?

  • Neighbor flap: Often the result of unstable links or overly aggressive timers. Check the interfaces for errors, slow down the keepalive/hold timers, or you can use BFD for faster failover.
  • Routes not installing: Verify the prefix is in the RIB and that it is not being blocked by policy, next-hop reachability, or administrative distance.
  • Session drops: Pay close attention to the ASN – mismatched ASNs could affect the peering relationship. Additional startup checks: Are there filters on TCP port 179? Are you experiencing authentication failures (MD5 keys)? Or is there an MTU issue resulting in dropped packets?

41. What are some best practices for configuring and scaling BGP?

  • Prefix filtering: Only advertise intended routes; never leak the full table.
  • Route summarization: Aggregate prefixes to allow BGP tables to be smaller.
  • Max-prefix limits: Protect against accidental route flooding.
  • Route Reflectors/Confederations: Avoid full mesh iBGP scaling issues.
  • Use BGP communities: Tag routes to be able to have flexible policy.
  • Monitoring: Always monitor BGP session health, routes on session update, and other anomalies.

42. How is BGP used in hybrid cloud and multi-cloud setups?

  • Hybrid cloud: Enterprises connect on-prem data centers with cloud providers (AWS, Azure, GCP) using BGP over VPN or Direct Connect/ExpressRoute. BGP dynamically advertises prefixes between on-prem and cloud networks.
  • Multi-cloud: BGP manages routing across different cloud providers, ensuring redundancy and avoiding single-vendor lock-in. Route policies, communities, and AS_PATH prepending control outbound/inbound traffic.

43. What are common BGP troubleshooting commands (show ip bgp, debug ip bgp, etc.)?

Command Used For
show ip bgp summary Check BGP neighbor/session status
show ip bgp View BGP table, path attributes, and NEXT_HOP details
show ip bgp neighbors Get detailed info about peer capabilities and timers
show ip route bgp See routes installed in the routing table
debug ip bgp Monitor real-time BGP events (use cautiously in production)
ping / traceroute Verify NEXT_HOP reachability and path tracing

Conclusion

BGP may seem complex at first, but once you break it down into its fundamentals, it becomes clear why it’s considered the backbone of the Internet. From managing routing policies to ensuring scalability and security, BGP skills are essential for anyone pursuing a career in networking. Preparing with the right mix of theory, real-world scenarios, and hands-on practice will not only help you ace interviews but also build confidence in tackling real networking challenges. Whether you’re a fresher or an experienced engineer, mastering BGP is a step toward becoming a strong, in-demand network professional.

Frequently Asked Questions
Q1. Is BGP knowledge important for a network engineering career?

Absolutely. BGP is utilized in ISPs, data centers, cloud networks, as well as enterprise WANs for larger organizations. Understanding BGP will be a critical skill for roles such as Network Engineer, NOC Engineer, Cloud Network Engineer, and would be relevant to any role that uses multi-AS routing.

Q2. What entry-level jobs require BGP skills?
  • Network Engineer / Network Operations Engineer
  • NOC (Network Operations Center) Technician
  • Cloud Network Engineer (AWS, Azure, GCP)
  • Junior Network Consultant

While freshers may not configure large BGP networks immediately, interviewers often test your understanding of BGP fundamentals.

Q3. How can I learn BGP as a beginner?
  • Establish a home lab or virtual lab utilizing GNS3, Cisco Packet Tracer, or EVE-NG. 
  • Familiarize yourself with eBGP/iBGP session configuration, route redistribution, and route filtering. 
  • Research actual scenarios on multi-homing, route reflectors, and route aggregation. 
  • Take courses online or follow documentation from Cisco or for BGP.
Q4. Are BGP certifications worth it?

Yes. Certifications like CCNA, CCNP Enterprise, or Juniper JNCIA/JNCIS validate your knowledge and make you more competitive in interviews. They also provide hands-on experience with BGP configuration and troubleshooting.

Q5 How do I prepare for BGP questions in interviews?
  • Understand BGP fundamentals: eBGP vs iBGP, neighbor states, path attributes, route selection.
  • Practice scenario-based questions like route leaks, multi-homing, or slow convergence.
  • Learn common CLI commands: show ip bgp, show ip bgp summary, and debug ip bgp.
  • Be ready to explain real-world applications of BGP in ISPs, enterprise networks, and the cloud.

About the Author

Technical Content Lead | Software Developer

Anisha is an experienced Software Developer and Technical Content Lead with over 6.5 years of expertise in Full Stack Development. She excels at crafting clear, accurate, and engaging content that translates complex technical concepts into practical insights. With a strong passion for technology and education, Anisha writes on a wide range of IT topics, empowering learners and professionals to stay ahead in today’s fast-evolving digital landscape.

fullstack