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
  1. Version: BGPv4
  2. Standard: RFC 427
  3. Type: EGP -Path Vector
  4. iBGP Administrative Distance: 200
  5. eBGP Administrative Distance: 20
  6. Transport: Port 179
  7. Authentication: MD5
 
 
Packet Types
  1. Open (BGP Version, Local AS Number, BGP Router ID)
  2. Keepalive (Every 60 Seconds)
  3. Update (Exchange Routes)
  4. Notification (Fatal Errors)
 
 
BGP Table Types
  1. BGP Neighbor Table
  2. BGP Table (also known as BGP topology table)
  3. BGP Routing Table 
 
 
BGP Session Establishment between peers
  1. TCP – Syn – Syn-Ack -Ack (3-way handshake)
  2. Open – Open
  3. Keepalive – Keepalive
  4. Update – Update
 
FSM – Finite State Machine
  1. Idle – The opening BGP state.
  2. 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.
  3. 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.
  4. 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.
  5. OpenConfirm – BGP hears for a reply KEEPALIVE message.
  6. Established – BGP peer session is completely built. UPDATE messages including routing data will now be sent.
 
 
Path Selection
  1. Weight (Highest)
  2. Local Preference (Highest)
  3. Self-Originated
  4. AS Path (Shortest)
  5. Origin (IGP over EGP)
  6. MED (Lowest)
  7. External (eBGP over iBGP)
  8. IGP Cost (Lowest)
  9. Multiple paths
  10. eBGP Peering (Oldest)
  11. Router ID (Lowest)
  12. Cluster List (Minimum)
  13. Neighbor address (Lowest)
 
BGP Commands of Cisco, Juniper & Alcatel
 
Cisco BGP Commands
  1. show ip bgp
  2. show ip bgp neighbors
  3. show ip bgp neighbors <address> advertised-routes
  4. show ip bgp neighbors <address> received-routes
  5. show ip bgp community
  6. show ip bgp dampened paths
  7. show ip bgp peer-group
  8. show ip bgp regexp
  9. clear ip bgp
  10. clear ip bgp dampening
  11. show ip bgp summary
 
Juniper BGP Commands
 
  1. show route protocol bgp
  2. show route community
  3. show route damping decayed
  4. show bgp neighbor
  5. show route advertising-protocol bgp <address>
  6. show route receive-protocol bgp <address>
  7. show bgp group
  8. show route aspath-regex
  9. clear bgp neighbor
  10. clear bgp damping
  11. show bgp summary
 
 
Alcatel BGP Commands
 
  1. show router route-table protocol bgp
  2. show router bgp routes community
  3. show router bgp damping
  4. show router bgp neighbor
  5. show router bgp neighbor (x.x.x.x) advertised-routes
  6. show router bgp neighbor (x.x.x.x) received-routes
  7. show router bgp group
  8. show router bgp routes (family) aspath-regex
  9. clear router bgp neighbor
  10. clear router bgp damping
  11. show router bgp summary
 
 
Other important BGP topics
 
  1. BGP Split horizon
  2. BGP Synchronization
  3. BGP Route-Reflectors, Confederations
  4. BGP Communities
  5. BGP Summarization
  6. BGP Route Dampening
  7. BGP Backdoor