The mental model — packet-diag taps the dataplane in four places
Every packet on a Palo Alto firewall travels through a pipeline: NIC ingress → route/zone/policy lookup → NAT translation → forwarding → NIC egress. The packet-diag framework lets you copy a packet INTO a pcap file at four specific points along that journey. You don't capture "everywhere" — you choose the stage(s) that prove or disprove your hypothesis.
Sneha at Infosys gets a ticket: "SAP server isn't reachable." Step one isn't to capture all four stages — it's to ask "where do I expect the packet?" If she thinks the firewall isn't even receiving the packets, capture rx. If she suspects a policy drop, capture drop. The smaller the capture footprint, the faster the diagnosis and the less disk pressure on the firewall.
① The four capture stages — animated
Watch a packet flow through the dataplane. Each stage's tap is shown in order. Combination of which stages have packets and which don't tells you exactly where the drop happened.
▶ Packet journey through the dataplane
Aditya at Wipro captures all four stages. Watch what each one sees.
show counter global filter severity drop delta yes to learn WHY.
| Pattern seen | What it tells you |
|---|---|
| RX empty, all others empty | Packet never arrived. Check upstream switch, cable, ARP, source-side firewall. |
| RX has packets, others empty | Packet arrived but never made it past dataplane. Check route, zone protection, very early drops (Zone Protection counters). |
| RX + FW have packets, TX empty, DROP populated | Firewall lookup happened, packet got dropped post-policy. Run show counter global right now — counter names which stage. |
| RX + FW + TX all have packets | Firewall is forwarding successfully. Problem is downstream (server, client, return path). |
| RX has packets, DROP populated (no FW, no TX) | Pre-policy drop. Zone Protection / Bad-checksum / packet-parse error. |
Sneha runs a four-stage capture. She sees: RX has 24 packets, FW empty, TX empty, DROP has 24 packets. What's happening?
② The 5-step CLI workflow
The exact sequence every PA engineer must memorise. Skip a step and you'll either capture the entire firewall's traffic (disk fills in seconds) or miss the actual packets you wanted.
▶ Rahul at TCS — full 5-step workflow
From "I need a capture" to "I have a pcap on my laptop."
set filter match source 10.10.10.5 destination 8.8.8.8 destination-port 443 then set filter on. Always filter first. An unfiltered capture on a 10 Gbps firewall fills the 200 MB pcap in seconds.
set capture stage receive file rx.pcapset capture stage firewall file fw.pcapset capture stage transmit file tx.pcapset capture stage drop file dp.pcap
set capture on — now packets matching the filter get copied to the relevant stage's pcap.
show counter global filter packet-filter yes delta yes — only counters that touched filtered packets appear.
set capture offset filter offclear allThen SCP:
scp export filter-pcap from rx.pcap to admin@10.0.0.50:/captures/
! Step 1 — Filter FIRST (always) debug dataplane packet-diag set filter match source 10.10.10.5 destination 8.8.8.8 destination-port 443 debug dataplane packet-diag set filter on ! Step 2 — Per-stage files debug dataplane packet-diag set capture stage receive file rx.pcap debug dataplane packet-diag set capture stage firewall file fw.pcap debug dataplane packet-diag set capture stage transmit file tx.pcap debug dataplane packet-diag set capture stage drop file dp.pcap ! Step 3 — Arm debug dataplane packet-diag set capture on ! Step 4 — Reproduce traffic from the user side (2-3 attempts is enough) ! Then check counters show counter global filter packet-filter yes delta yes ! Step 5 — Cleanup (DO NOT skip) debug dataplane packet-diag set capture off debug dataplane packet-diag set filter off debug dataplane packet-diag clear all ! SCP the files out scp export filter-pcap from rx.pcap to admin@10.0.0.50:/captures/rx.pcap scp export filter-pcap from fw.pcap to admin@10.0.0.50:/captures/fw.pcap scp export filter-pcap from tx.pcap to admin@10.0.0.50:/captures/tx.pcap scp export filter-pcap from dp.pcap to admin@10.0.0.50:/captures/dp.pcap
PAN-OS rotates each pcap at 200 MB — rx.pcap → rx.pcap.1, and keeps a total of ~400 MB per stage. Anything older is overwritten. On a busy firewall, an unfiltered capture can roll those buffers in <30 seconds, meaning you LOSE the packets you wanted. Filter first, capture short windows, retrieve immediately.
Priya runs set capture on but forgets to run set filter on first. What happens?
set filter match + set filter on BEFORE set capture on. Memorize the order: filter, capture.③ Stage picker — which to capture when?
You don't always need all four. Pick a symptom; the widget shows which stage(s) prove or disprove your hypothesis.
▶ Symptom → which stages to enable
Karthik at Flipkart picks his symptom — gets the minimum-viable capture plan.
Common gotchas — flip cards
Once App-ID completes, sessions offload to hardware. Subsequent packets skip dataplane → no capture. Briefly set session offload no if you need ALL packets — re-enable immediately.
RX sees the PRE-NAT addresses (what arrived). TX sees POST-NAT (what's leaving). Filter using pre-NAT IPs; if needed for tricky NAT cases, add pre-parse-match yes to the filter set.
Each pcap rotates at 200 MB; total ~400 MB per stage. Filter tight or your target packets get overwritten. Retrieve immediately after capture-off.
For IPSec captures filter by ingress-interface tunnel.10 or filter the ESP outer-headers by source/dest of the tunnel peers. Inside-tunnel packets visible at FW stage after de-encapsulation.
Aditya needs to capture EVERY packet of a TCP flow that's been ACTIVE for 30 seconds. He sees only 4 packets in his RX file. What's the most likely reason?
The "no transmit, no drop" mystery — a real war story
From a real Live Community thread (#422829): an engineer captures all four stages on a flow that "isn't working." RX has packets, TX is empty, DROP is empty, traffic log shows action=allow. Confusion peaks.
Solution? The session offloaded mid-flow. The first ~4 packets came through RX + FW + TX normally (verified post-mortem in the rotating pcap.1 file). The next 2000 packets offloaded to hardware and bypassed the dataplane — so they appear nowhere in the four-stage capture. The session was actually working perfectly. The capture's silence was the offload doing its job.
show session id <N> → if you see offloaded: yes, that's why your capture is empty. Either accept the offload (the firewall is doing its job efficiently) or briefly disable offload to capture. Don't keep digging assuming the firewall is broken — it isn't.
④ Mgmt-plane tcpdump — a completely different tool
The dataplane packet-diag does not see mgmt-plane traffic. SSH to the firewall, Panorama heartbeats, syslog egress, SNMP polls, the Web UI — these all ride the management plane and need a different command: tcpdump.
! Filter using BPF-like syntax tcpdump filter "host 10.0.0.5 and port 3978" ! Or capture all mgmt SSH + HTTPS tcpdump filter "tcp port 22 or tcp port 443" ! Stop with Ctrl-C, then view briefly: view-pcap mgmt-pcap mgmt.pcap ! Then SCP out: scp export mgmt-pcap from mgmt.pcap to admin@10.0.0.50:/tmp/mgmt.pcap
Mgmt tcpdump always writes to mgmt.pcap (overwritten each run). Max size is ~20 MB. Use it for:
- SSH login problems to the mgmt interface
- Panorama-to-firewall communication failures (port 3978 / 28443)
- Syslog forwarding diagnostics (UDP/514)
- SNMP polling failures
- GlobalProtect portal/gateway control-channel debug
- WebUI / API request timeouts
Karthik wasted 2 hours trying to debug Panorama push failures with packet-diag — finding zero packets. Of course: Panorama control rides the mgmt-plane. tcpdump filter "host <panorama-ip>" solved it in 2 minutes. Always ask: does this traffic touch the dataplane (user data) or the mgmt-plane (administration)? Pick the right tool.
Karthik suspects Panorama isn't getting heartbeats from the firewall. He runs debug dataplane packet-diag with a filter on the Panorama IP. The capture is empty. Why?
tcpdump filter "host 10.10.10.50" from the firewall CLI to capture. The mgmt-plane is a completely separate world with its own tool, its own pcap file (mgmt.pcap), and its own size limits.⑤ Retrieving the pcap files
Two ways:
- GUI: Monitor → Packet Captures → click each file. Good for one-offs.
- CLI / SCP:
scp export filter-pcap from rx.pcap to user@host:/path/. Scales to automation.
Files sit on the firewall's filesystem under /var/tmp/. They survive a set filter off but get cleared by debug dataplane packet-diag clear all — so always retrieve BEFORE you clear.
What to look for in Wireshark after retrieval
| Pattern in the pcap | What it tells you |
|---|---|
| RX has SYN, TX has nothing | Policy/zone/route killed the packet. Check drop pcap + global counters. |
| RX has SYN, TX has SYN, no SYN-ACK in RX | Server unreachable or asymmetric return. Firewall is fine — chase downstream. |
| Multiple duplicate SYNs from client | Client is retrying because no SYN-ACK. Confirm server is up. |
| RX shows pre-NAT IP; TX shows post-NAT IP | NAT is working as expected. Match against the NAT policy you wrote. |
| RX packets are truncated (e.g. only first 64 bytes) | You hit the snaplen default. Raise capture snaplen if needed for deeper inspection. |
| Some packets in DROP, marked with bad TCP checksum | NIC hardware offload bug (common in VM-Series with TSO/GRO on hypervisor) — disable offload on hypervisor side. |
🤖 Ask the AI Tutor
Tap any question — instant answer.
Answers drawn from PAN-OS docs + Live Community real threads.
📝 Wrap-up — six more
4 inline done. 6 to go. 70% (7/10) marks the lesson complete.
📚 Sources
- Palo Alto KB — Getting Started: Packet Capture. knowledgebase.paloaltonetworks.com
- LIVECommunity — Flow Basic Debugging tips & tricks. live.paloaltonetworks.com
- LIVECommunity #422829 — No transmit/drop in capture (real war story). live.paloaltonetworks.com
- Palo Alto KB — Disabling Session Offload to Record Traffic. knowledgebase.paloaltonetworks.com
- Palo Alto KB — 200 MB packet capture file limit. knowledgebase.paloaltonetworks.com
- Palo Alto Docs — Take a Packet Capture on the Management Interface. docs.paloaltonetworks.com
- theworldsgonemad.net — Palo Packet Captures field guide. theworldsgonemad.net
- LIVECommunity — Packet capture filters via CLI debug. live.paloaltonetworks.com
What's next?
You now own the troubleshooting trio. Next blog turns to operational failure patterns — HA flapping, commit failures, dataplane CPU spikes, log-forwarding silently dropping. The patterns TAC sees every day, in your toolkit.