Protocol 47 of 81Layer 7FrameAssembly v3.1.2
llms-full.txt
http2Hypertext Transfer Protocol Version 2 Binary Framing

Binary HTTP/2 Connection Prefaces & Multiplexed Frames (http2 TCP 443)

Default Port / Protocol
TCP 443
Host Endpoint Rule
Dual-Stack IPv4/IPv6
Wireshark Display Filter
http2
Standards & Specs
RFC 9113
Wire Stack:Ethernet II[802.1Q / QinQ / MPLS]IPv4 / IPv6TCP 443HTTP/2

What It Does on the Wire

Plaintext GET / turned into 9-byte binary frame headers (Length, Type, Flags, 31-bit Stream ID) — start with http2 preface + settings and watch Wireshark dissect your multiplexed streamid flows.

HTTP/2 (http2, RFC 9113) replaces plain-text HTTP/1.1 lines with multiplexed binary frames over TCP port 443 (or cleartext h2c on port 80/8080). Every HTTP/2 frame carries a 9-byte header: 24-bit Payload Length, 8-bit Frame Type, 8-bit Flags, and a 31-bit Stream Identifier (streamid).

FrameAssembly automatically builds RFC-compliant frame lengths for connection preface (PRI * HTTP/2.0 SM + initial SETTINGS), settings, HPACK-indexed headers, data, windowupdate (4-byte window increment), ping (8-byte opaque payload), and goaway teardown frames.

Load Balancer & Reverse Proxy h2c / HTTP/2 Health Checks

Test Envoy, NGINX, HAProxy, and cloud ALB behavior across HTTP/2 preface, settings, ping, and graceful goaway drain sequences.

HTTP/2 Control-Frame Rate Limit & DoS Rule Validation

Create controlled bursts of ping, settings, or headers frames to verify WAF and IDS protections against HTTP/2 control-frame floods.

Cleartext HTTP/2 (h2c) Dissector Captures

Override dstport 8080 on http2 packets so Wireshark inspects unencrypted multiplexed streams (streamid 1, streamid 3) directly.

Minimal Quickstart (http2_quickstart.frasm)

Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.

http2_quickstart.frasm9 lines
Open in Playground
host app_client { ip 10.20.1.10 }
host api_gw { ip 10.20.1.44 }
compile {
app_client -> api_gw http2 preface dstport 8080 wait 1ms
app_client <- api_gw http2 settings wait 1ms
app_client -> api_gw http2 headers streamid 1 wait 1ms
app_client <- api_gw http2 data streamid 1 payload "{\"ok\":true}"
}

What the Compiler Calculates So You Don't Have To

  • Defaults to TCP destination port 443 (psh ack) and keeps TCP seq / acknum synchronized across multiplexed frames.
  • Enforces RFC 9113 frame size rules automatically: 24-byte magic string + SETTINGS on preface, 8-byte payload on ping (streamid 0), 4-byte window increment on windowupdate, and 8-byte last_stream_id + error_code on goaway.
  • Encodes valid HPACK indexed pseudo-headers (:method GET, :scheme https, :path /) on headers when no raw override is supplied.
Multi-Frame Lab · Ready to Compile

Cleartext h2c Connection Preface, Stream 1 Request, PING & Graceful GOAWAY

Establishes a TCP port 8080 connection, exchanges HTTP/2 connection prefaces, serves a Stream 1 request/data exchange, tests liveness with ping, and closes cleanly via goaway.

http2_multiplexed_session.frasm19 lines
Open in Playground
host mesh_sidecar { ip 172.16.30.11 }
host upstream_svc { ip 172.16.30.80 }
compile {
mesh_sidecar -> upstream_svc tcp syn srcport 53080 dstport 8080 win 65535 mss 1460 wait 1ms
mesh_sidecar <- upstream_svc tcp syn ack win 65535 mss 1460 wait 1ms
mesh_sidecar -> upstream_svc tcp ack wait 1ms
// 1. Client magic preface + server SETTINGS
mesh_sidecar -> upstream_svc http2 preface wait 1ms
mesh_sidecar <- upstream_svc http2 settings wait 1ms
// 2. Stream 1 request headers + response data + flow-control window update
mesh_sidecar -> upstream_svc http2 headers streamid 1 wait 2ms
mesh_sidecar <- upstream_svc http2 headers streamid 1 wait 1ms
mesh_sidecar <- upstream_svc http2 data streamid 1 payload "{\"items\":[]}" wait 1ms
mesh_sidecar -> upstream_svc http2 windowupdate streamid 0 wait 5ms
// 3. Keepalive PING & graceful connection drain (GOAWAY on stream 0)
mesh_sidecar -> upstream_svc http2 ping streamid 0 wait 2ms
mesh_sidecar <- upstream_svc http2 goaway streamid 0
}
Terminal Commands (FrameAssembly CLI v3.1.2)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show http2_multiplexed_session.frasm

# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly http2_multiplexed_session.frasm http2_multiplexed_session.pcap
frameassembly http2_multiplexed_session.frasm http2_multiplexed_session.pcapng

# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse http2_multiplexed_session.pcap http2_multiplexed_session_edited.frasm

All http2 Keywords & Header Options

Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after http2:

src_host -> dst_host http2 [preface | settings | headers | data | windowupdate | ping | goaway] [streamid <number>]
Keyword / OptionAccepted ValueDefaultEffect on Packet
preface | settings | headers | data | windowupdate | ping | goawayHTTP/2 frame type keywordsettings (Type 0x04, streamid 0)Selects the RFC 9113 HTTP/2 binary frame type (0x0 DATA, 0x1 HEADERS, 0x4 SETTINGS, 0x6 PING, 0x7 GOAWAY, 0x8 WINDOW_UPDATE, or connection preface).
streamid <number>31-bit Stream Identifier (0 for connection control, odd 1, 3, 5 for client streams)0 on control frames, 1 on headers/dataSets the 31-bit Stream ID in bytes 5..8 of the 9-byte HTTP/2 frame header.

Cross-Layer Wrappers Valid with http2

802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol

11 options
OptionRange / FormatDefaultEffect on Packet
wait <number><ns|us|ms|s|m>Time gap (ns, us, ms, s, m)10msAdvances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back).
payload "<text>" | hexpayload "<hex>"Quoted text or hex bytes (choose one)OmittedAppends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums.
srcmac <mac> | dstmac <mac>Colon, hyphen, or Cisco dot MACHost MAC / RFC multicast MACOverrides the 14-byte Ethernet II source or destination MAC address for this single packet.
vlan <0..4095> [pcp <0..7>] [dei <0|1>]VLAN ID 0..4095, PCP 0..7, DEI 0..1UntaggedWraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority.
qinq <0..4095> [innervlan <0..4095>]Outer S-VLAN 0..4095, Inner C-VLAN 0..4095Untagged (innervlan 1 when qinq is set)Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100).
mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>]Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255Unlabeled (at most 1 mpls tag per packet)Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header.
ttl <0..255> [dscp <0..63>] [ecn <0..3>]TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3ttl 64, dscp 0, ecn 0Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings.
ipid <0..65535> [df] [mf] [fragoffset <0..8191>]IPv4 ID, DF/MF flags, fragment offset 0..8191ipid 1, flags 0, fragoffset 0Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6).
flowlabel <0..1048575>20-bit IPv6 Flow Label (0..1048575)0Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts).
srcport <0..65535> | dstport <0..65535>Port number 0..65535srcport 49152 (remembered), TCP 443Overrides source or destination port and remembers the port pair automatically on <- replies.
seq <number> | acknum <number> | win <0..65535> | syn | ack | psh | fin | rstTCP sequence/ack numbers, window size, flags & RFC 7323 optionspsh ack, win 65535, automatic TCP seq/acknumOverrides automatic TCP sequence tracking, flags, or RFC 7323 options (mss, wscale, sackperm, tsval, tsecr).

Gotchas & Quick Fixes

Connection-Level Control Frames Use streamid 0

Valid v3.1.2 Syntax
app_client -> api_gw http2 ping streamid 0

Per RFC 9113, settings, ping, and goaway apply to the entire connection (streamid 0), whereas client-initiated requests use odd stream IDs (streamid 1, streamid 3).

No Hyphens or Underscores in windowupdate or goaway

Avoid
app_client -> api_gw http2 window_update stream_id 1
Valid v3.1.2 Syntax
app_client -> api_gw http2 windowupdate streamid 1

Spell HTTP/2 keywords without underscores: windowupdate, goaway, and streamid.

Field Guide 03
Poke Stateful Firewalls, Suricata, Zeek & OT Conduits