Protocol 95 of 81Layer 7FrameAssembly v3.3.0
Raw .mdllms-full.txt
iscsiInternet Small Computer Systems Interface Block SAN

iscsi — Port 3260 48-Byte BHS Login, SCSI Read/Write & NOPs

Default Port / Protocol
TCP 3260
Host Endpoint Rule
Dual-Stack IPv4/IPv6
Wireshark Display Filter
iscsi
Standards & Specs
RFC 7143, RFC 3720, SAM-5
Wire Stack:Ethernet II[802.1Q / QinQ / MPLS]IPv4 / IPv6TCP 3260iSCSI (RFC 7143)
L2 Tagging: vlan · qinq · repeatable mpls · fcsHost Family: Dual-Stack IPv4/IPv6L3 QoS & TTL: ttl · dscp · ecnL4 State: Auto 4-tuple seq / acknum

What It Does on the Wire

Every iSCSI PDU starts with a strict 48-byte Basic Header Segment on TCP 3260 — iscsi builds IQN login key-value pairs, lun-addressed SCSI commands, itt/cmdsn/statsn counters, and nop keepalives.

Internet Small Computer Systems Interface (iscsi, RFC 7143 / RFC 3720) transports block-level SCSI commands, NVMe/hypervisor datastore I/O, and cluster shared volumes across IP storage networks on TCP port 3260. Every iSCSI Protocol Data Unit begins with a 48-byte Basic Header Segment (BHS) containing a 6-bit Opcode (plus I Immediate bit), Flags (Final 0x80, Read/Write, Transit/Continue), 24-bit DataSegmentLength (padded to 4-byte boundaries), 64-bit LUN, Initiator Task Tag (itt), CmdSN, ExpStatSN / StatSN, and 16-byte SCSI Command Descriptor Blocks (CDBs) or key=value Login/Text operational parameters.

FrameAssembly packs exact 48-byte BHS frames + 4-byte padded InitiatorName / TargetName IQN text segments over stateful 4-tuple TCP (3260).

01. Application

Dedicated Storage VLAN & Jumbo-Frame (MTU 9000) SAN Audits

Validate dedicated storage VLANs (vlan 200 pcp 4 df) and firewall ACLs on TCP 3260 for VMware ESXi, Proxmox, Ceph, NetApp, and Pure Storage iSCSI initiators.

02. Application

Unauthorized IQN Target Discovery (SendTargets) Detection

Simulate lateral-movement reconnaissance where a compromised host sends iscsi login or iscsi text PDUs probing storage targets (iqn.2026-01.corp.san:...) without CHAP credentials.

03. Application

CmdSN / StatSN Ordering & SCSI Check-Condition Lab Traces

Script iscsi write -> data -> response (status 0x02 Check Condition vs 0x00 Good) sequences with explicit itt, cmdsn, and statsn counters.

Fig. 1 · RFC Octet & Bit Schematic

RFC Wire Header Layout (iscsi)

Select any 32-bit wire word or field slice below to inspect which .frasm modifiers control those octets and what defaults the compiler writes.

0 ··············· 15 · 16 ··············· 31 bit
Selected Wire Segment
iSCSI (RFC 7143) Wire PDU & Payload (Variable)
Controlling .frasm Modifiers
iscsi login · opcode · initiator · lun · itt · payload · hexpayload
Compiler Default Behavior
RFC-compliant iSCSI (RFC 7143) defaults (RFC 7143)

Minimal Quickstart (iscsi_quickstart.frasm)

Select Preview Packets to compile in-browser and inspect timestamps + wire byte lengths, or open directly in the Playground.

iscsi_quickstart.frasm10 lines
Open in Playground
host esxi_host { ip 10.70.20.11 }
host san_target { ip 10.70.20.50 }
compile {
esxi_host -> san_target tcp syn srcport 51320 dstport 3260 win 65535 mss 8960 wait 1ms
esxi_host <- san_target tcp syn ack win 65535 mss 8960 wait 1ms
esxi_host -> san_target tcp ack wait 1ms
esxi_host -> san_target iscsi login initiator "iqn.2026-01.corp.vm:esxi01" target "iqn.2026-01.corp.san:datastore01" itt 1 cmdsn 1 wait 2ms
esxi_host <- san_target iscsi response opcode 0x23 itt 1 statsn 1 status 0
}

Handled Automatically on the Wire

  • Defaults to stateful TCP port 3260 (psh ack, automatic seq/acknum progression across 48-byte BHS + padded data segments).
  • Formats null-delimited InitiatorName=<iqn> and TargetName=<iqn> operational key-value pairs on login (0x03), writing unpadded DataSegmentLength into BHS bytes 5..7 while zero-padding the wire segment to 4-byte alignment.
  • Populates 10-byte SCSI READ(10) (0x28) and WRITE(10) (0x2a) CDBs inside SCSI Command (0x01) BHS headers using lun and offset LBA.
