Explain BGP: Sessions, Route Exchange, and Best-Path Selection

Read the full interview experience this question came from →

Quick Overview

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 BGP: Sessions, Route Exchange, and Best-Path Selection

Company: Cisco

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Onsite

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. ```hint 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 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. ``` ### 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? ### What a Strong Answer Covers - The purpose: routing between autonomous systems, the path-vector design, and loop prevention - Session mechanics: transport, the neighbor state machine, and the message types - Path attributes and the best-path selection order, and how operators use them as policy - The differences between external and internal BGP, and between BGP and interior gateway protocols - Operational risks such as route leaks and hijacks, and how to verify or troubleshoot a session ### 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?

Overview: 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.

Read the full Cisco Software Engineer interview experience this question came from

|Home/Software Engineering Fundamentals/Cisco
Cisco logo
Cisco
Sep 19, 2026
easySoftware EngineerOnsiteSoftware Engineering Fundamentals
0
0

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 Guidance

  • 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?

What a Strong Answer Covers Guidance

  • The purpose: routing between autonomous systems, the path-vector design, and loop prevention
  • Session mechanics: transport, the neighbor state machine, and the message types
  • Path attributes and the best-path selection order, and how operators use them as policy
  • The differences between external and internal BGP, and between BGP and interior gateway protocols
  • Operational risks such as route leaks and hijacks, and how to verify or troubleshoot a session

Follow-up Questions Guidance

  • 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?
Loading comments...