What is BGP?
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.