BGP (Border Gateway Protocol): Quick Reference Notes
Quick BGP notes, for network professionals seeking insights into key attributes, the path vector protocol, and routing decisions.
Border Gateway Protocol (BGP)
Basic Information
- Version: BGPv4
- Standard: RFC 427
- Type: EGP -Path Vector
- iBGP Administrative Distance: 200
- eBGP Administrative Distance: 20
- Transport: Port 179
- Authentication: MD5
Packet Types
- Open (BGP Version, Local AS Number, BGP Router ID)
- Keepalive (Every 60 Seconds)
- Update (Exchange Routes)
- Notification (Fatal Errors)
BGP Table Types
- BGP Neighbor Table
- BGP Table (also known as BGP topology table)
- BGP Routing Table
BGP Session Establishment between peers
- TCP – Syn – Syn-Ack -Ack (3-way handshake)
- Open – Open
- Keepalive – Keepalive
- Update – Update
FSM – Finite State Machine
- Idle – The opening BGP state.
- Connect – BGP waits for a TCP connection with the remote peer. If successful, an OPEN message is sent. If failed, the session is placed in an Active state.
- Active – BGP tries to begin a TCP connection with the remote peer. If successful, an OPEN message is sent. If unsuccessful, BGP will wait for a Connect-Retry timer to terminate, and place the session back in a Connect State.
- OpenSent – BGP has both built the TCP connection and sent an OPEN Message, and is expecting a reply OPEN Message. Once it gets a reply OPEN Message, the BGP peer will send a KEEPALIVE message.
- OpenConfirm – BGP hears for a reply KEEPALIVE message.
- Established – BGP peer session is completely built. UPDATE messages including routing data will now be sent.
Path Selection
- Weight (Highest)
- Local Preference (Highest)
- Self-Originated
- AS Path (Shortest)
- Origin (IGP over EGP)
- MED (Lowest)
- External (eBGP over iBGP)
- IGP Cost (Lowest)
- Multiple paths
- eBGP Peering (Oldest)
- Router ID (Lowest)
- Cluster List (Minimum)
- Neighbor address (Lowest)
BGP Commands of Cisco, Juniper & Alcatel
Cisco BGP Commands
- show ip bgp
- show ip bgp neighbors
- show ip bgp neighbors <address> advertised-routes
- show ip bgp neighbors <address> received-routes
- show ip bgp community
- show ip bgp dampened paths
- show ip bgp peer-group
- show ip bgp regexp
- clear ip bgp
- clear ip bgp dampening
- show ip bgp summary
Juniper BGP Commands
- show route protocol bgp
- show route community
- show route damping decayed
- show bgp neighbor
- show route advertising-protocol bgp <address>
- show route receive-protocol bgp <address>
- show bgp group
- show route aspath-regex
- clear bgp neighbor
- clear bgp damping
- show bgp summary
Alcatel BGP Commands
- show router route-table protocol bgp
- show router bgp routes community
- show router bgp damping
- show router bgp neighbor
- show router bgp neighbor (x.x.x.x) advertised-routes
- show router bgp neighbor (x.x.x.x) received-routes
- show router bgp group
- show router bgp routes (family) aspath-regex
- clear router bgp neighbor
- clear router bgp damping
- show router bgp summary
Other important BGP topics
- BGP Split horizon
- BGP Synchronization
- BGP Route-Reflectors, Confederations
- BGP Communities
- BGP Summarization
- BGP Route Dampening
- BGP Backdoor