Skip to content
עברית

Guide

BGP — Border Gateway Protocol

BGP exchanges reachability and routing policy between autonomous systems and within large networks. Neighbors establish a TCP session, exchange capabilities, then send announcements and withdrawals. BGP describes control-plane reachability; it does not itself forward application packets or guarantee that an advertised path carries traffic successfully.

Meaning and purpose

BGP exchanges reachability and routing policy between autonomous systems and within large networks. Neighbors establish a TCP session, exchange capabilities, then send announcements and withdrawals. BGP describes control-plane reachability; it does not itself forward application packets or guarantee that an advertised path carries traffic successfully.

How it works in context

AS_PATH records traversed autonomous systems; NEXT_HOP identifies the next forwarding destination. LOCAL_PREF expresses preference inside an AS; MED can influence entry-point choice under particular comparison rules. Policy and implementation affect best-path selection, so “shortest path always wins” is incorrect. Communities carry policy labels whose meanings are agreed by operators.

Technical terms in this section

Why BGP exists

BGP exchanges reachability between independently governed networks with policy-controlled path selection.

How BGP works

BGP peers negotiate capabilities and exchange prefix announcements and withdrawals over TCP.

BGP neighbors

BGP neighbors are configured protocol peers and need not share a direct physical link.

BGP sessions

A BGP session maintains peer state and carries routing updates after establishment.

TCP port 179

TCP 179 conventionally serves BGP; reachability alone does not establish an authorized session.

eBGP vs. iBGP

eBGP connects different autonomous systems; iBGP distributes BGP routes within one system.

BGP route announcements

BGP announcements advertise prefix reachability together with associated path attributes.

BGP route withdrawals

A withdrawal removes a peer’s earlier route advertisement, not necessarily all alternative reachability.

BGP route propagation

BGP propagation follows each operator’s import and export policies rather than automatic universal distribution.

BGP path selection

BGP selects among eligible routes using policy and attributes, not AS-path length alone.

AS_PATH

AS_PATH records autonomous-system traversal and supports loop detection and routing policy.

NEXT_HOP

NEXT_HOP identifies the forwarding next hop, which must be reachable through local routing.

LOCAL_PREF

LOCAL_PREF expresses intra-AS preference, with higher values generally preferred among eligible routes.

MED

MED suggests an inter-AS entry preference; comparison scope and policy determine its effect.

ORIGIN

ORIGIN classifies route origin type; it is distinct from the origin ASN or resource holder.

BGP communities

BGP communities label routes for operator-defined policy; meanings depend on documented agreements.

Extended communities

Extended communities encode additional policy information, including route targets in supported deployments.

Large communities

Large communities use three 32-bit values for scalable routing-policy labels.

Route reflectors

Route reflectors reduce iBGP full-mesh requirements by reflecting routes between clients.

BGP confederations

Confederations organize internal BGP sub-autonomous systems while presenting coordinated external routing.

BGP route filtering

Route filtering constrains accepted and exported prefixes or attributes according to policy.

Prefix lists

Prefix lists match address prefixes and permitted prefix-length ranges.

AS_PATH filtering

AS-path filters accept or reject routes based on autonomous-system path patterns.

BGP route aggregation

Route aggregation advertises covering prefixes and needs forwarding plans for all covered destinations.

BGP convergence

BGP convergence is the transition toward stable route selection after reachability or policy changes.

BGP route dampening

Route dampening suppresses unstable routes but can delay restoration if poorly configured.

BGP multipath

BGP multipath installs multiple eligible paths under implementation-specific equality and policy rules.

BGP traffic engineering

BGP traffic engineering influences path choice through policy and attributes within inter-network constraints.

BGP looking glasses

Looking glasses expose an operator’s routing viewpoint rather than universal Internet state.

BGP route collectors

Route collectors record peer advertisements for measurement without necessarily forwarding user traffic.

BGP hijacking

BGP hijacking advertises unauthorized reachability and may divert or disrupt traffic.

BGP route leaks

Route leaks propagate reachability beyond intended routing-policy or relationship boundaries.

BGP poisoning

BGP poisoning manipulates AS-path contents to influence loop rejection and path availability.

BGP security

BGP security combines peer protection, filtering, limits, validation and change monitoring.

RPKI and Route Origin Validation

Route Origin Validation checks an announced prefix/origin against validated RPKI authorization data.

ROAs

A ROA authorizes an ASN to originate a prefix with a specified maximum length.

ASPA

ASPA describes authorized provider relationships for path-verification mechanisms; support depends on specification and implementation.

BGPsec

BGPsec cryptographically protects aspects of AS-path propagation in supporting deployments, separately from origin validation.

BGP monitoring

BGP monitoring tracks prefixes, origins, path changes and policy anomalies over time.

Operational checks and security

Check session state, accepted prefixes, policy and next-hop reachability separately. Filter unexpected prefixes and AS paths, set prefix limits and monitor changes. RPKI origin validation checks authorization of an origin/prefix combination, not the legitimacy of every AS in the path.

Read-only example

These commands inspect the surrounding system or protocol. They do not automatically change its configuration or establish every property of this term. Replace example targets only with destinations you are authorized to inspect.

# Read-only FRRouting example; command availability depends on version
vtysh -c "show bgp summary"
vtysh -c "show bgp ipv4 unicast 192.0.2.0/24"

Sources and further reading

These explanations are educational. Implementations, policies and standards evolve; check the current specification and software version before changing a system.

Zaltzman.net · Your choice

Privacy preferences

Choose whether to link returning visits and remember display settings. Public content remains available without optional cookies.

Essential cookies

Always on

Secure forms, login sessions and your privacy choice.

What is included?

Session and CSRF protection, your privacy choice for up to 180 days, and Cloudflare security services. These do not authorise optional visitor analytics.

Analytics & returning visits

Store page history, visit times, IP and approximate location under one browser identifier, including return visits after an IP change.

How is this information used?

Authorised administrators use the history to understand usage and improve the site. No targeted ads, keystroke recording or fingerprinting. Turning this off deletes the history linked to your current identifier from the active database.

Remember display preferences

Save text size, contrast and other accessibility choices locally for your next visit.

Download my browser history

Turning analytics off deletes the current history and stops new collection.

Website operator: The Zaltzman Family
[email protected]

Zaltzman.net · Display settings

Accessibility tools

Adjust reading and navigation to suit you. Analytics consent is not required.

Text size
100%