Border Gateway Protocol (BGP) is the routing protocol that holds the internet together, enabling autonomous systems to exchange routing information and determine the best path for traffic between networks. Understanding BGP is essential for network engineers working with ISP connections, multi-homed networks, or large enterprise environments.
eBGP and iBGP Peering
External BGP (eBGP) sessions connect different autonomous systems and are the mechanism through which internet routes are exchanged. Internal BGP (iBGP) distributes routes learned via eBGP to routers within the same AS. Unlike IGP protocols, iBGP does not modify the next-hop attribute by default, requiring either next-hop-self configuration or an IGP that carries the eBGP next-hop addresses.
BGP path selection follows a well-defined decision process considering attributes like local preference, AS path length, origin type, MED, and community values. Understanding this decision process is key to implementing traffic engineering policies. Use local preference to influence outbound path selection and AS path prepending or MED to influence inbound traffic from peers.
Route filtering is a critical responsibility for any BGP operator. Always filter inbound and outbound routes to prevent accepting or advertising invalid prefixes. Implement prefix-lists and AS-path filters to accept only expected routes from each peer. The consequences of incorrect BGP advertisements can extend far beyond your own network, potentially causing widespread routing disruptions.