Use it when a connection starts but replies are dropped, when long idle sessions die, or when traffic works in one direction only through a firewall.
NGFW Stateful Inspection
Stateful inspection tracks each connection's state (for example TCP handshake and sequence), so return traffic is allowed automatically and packets that do not belong to a known session are dropped. General firewall principles are in Firewall.
1. show conn (ASA) or the session table — is there a connection entry for the flow?
2. Return traffic is allowed only for existing state.
3. Asymmetric routing breaks state — check both directions use the same firewall.
first packet (TCP SYN) permitted by a rule → connection entry created → replies matched to the entry, no rule needed → entry removed on close or idle timeout → a packet without an entry is dropped (asymmetric path, timeout)
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show zone-pair securityShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Known-good, broken state and proof boundary Verify boundary
Known-good for Stateful Inspection means the intended object exists in the correct scope, the relevant show zone-pair security fields agree with desired state, dependencies needed by the flow are reachable/usable, and the original operation succeeds again on the same target. Evidence boundary: show zone-pair security shows only the fields it exposes at that time; it does not by itself show root cause, hidden provider state or end-to-end success.
Step 2 Observation-driven branch tree Narrow the fault
Troubleshooting branch for Stateful Inspection: if show zone-pair security cannot resolve the intended object, verify target identity/context first; if the object resolves but state differs from intended, isolate configuration, precedence and dependency ownership; if local state matches intent but the original operation still fails, move outward to the first adjacent dependency or consumer; if a minimal change alters the symptom without restoring the same failing operation, treat that as a changed failure point rather than closure.
Step 3 Common mistakes Narrow the fault
- Asymmetric routing through two firewalls, breaking state.
- Connection timeouts too short for long-lived sessions (databases, SSH).
A connection-table entry proves local tracking, not successful application delivery or comprehensive threat inspection.
show conn on ASA/FTD (or the session table on another platform) → an entry for the flow and its flags. show asp drop → packets dropped for having no connection. Compare forward and return path: both must cross the same firewall.
ReferenceWhat it is2 sections · depth on demand
Direct Answer
Stateful Inspection tracks connection context so policy can evaluate packets in relation to an observed flow. Firewall owns general firewall principles.
Scope and canonical references
This Topic owns session-state interpretation within Next-Generation Firewall.
ReferenceHow it works2 sections · depth on demand
Technical Mechanics
Correlate the same device, protocol and flow tuple with connection state, applied policy and the return path. Stateful handling does not automatically classify the application or inspect file contents.
How it works
The primary observation show zone-pair security is a bounded read surface: correlate its fields with the configured intent, dependency state and the consumer that actually experiences the symptom.
ReferenceImportant terms & boundaries4 sections · depth on demand
Official Sources
Proof Boundaries
A connection-table entry proves local tracking, not successful application delivery or comprehensive threat inspection.
In depth
Stateful inspection
Stateful inspection is the foundation of modern firewalls. NIST SP 800-41 Rev. 1 describes it as tracking each connection in a state table and blocking packets that deviate from the expected state. The table holds source and destination addresses and ports and a connection state: a TCP connection goes from initiated to established after the three-way handshake, while UDP entries, with no formal setup or teardown, are removed after a timeout.
State table entry
| Field | Example |
|---|---|
| Protocol | TCP |
| Inside address and port | 10.110.0.64:51522 |
| Outside address and port | 142.250.74.46:443 |
| State | Established |
| Idle timer | Reset by traffic |
What stateful inspection gives
| Benefit | Explanation |
|---|---|
| Return traffic allowed automatically | Replies match an existing entry; no inbound rule needed |
| Spoofed packets dropped | A TCP packet without matching state is rejected |
| Simpler rules | Rules describe who may start connections |
| Protocol awareness | Helpers for protocols that open secondary connections (FTP, SIP) |
fw# show conn address 10.110.0.64 detail
TCP outside: 142.250.74.46/443 inside: 10.110.0.64/51522,
flags UIO, idle 2s, uptime 4m12s, timeout 1h0m, bytes 1832200
UDP outside: 10.20.0.53/53 inside: 10.110.0.64/52011,
flags -, idle 0s, uptime 0s, timeout 2m0s, bytes 94
R1(config)# ip inspect name FW-OUT tcp
R1# show policy-firewall sessions platform
flags UIO on the firewall means up, inbound and outbound data seen.
Limits
| Limit | Implication |
|---|---|
| Asymmetric routing | Return traffic through another firewall has no state and is dropped |
| State table size | Floods of connections can exhaust it |
| Long-lived idle connections | Timeouts can drop them; tune per application |
| No application insight | Port 443 is allowed regardless of the application (NGFW adds that) |
Design so both directions of a flow pass the same firewall or a clustered pair that shares state.
Documented example, not captured output.
Quick reference
Stateful inspection tracks the state of every connection passing through the firewall. When the first packet of a session is permitted, the firewall creates a session entry, and return packets matching that entry are allowed automatically; packets that do not belong to a known session and are not permitted are dropped.
| Tracked | Example |
|---|---|
| TCP state | SYN, established, FIN/RST, sequence numbers |
| UDP pseudo-sessions | Address/port pairs with idle timeout |
| ICMP | Echo request/reply pairing |
| Translations | NAT mapping per session |
Asymmetric routing breaks stateful inspection: if return traffic passes a different firewall, it has no session and is dropped.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Expected output
show conn address 10.1.1.20Expected state: One entry for the flow with data in both directions.
TCP outside 203.0.113.10:443 inside 10.1.1.20:51844, idle 0:00:03, bytes 18432, flags UIO
! Illustrative output, not captured Evidence.The firewall is tracking the session from inside host 10.1.1.20 to 203.0.113.10:443. Flags `U` = up, `I` = inbound data seen, `O` = outbound data seen. Only one of `I`/`O` suggests the replies take another path.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Security → Next-Generation Firewall → Stateful Inspection. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%