🌐 Networking Intermediate

What is BGP?

Why Interviewers Ask This

This tests whether you can apply Networking knowledge to real-world scenarios. Interviewers are looking for clarity of thought and evidence that you've encountered this in production code.

Answer

BGP (Border Gateway Protocol) is the routing protocol that powers the Internet — it manages how packets are routed between different autonomous systems (networks belonging to different organizations/ISPs). BGP is the only EGP (Exterior Gateway Protocol) in use today. BGP uses path vector routing — it tracks the entire path (AS_PATH) to prevent routing loops, unlike distance-vector or link-state protocols. iBGP (internal BGP) runs between routers within the same AS. eBGP (external BGP) runs between different ASes. BGP makes routing decisions based on policies and attributes: AS_PATH, LOCAL_PREF, MED, NEXT_HOP, communities. BGP is highly configurable but complex — a misconfigured BGP announcement can cause major Internet outages (BGP hijacking incidents). All major ISPs and large organizations use BGP. BGP runs over TCP port 179.

Common Mistake

A common mistake is memorizing definitions without understanding implications. When asked this question, go one level deeper — explain what happens when this concept is misused or ignored.