Multi-Frame Example

Storage VLAN 200 iSCSI Session Login, SCSI READ(10) Data-In & NOP-Out Ping

Establishes an iSCSI Full Feature Phase session over VLAN 200, executes a SCSI READ on LUN 1 (offset 4096), returns SCSI Data-In (0x25) with status completion, and exchanges NOP-Out / NOP-In keepalives.

iscsi_san_read_cycle.frasm18 lines
Open in Playground
host hv_node01 { ip 172.18.200.11 mac 00:25:b5:01:00:11 }
host flash_san { ip 172.18.200.80 mac 00:25:b5:02:00:80 }
compile {
hv_node01 -> flash_san tcp syn srcport 54320 dstport 3260 vlan 200 pcp 4 df wait 1ms
hv_node01 <- flash_san tcp syn ack vlan 200 pcp 4 df wait 1ms
hv_node01 -> flash_san tcp ack vlan 200 pcp 4 df wait 1ms
// 1. iSCSI Login Request (0x03) -> Login Response (0x23, StatusClass=0 Success)
hv_node01 -> flash_san iscsi login initiator "iqn.2026-01.internal.hv:node01" target "iqn.2026-01.internal.san:lun-db01" itt 0x1001 cmdsn 1 vlan 200 pcp 4 wait 2ms
hv_node01 <- flash_san iscsi response opcode 0x23 itt 0x1001 statsn 1 status 0 vlan 200 pcp 4 wait 2ms
// 2. SCSI READ(10) Command on LUN 1 at LBA 4096 -> Data-In (0x25) + SCSI Response (0x21)
hv_node01 -> flash_san iscsi read lun 1 itt 0x1002 cmdsn 2 statsn 1 offset 4096 vlan 200 pcp 4 wait 1ms
hv_node01 <- flash_san iscsi data opcode 0x25 lun 1 itt 0x1002 statsn 2 payload "BLOCK-SECTOR-4096-DATA" vlan 200 pcp 4 wait 1ms
hv_node01 <- flash_san iscsi response lun 1 itt 0x1002 statsn 3 status 0 vlan 200 pcp 4 wait 10ms
// 3. iSCSI NOP-Out (0x00) -> NOP-In (0x20) storage fabric liveness check
hv_node01 -> flash_san iscsi nop itt 0x1003 cmdsn 3 statsn 3 vlan 200 pcp 4 wait 1ms
hv_node01 <- flash_san iscsi response opcode 0x20 itt 0x1003 statsn 4 vlan 200 pcp 4
}
Terminal Commands (FrameAssembly CLI v3.3.0)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show iscsi_san_read_cycle.frasm

# 2. Compile .frasm -> classic .pcap, nanosecond .pcapng, or pipe via '-'
frameassembly iscsi_san_read_cycle.frasm iscsi_san_read_cycle.pcap
frameassembly iscsi_san_read_cycle.frasm iscsi_san_read_cycle.pcapng

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

# 4. Verify dissected protocol fields in tshark
tshark -r iscsi_san_read_cycle.pcap -Y "iscsi"

All iscsi 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 iscsi:

src_host -> dst_host iscsi [login | logout | read | write | nop | response | data | text | cmd "<text>"] [opcode <0..63>] [initiator "<text>"] [target "<text>"] [lun <0..65535>] [itt <number>] [cmdsn <number>] [statsn <number>] [status <0..255>] [flags <0..255>] [offset <number>]
Keyword / OptionAccepted ValueDefaultEffect on Packet
login | logout | read | write | nop | response | data | text | cmd "<text>"iSCSI BHS PDU type shorthandnop (0x00)Selects 0x00 NOP-Out, 0x01 SCSI Command (read/write), 0x03 Login Request, 0x04 Text Request, 0x05 SCSI Data-Out, 0x06 Logout, 0x21 SCSI Response, 0x23 Login Response, or 0x25 SCSI Data-In.
opcode <0..63>6-bit RFC 7143 BHS Opcode overrideDerived from command keywordExplicitly sets byte 0 (0x20 NOP-In, 0x21 SCSI Resp, 0x23 Login Resp, 0x24 Text Resp, 0x25 Data-In, 0x31 R2T).
initiator "<text>" | target "<text>"iSCSI Qualified Name (IQN / EUI) strings"iqn.2026-01.com.example:initiator" / "...:target"Appends InitiatorName="<text>" and TargetName="<text>" key-value pairs in Login/Text DataSegments.
lun <0..65535>16-bit single-level Logical Unit Number0Writes the big-endian LUN in bytes 8..15 of the 48-byte BHS.
itt <number> | cmdsn <number> | statsn <number>32-bit Initiator Task Tag, Command SeqNum, and Status SeqNumitt 1, cmdsn 1, statsn 1Populates BHS bytes 16..19 (ITT) and 24..31 (CmdSN / ExpStatSN / StatSN).
status <0..255> | flags <0..255> | offset <number>8-bit SCSI Status (0x00 Good, 0x02 Check Cond), BHS Flags, and 32-bit LBA/Buffer Offsetstatus 0, flags 0x80 (Final), offset 0Sets BHS byte 1 (flags), byte 3 (status), and CDB LBA or Data-In/Out Buffer Offset.

