BGP between ASes

Path-vector protocol between autonomous systems, over TCP 179, AD 20 (eBGP) / 200 (iBGP). No multicast, no auto-discovery — peers are configured. Messages: OPEN, UPDATE (NLRI + attributes), KEEPALIVE, NOTIFICATION. Keepalive 60 / hold 180.

Best-path order (know it cold)

  1. Weight (Cisco-local) 2. Local Preference 3. Locally originated 4. Shortest AS-path 5. Origin IGP>EGP>? 6. Lowest MED 7. eBGP over iBGP

BGP best-path attribute comparison

Config core

router bgp 65010
 bgp log-neighbor-changes
 neighbor 192.0.2.1 remote-as 65002
 network 10.0.0.0 mask 255.255.255.0   ! must exist in the RIB

BGP session states
BGP peering setup
BGP UPDATE exchange
BGP path selection
BGP policy flow

Aggregation & the blackhole trap

aggregate-address 10.10.0.0 255.255.252.0 summary-only hides the /24s — if one dies internally, traffic still arrives and blackholes. Use as-set to keep AS-path loop detection; keep a IGP route to every component subnet.

BGP summarization scenario

Verify: show ip bgp summary, show ip bgp neighbors <ip> advertised-routes, soft reset with clear ip bgp * soft.