Technical Tip: How to sniffer GENEVE traffic filtered by encapsulated header fields
| Description | This article describes how to use the FortiGate built‑in packet sniffer to capture GENEVE‑encapsulated traffic (UDP/6081) filtered by fields in the inner packet header, such as inner source or destination IP. This is especially useful in environments such as AWS Gateway Load Balancer (GWLB), where packets arrive encapsulated within GENEVE tunnels. By default, packet captures on a FortiGate show only the outer Ethernet, IP, and UDP headers, so BPF byte‑offset filters using ether[] are required to match values inside the GENEVE payload. |
| Scope | FortiGate. |
| Solution | GENEVE encapsulates original frames for transport between tunnel endpoints. The general structure of a GENEVE packet is:
⌞[Outer IP (20 bytes)] ⌞[UDP 6081 (8 bytes)] ⌞[GENEVE Header (40 bytes)] ⌞[Inner IP (20 bytes)] ⌞[Inner Payload]
To filter based on the encapsulated packet, the sniffer must examine the raw packet buffer at specific byte offsets, using the expressions:
The offsets, 96 and 100, respectively, point to the inner IP header’s source/destination IP fields.
For example, filtering for inner source IP = 172.31.1.22 (0xac1f0116):
diagnose sniffer packet any "udp port 6081 and (ether[96:4] == 0xac1f0116)" 6 0 l
However, this offset only applies when the encapsulation uses the following structure:
Furthermore, the sniffer expressions to filter packets can be used as follows, considering bidirectional traffic flow.
diagnose sniffer packet any 'port 6081 and ((ether[96:4]=0xac1f0116) or (ether[100:4]=0xac1f0116))' 6 0 l diagnose sniffer packet any 'port 6081 and ((ip[80:4]=0xac1f0116) or (ip[84:4]=0xac1f0116))' 6 0 l diagnose sniffer packet any 'port 6081 and ((udp[60:4]=0xac1f0116) or (udp[64:4]=0xac1f0116))' 6 0 l
Example:
FGVM16TM00000000 # diagnose sniffer packet any 'port 6081 and ((ether[96:4]=0xac1f0116) or (ether[100:4]=0xac1f0116))' 6 0 l 2026-03-18 23:52:29.378455 port1 out 172.31.2.253.61907 -> 172.31.2.126.6081: udp 100 2026-03-18 23:52:29.397286 port1 in 172.31.2.126.61907 -> 172.31.2.253.6081: udp 100 2026-03-18 23:52:29.397318 port1 out 172.31.2.253.61907 -> 172.31.2.126.6081: udp 100 |

