5-tuple
What is a 5-tuple?

A 5-tuple is a combination of five Layer 3 and Layer 4 values used to identify a TCP or UDP traffic flow. Together, these values distinguish traffic between endpoints more precisely than an IP address or port alone.

A 5-tuple provides the starting point for session intelligence: it identifies the traffic flow whose activity a system needs to track. Session intelligence adds context over time, such as whether a connection was established, remains active, or has ended. In simple terms, the 5-tuple answers "Which flow is this?", while session intelligence answers "What is happening within that flow?"

Time to read: 5 minutes 18 seconds | Published: December 3, 2026

Inhaltsverzeichnis

    Key takeaways

    • A 5-tuple identifies a TCP or UDP traffic flow using five values: source IP address, destination IP address, source port, destination port, and transport protocol.
    • Direction matters: replies reverse the source and destination addresses and ports. A stateful system can associate both directions with one session, while timing and observation context help distinguish reused tuples or values changed by NAT.
    • A 5-tuple answers "Which flow is this?" Session intelligence adds connection state, timing, and counters to explain what is happening within that flow, supporting filtering, segmentation, monitoring, and troubleshooting.

    What are the five fields of a 5-tuple?

    The IP addresses describe the network endpoints, the ports distinguish transport endpoints, and the protocol separates traffic such as TCP from UDP. The values below form one example client-to-server flow.

    Source IP address
    Layer
    Example
    Meaning

    Firewall

    Layer 3

    192.0.2.10

    Address sending the packet in this direction.

    Destination IP address

    Layer 3

    198.51.100.20

    Address receiving the packet in this direction.

    Source port

    Layer 4

    51514

    Sending transport endpoint; clients commonly use a temporary port.

    Destination port

    Layer 4

    443

    Receiving transport endpoint; port 443 is commonly used for HTTPS.

    Transport protocol

    IP protocol field

    TCP

    Protocol carrying the traffic; TCP and UDP flows remain distinct even if the addresses and ports match.

    How does a 5-tuple identify a flow?

    For the example above, the tuple is (192.0.2.10, 198.51.100.20, 51514, 443, TCP). A device extracts these values from packet headers and uses them to classify traffic or look up a flow record. Changing any field produces a different tuple—for example, a second connection from the same client using source port 51515.


    Direction matters. Without address translation, replies reverse the source and destination addresses and ports: (198.51.100.20, 192.0.2.10, 443, 51514, TCP). A stateful system can associate the two directions with one session rather than treating them as unrelated conversations.


    A tuple is not a permanent identity. Flow records also need time and observation context. A tuple may be reused after an earlier flow expires, and NAT can change the addresses or ports seen at different points in the path. To tell whether records describe the same traffic, check when and where each record was captured. If NAT changed an IP address or port, use the NAT records to connect the original values to the changed ones.

    How does a 5-tuple support session intelligence?

    Session intelligence builds on flow identification rather than replacing it. A system uses the 5-tuple to associate packets with a flow, then maintains a record of the communication over time. That record can combine both traffic directions with connection state, timing, and counters. These details help explain how the session progresses—not just which endpoints are communicating.

    Information
    What it contributes

    5-tuple

    Identifies the flow through source and destination IP addresses, source and destination ports, and protocol. It is the key used to associate traffic with a flow record.

    Traffic directions

    Connects outgoing traffic and replies within a session record, including address or port changes caused by NAT where applicable.

    Connection state

    Shows how a TCP connection progresses through establishment, ongoing communication, and termination. UDP has no TCP-style handshake; systems can track its flows using activity and timeouts.

    Timing and counters

    Adds activity and timeout information, plus packet and byte counts, to help describe the session beyond its five identifying fields.

    Additional context

    Identity and application information can enrich the interpretation of a session. They are separate from the 5-tuple and basic connection state, not information contained in the five fields.

    How are 5-tuples and session intelligence used?

    • Traffic filtering and segmentation: Match source and destination addresses, ports, and protocol to allow or deny communication between endpoints or network segments. Policy rules may use ranges or wildcards rather than one exact tuple.
    • Session tracking: Associate packets with a session record and combine the flow identifier with state information for connection-aware handling.
    • Monitoring and troubleshooting: Isolate traffic for a particular endpoint pair and service, then examine session records, counters, or logs to investigate communication problems.
    • Traffic classification: Classify flows for analysis and traffic management. The tuple supplies the identifier; other measurements describe volume, timing, or behavior.

    Examples in HPE Networking products

    The 5-tuple is a shared networking concept, not a capability unique to one product. These examples show how flow identification can support session tracking in firewalls and access switches. The products should not be assumed to provide identical session analysis or inspection functions.
     

    HPE Networking SRX Firewalls

    SRX firewalls provide flow-monitoring inclusive of all five tuple fields, and their session output combines addresses, ports, and protocol with information such as traffic directions, packet and byte counts, timeout, policy, and NAT details.
     

    HPE Networking CX7300 switch series

    The HPE Networking CX7300 access switch series delivers stateful security using 5-tuple and session intelligence to support granular segmentation at the access layer, helping restrict device-to-device communication and limit lateral movement in the local network. Enforcing suitable policies locally can reduce the need to route traffic centrally solely for segmentation, optimizing higher order services to handle traffic that require advanced inspection services.

    FAQs

    Is a 5-tuple the same as session intelligence?

    No. A 5-tuple identifies a flow. Session intelligence uses that identifier alongside information gathered over time, such as connection state, traffic directions, timing, and counters. The five fields alone do not show whether the connection was established or how it progressed.

    Why are IP addresses alone not enough?

    The same endpoints can have multiple simultaneous communications. Ports distinguish transport endpoints, and the protocol differentiates TCP from UDP. Using all five fields makes flow identification more precise than using only an address pair.

    How can a 5-tuple be used to defend against threats?

    It supplies information used by filtering, tracking, analytics, and segmentation solutions. Protection depends on the policy, inspection, state tracking, and enforcement functions that use that information.

    Related products, solutions or services

    HPE Networking CX switches

    HPE Networking EX Switches

    HPE Networking SRX Firewalls