BGP Interview Questions & Answers
50 interview questions across five sections, with practical examples and a Senior Network QA focus.
How to use this section
Work through each section in sequence. Expand a question to review its answer, then practise explaining the concept, relevant verification commands and the QA checks you would perform in a real network.
SECTION A – BGP FUNDAMENTALS
Questions 1–10 · 10 questions
Q1Q1. What is BGP, and what is its primary purpose?
BGP (Border Gateway Protocol) is a standardized Exterior Gateway Protocol used to exchange reachability information between Autonomous Systems. BGP-4 is a path-vector protocol that selects routes using policy and path attributes, not simply physical distance. It supports inter-domain routing, route policy, traffic engineering and loop prevention through AS_PATH. Example: AS65001 advertises 203.0.113.0/24 to AS65002. Senior QA: verify session, advertisements, withdrawals, AS_PATH, best path, RIB and forwarding.
Q2Q2. Which transport protocol does BGP use, and why?
BGP uses TCP destination port 179. TCP provides reliable, sequenced delivery, retransmission and flow control. TCP establishes before BGP OPEN exchange. Source port is normally ephemeral. Check nc -vz <peer> 179, show tcp brief, show ip bgp summary. QA: test TCP reachability, ACL/firewall behaviour and recovery. Ping success alone does not prove TCP 179 is reachable.
Q3Q3. What is an Autonomous System?
An AS is a collection of networks and routers administered under a common routing policy and identified by an ASN. Private-use ASN ranges include 64512–65534 and 4200000000–4294967294. Example: router bgp 65001. QA: validate local/remote AS, private/public ASN handling, four-octet ASN compatibility and AS_PATH. An ASN is not the BGP Router ID.
Q4Q4. What are the differences between eBGP and iBGP?
eBGP peers belong to different ASes; iBGP peers belong to the same AS. Cisco defaults commonly use AD 20 for eBGP and 200 for iBGP. eBGP normally prepends local AS and changes NEXT_HOP; iBGP normally preserves AS_PATH and NEXT_HOP. iBGP split horizon prevents a route learned from one iBGP peer being advertised to another. Scale with full mesh, RR or confederations. QA: verify session type, path attributes, next hop and route propagation.
Q5Q5. What are the four BGP message types?
OPEN establishes parameters and capabilities; KEEPALIVE maintains the session; UPDATE advertises routes/attributes and withdraws routes; NOTIFICATION reports protocol errors and normally terminates the session. Wireshark filter bgp; types are OPEN 1, UPDATE 2, NOTIFICATION 3, KEEPALIVE 4. QA: inspect capability negotiation, timers, advertisements, withdrawals and notification codes.
Q6Q6. What are the BGP FSM states?
Idle, Connect, Active, OpenSent, OpenConfirm and Established. Active means BGP is retrying TCP connection establishment, not that the session is established. Established permits UPDATE exchange. Verify with show ip bgp summary and show ip bgp neighbors. QA: inject wrong peer, wrong AS, blocked TCP 179, authentication mismatch and link failure; verify transitions and recovery.
Q7Q7. Difference between BGP RIB and IP routing table?
BGP RIB stores BGP paths and attributes. IP RIB contains routes selected for installation from connected, static and routing protocols. A BGP path may not install due to unreachable next hop, competing route or ineligibility. FIB/CEF drives forwarding. Commands: show ip bgp, show ip route <prefix>, show ip cef <prefix>. QA must distinguish received, selected, installed and forwarded.
Q8Q8. What is BGP best-path selection?
A simplified Cisco sequence is highest Weight (Cisco-specific), highest LOCAL_PREF, locally originated, shortest AS_PATH, lowest ORIGIN (IGP, EGP, Incomplete), lowest MED when comparison applies, eBGP over iBGP, lowest IGP metric to next hop, then further tie-breakers. Exact order varies by platform/release/configuration. Earlier attributes can outweigh shorter AS_PATH. QA: change one attribute at a time and verify BGP/RIB/FIB.
Q9Q9. What does BGP Active state mean?
Active means BGP is attempting TCP connection establishment. Causes include wrong peer IP, missing route, blocked TCP 179, wrong update-source, eBGP multihop TTL, authentication mismatch, remote peer not configured or interface failure. Check show ip bgp summary, show ip route <peer>, ping, traceroute, show access-lists, show tcp brief; Linux nc -vz <peer> 179. Ping is not sufficient proof.
Q10Q10. Can two BGP processes run on one physical router?
It depends on platform and routing-instance architecture. A conventional global BGP process generally uses one local AS in its routing context; platforms may support separate instances through VRFs, virtual routers or logical systems. A VRF can have its own routing table and BGP address-family configuration. Validate platform support, isolation, route leaking and independent session behaviour.
SECTION B – PATH ATTRIBUTES & BEST PATH SELECTION
Questions 11–20 · 10 questions
Q11Q11. What are BGP Path Attributes?
Path attributes accompany routes and support loop prevention, selection and policy. Categories: well-known mandatory (ORIGIN, AS_PATH, NEXT_HOP), well-known discretionary (LOCAL_PREF), optional transitive (COMMUNITY), optional non-transitive (MED). Other important attributes include Weight (Cisco-specific). QA: verify receipt, modification, propagation and best-path impact.
Q12Q12. Difference between Weight and LOCAL_PREF?
Weight is Cisco proprietary, local to one router and not advertised; higher is preferred. LOCAL_PREF is well-known discretionary, distributed within the AS through iBGP and normally not sent to eBGP; higher is preferred. Use Weight for router-specific preference and LOCAL_PREF for AS-wide outbound exit choice. QA: confirm LOCAL_PREF propagation and Weight locality.
Q13Q13. What is AS_PATH and how does it prevent loops?
AS_PATH records the AS sequence traversed. eBGP normally prepends the advertising AS. A router normally rejects a route containing its own AS, preventing inter-AS loops. AS_PATH length can influence selection. Prepending influences remote preference; allowas-in and as-override modify normal loop-prevention behaviour and require care. QA: test loop rejection and these features.
Q14Q14. What is the ORIGIN attribute?
ORIGIN indicates how a route entered BGP: IGP, EGP or Incomplete. Traditional preference is IGP over EGP over Incomplete. Cisco IOS network-statement routes are normally marked i; redistributed routes commonly show ?. QA: verify origin values and selection when earlier criteria tie.
Q15Q15. What is MED?
MED (Multi-Exit Discriminator) suggests to a neighbouring AS which entry point to prefer. Lower is preferred when comparison applies; by default it is commonly compared among paths from the same neighbouring AS. bgp always-compare-med can change behaviour. MED is a suggestion, not a guarantee. QA: test advertisement, comparison scope and path recalculation.
Q16Q16. What is NEXT_HOP?
NEXT_HOP identifies the next-hop IP for a prefix. eBGP normally changes it to the advertising router's peering address; iBGP normally preserves it. An unreachable next hop can prevent route installation. neighbor <peer> next-hop-self changes next hop to the local router for eligible routes. Verify BGP, route to next hop and RIB.
Q17Q17. What are BGP Communities?
Communities tag routes for policy. Standard communities are 32-bit (RFC1997), Extended 64-bit (RFC4360), Large 96-bit (RFC8092). Well-known values include NO_EXPORT, NO_ADVERTISE, NO_EXPORT_SUBCONFED and NOPEER. Use set community ... additive and send-community where supported. A tag requires policy/peer action; it is not automatically a filter.
Q18Q18. What is AS_PATH prepending?
Prepending adds repeated local ASN values to an advertised AS_PATH, making a route appear longer and potentially less attractive to remote networks. It can influence inbound traffic but cannot guarantee it because remote LOCAL_PREF and policies may dominate. QA: verify intended neighbour, repetition count, remote path and recovery.
Q19Q19. What is BGP Multipath?
Multipath permits multiple eligible paths for the same prefix to be installed in routing/forwarding tables. Cisco examples include maximum-paths 2; iBGP syntax/support varies. Eligibility rules are platform-specific. QA: verify paths, load-sharing, next-hop failure and recovery. It does not install every path unconditionally.
Q20Q20. Difference between LOCAL_PREF, MED and AS_PATH?
LOCAL_PREF influences outbound exit selection inside an AS (higher preferred); MED suggests a neighbouring AS's entry point (lower preferred when compared); AS_PATH records AS sequence, prevents loops and may influence selection (shorter generally preferred when earlier criteria tie). Remote policy controls remote decisions.
SECTION C – CONFIGURATION & ROUTING POLICIES
Questions 21–30 · 10 questions
Q21Q21. How do you configure eBGP?
Configure local BGP AS and reciprocal neighbour statements. R1: router bgp 65001; neighbor 11.1.1.2 remote-as 65002. R2 uses AS65002 and remote-as 65001. Ensure IP reachability and TCP 179. Verify show ip bgp summary, neighbour and TCP. QA: correct AS, session, routes and recovery.
Q22Q22. How do you configure iBGP?
Configure both routers with the same AS, e.g. router bgp 65001 and neighbor 13.1.1.2 remote-as 65001. For loopback peering use update-source Loopback0 and ensure underlay reachability. iBGP preserves AS_PATH and normally NEXT_HOP; split horizon applies. QA: peer AS, update-source, reachability, propagation.
Q23Q23. Network statement vs redistribution?
Cisco IOS network originates a prefix only when an exact matching prefix and mask exist in local RIB; it does not create the route. Redistribution injects eligible routes from another protocol and can introduce many prefixes. Control redistribution with route maps/filters. QA: exact match, source route, filtering and withdrawal.
Q24Q24. What is a prefix list?
A prefix list filters network prefixes and lengths using sequence numbers, permit/deny, ge and le. Example: ip prefix-list CUSTOMER permit 10.10.0.0/16 le 24. Entries process in sequence order; unmatched prefixes are implicitly denied. QA: exact match, length boundaries, ordering and direction.
Q25Q25. Route map vs prefix list?
A prefix list matches prefixes/lengths. A route map supports ordered permit/deny sequences, match conditions and set actions such as LOCAL_PREF, MED, communities and AS_PATH prepend. First matching sequence determines result; unmatched routes are denied unless a matching permit applies. QA: sequence, match, set and implicit behaviour.
Q26Q26. Inbound vs outbound filtering?
Inbound in controls routes received from a peer; outbound out controls routes advertised to it. Inbound may reject prefixes or set LOCAL_PREF; outbound may limit advertisements or set MED/community/prepend. Verify advertised routes and received routes where platform/configuration supports it.
Q27Q27. What is BGP Route Refresh?
Route Refresh lets a router request that a peer resend routes without tearing down the session, useful after inbound policy changes. clear ip bgp <peer> soft in is a common soft-refresh command where supported. Soft-reconfiguration inbound stores pre-policy routes and consumes memory. QA: refresh, policy reevaluation and session stability.
Q28Q28. How do you prevent route leaks?
Use explicit inbound/outbound prefix filters, route maps, AS_PATH filters, maximum-prefix, communities and defined customer/provider policies. Prefer explicit permitted prefixes with deny for others where appropriate. NO_EXPORT adds scope control but does not replace precise filtering. Test unauthorized advertisements.
Q29Q29. What is maximum-prefix?
Maximum-prefix limits prefixes accepted from a neighbour, protecting against unexpected route growth. Illustrative syntax: neighbor 11.1.1.2 maximum-prefix 1000 80; warning and teardown behaviour vary. QA: threshold, limit, logging, session action and recovery. It does not replace prefix filtering.
Q30Q30. How do you troubleshoot a routing policy?
Confirm session, inspect received routes, verify prefix-list address/mask/ge/le, route-map order/match/set, inbound/outbound application, advertised routes, best path, RIB and forwarding. Use soft refresh when appropriate. Document requirement, configuration, input, expected/actual, root cause, fix and regression.
SECTION D – ADVANCED BGP
Questions 31–40 · 10 questions
Q31Q31. What is a Route Reflector?
A Route Reflector reduces iBGP full mesh by reflecting eligible routes. Full mesh sessions = n(n−1)/2; 10 routers need 45. Client-learned routes reflect to other clients/non-clients; non-client-learned routes reflect to clients. Originator ID and Cluster List prevent loops. RR usually reflects selected best path, creating possible path hiding. QA: reflection rules and redundancy.
Q32Q32. What is a Confederation?
A confederation divides a large AS into smaller sub-ASes. iBGP operates within sub-ASes and confederation eBGP between them; externally the confederation presents one identifier. It differs from RR, which reflects routes rather than dividing the AS. QA: identifiers, sub-AS propagation, AS_CONFED_PATH and external visibility.
Q33Q33. What is route aggregation?
Aggregation summarizes more-specific prefixes. Four contiguous /24s 192.168.0.0–192.168.3.0 can summarize to 192.168.0.0/22. Cisco example aggregate-address 192.168.0.0 255.255.252.0; summary-only suppresses components; as-set can retain contributing AS information. QA: component presence, summary, withdrawals and blackholing.
Q34Q34. What is Graceful Restart?
Graceful Restart aims to preserve eligible forwarding routes while BGP control plane restarts. A helper may retain previously learned paths as stale during restart, subject to negotiated capability, timers and forwarding continuity. It does not guarantee uninterrupted forwarding. QA: capability, restart, stale routes, refresh, stale cleanup and expiry.
Q35Q35. What is BFD and how does it help BGP?
BFD detects forwarding-path failure quickly and can notify BGP, often faster than Hold Timer expiry. A simplified detection estimate is negotiated interval times detection multiplier; scheduling and platform affect actual time. QA: session, failure detection, BGP reaction, packet loss, recovery and scale.
Q36Q36. What is conditional advertisement?
Conditional advertisement sends or suppresses specified routes depending on presence/absence of other routes. Cisco constructs include advertise-map, exist-map and non-exist-map. Use cases include conditional backup advertisement. Exact syntax and address-family support vary. QA: condition changes, advertisement, withdrawal and recovery.
Q37Q37. What is route dampening?
Dampening assigns penalties to flapping routes; penalties decay over time. Above suppress threshold the route may be suppressed; below reuse threshold it can be reused. Half-life controls decay and maximum suppress time limits suppression. Aggressive settings can delay recovery. QA: penalty, suppression, decay and reuse.
Q38Q38. What is RPKI?
RPKI supports validation that an AS is authorized to originate a prefix using ROAs containing prefix, origin ASN and optional maxLength. ROV states: Valid, Invalid and NotFound. Invalid means a relevant ROA exists but origin or length violates it; NotFound means no relevant covering ROA. ROV validates origin, not full AS_PATH; policy decides action.
Q39Q39. What is Add-Path?
Add-Path allows multiple paths for the same prefix to be advertised, reducing Route Reflector path hiding where only the selected best path would otherwise be reflected. Capability negotiation is required; path identifiers distinguish paths. Extra paths consume resources. QA: negotiation, multiple paths, withdrawal and retention.
Q40Q40. Full Mesh vs RR vs Confederation?
Full mesh requires n(n−1)/2 sessions. RR reduces sessions through reflection. Confederation divides an AS into sub-ASes while presenting one external identity. Compare scalability, complexity, path visibility, loop prevention and recovery. QA: propagation, best-path visibility, redundancy and convergence.
SECTION E – TROUBLESHOOTING & SENIOR NETWORK QA
Questions 41–50 · 10 questions
Q41Q41. BGP neighbour stuck in Active: how troubleshoot?
Active means TCP establishment is being retried. Check peer IP, remote AS, interface, route to peer, TCP179, ACL/firewall, update-source, multihop TTL and authentication. Use show ip bgp summary, neighbour, route, interface, ACL, TCP commands and Linux nc -vz. Capture packets if needed. Ping does not prove TCP reachability.
Q42Q42. Established but no routes received: why?
Established confirms session only. Peer may originate no routes; network statement may lack exact RIB match; outbound policy may deny; address family may not be activated; aggregation may suppress routes. Inspect sender advertised routes and receiver BGP table; verify source RIB and policies. Test permit/deny and recovery.
Q43Q43. BGP route present but missing from IP RIB: troubleshoot?
Check best-path marker, NEXT_HOP reachability, competing route/administrative distance and installation eligibility. Compare BGP RIB, IP RIB and FIB/CEF. Commands: show ip bgp <prefix>, show ip route <next-hop>, show ip route <prefix>, show ip cef <prefix>. Separate receipt, selection, installation and forwarding.
Q44Q44. What is route flapping and how troubleshoot?
Repeated advertisement/withdrawal or session transitions can result from physical instability, packet loss, TCP resets, unstable underlay, BFD, timers or remote instability. Inspect interface counters, logs, reset reasons, TCP and BFD events. Measure flap count, withdrawals, convergence, loss and stability. Fix root cause before dampening.
Q45Q45. Incorrect AS in OPEN: what happens?
The receiver compares peer AS information with configured remote AS. A mismatch can produce OPEN error/NOTIFICATION and terminate session, even though TCP succeeded. Inspect logs and packet capture. Four-octet ASN capability may use AS_TRANS (23456) in legacy 16-bit field. Test correct/wrong AS and recovery.
Q46Q46. How troubleshoot asymmetric routing?
Forward and return paths can differ due to LOCAL_PREF, AS_PATH, MED, remote policy or ECMP. Asymmetry is not automatically a fault but can affect stateful firewalls/NAT. Trace both directions, inspect BGP and forwarding, test firewall session and application behaviour.
Q47Q47. How analyse BGP with Wireshark?
Capture TCP179 and filter bgp. Message filters: bgp.type == 1 OPEN, 2 UPDATE, 3 NOTIFICATION, 4 KEEPALIVE. Inspect TCP handshake, OPEN/capabilities, keepalives, UPDATE attributes/prefixes/withdrawals, NOTIFICATION code/subcode and TCP teardown. Save timestamps and peer details as evidence.
Q48Q48. How validate convergence and failover?
Establish primary/backup, run traffic, record baseline, inject controlled failure, measure detection, withdrawal, best-path change, RIB/FIB update and data-plane recovery; restore link and verify policy. Measure detection, BGP convergence, packet loss, application recovery and stability. Define thresholds from requirement/SLA, not assumed universal values.
Q49Q49. How design a BGP test plan for Senior QA?
Cover functional, protocol, routing, policy, attributes, scale, performance, stability, security, interoperability and recovery. Include negative tests: wrong AS/peer, TCP blocked, auth mismatch, prefix filtering, next-hop failure, max-prefix, BFD and withdrawals. Record ID, requirement, topology, preconditions, steps, expected/actual, pass/fail, logs, captures and defect.
Q50Q50. Four routers have intermittent route loss: how investigate?
Identify prefix and scope; determine whether route is not advertised, rejected, not selected, not installed or not forwarded. Check sessions, attributes, policies, interfaces, logs, TCP/BFD and UPDATE/NOTIFICATION captures. Inject controlled link, ACL, policy and next-hop faults. Measure convergence. Report reproducible steps, evidence, root cause, fix and regression. Example: unreachable next hop leaves prefix in BGP but absent from IP RIB.
This page publishes the 50 interview questions and answers from the Part 3 master document, Version 1.0. The five interactive section assessments are not included in this website update; their exact question wording, options, correct answers and explanations remain a separate review item before publication.
CLI syntax and platform behaviours are illustrative. Validate commands against the target vendor, platform, address family and software release.