Border Gateway Protocol
BGP is the only routing protocol in widespread use which facilitates inter-domain routing (between autonomous systems).
BGP is path-vector; routes are tracked in terms of which autonomous systems they pass through.
Message Types
- Open
- Keepalive
- Update
- Notification
Connections between BGP peers are maintained via Open and Keepalive messages on TCP/179.
BGP Tables
- Neighbor table
- BGP table
- IP Routing table
BGP doesn't use a route metric; it relies on a complex path selection process.
EBGP is used between autonomous systems; IBGP is used within an AS.
IGP Synchronization
The synchronization requirement mandates that BGP must learn a route from an IGP for it to be propagated, to ensure consistency. BGP synchronization is often disabled for autonomous systems which do not act as a transit AS.
BGP States
- Idle (active) - Searching for neighbors
- Connect (active) - TCP connection established
- Open Sent (active) - Open message sent
- Open Confirm (active) - Response received
- Established - BGP neighborship established
Neighbors still displayed as "active" after some time has passed have not correctly peered.
BGP Attributes
- Aggregator - ID and AS of the advertising router
- AS_Path - List of the autonomous systems the route has traversed
- Atomic aggregate - Summary includes multiple AS
- Cluster ID - Originating cluster
- Community - Route tag
- Local preference - External path metric for internal neighbors (prefer highest)
- Multiple Exit Discriminator (MED) - Informs external peers which path to take into the AS (prefer lowest)
- Next Hop - External peer in neighboring AS
- Origin - Lowest origin type preferred (IGP < EGP < unknown)
- Originator ID - Identifies route reflector
- Weight (Cisco proprietary) - Administrative Cisco attribute (prefer highest)
Path Selection Process
Routes must meet the synchronization requirement (if enforced) to be considered.
- Weight (highest) - Provided for administrative override
- Local Preference (highest) - Used internally to select path out of AS
- Self-originated (TRUE) - Prefer paths originated by self
- AS_Path (shortest) - Minimize AS hops
- Origin (lowest type) - native < EGP < redistributed; stability
- MED (lowest) - Used to determine entrance into an AS
- External (eBGP < iBGP) - External path preferred over internal path
- IGP cost (lowest) - Used to consider additional information about the route
- eBGP peering (oldest) - Stability
- Router ID (lowest) - Lowest router ID breaks a tie