Cross-Layer Wrappers Valid with iscsi

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

15 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).
comment "<text>"Quoted UTF-8 annotationOmittedAttaches an Enhanced Packet Block opt_comment annotation when compiling to .pcapng (Wireshark pkt_comment filter).
payload "<text>" | hexpayload "<hex>"Quoted text or hex bytes (choose one)OmittedAppends or overrides raw payload bytes ("deadbeef", "de:ad:be:ef", or "\x01\x02") and updates packet lengths and checksums.
srcmac <mac> | dstmac <mac> | ethertype <0..65535>Colon/hyphen/Cisco MAC · EtherType 0..65535 (e.g. 0x0800)Host MAC / RFC multicast MAC / auto EtherTypeOverrides the 14-byte Ethernet II source MAC, destination MAC, or standalone Layer 2 16-bit EtherType.
fcs | badfcsEthernet CRC-32 trailer flags (choose one)Omittedfcs appends a valid IEEE 802.3 4-byte CRC-32 Frame Check Sequence trailer; badfcs XOR-corrupts the CRC-32 for NIC/tap negative tests.
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> [label <0..1048575>] [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>]Repeatable label stack (0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255)Unlabeled (auto bos=0 on outer labels, bos=1 on bottom)Prepends one or more 32-bit MPLS label shims (0x8847, e.g. mpls 16000 mpls 24010) ahead of Layer 2 EoMPLS or Layer 3 payloads.
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>] [routeralert] [badipchecksum]IPv4 ID, DF/MF flags, offset 0..8191, Router Alert & checksum faultipid 1, flags 0, fragoffset 0, valid RFC 1071 checksumSets IPv4 Identification/fragmentation, injects RFC 2113 Router Alert (20 04 00 00), or corrupts the 16-bit IPv4 header checksum (badipchecksum).
flowlabel <0..1048575>20-bit IPv6 Flow Label (0..1048575)0Sets the 20-bit IPv6 Flow Label for ECMP routing tests (valid on IPv6 endpoint pairs only).
srcport <0..65535> | dstport <0..65535>Port number 0..65535srcport 49152 (remembered), TCP 3260Overrides source or destination port and remembers the port pair automatically on <- replies.
transport sctpOptional SCTP association transport (IP Proto 132)TCP (TCP 3260)Carries this Layer 7 PDU inside a stateful RFC 9260 SCTP DATA chunk with automatic Verification Tag, TSN tracking, and CRC-32c.
badchecksumL4/ICMP/SCTP checksum fault injection flagValid RFC checksum / CRC-32cDeliberately corrupts the TCP, SCTP CRC-32c, ICMP, or ICMPv6 checksum for negative IDS/firewall testing.
seq <number> | acknum <number> | win|window <0..65535> | urgent <0..65535> | syn | ack | psh | fin | rst | urg | ece | cwrTCP sequence/ack numbers, window, flags, SACK, TCP-MD5 & TFO optionspsh ack, win 65535, automatic TCP seq/acknumOverrides automatic TCP sequence tracking, flags, or RFC 7323/2018/2385/7413 options (mss, wscale, sackperm, sackblock, tsval, tsecr, tcpmd5, tfo).

Gotchas & Quick Fixes

Match Initiator Task Tag (itt) Across Command, Data, and Response PDUs

Valid v3.3.0 Syntax
h -> s iscsi read lun 1 itt 0x42 h <- s iscsi response lun 1 itt 0x42 status 0

Wireshark’s iscsi dissector uses the 32-bit Initiator Task Tag (itt) to link a SCSI Command (0x01) with its Data-In/Out and Response PDUs and compute SAN I/O latency.

Target-to-Initiator Opcodes Set Bit 0x20

Valid v3.3.0 Syntax
h <- s iscsi response opcode 0x23 itt 1 statsn 1 status 0

In RFC 7143, initiator-to-target opcodes occupy 0x00..0x1f (0x03 Login Req) while target-to-initiator opcodes add 0x20 (0x20 NOP-In, 0x21 SCSI Resp, 0x23 Login Resp, 0x25 Data-In).

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