Glossary

BGP

Border Gateway Protocol

What is BGP

BGP (Border Gateway Protocol) is a distance vector routing protocol that establishes route reachability between autonomous systems and selects the best path among the routes it learns. As networks grew, they were divided into separate autonomous systems (AS) to keep them manageable, and an early protocol — EGP (Exterior Gateway Protocol) — was introduced in 1982 to exchange routing information between them. EGP only published which networks were reachable; it had no way to prefer one path over another or guard against routing loops, and it couldn't keep up as networks scaled. BGP replaced it, adding path selection, loop prevention, and the ability to carry large volumes of routing information efficiently between AS.

BGP isn't always the right tool for every link, though. On a data center's uplink to the internet, for example, exposing the internal network to the full scale of internet routing tables via BGP is often unnecessary risk — a static route to the external network is frequently the simpler, more contained choice.

BGP comes in two operating modes: IBGP (Internal BGP), which runs between devices inside the same AS, and EBGP (External BGP), which runs between devices in different AS. Because IBGP peers don't re-advertise routes learned from other IBGP peers — the mechanism that would otherwise create loops inside the AS — a fully-connected mesh of IBGP sessions is normally required, which is where route reflectors come in to simplify that topology. EBGP, by contrast, prevents loops simply by discarding any route that already carries the local AS number, and needs no route reflector. Since most devices in a network are assigned different AS numbers, EBGP is the more common mode in practice; IBGP typically shows up between a pair of redundant devices sharing the same AS number.

How BGP Works

Two devices exchanging BGP information are called peers, and the switch actively sending BGP packets is a BGP Speaker — it both generates new routing information and advertises it onward to other Speakers. Related peers can be grouped into a Peer Group for shared configuration.

Every BGP device is identified by a Router ID, a 32-bit value usually expressed as an IPv4 address and carried in the Open packet exchanged when a session is established. Two peers can't form a BGP session unless each has a unique Router ID.

At a high level, establishing and running a BGP relationship follows this general flow:

· AS and Router ID setup: Each device is configured with its AS number and (usually) a unique Router ID, often drawn from a Loopback interface address for stability regardless of physical link status.

· Neighbor/peer establishment: A device is told the IP address and AS number of each neighbor it should peer with — matching AS numbers on both sides identifies the session as IBGP, differing numbers as EBGP.

· Route exchange and best-path selection: Once a session is up, peers exchange reachable prefixes; each device evaluates the routes it receives against its policies and its BGP path-selection rules to choose the best path to each destination.

· Loop prevention: IBGP relies on the "don't re-advertise to other IBGP peers" rule; EBGP relies on discarding any route already tagged with the local AS number in its AS-path.

· Route reflection (IBGP): Instead of meshing every IBGP device together, a Route Reflector (RR) can be designated so that other devices peer only with the RR, which then reflects routes among its clients — cutting down the number of sessions each device must maintain.

Why BGP is Beneficial

The core value of BGP lies in scalable, policy-aware route exchange across administrative boundaries:

· Loop-free route exchange between AS: Built-in AS-path and IBGP re-advertisement rules keep routing loops from forming as routes cross network boundaries.

· Best-path selection, not just reachability: Unlike its EGP predecessor, BGP actively compares candidate routes and selects the best one, rather than simply reporting what's reachable.

· Scales to large routing tables: BGP is built to carry and maintain large volumes of routing information reliably, which is why it underpins inter-AS routing across the internet as well as large data center fabrics.

· Flexible, policy-driven control: Route maps, redistribution of other protocols' routes, and per-session tuning give administrators fine-grained control over what gets announced, accepted, and preferred.

· Fast convergence when paired with BFD: Linking BGP with BFD (Bidirectional Forwarding Detection) lets link failures trigger near-immediate session teardown and route recalculation, instead of waiting on BGP's own slower failure-detection timers.

At Asteraix

What We Can Do at Asteraix

AsterNOS supports a full BGP feature set for building resilient, policy-controlled routing between and within autonomous systems:

· Core session setup: router bgp <asn> enters BGP configuration, bgp router-id <ip_addr> sets the Router ID (Loopback 0 by default), and neighbor <neighbor_ip> remote-as <asn> establishes a peer — with the option to shut down an individual neighbor session or all BGP sessions on the device without removing the configuration.

· Peer groups and session source addressing: Neighbors can be organized into peer groups (neighbor <peer-group> peer-group) for shared settings, and neighbor ... update-source lets a session be sourced from a Loopback interface rather than a physical link IP.

· Route control: network <prefix> announces IPv4 or IPv6 BGP routes under the relevant address-family, redistribute connected/kernel/ospf/isis brings routes from other sources into BGP, and route-maps can be attached at each step for policy-based filtering.

· IBGP simplification and resiliency features: neighbor ... route-reflector-client configures route reflection to cut down full-mesh IBGP sessions, bgp graceful-restart keeps the forwarding plane intact through a BGP process restart, and neighbor ... bfd links a session to BFD for fast failure detection.

· Security and tuning: neighbor ... password adds session authentication, bgp bestpath as-path multipath-relax controls whether equal routes from different AS domains are combined into an ECMP group, and no bgp ebgp-requires-policy can relax the default requirement that every EBGP session have a bound routing policy.

· Display and maintenance: show ip bgp summary reports established and failed neighbor sessions at a glance, show ip bgp shows the routes in the BGP table, and show ip bgp neighbors <ip> [routes|advertised-routes|received-routes|...] drills into exactly what a specific neighbor has sent, received, or had filtered.

· Typical deployment: Three switches connect a set of hosts across different network segments, each running BGP in its own AS. After bringing up each directly-connected interface and a Loopback0 address for the Router ID, EBGP neighbors are configured over the physical links between adjacent switches, and connected routes are redistributed into BGP so that each switch's local subnets become reachable network-wide. show ip bgp summary confirms each EBGP session reaches the Established state, and hosts on the outermost switches can then reach each other end-to-end.