nfsNetwork File System over ONC RPCUnix Storage Mounts & RPC COMPOUND Ops (node <-> nas nfs Port 2049)
What It Does on the Wire
Verify storage-VLAN segmentation on port 2049: over default TCP, FrameAssembly automatically prepends the 4-byte ONC RPC Record-Marking fragment header (0x80000000 | len) so Wireshark dissects NFSv4 COMPOUND calls cleanly.
Network File System (nfs, RFC 7530 / RFC 1813) mounts shared NAS volumes across Linux, VMware ESXi, and Kubernetes nodes on port 2049 (ONC RPC Program 100003). Unlike legacy NFSv3 setups requiring separate portmapper ports, modern NFSv4 (vers 4, default) consolidates mounting, locking, and file operations inside single compound RPC calls over TCP port 2049 (with transport udp available for UDP 2049 legacy tests).
FrameAssembly builds the ONC RPC v2 Call/Reply header (including the 4-byte Last-Fragment Record Marking header over TCP), XDR-padded UTF-8 tag and export path strings, and NFSv4 PUTFH / LOOKUP operations automatically.
Storage VLAN & VMware/Kubernetes NAS Firewall Verification
Test firewall rules permitting TCP 2049 from hypervisor/worker subnets to NetApp, Isilon, or Linux NFS exports while blocking guest subnets.
Detect Unauthorized /exports Mount & Backup Share Enumeration
Replay nfs vers 4 compound path "/exports/finance" requests to verify NDR and storage-security alerts.
Legacy UDP 2049 NFSv3 Audit (vers 3 transport udp)
Verify perimeter and internal ACLs block unauthenticated UDP 2049 RPC probes.
Minimal Quickstart (nfs_quickstart.frasm)
Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.
host esxi_node { ip 10.40.10.21 }host nas_filer { ip 10.40.10.100 }compile { esxi_node -> nas_filer tcp syn srcport 892 dstport 2049 wait 1ms esxi_node <- nas_filer tcp syn ack wait 1ms esxi_node -> nas_filer tcp ack wait 1ms esxi_node -> nas_filer nfs vers 4 compound xid 0x55001122 tag "lookup-datastore" path "/vol/vmstore01"}What the Compiler Calculates So You Don't Have To
- Defaults to TCP destination port
2049(vers 4, RPC Program100003) and prepends the 4-byte ONC RPC Record Marking header (0x80000000 | length) over TCP (omitting it cleanly whentransport udpis selected). - Aligns
tagandpathUTF-8 strings to 4-byte XDR boundaries per RFC 4506. - Uses privileged client ports easily (
srcport 892) when testingroot_squash/insecureNFS export rules.
NFSv4 TCP 2049 Export Lookup + Legacy NFSv3 UDP Probe
Opens TCP port 2049 from a privileged source port (srcport 850) to mount /exports/backups, then tests a legacy NFSv3 NULL ping over UDP 2049.
host worker_01 { ip 172.16.40.25 }host netapp_01 { ip 172.16.40.200 }compile { // 1. Stateful NFSv4 COMPOUND over TCP 2049 from privileged port 850 (< 1024) worker_01 -> netapp_01 tcp syn srcport 850 dstport 2049 win 65535 mss 1460 wait 1ms worker_01 <- netapp_01 tcp syn ack win 65535 mss 1460 wait 1ms worker_01 -> netapp_01 tcp ack wait 1ms worker_01 -> netapp_01 nfs vers 4 compound xid 0x7001 tag "mount-backups" path "/exports/backups" wait 3ms // 2. Legacy NFSv3 NULL RPC check over UDP 2049 worker_01 -> netapp_01 nfs vers 3 proc "NULL" xid 0x7002 transport udp}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show nfs_storage_audit.frasm
# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly nfs_storage_audit.frasm nfs_storage_audit.pcap
frameassembly nfs_storage_audit.frasm nfs_storage_audit.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse nfs_storage_audit.pcap nfs_storage_audit_edited.frasmAll nfs 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 nfs:
src_host -> dst_host nfs [vers <3|4>] [compound | proc "<text>"] [tag "<text>"] [path "<text>"] [xid <hex_or_num>] [transport <tcp|udp>]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| vers <3|4> | NFS protocol version (4 default, or 3) | 4 | Sets the ONC RPC Program Version (4 or 3) for Program 100003. |
| compound | proc "<text>" | compound or procedure name ("NULL", "GETATTR", "LOOKUP", "READ", "WRITE") | compound | Selects RPC procedure 1 (COMPOUND on NFSv4) or named NFSv3/v4 procedure. |
| tag "<text>" | path "<text>" | Quoted NFSv4 compound tag and export path | tag "fa", path "/export" | Encodes XDR length-prefixed tag and LOOKUP component path inside NFSv4 COMPOUND. |
| xid <hex_or_num> | 32-bit ONC RPC Transaction ID | 0x12345678 | Sets the 4-byte RPC XID matching RPC replies to calls. |
| transport <tcp|udp> | tcp or udp | tcp | Switches between TCP 2049 (with 4-byte RPC record mark) and UDP 2049. |
Cross-Layer Wrappers Valid with nfs
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
12 options
Cross-Layer Wrappers Valid with nfs
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
| Option | Range / Format | Default | Effect on Packet |
|---|---|---|---|
| wait <number><ns|us|ms|s|m> | Time gap (ns, us, ms, s, m) | 10ms | Advances 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) | Omitted | Appends 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 MAC | Host MAC / RFC multicast MAC | Overrides 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..1 | Untagged | Wraps 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..4095 | Untagged (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..255 | Unlabeled (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..3 | ttl 64, dscp 0, ecn 0 | Sets 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..8191 | ipid 1, flags 0, fragoffset 0 | Sets 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) | 0 | Sets 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..65535 | srcport 49152 (remembered), TCP 2049 (or UDP 2049 via transport udp) | Overrides source or destination port and remembers the port pair automatically on <- replies. |
| transport <tcp|udp> | tcp or udp (supported on 9 dual-L4 protocols) | transport tcp | Switches Layer 4 transport between TCP (psh ack + length framing where required) and UDP. |
| seq <number> | acknum <number> | win <0..65535> | syn | ack | psh | fin | rst | TCP sequence/ack numbers, window size, flags & RFC 7323 options | psh ack, win 65535, automatic TCP seq/acknum | When using TCP (transport tcp or default TCP): overrides automatic TCP sequence tracking, flags, or mss/wscale/sackperm/tsval/tsecr. |
Gotchas & Quick Fixes
NFS Defaults to TCP (Unlike DNS/Syslog Which Default to UDP)
worker_01 -> netapp_01 nfs vers 3 proc "NULL" transport udpnfs defaults to transport tcp on port 2049 because RFC 7530 NFSv4 mandates TCP; add transport udp explicitly when testing UDP.