Border Gateway Protocol is the Internet's path-vector routing protocol. It exchanges IP prefix reachability and path attributes so networks can apply administrative policy rather than choosing routes only by physical distance.
Routing · Lesson 7
Border Gateway Protocol
Learn how BGP exchanges policy-controlled IP reachability between and within autonomous systems.
Autonomous Systems and Sessions
An autonomous system is a set of networks under a common routing administration, identified for BGP by an autonomous system number. External BGP exchanges routes between autonomous systems; internal BGP distributes BGP reachability within one AS.
BGP peers establish a session over TCP port 179. A working TCP session is only the transport foundation; BGP capabilities, policies, and route exchange must also succeed.
What does external BGP exchange?
Path-Vector Information
An advertisement includes a prefix and attributes. AS_PATH lists autonomous systems traversed and helps detect loops. Other common attributes include LOCAL_PREF, MED, origin, next hop, and communities. Their effect depends on direction, implementation, and policy.
How does AS_PATH help prevent inter-AS loops?
Policy-Based Selection
BGP's “best” path is the path that wins a configured decision process. Operators can prefer customer routes, alter local preference, filter prefixes, use communities, and apply traffic-engineering policy. A shorter AS_PATH can matter at one step but does not universally override higher-priority attributes.
After BGP selects candidates, normal IP forwarding still applies longest-prefix matching. A selected /24 is used for its destinations instead of a selected covering /16.
What does a BGP best path represent?
Advertisement and Reachability
Advertising a prefix asserts reachability under policy; it does not create the underlying route or ensure the return path. Before originating a prefix, ensure valid forwarding, aggregation behavior, filters, failover, and ownership authorization.
What does advertising a prefix fail to guarantee?
Routing Security and Change Control
Route leaks and hijacks can affect traffic far beyond one router. Operators use strict import and export filters, maximum-prefix limits, peer policy, monitoring, and Resource Public Key Infrastructure origin validation where appropriate. RPKI origin validation checks whether an AS is authorized to originate a prefix; it does not validate the complete AS path.
BGP changes require staged rollout, route-diff review, out-of-band access, rollback, and both control- and data-plane verification.
What does RPKI origin validation check?
Lesson complete
You finished Border Gateway Protocol
You can now describe BGP as policy-controlled path-vector routing.
Distinguish external from internal BGP sessions.
Use
AS_PATHas path and loop information.Interpret best path through local attributes and policy.
Verify forwarding behind every advertised prefix.
Apply filtering, origin validation, monitoring, and rollback.
Keep your learning progress
Create a free account to save this lesson and continue learning on any device.
Create a free account