Explain BGP: Sessions, Route Exchange, and Best-Path Selection
CiscoSoftware Engineer · OnsiteLast updated
A networking fundamentals question asking the candidate to explain the Border Gateway Protocol: why it exists, how peers form sessions and exchange routes, how a router selects the best path, and how BGP differs from interior protocols such as OSPF. It also probes troubleshooting and testing.
Explain the Border Gateway Protocol (BGP). Cover what problem it solves, how two routers establish a BGP session and exchange routes, how a router chooses among several routes to the same destination, and how BGP differs from an interior routing protocol such as OSPF.
Clarifying Questions
- Should the explanation focus on BGP between organizations on the internet, or also cover BGP inside one network, such as between a company's own routers or in a data center?
- How deep should the route selection discussion go: the main attributes, or the full tie-breaking order?
Hints
Hint 1
Between networks, not inside one: Start from the problem: many independently operated networks must learn how to reach each other's address blocks without sharing their internal topology or agreeing on one metric.
Hint 2
More than the shortest path: Think about why a network operator might prefer a longer route, and which information carried with each route lets them express that preference.
Follow-up questions
- A BGP session stays in the Active state. What do you check?
- Why does internal BGP need a full mesh of sessions, or route reflectors?
- You have two upstream providers. How do you prefer one for outbound traffic, and how do you influence which one inbound traffic uses?
- How would you test a router's BGP implementation in a lab?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.