BGP (Border Gateway Protocol)
Border Gateway Protocol (BGP) exchanges IP prefix reachability and path attributes between routing peers. Networks use those advertisements and their routing policies to decide which paths to accept and advertise.
What BGP carries
A BGP peer advertises reachable prefixes and attributes associated with those paths. Examples include the autonomous-system path (AS_PATH) and next-hop information. Receiving a prefix gives a router a candidate route; local policy and route selection determine whether it is accepted and used.
External BGP, or eBGP, connects peers in different autonomous systems. Internal BGP, or iBGP, exchanges BGP reachability within an autonomous system. A BGP relationship is a control-plane session, normally carried over TCP port 179. It does not itself carry the application packets destined for the advertised prefix.
A service-address example
Imagine two load-balancer nodes can reach a service address, 203.0.113.40. They each advertise 203.0.113.40/32 to an upstream router.
- The
/32identifies one IPv4 address, not an entire client subnet. - If the router accepts both advertisements and its multipath policy permits it, it may install multiple forwarding next hops.
- If a node withdraws its advertisement, the router can remove that path after processing the update.
The service still needs a working data path and healthy application endpoints. An advertisement does not configure an application, open a firewall, or guarantee that replies have a valid return route.
What to inspect
In a routing daemon such as FRRouting, compare the peer state, received prefixes, selected BGP paths and installed IP routes. These read-only examples inspect different parts of that process:
vtysh -c 'show bgp summary'
vtysh -c 'show bgp ipv4 unicast 203.0.113.40/32'
ip -4 route get 203.0.113.40
Command availability and output vary with the routing daemon and configuration.
Common confusions
BGP is policy-driven; it is not simply a shortest-hop protocol. An Established session proves that peers have formed a session, not that the desired prefix is advertised or installed. BGP advertisements also do not replace ARP or IPv6 Neighbor Discovery on links where those mechanisms are needed to reach a next hop.