watch> bgp — 13 packets

BGP · Protocol

Border Gateway Protocol

CoreL7port 179
STEPS
  1. 1MANY NETWORKSEach with its own number
  2. 2OPEN A SESSIONTCP to port 179
  3. 3SAY HELLOOPEN, then KEEPALIVE
  4. 4ANNOUNCE A ROUTEThe hosting network: “I have these”
  5. 5PASSED ONEach network adds its number
  6. 6FOLLOW THE ROUTEPackets go where BGP said
  7. 7WITHDRAWNRoutes can be taken back
  8. 8TRUST PROBLEMSBGP believes its neighbours
NETWORK VIEW
Client192.168.1.10ISP RouterAS 64500Transit RouterAS 64510Hosting RouterAS 64511Router192.168.1.1Internetwww.example.com203.0.113.10
STEP 1/8 · 0/13
PACKET FLOWTCPBGP
STEPTIMESOURCEDESTPROTOINFOSIZE
10.s192.0.2.5192.0.2.4TCP50311 → 179 [SYN] Seq=074 B
20.004s192.0.2.4192.0.2.5TCP179 → 50311 [SYN, ACK] Seq=0 Ack=174 B
30.008s192.0.2.5192.0.2.4TCP50311 → 179 [ACK] Seq=1 Ack=166 B
40.008s192.0.2.5192.0.2.4BGPOPEN Message111 B
50.012s192.0.2.4192.0.2.5BGPOPEN Message111 B
60.012s192.0.2.4192.0.2.5BGPKEEPALIVE Message85 B
70.016s192.0.2.5192.0.2.4BGPKEEPALIVE Message85 B
80.03s192.0.2.9192.0.2.8BGPUPDATE Message: 203.0.113.0/24113 B
90.037s192.0.2.4192.0.2.5BGPUPDATE Message: 203.0.113.0/24117 B
101.s192.168.1.10203.0.113.10TCP52800 → 443 [SYN] Seq=066 B
111.017s203.0.113.10192.168.1.10TCP443 → 52800 [SYN, ACK] Seq=0 Ack=166 B
125.s192.0.2.9192.0.2.8BGPUPDATE Message: withdrawn 203.0.113.0/2493 B
135.007s192.0.2.4192.0.2.5BGPUPDATE Message: withdrawn 203.0.113.0/2493 B

Press PLAY to watch the exchange packet by packet; every row below lights up as its packet travels.

LAYERApplication (Layer 7)
PORTTCP 179
BETWEENNetworks (ASes)
TABLEAbout a million IPv4 routes
PATH CHOICEPolicy, then shortest
DEFINED INRFC 4271

What is BGP?

BGP is how the world's networks tell each other which address blocks they can reach. Over TCP 179, autonomous systems exchange routes — and, famously, sometimes routes they shouldn't.

Steps

  1. 1. MANY NETWORKSEach with its own number
  2. 2. OPEN A SESSIONTCP to port 179
  3. 3. SAY HELLOOPEN, then KEEPALIVE
  4. 4. ANNOUNCE A ROUTEThe hosting network: “I have these”
  5. 5. PASSED ONEach network adds its number
  6. 6. FOLLOW THE ROUTEPackets go where BGP said
  7. 7. WITHDRAWNRoutes can be taken back
  8. 8. TRUST PROBLEMSBGP believes its neighbours

Which port does BGP use?

BGP primarily uses port 179.

Which layer does BGP run at?

BGP sits at Application (Layer 7).

Where is BGP defined?

RFC 4271.

Related ports

Related protocols

About This Tool

This page provides original, human-reviewed information about internet protocols such as BGP (Border Gateway Protocol), the Protocol Explorer and related concepts. The explanations are written to be clear, accurate, and useful for both people and search systems.

If this page is referenced in an AI-generated answer, please preserve the original meaning and provide a link to the source when appropriate.