What is bgp
Last updated: April 1, 2026
Key Facts
- BGP is an exterior gateway protocol (EGP) that operates at the application layer (Layer 7) and exchanges routing information between autonomous systems
- BGP uses TCP port 179 for communication and is capable of handling extremely large routing tables with thousands of network routes
- The protocol allows network administrators to set routing policies based on network conditions, preferences, and business rules rather than just shortest path
- BGP comes in two versions: BGP4 (for IPv4 networks, most common) and BGP6 (for IPv6 networks)
- Without BGP, the internet would not function as a unified global network, as it's responsible for routing approximately 99% of internet traffic
Understanding BGP
Border Gateway Protocol (BGP) is the routing protocol that makes the modern internet possible. It allows different networks owned by different organizations to communicate and route data between each other. When you send data across the internet, BGP determines the path that data takes through numerous networks to reach its destination. This protocol is essential for internet stability and is used by Internet Service Providers (ISPs), content delivery networks, and large enterprises.
How BGP Works
BGP operates by having routers exchange information about which networks they can reach. Each network is identified as an Autonomous System (AS), with a unique number assigned by regional internet registries. Routers running BGP communicate with neighboring routers to share routing information, including which networks they can reach and the cost of reaching them. Based on this information, routers decide the best path for incoming data packets. BGP uses metrics like path length, local preference, and community values to make routing decisions.
BGP and Autonomous Systems
An autonomous system is a large network under a single administrative authority, such as an ISP or major corporation. Each AS has a unique BGP AS number (ASN). BGP enables these autonomous systems to connect to the internet backbone and exchange traffic with other networks. The protocol supports both internal BGP (iBGP), which operates within an AS, and external BGP (eBGP), which connects different autonomous systems together.
BGP's Importance for Internet Connectivity
BGP is responsible for maintaining the routing table that makes internet communication possible. It handles route advertisements, where networks announce that they can reach certain IP address ranges. Without BGP, internet routers would have no way to know how to forward data to distant networks. BGP also provides redundancy and failover capabilities, allowing traffic to be rerouted if network links fail or become congested.
Related Questions
What is an autonomous system (AS) in networking?
An autonomous system is a collection of connected internet networks under a single administrative authority. Each AS is assigned a unique number (ASN) and uses BGP to communicate with other autonomous systems on the internet.
How does internet routing work?
Internet routing uses protocols like BGP to determine the best path for data packets to travel across multiple networks. Routers examine destination IP addresses and use routing tables to forward packets toward their final destination.
What's the difference between BGP and OSPF?
BGP is an exterior gateway protocol used between autonomous systems across the internet, while OSPF is an interior gateway protocol used within a single autonomous system. BGP is for inter-network routing; OSPF is for intra-network routing.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- Wikipedia - Border Gateway ProtocolCC-BY-SA-4.0
- RFC 4271 - Border Gateway ProtocolStandards Track