BGP Peering and Route Exchange, Packet by Packet

A frame-by-frame read of a BGP peering coming up in a real Wireshark BGP capture โ€” three autonomous systems, a hub that peers with two others, and the full arc from the first TCP SYN to a converged routing table. The trace was decoded and annotated with VisualEther, which turns a Wireshark PCAP into a sequence diagram with a plain-English caption on every message.

๐Ÿ’ก Read the walkthrough and the diagram side by side. Open the interactive diagram (or PDF) in a split-screen window so the captions stay in view as you read. In Edge, Chrome, or Firefox, right-click the link and pick your browser's split-screen option (Edge labels it "Open link in split screen window"). On macOS, prefer Chrome or Firefox โ€” Safari has no in-browser split screen. Otherwise, open the diagram in a new tab and snap the two windows side by side.

Overview

The Border Gateway Protocol is how the independent networks that make up the internet โ€” autonomous systems, each with its own AS number โ€” tell each other which destinations they can reach. This 154-frame capture is a small, self-contained lab of exactly that: three autonomous systems, a routing table converging from nothing, and every mechanism BGP uses to get there visible on the wire.

The topology is hub-and-spoke. AS 65000 is the hub; it peers with AS 65100 over one link and AS 65200 over another. The two spokes never peer directly โ€” everything they learn about each other transits the hub, which is BGP's core job.

flowchart TB accTitle: BGP hub-and-spoke topology of the capture accDescr: A central autonomous system, AS 65000, peers over eBGP with AS 65100 on the 192.168.51.x link and with AS 65200 on the 192.168.50.x link. AS 65100 and AS 65200 do not peer directly. AS 65000 originates the 10.10.0.0/16 and 10.20.0.0/16 prefixes, AS 65100 originates 10.30.0.0/16 and 10.40.0.0/16, and AS 65200 originates 10.50.0.0/16 and 10.60.0.0/16. AS65100["AS 65100<br/>10.30.0.0/16 ยท 10.40.0.0/16"] AS65000["AS 65000 โ€” hub<br/>10.10.0.0/16 ยท 10.20.0.0/16"] AS65200["AS 65200<br/>10.50.0.0/16 ยท 10.60.0.0/16"] AS65100 ---|"eBGP ยท 192.168.51.x"| AS65000 AS65000 ---|"eBGP ยท 192.168.50.x"| AS65200
The capture's topology. The hub AS 65000 runs one eBGP session to AS 65100 (over the 192.168.51.x link) and another to AS 65200 (over the 192.168.50.x link). The spokes never peer directly, so all reachability between them transits the hub. Each AS originates two /16 prefixes.

The flow moves through five phases, each building on the last:

  1. TCP setup (frames 1โ€“14). BGP runs over TCP, so nothing BGP-level happens until a TCP connection exists. The hub is up first, and its outbound attempts are refused until each neighbor's BGP is listening.
  2. OPEN and Established (frames 16โ€“21). Once TCP connects, the two ends exchange BGP OPEN messages, agree on a hold time, negotiate capabilities, and a KEEPALIVE promotes the session to Established.
  3. Route exchange (frames 24โ€“32). Each side advertises its routes in UPDATE messages and closes its initial table with an End-of-RIB marker.
  4. Propagation across the fabric (frames 34โ€“82). When the second spoke comes up, its routes ripple through the hub to the first spoke โ€” without the two ever peering.
  5. Steady state (frames 84โ€“154). Once converged, the sessions carry nothing but periodic KEEPALIVE heartbeats, until the capture stops.

Every session walks the BGP finite state machine (RFC 4271) on its way to Established:

stateDiagram-v2 accTitle: The BGP finite state machine from Idle to Established accDescr: A BGP session starts in Idle and moves to Connect when it tries to open the TCP connection. If TCP establishes, it moves to OpenSent, sends its OPEN, and on receiving the peer's OPEN moves to OpenConfirm. Receiving a KEEPALIVE promotes it to Established. If the TCP connect fails, it moves to Active and retries after the ConnectRetry timer expires. A NOTIFICATION or hold-timer expiry from any state returns the session to Idle. [*] --> Idle Idle --> Connect: start Connect --> OpenSent: TCP up Connect --> Active: TCP failed Active --> OpenSent: TCP up on retry OpenSent --> OpenConfirm: OPEN received OpenConfirm --> Established: KEEPALIVE received Established --> Idle: NOTIFICATION /<br/>hold expiry
The BGP finite state machine (RFC 4271). A session climbs from Idle through Connect and OpenSent to OpenConfirm, reaching Established only after it receives a KEEPALIVE. A failed TCP connect drops to Active and retries after the ConnectRetry timer โ€” the loop this capture spends its first minutes in. Any NOTIFICATION or hold-timer expiry tears the session back down to Idle.

A primer on BGP

A few ideas make the rest of the walkthrough read cleanly:

Phase 1 โ€” TCP setup: refused until the far side is listening (frames 1โ€“14)

The capture opens with the hub (AS 65000) actively trying to connect to both neighbors: a TCP SYN to destination port 179 on each. Every one is answered with RST, ACK โ€” a reset, before a single BGP byte is exchanged.

sequenceDiagram accTitle: A BGP TCP connection refused before the peer is up accDescr: The hub AS 65000 sends a TCP SYN to the neighbor's port 179. The neighbor responds with a TCP RST and ACK because its BGP process is not listening yet, so no BGP message is ever exchanged. BGP then waits for the ConnectRetry timer (about 120 seconds) before trying again. participant Hub as AS 65000 (hub) participant Peer as neighbor Hub->>Peer: TCP SYN to port 179 Peer-->>Hub: TCP RST, ACK (refused) Note over Hub,Peer: wait ConnectRetry (~120 s), then retry
A refused connection attempt. The hub sends a TCP SYN to the neighbor's port 179; the neighbor answers with RST, ACK because no BGP process is listening yet. This is a transport-layer refusal, not a BGP NOTIFICATION. BGP waits out the ConnectRetry timer (~120 s) and tries again.

