What is BGP?

Published Aug 13, 2026

← All glossary terms Jump to B

Border Gateway Protocol (BGP) is the standardized path-vector routing protocol that exchanges reachability information between autonomous systems, and it is the protocol that effectively routes the internet. Versa SD-WAN also runs a multiprotocol variant of BGP as its own control-plane protocol, distributing overlay routes between CPE devices, Controller nodes, and LAN- or cloud-side routers.

Key takeaways

  • BGP exchanges routes between autonomous systems as AS-path vectors.
  • eBGP peers different autonomous systems; iBGP peers within one AS.
  • Local preference, AS path, and MED are the core selection attributes.
  • Versa SD-WAN runs MP-BGP as its overlay control-plane protocol.
  • Communities and import/export policies shape SD-WAN topologies.

On this page: Why it mattersHow it worksTypesBGP & VersaFAQ

Why is BGP important?

BGP is the routing protocol that connects the internet’s independently operated networks into a single reachable system. Every internet service provider, cloud provider, and large enterprise network announces its address space through BGP, and every router between them uses BGP-learned routes to reach the rest of the internet. Without a common exterior protocol, these networks could not agree on how to forward traffic to one another.

What makes BGP durable is that it is policy-based rather than purely metric-based: an operator can prefer a route for business reasons, not just because it is shortest. That same scalable, policy-driven model is why SD-WAN vendors, including Versa, repurpose BGP internally as a control-plane protocol instead of designing a new one from scratch.

What is BGP?

BGP is a path-vector protocol: routers exchange full paths (sequences of AS numbers) rather than just distances, letting each router reject a route that already contains its own AS. Two speakers form a peering session over TCP port 179 and exchange UPDATE messages carrying prefixes and path attributes – AS path, next hop, local preference, MED, and community values.

There are two peering modes. eBGP runs between routers in different autonomous systems. iBGP runs between routers inside the same AS, carrying externally learned routes across it. When multiple valid paths exist, BGP evaluates attributes in a fixed order – weight, then local preference, then AS path length, then origin, then MED – until one wins.

Types of BGP

BGP is described by address family more than by separate “versions.” Multiprotocol BGP (MP-BGP) carries address families beyond plain IPv4 unicast – IPv6, Layer 3 VPN routes, EVPN, and vendor-private families – inside the same session, which is how Versa reuses BGP for SD-WAN overlay routes.

Path attributes function as the protocol’s real “controls.” Local preference is an iBGP-only attribute that sets the most-preferred exit point within an AS. AS path doubles as a loop-prevention and preference tool through prepending. Communities tag routes so policies can match groups of prefixes without listing individual addresses. Route reflectors solve the iBGP full-mesh scaling problem by reflecting routes to clients instead of requiring every router to peer with every other one.

BGP & Versa

Versa SD-WAN uses MP-BGP as its control-plane protocol, exchanging overlay routes as NLRI carried in BGP communities between CPE branches and Controller nodes, which act as route reflectors for their branches. Import and export policies keyed on communities build SD-WAN topologies – full mesh, hub-and-spoke, or spoke-to-hub-only – as described in the Consolidated SD-WAN Design Guide and Versa SD-WAN Design Guide.

Local preference is what Director Workflows manipulate to steer traffic: for direct internet access (DIA), the default route from a primary broadband transport VR is advertised with a higher local preference (say 120) than a backup LTE VR (119), so the LAN-VR installs the primary link’s route as active. AS path checks guard against loops when a VOS gateway peers with an external MPLS provider, using the default SD-WAN iBGP AS number 64512 so a re-learned provider route is rejected automatically. On the device, BGP is configured under Networking > Virtual Routers > BGP – router ID, local/peer AS, MD5 authentication, prefix lists, and peer-group policies all live there, alongside optional BFD.

Frequently asked questions

What is the difference between eBGP and iBGP?

eBGP runs between routers in different autonomous systems to connect independently operated networks. iBGP runs between routers within the same AS to carry externally learned routes across it. Versa SD-WAN’s overlay control plane runs as iBGP between CPE branches and Controllers by default.

What is an autonomous system in BGP?

An autonomous system (AS) is a network or group of networks under one administrative control that shares a common routing policy, identified by a unique AS number. BGP exchanges reachability information between autonomous systems, whether they belong to internet providers, enterprises, or an SD-WAN overlay’s own AS.

What is AS path prepending used for?

AS path prepending repeats an AS number in a route’s AS path to make that path look longer, and therefore less preferred, to peers evaluating AS path length. Operators use it to de-prioritize a link – for example, making a backup circuit less attractive without disabling it.

How does BGP select the best path when multiple routes exist?

BGP evaluates attributes in a fixed order – weight, local preference, locally originated status, AS path length, origin, MED, and eBGP-over-iBGP preference – stopping at the first attribute that distinguishes the candidates. Only one best path is installed unless multipath (ECMP) is explicitly enabled.

How does Versa SD-WAN use BGP local preference for path selection?

Director Workflows set BGP local preference on default routes advertised from each WAN transport VR to the LAN-VR, so the route with the higher value becomes active. This is how DIA failover and load-balancing between broadband and LTE transports are implemented without static routing.

More on BGP

If you want to learn more, these are sources we trust.

RFC 4271: A Border Gateway Protocol 4 (BGP-4) RFC 4760: Multiprotocol Extensions for BGP-4
The IETF standard defining BGP-4: message formats, path attributes, and the best-path selection process. The extension that lets BGP carry address families beyond IPv4 unicast, the basis for Versa’s MP-BGP control plane.

If you’re reading about BGP, these are worth looking at next.

AS Path SD-WAN Multiprotocol Label Switching
The BGP attribute listing the autonomous systems a route has traversed, used for loop detection and preference. The overlay architecture whose control plane, in Versa’s implementation, runs as a multiprotocol variant of BGP. The label-switched underlay technology Versa gateways commonly peer with over BGP to exchange provider routes.