Frames 1โ€“4 โ€” the first refusals. Frame 1 is the hub's SYN toward AS 65200 (ephemeral source port 51416 โ†’ destination 179); frame 2 is the RST, ACK that refuses it. Frames 3 and 4 are the same exchange toward AS 65100 on the other link. A reset this early means no process is listening on TCP/179 โ€” the neighbor's BGP daemon is not up yet. This is a transport-layer refusal, not a BGP NOTIFICATION or a policy rejection.

Frames 5โ€“12 โ€” the ConnectRetry loop. Frame 5 retries AS 65100 about 120 s after frame 3; its ephemeral source port stepped up (55404) so you can see it is a brand-new attempt, not a retransmission. That ~120 s cadence is BGP's ConnectRetry timer: when an active connect fails, BGP moves to the Active state, waits ConnectRetry seconds, and tries again. Frames 5โ€“12 are two more rounds of this against both still-silent neighbors โ€” every one refused.

Frames 13โ€“14 โ€” the .51 session comes up, and note who connects. Frame 13 is the turning point: now AS 65100 (192.168.51.2) sends the SYN inbound to the hub's port 179, and frame 14 is the hub's SYN, ACK completing the handshake. The hub's outbound attempts never worked โ€” the session completes only once the passive side's BGP is running and connects in. A session needs one end listening and the other connecting, and here the listener (the hub) was ready long before the callers were. With TCP up, both ends move to OpenSent.

Phase 2 โ€” OPEN, capabilities, and Established (frames 16โ€“21)

With TCP established on the .51 link, both ends exchange BGP OPEN messages โ€” the first BGP-level bytes in the whole capture.

sequenceDiagram accTitle: BGP session establishment from TCP handshake to Established accDescr: AS 65100 sends a TCP SYN to the hub's port 179 and the hub replies with SYN and ACK, completing the TCP handshake. AS 65100 sends a BGP OPEN advertising My AS 65100, a hold time of 180 seconds, and its capabilities, with the graceful-restart restart-state flag set. The hub replies with its own BGP OPEN for AS 65000. Each side then sends a KEEPALIVE, and the session becomes Established. participant Peer as AS 65100 participant Hub as AS 65000 (hub) Peer->>Hub: TCP SYN to port 179 Hub-->>Peer: TCP SYN, ACK Peer->>Hub: BGP OPEN (My AS 65100, hold 180 s, GR restart-state set) Hub->>Peer: BGP OPEN (My AS 65000, hold 180 s) Peer->>Hub: KEEPALIVE Hub->>Peer: KEEPALIVE Note over Peer,Hub: both sides now Established
Session establishment on the AS 65000 to AS 65100 link. The spoke initiates the TCP handshake inbound to the always-listening hub. Both sides send BGP OPEN carrying their AS number, a 180-second hold time, and a capability list. A KEEPALIVE from each side then promotes the session to Established.

Frames 16 and 18 โ€” the two OPENs. Frame 16 is AS 65100's OPEN; frame 18 is the hub's reply. Each carries the sender's My AS, a BGP Identifier (router ID), a proposed Hold Time of 180 s, and a capability list: 4-octet AS numbers, MP-BGP IPv4 unicast, route refresh, graceful restart with long-lived graceful restart, add-paths, and an FQDN capability. The lower of the two proposed hold times wins; both proposed 180, so 180 it is.

One capability detail in frame 16 matters for what follows: AS 65100's graceful-restart Restart-State flag is set, telling the hub it is recovering from a restart. The hub should hold any stale AS 65100 routes until an End-of-RIB marker says the spoke has finished re-advertising. The hub's own flag, back in frame 18, is clear โ€” it did not restart. To find it in the field tree below, expand Optional Parameters and open the second-to-last capability, Graceful Restart capability (the last is Long-Lived Graceful Restart); its Restart Timers node holds the Restart state: Yes flag.

Frames 20 and 21 โ€” KEEPALIVE promotes to Established. A KEEPALIVE in each direction โ€” frame 20 from the spoke, frame 21 from the hub โ€” received in OpenConfirm, promotes both ends to Established, and route exchange can begin.

Frame 16 in full. Everything the two ends negotiate is in this one message: the sender's AS number, its router ID, the proposed hold time, and the full capability list โ€” including the graceful-restart capability whose Restart-State flag drives the rest of the flow. The decoded field tree lays it all out:

๐Ÿค [00015] Frame 16 BGP OPEN 2022-08-24T17:13:23.875067688Z ๐Ÿ–ฅ R2.AS65100 → ๐Ÿ–ฅ R2.AS65000
frame : Frame 16: Packet, 166 bytes on wire (1328 bits), 166 bytes captured (1328 bits) on interface ens39, id 1
Section number : 1
Interface id : 1 (ens39)
Interface name : ens39
Encapsulation type : Ethernet (1)
Arrival Time : Aug 24, 2022 10:13:23.875067688 Pacific Daylight Time
UTC Arrival Time : Aug 24, 2022 17:13:23.875067688 UTC
Epoch Arrival Time : 1661361203.875067688
Time shift for this packet : 0.000000000 seconds
Time delta from previous captured frame : 367.826 microseconds
Time delta from previous displayed frame : 367.826 microseconds
Time since reference or first frame : 4 minutes, 36.336385586 seconds
Frame Number : 16
Frame Length : 166 bytes (1328 bits)
Capture Length : 166 bytes (1328 bits)
Frame is marked : False
Frame is ignored : False
Protocols in frame : eth:ethertype:ip:tcp:bgp
Character encoding : ASCII (0)
eth : Ethernet II, Src: 00:0c:29:dc:92:4e, Dst: 00:0c:29:c8:75:81
Destination : 00:0c:29:c8:75:81
Destination (resolved) : 00:0c:29:c8:75:81
Destination OUI : 00:0c:29 (VMware, Inc.)
Destination OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:0c:29:c8:75:81
Address (resolved) : 00:0c:29:c8:75:81
Address OUI : 00:0c:29 (VMware, Inc.)
Address OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Source : 00:0c:29:dc:92:4e
Source (resolved) : 00:0c:29:dc:92:4e
Source OUI : 00:0c:29 (VMware, Inc.)
Source OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:0c:29:dc:92:4e
Address (resolved) : 00:0c:29:dc:92:4e
Address OUI : 00:0c:29 (VMware, Inc.)
Address OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Type : IPv4 (0x0800)
Stream index : 1
ip : Internet Protocol Version 4, Src: 192.168.51.2, Dst: 192.168.51.1
0100 .... = Version : 4
.... 0101 = Header Length : 20 bytes (5)
Differentiated Services Field : 0xc0 (DSCP: CS6, ECN: Not-ECT)
1100 00.. = Differentiated Services Codepoint : Class Selector 6 (48)
.... ..00 = Explicit Congestion Notification : Not ECN-Capable Transport (0)
Total Length : 152
Identification : 0xeb32 (60210)
010. .... = Flags : 0x2, Don't fragment
0... .... = Reserved bit : Not set
.1.. .... = Don't fragment : Set
..0. .... = More fragments : Not set
...0 0000 0000 0000 = Fragment Offset : 0
Time to Live : 1
Expert Info (Note/Sequence) : "Time To Live" only 1
"Time To Live" only 1
Message : "Time To Live" only 1
Severity level : Note
Group : Sequence
Protocol : TCP (6)
Header Checksum : 0xa619 [validation disabled]
Header checksum status : Unverified
Source Address : 192.168.51.2
Source or Destination Address : 192.168.51.2
Source Host : 192.168.51.2
Source or Destination Host : 192.168.51.2
Destination Address : 192.168.51.1
Source or Destination Address : 192.168.51.1
Destination Host : 192.168.51.1
Source or Destination Host : 192.168.51.1
Stream index : 1
tcp : Transmission Control Protocol, Src Port: 54402, Dst Port: 179, Seq: 1, Ack: 1, Len: 100
Source Port : 54402
Destination Port : 179
Source or Destination Port : 54402
Source or Destination Port : 179
Stream index : 6
Stream Packet Number : 4
Conversation completeness : Incomplete, DATA (15)
..0. .... = RST : Absent
...0 .... = FIN : Absent
.... 1... = Data : Present
.... .1.. = ACK : Present
.... ..1. = SYN-ACK : Present
.... ...1 = SYN : Present
Completeness Flags : ยทยทDASS
TCP Segment Len : 100
Sequence Number : 1 (relative sequence number)
Sequence Number (raw) : 3911483355
Next Sequence Number : 101 (relative sequence number)
Acknowledgment Number : 1 (relative ack number)
Acknowledgment number (raw) : 3921425671
1000 .... = Header Length : 32 bytes (8)
Flags : 0x018 (PSH, ACK)
000. .... .... = Reserved : Not set
...0 .... .... = Accurate ECN : Not set
.... 0... .... = Congestion Window Reduced : Not set
.... .0.. .... = ECN-Echo : Not set
.... ..0. .... = Urgent : Not set
.... ...1 .... = Acknowledgment : Set
.... .... 1... = Push : Set
.... .... .0.. = Reset : Not set
.... .... ..0. = Syn : Not set
.... .... ...0 = Fin : Not set
TCP Flags : ยทยทยทยทยทยทยทAPยทยทยท
Window : 502
Calculated window size : 64256
Window size scaling factor : 128
Checksum : 0x6385 [unverified]
Checksum Status : Unverified
Urgent Pointer : 0
Options : (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
TCP Option - No-Operation (NOP)
Kind : No-Operation (1)
TCP Option - No-Operation (NOP)
Kind : No-Operation (1)
TCP Option - Timestamps : TSval 3256349416, TSecr 253927126
Kind : Time Stamp Option (8)
Length : 10
Timestamp value : 3256349416
Timestamp echo reply : 253927126
Timestamps
Time since first frame in this TCP stream : 1.077286 milliseconds
Time since previous frame in this TCP stream : 367.826 microseconds
SEQ/ACK analysis
iRTT : 709.460 microseconds
Bytes in flight : 100
Bytes sent since last PSH flag : 100
Client Contiguous Streams : 1
Server Contiguous Streams : 1
TCP payload (100 bytes)
PDU Size : 100
bgp : Border Gateway Protocol - OPEN Message
Marker : ffffffffffffffffffffffffffffffff
Length : 100
Type : OPEN Message (1)
Version : 4
My AS : 65100
Hold Time : 180
BGP Identifier : 192.168.51.2
Optional Parameters Length : 71
Optional Parameters
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 6
Capability : Multiprotocol extensions capability
Type : Multiprotocol extensions capability (1)
Length : 4
AFI : IPv4 (1)
Reserved : 00
SAFI : Unicast (1)
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 2
Capability : Route Refresh Capability (Cisco)
Type : Route Refresh Capability (Cisco) (128)
Length : 0
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 2
Capability : Route refresh capability
Type : Route refresh capability (2)
Length : 0
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 2
Capability : Enhanced route refresh capability
Type : Enhanced route refresh capability (70)
Length : 0
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 6
Capability : Support for 4-octet AS number capability
Type : Support for 4-octet AS number capability (65)
Length : 4
AS Number : 65100
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 2
Capability : BGP-Extended Message
Type : BGP-Extended Message (6)
Length : 0
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 6
Capability : Support for Additional Paths
Type : Support for Additional Paths (69)
Length : 4
AFI : IPv4 (1)
SAFI : Unicast (1)
Send/Receive : Receive (1)
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 12
Capability : FQDN Capability
Type : FQDN Capability (73)
Length : 10
Hostname Length : 8
Hostname : ubuntu01
Domain Name Length : 0
Domain Name
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 4
Capability : Graceful Restart capability
Type : Graceful Restart capability (64)
Length : 2
Expert Info (Chat/Request) : Graceful Restart Capability supported in Helper mode only
Graceful Restart Capability supported in Helper mode only
Message : Graceful Restart Capability supported in Helper mode only
Severity level : Chat
Group : Request
Restart Timers : 0xc078, Restart state, Graceful notification
1... .... .... .... = Restart state : Yes
.1.. .... .... .... = Graceful notification : Yes
.... 0000 0111 1000 = Time : 120
Optional Parameter : Capability
Parameter Type : Capability (2)
Parameter Length : 9
Capability : Long-Lived Graceful Restart (LLGR) Capability
Type : Long-Lived Graceful Restart (LLGR) Capability (71)
Length : 7
Unknown : 00010180000000
Rendered from a Wireshark PCAP by VisualEther.

Frame 16, BGP OPEN from AS 65100. Under Border Gateway Protocol - OPEN Message sit My AS (65100), Hold Time (180 s), and the BGP Identifier (router ID); the Optional Parameters -> Optional Parameter -> Capability list carries the Multiprotocol extensions, Route Refresh, Support for 4-octet AS number, Support for Additional Paths, and FQDN capabilities, plus the Graceful Restart and Long-Lived Graceful Restart capabilities that bracket the initial table.

Phase 3 โ€” Route exchange (frames 24โ€“32)

With the session up, each side advertises its routes in UPDATE messages. In frame 24, AS 65100 sends its two origin prefixes; in frame 26 the hub replies with its full table toward AS 65100; and each UPDATE burst closes with an End-of-RIB marker. The AS_PATH on every route tells the story of where it came from:

PrefixAdvertised byAS_PATHMeaning
10.30.0.0/16AS 6510065100AS 65100's own route (one hop = origin)
10.40.0.0/16AS 6510065100AS 65100's own route
10.10.0.0/16hub65000hub-originated
10.20.0.0/16hub65000hub-originated
10.30.0.0/16hub65000 6510065100's route, reflected back with the hub prepended
10.40.0.0/16hub65000 6510065100's route, reflected back

That last pair, in frame 26, is AS_PATH loop prevention in action. The hub advertises everything it uses, including the routes it learned from AS 65100, straight back to AS 65100. The spoke sees its own AS number (65100) already in the path and silently discards them. Harmless, and a clean illustration of why the AS_PATH check exists โ€” without it, those two prefixes would ricochet between the peers forever. The End-of-RIB marker โ€” an UPDATE carrying no NLRI and no withdrawals โ€” is the "my initial table is complete" signal the graceful-restart flag promised back in the OPEN. There is no dedicated message or flag for it: on the wire it is simply the smallest legal UPDATE, 23 bytes with both its Withdrawn Routes Length and Total Path Attribute Length set to zero, and the receiver recognizes it by that empty shape (RFC 4724).

Frame 28 closes the exchange the other way: AS 65100 re-advertises the hub's own origin routes (10.10, 10.20) back to it with AS_PATH 65100 65000, and the hub drops them by the same rule โ€” 65000 is already in the path. With that, the two tables are synchronized, and frames 30 and 32 are the session's first periodic KEEPALIVEs, ~60 s apart, carrying no routes.

Frame 24 in full. The first two rows of that table on the wire: the spoke advertising its own prefixes with a one-hop AS_PATH, the signature of an origin route. The path attributes โ€” ORIGIN, AS_PATH, NEXT_HOP โ€” and the reachable prefixes are all here:

๐Ÿ“ข [00019] Frame 24 BGP UPDATE 2022-08-24T17:13:24.978206148Z ๐Ÿ–ฅ R2.AS65100 → ๐Ÿ–ฅ R2.AS65000
frame : Frame 24: Packet, 211 bytes on wire (1688 bits), 211 bytes captured (1688 bits) on interface ens39, id 1
Section number : 1
Interface id : 1 (ens39)
Interface name : ens39
Encapsulation type : Ethernet (1)
Arrival Time : Aug 24, 2022 10:13:24.978206148 Pacific Daylight Time
UTC Arrival Time : Aug 24, 2022 17:13:24.978206148 UTC
Epoch Arrival Time : 1661361204.978206148
Time shift for this packet : 0.000000000 seconds
Time delta from previous captured frame : 1.100765852 seconds
Time delta from previous displayed frame : 1.100765852 seconds
Time since reference or first frame : 4 minutes, 37.439524046 seconds
Frame Number : 24
Frame Length : 211 bytes (1688 bits)
Capture Length : 211 bytes (1688 bits)
Frame is marked : False
Frame is ignored : False
Protocols in frame : eth:ethertype:ip:tcp:bgp
Character encoding : ASCII (0)
eth : Ethernet II, Src: 00:0c:29:dc:92:4e, Dst: 00:0c:29:c8:75:81
Destination : 00:0c:29:c8:75:81
Destination (resolved) : 00:0c:29:c8:75:81
Destination OUI : 00:0c:29 (VMware, Inc.)
Destination OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:0c:29:c8:75:81
Address (resolved) : 00:0c:29:c8:75:81
Address OUI : 00:0c:29 (VMware, Inc.)
Address OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Source : 00:0c:29:dc:92:4e
Source (resolved) : 00:0c:29:dc:92:4e
Source OUI : 00:0c:29 (VMware, Inc.)
Source OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:0c:29:dc:92:4e
Address (resolved) : 00:0c:29:dc:92:4e
Address OUI : 00:0c:29 (VMware, Inc.)
Address OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Type : IPv4 (0x0800)
Stream index : 1
ip : Internet Protocol Version 4, Src: 192.168.51.2, Dst: 192.168.51.1
0100 .... = Version : 4
.... 0101 = Header Length : 20 bytes (5)
Differentiated Services Field : 0xc0 (DSCP: CS6, ECN: Not-ECT)
1100 00.. = Differentiated Services Codepoint : Class Selector 6 (48)
.... ..00 = Explicit Congestion Notification : Not ECN-Capable Transport (0)
Total Length : 197
Identification : 0xeb36 (60214)
010. .... = Flags : 0x2, Don't fragment
0... .... = Reserved bit : Not set
.1.. .... = Don't fragment : Set
..0. .... = More fragments : Not set
...0 0000 0000 0000 = Fragment Offset : 0
Time to Live : 1
Expert Info (Note/Sequence) : "Time To Live" only 1
"Time To Live" only 1
Message : "Time To Live" only 1
Severity level : Note
Group : Sequence
Protocol : TCP (6)
Header Checksum : 0xa5e8 [validation disabled]
Header checksum status : Unverified
Source Address : 192.168.51.2
Source or Destination Address : 192.168.51.2
Source Host : 192.168.51.2
Source or Destination Host : 192.168.51.2
Destination Address : 192.168.51.1
Source or Destination Address : 192.168.51.1
Destination Host : 192.168.51.1
Source or Destination Host : 192.168.51.1
Stream index : 1
tcp : Transmission Control Protocol, Src Port: 54402, Dst Port: 179, Seq: 120, Ack: 120, Len: 145
Source Port : 54402
Destination Port : 179
Source or Destination Port : 54402
Source or Destination Port : 179
Stream index : 6
Stream Packet Number : 12
Conversation completeness : Incomplete, DATA (15)
..0. .... = RST : Absent
...0 .... = FIN : Absent
.... 1... = Data : Present
.... .1.. = ACK : Present
.... ..1. = SYN-ACK : Present
.... ...1 = SYN : Present
Completeness Flags : ยทยทDASS
TCP Segment Len : 145
Sequence Number : 120 (relative sequence number)
Sequence Number (raw) : 3911483474
Next Sequence Number : 265 (relative sequence number)
Acknowledgment Number : 120 (relative ack number)
Acknowledgment number (raw) : 3921425790
1000 .... = Header Length : 32 bytes (8)
Flags : 0x018 (PSH, ACK)
000. .... .... = Reserved : Not set
...0 .... .... = Accurate ECN : Not set
.... 0... .... = Congestion Window Reduced : Not set
.... .0.. .... = ECN-Echo : Not set
.... ..0. .... = Urgent : Not set
.... ...1 .... = Acknowledgment : Set
.... .... 1... = Push : Set
.... .... .0.. = Reset : Not set
.... .... ..0. = Syn : Not set
.... .... ...0 = Fin : Not set
TCP Flags : ยทยทยทยทยทยทยทAPยทยทยท
Window : 502
Calculated window size : 64256
Window size scaling factor : 128
Checksum : 0xbff5 [unverified]
Checksum Status : Unverified
Urgent Pointer : 0
Options : (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
TCP Option - No-Operation (NOP)
Kind : No-Operation (1)
TCP Option - No-Operation (NOP)
Kind : No-Operation (1)
TCP Option - Timestamps : TSval 3256350519, TSecr 253927129
Kind : Time Stamp Option (8)
Length : 10
Timestamp value : 3256350519
Timestamp echo reply : 253927129
Timestamps
Time since first frame in this TCP stream : 1.104215746 seconds
Time since previous frame in this TCP stream : 1.100765852 seconds
SEQ/ACK analysis
iRTT : 709.460 microseconds
Bytes in flight : 145
Bytes sent since last PSH flag : 145
Client Contiguous Streams : 1
Server Contiguous Streams : 1
TCP payload (145 bytes)
PDU Size : 61
PDU Size : 61
PDU Size : 23
bgp : Border Gateway Protocol - UPDATE Message
Marker : ffffffffffffffffffffffffffffffff
Length : 61
Type : UPDATE Message (2)
Withdrawn Routes Length : 0
Total Path Attribute Length : 35
Path attributes
Path Attribute - ORIGIN : IGP
Flags : 0x40, Transitive, Well-known, Complete
0... .... = Optional : Not set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : ORIGIN (1)
Length : 1
Origin : IGP (0)
Path Attribute - AS_PATH : 65100
Flags : 0x50, Transitive, Extended-Length, Well-known, Complete
0... .... = Optional : Not set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...1 .... = Extended-Length : Set
.... 0000 = Unused : 0x0
Type Code : AS_PATH (2)
Length : 6
AS Path segment : 65100
Segment type : AS_SEQUENCE (2)
Segment length (number of ASN) : 1
AS4 : 65100
Path Attribute - NEXT_HOP : 192.168.51.2
Flags : 0x40, Transitive, Well-known, Complete
0... .... = Optional : Not set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : NEXT_HOP (3)
Length : 4
Next hop : 192.168.51.2
Path Attribute - MULTI_EXIT_DISC : 0
Flags : 0x80, Optional, Non-transitive, Complete
1... .... = Optional : Set
.0.. .... = Transitive : Not set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : MULTI_EXIT_DISC (4)
Length : 4
Multiple exit discriminator : 0
Path Attribute - COMMUNITIES : 321:654
Flags : 0xc0, Optional, Transitive, Complete
1... .... = Optional : Set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : COMMUNITIES (8)
Length : 4
Communities : 321:654
Community : 321:654
Community AS : 321
Community value : 654
Network Layer Reachability Information (NLRI)
10.30.0.0/16
NLRI prefix length : 16
NLRI prefix : 10.30.0.0
bgp : Border Gateway Protocol - UPDATE Message
Marker : ffffffffffffffffffffffffffffffff
Length : 61
Type : UPDATE Message (2)
Withdrawn Routes Length : 0
Total Path Attribute Length : 35
Path attributes
Path Attribute - ORIGIN : IGP
Flags : 0x40, Transitive, Well-known, Complete
0... .... = Optional : Not set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : ORIGIN (1)
Length : 1
Origin : IGP (0)
Path Attribute - AS_PATH : 65100
Flags : 0x50, Transitive, Extended-Length, Well-known, Complete
0... .... = Optional : Not set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...1 .... = Extended-Length : Set
.... 0000 = Unused : 0x0
Type Code : AS_PATH (2)
Length : 6
AS Path segment : 65100
Segment type : AS_SEQUENCE (2)
Segment length (number of ASN) : 1
AS4 : 65100
Path Attribute - NEXT_HOP : 192.168.51.2
Flags : 0x40, Transitive, Well-known, Complete
0... .... = Optional : Not set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : NEXT_HOP (3)
Length : 4
Next hop : 192.168.51.2
Path Attribute - MULTI_EXIT_DISC : 0
Flags : 0x80, Optional, Non-transitive, Complete
1... .... = Optional : Set
.0.. .... = Transitive : Not set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : MULTI_EXIT_DISC (4)
Length : 4
Multiple exit discriminator : 0
Path Attribute - COMMUNITIES : 123:456
Flags : 0xc0, Optional, Transitive, Complete
1... .... = Optional : Set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : COMMUNITIES (8)
Length : 4
Communities : 123:456
Community : 123:456
Community AS : 123
Community value : 456
Network Layer Reachability Information (NLRI)
10.40.0.0/16
NLRI prefix length : 16
NLRI prefix : 10.40.0.0
bgp : Border Gateway Protocol - UPDATE Message
Marker : ffffffffffffffffffffffffffffffff
Length : 23
Type : UPDATE Message (2)
Withdrawn Routes Length : 0
Total Path Attribute Length : 0
Rendered from a Wireshark PCAP by VisualEther.

Frame 24, BGP UPDATE from AS 65100. Under Border Gateway Protocol - UPDATE Message: Path Attribute - ORIGIN (IGP), Path Attribute - AS_PATH -> AS Path segment holding the single AS 65100 (a one-hop, origin path), and Path Attribute - NEXT_HOP; the advertised prefixes sit under Network Layer Reachability Information (NLRI) -> NLRI prefix.

Phase 4 โ€” Propagation across the fabric (frames 34โ€“82)

Meanwhile, the hub keeps retrying the second neighbor: active-open attempts toward AS 65200 at frames 34, 44, 52, and 60, each ~120 s apart and each refused, exactly as in Phase 1. Then, minutes in, the AS 65200 spoke finally comes up on the .50 link the same way AS 65100 did โ€” frame 62 is its inbound SYN, frame 63 the hub's SYN, ACK, frames 65 and 67 the two OPENs (with AS 65200 also flagging Restart-State), and frames 69โ€“70 the KEEPALIVE pair that brings the second session to Established.

AS 65200's new routes do not stay on the .50 link โ€” they ripple across the existing .51 session too, in a ~50 ms flurry at frames 73โ€“82. In frame 74, the hub takes the 10.50.0.0/16 and 10.60.0.0/16 prefixes it just learned from AS 65200, prepends its own AS, and advertises them to AS 65100 as AS_PATH 65000 65200. In frame 78, it hands AS 65200 everything it knows โ€” its own origins and the routes it learned from AS 65100 (AS_PATH 65000 65100). This is the whole point of BGP: it makes AS 65200's reachability visible to AS 65100, and vice versa, without those two autonomous systems ever peering directly. And every route the hub reflects back toward its origin โ€” frame 80 toward AS 65200, and the 65200-prepended pairs AS 65200 sends back in frame 82 โ€” is dropped by the same AS_PATH rule from Phase 3. With both peerings converged, all three autonomous systems can now reach all six /16 prefixes.

Frame 74 in full. One of those cross-fabric advertisements: the hub handing AS 65200's route to AS 65100 with its own AS prepended. The AS_PATH now reads two hops โ€” 65000 65200 โ€” and the NEXT_HOP is the hub, so AS 65100 reaches AS 65200 through it:

๐Ÿ“ข [00058] Frame 74 BGP UPDATE 2022-08-24T17:21:13.714491325Z ๐Ÿ–ฅ R2.AS65000 → ๐Ÿ–ฅ R2.AS65100
frame : Frame 74: Packet, 127 bytes on wire (1016 bits), 127 bytes captured (1016 bits) on interface ens39, id 1
Section number : 1
Interface id : 1 (ens39)
Interface name : ens39
Encapsulation type : Ethernet (1)
Arrival Time : Aug 24, 2022 10:21:13.714491325 Pacific Daylight Time
UTC Arrival Time : Aug 24, 2022 17:21:13.714491325 UTC
Epoch Arrival Time : 1661361673.714491325
Time shift for this packet : 0.000000000 seconds
Time delta from previous captured frame : 1.182222 milliseconds
Time delta from previous displayed frame : 1.182222 milliseconds
Time since reference or first frame : 12 minutes, 26.175809223 seconds
Frame Number : 74
Frame Length : 127 bytes (1016 bits)
Capture Length : 127 bytes (1016 bits)
Frame is marked : False
Frame is ignored : False
Protocols in frame : eth:ethertype:ip:tcp:bgp
Character encoding : ASCII (0)
eth : Ethernet II, Src: 00:0c:29:c8:75:81, Dst: 00:0c:29:dc:92:4e
Destination : 00:0c:29:dc:92:4e
Destination (resolved) : 00:0c:29:dc:92:4e
Destination OUI : 00:0c:29 (VMware, Inc.)
Destination OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:0c:29:dc:92:4e
Address (resolved) : 00:0c:29:dc:92:4e
Address OUI : 00:0c:29 (VMware, Inc.)
Address OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Source : 00:0c:29:c8:75:81
Source (resolved) : 00:0c:29:c8:75:81
Source OUI : 00:0c:29 (VMware, Inc.)
Source OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:0c:29:c8:75:81
Address (resolved) : 00:0c:29:c8:75:81
Address OUI : 00:0c:29 (VMware, Inc.)
Address OUI (resolved) : VMware, Inc.
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Type : IPv4 (0x0800)
Stream index : 1
ip : Internet Protocol Version 4, Src: 192.168.51.1, Dst: 192.168.51.2
0100 .... = Version : 4
.... 0101 = Header Length : 20 bytes (5)
Differentiated Services Field : 0xc0 (DSCP: CS6, ECN: Not-ECT)
1100 00.. = Differentiated Services Codepoint : Class Selector 6 (48)
.... ..00 = Explicit Congestion Notification : Not ECN-Capable Transport (0)
Total Length : 113
Identification : 0x3c15 (15381)
010. .... = Flags : 0x2, Don't fragment
0... .... = Reserved bit : Not set
.1.. .... = Don't fragment : Set
..0. .... = More fragments : Not set
...0 0000 0000 0000 = Fragment Offset : 0
Time to Live : 1
Expert Info (Note/Sequence) : "Time To Live" only 1
"Time To Live" only 1
Message : "Time To Live" only 1
Severity level : Note
Group : Sequence
Protocol : TCP (6)
Header Checksum : 0x555e [validation disabled]
Header checksum status : Unverified
Source Address : 192.168.51.1
Source or Destination Address : 192.168.51.1
Source Host : 192.168.51.1
Source or Destination Host : 192.168.51.1
Destination Address : 192.168.51.2
Source or Destination Address : 192.168.51.2
Destination Host : 192.168.51.2
Source or Destination Host : 192.168.51.2
Stream index : 1
tcp : Transmission Control Protocol, Src Port: 179, Dst Port: 54402, Seq: 518, Ack: 579, Len: 61
Source Port : 179
Destination Port : 54402
Source or Destination Port : 179
Source or Destination Port : 54402
Stream index : 6
Stream Packet Number : 43
Conversation completeness : Incomplete, DATA (15)
..0. .... = RST : Absent
...0 .... = FIN : Absent
.... 1... = Data : Present
.... .1.. = ACK : Present
.... ..1. = SYN-ACK : Present
.... ...1 = SYN : Present
Completeness Flags : ยทยทDASS
TCP Segment Len : 61
Sequence Number : 518 (relative sequence number)
Sequence Number (raw) : 3921426188
Next Sequence Number : 579 (relative sequence number)
Acknowledgment Number : 579 (relative ack number)
Acknowledgment number (raw) : 3911483933
1000 .... = Header Length : 32 bytes (8)
Flags : 0x018 (PSH, ACK)
000. .... .... = Reserved : Not set
...0 .... .... = Accurate ECN : Not set
.... 0... .... = Congestion Window Reduced : Not set
.... .0.. .... = ECN-Echo : Not set
.... ..0. .... = Urgent : Not set
.... ...1 .... = Acknowledgment : Set
.... .... 1... = Push : Set
.... .... .0.. = Reset : Not set
.... .... ..0. = Syn : Not set
.... .... ...0 = Fin : Not set
TCP Flags : ยทยทยทยทยทยทยทAPยทยทยท
Window : 508
Calculated window size : 65024
Window size scaling factor : 128
Checksum : 0xe7b7 [unverified]
Checksum Status : Unverified
Urgent Pointer : 0
Options : (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
TCP Option - No-Operation (NOP)
Kind : No-Operation (1)
TCP Option - No-Operation (NOP)
Kind : No-Operation (1)
TCP Option - Timestamps : TSval 254396967, TSecr 3256819254
Kind : Time Stamp Option (8)
Length : 10
Timestamp value : 254396967
Timestamp echo reply : 3256819254
Timestamps
Time since first frame in this TCP stream : 7 minutes, 49.840500923 seconds
Time since previous frame in this TCP stream : 1.182222 milliseconds
SEQ/ACK analysis
This is an ACK to the segment in frame : 73
The RTT to ACK the segment was : 1.182222 milliseconds
iRTT : 709.460 microseconds
Bytes in flight : 61
Bytes sent since last PSH flag : 61
Client Contiguous Streams : 1
Server Contiguous Streams : 1
TCP payload (61 bytes)
PDU Size : 61
bgp : Border Gateway Protocol - UPDATE Message
Marker : ffffffffffffffffffffffffffffffff
Length : 61
Type : UPDATE Message (2)
Withdrawn Routes Length : 0
Total Path Attribute Length : 32
Path attributes
Path Attribute - ORIGIN : IGP
Flags : 0x40, Transitive, Well-known, Complete
0... .... = Optional : Not set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : ORIGIN (1)
Length : 1
Origin : IGP (0)
Path Attribute - AS_PATH : 65000 65200
Flags : 0x50, Transitive, Extended-Length, Well-known, Complete
0... .... = Optional : Not set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...1 .... = Extended-Length : Set
.... 0000 = Unused : 0x0
Type Code : AS_PATH (2)
Length : 10
AS Path segment : 65000 65200
Segment type : AS_SEQUENCE (2)
Segment length (number of ASN) : 2
AS4 : 65000
AS4 : 65200
Path Attribute - NEXT_HOP : 192.168.51.1
Flags : 0x40, Transitive, Well-known, Complete
0... .... = Optional : Not set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : NEXT_HOP (3)
Length : 4
Next hop : 192.168.51.1
Path Attribute - COMMUNITIES : 321:654
Flags : 0xc0, Optional, Transitive, Complete
1... .... = Optional : Set
.1.. .... = Transitive : Set
..0. .... = Partial : Not set
...0 .... = Extended-Length : Not set
.... 0000 = Unused : 0x0
Type Code : COMMUNITIES (8)
Length : 4
Communities : 321:654
Community : 321:654
Community AS : 321
Community value : 654
Network Layer Reachability Information (NLRI)
10.50.0.0/16
NLRI prefix length : 16
NLRI prefix : 10.50.0.0
10.60.0.0/16
NLRI prefix length : 16
NLRI prefix : 10.60.0.0
Rendered from a Wireshark PCAP by VisualEther.

Frame 74, BGP UPDATE from the hub (AS 65000) to AS 65100. The Path Attribute - AS_PATH -> AS Path segment now lists 65000 65200 โ€” the hub prepended its own AS to AS 65200's origin route โ€” while Path Attribute - NEXT_HOP points at the hub and the carried prefix sits under Network Layer Reachability Information (NLRI) -> NLRI prefix.

Once both sessions settle, every AS can reach all six prefixes. This is the converged state โ€” each cell is the AS_PATH by which that AS reaches that prefix, read straight from the UPDATEs on the wire (local means the AS originates the prefix itself, so there is no path to traverse; and what a router selects as best path is its internal decision โ€” here every prefix has only one path to choose from):

Prefix (origin)AS_PATH at AS 65100AS_PATH at hub AS 65000AS_PATH at AS 65200
10.10.0.0/16 (hub)65000local65000
10.20.0.0/16 (hub)65000local65000
10.30.0.0/16 (65100)local6510065000 65100
10.40.0.0/16 (65100)local6510065000 65100
10.50.0.0/16 (65200)65000 6520065200local
10.60.0.0/16 (65200)65000 6520065200local

The two spokes never exchanged a single packet, yet each reaches the other's prefixes โ€” through the hub, 65000 65200 in one direction and 65000 65100 in the other. That is the whole hub-and-spoke payoff in one table.

Phase 5 โ€” Steady state (frames 84โ€“154)

From frame 84 onward, the tables have converged, and there are no more route changes for the rest of the capture โ€” only KEEPALIVE heartbeats on each session, one about every 60 s, each resetting the sender's 180 s hold timer. Frame 154, the last in the capture, is one such routine KEEPALIVE (hub โ†’ AS 65100).

Both peerings are still Established and perfectly healthy when the recording stops. There is no BGP NOTIFICATION and no TCP FIN or RST teardown โ€” the capture ends mid-flight.

A note on the lab capture: the two spokes carry the same BGP Identifier (192.168.51.2), and one reflected route arrives as AS_PATH 65200 65100 where a live network would show 65200 65000 65100. Both are artifacts of how this teaching capture was built; they do not change the mechanisms above. The interactive diagram and the printable PDF above carry the full per-message detail, with every field decoded.

Takeaways

  1. BGP is TCP-first. The most common reason a peering will not come up is a transport problem โ€” a refused or filtered port 179, or one side simply not listening yet โ€” long before any BGP logic runs. The RST, ACK pattern in Phase 1 is exactly what that looks like on the wire.
  2. A session needs a listener and a caller. Both ends can be active, but the connection only completes once the passive side's BGP is running and one end connects in.
  3. AS_PATH is loop prevention you can watch. Routes reflected back toward their origin are dropped on sight because the receiver's AS is already in the path โ€” twice over in this capture.
  4. Graceful restart brackets the initial table. The Restart-State flag in OPEN and the End-of-RIB marker that closes each advertisement are a matched pair: "hold my routes" and "I'm done."
  5. A hub gives full reachability without a full mesh. Two spokes that never peer still reach each other, because the hub transits and re-advertises their routes.

Try it on your own capture

Every arrow in this walkthrough was decoded and captioned by VisualEther from a raw Wireshark PCAP โ€” no manual diagramming. Point it at your own routing, 5G, or IMS trace and read it the same way.