Supported Platforms
Related Documentation
- LN, SRX Series
- Understanding Packet-Based Processing
- Selective Stateless Packet-Based Services Configuration Overview
- Example: Configuring Selective Stateless Packet-Based Services for End-to-End Packet-Based Forwarding
- Example: Configuring Selective Stateless Packet-Based Services for Packet-Based to Flow-Based Forwarding
- Additional Information
- Packet-Based Processing Feature Guide for Security Devices
Understanding Selective Stateless Packet-Based Services
Selective stateless packet-based services allow you to use both flow-based and packet-based forwarding simultaneously on a system. You can selectively direct traffic that requires packet-based, stateless forwarding to avoid stateful flow-based forwarding by using stateless firewall filters, also known as access control lists (ACLs). The traffic not so directed follows the default flow-based forwarding path. Bypassing flow-based forwarding can be useful for traffic for which you explicitly want to avoid flow session-scaling constraints.
By default, Juniper Networks devices running Junos OS use flow-based forwarding. Selective stateless packet-based services allows you to configure the device to provide only packet-based processing for selected traffic based on input filter terms. Other traffic is processed for flow-based forwarding. Bypassing flow-based forwarding is useful for deployments where you want to avoid session-scaling constraints and session creation and maintenance costs.
When you configure the device for selective stateless packet-based processing, packets entering the system are treated differently depending on certain conditions:
- If a packet satisfies matching conditions specified in input filter terms, it is marked for packet mode and all configured packet mode features are applied to it. No flow-based security features are applied. It bypasses them.
- If a packet has not been flagged for packet-mode, it undergoes normal processing. All services except for MPLS can be applied to this traffic.
Figure 1 shows traffic flow with selective stateless packet-based services bypassing flow-based processing.
Figure 1: Traffic Flow with Selective Stateless Packet-Based Services

When the packet comes in on an interface, the input packet filters configured on the interface are applied.
- If the packet matches the conditions specified in the firewall filter, a packet-mode action modifier is set to the packet. The packet-mode action modifier updates a bit field in the packet key buffer—this bit field is used to determine if the flow-based forwarding needs to be bypassed. As a result, the packet with the packet-mode action modifier bypasses the flow-based forwarding completely. The egress interface for the packet is determined through a route lookup. Once the egress interface for the packet is found, filters are applied and the packet is sent to the egress interface where it is queued and scheduled for transmission.
- If the packet does not match the conditions specified in this filter term, it is evaluated against other terms configured in the filter. If, after all terms are evaluated, a packet matches no terms in a filter, the packet is silently discarded. To prevent packets from being discarded, you configure a term in the filter specifying an action to accept all packets.
A defined set of stateless services is available with selective stateless packet-based services:
- IPv4 routing (unicast and multicast protocols)
- Class of service (CoS)
- Link fragmentation and interleaving (LFI)
- Generic routing encapsulation (GRE)
- Layer 2 switching
- Multiprotocol Label Switching (MPLS)
- Stateless firewall filters
- Compressed Real-Time Transport Protocol (CRTP)
Although traffic requiring MPLS services must be processed in packet mode, under some circumstances it might be necessary to concurrently apply certain services to this traffic that can only be provided in flow mode, such as stateful inspection, NAT, and IPsec. To direct the system to process traffic in both flow and packet modes, you must configure multiple routing instances connected through a tunnel interface. One routing instance must be configured to process the packets in flow mode and the other routing instance must be configured to process the packets in packet mode. When you use a tunnel interface to connect routing instances, traffic between those routing instances is injected again into the forwarding path and it can then be reprocessed using a different forwarding method.
Related Documentation
- LN, SRX Series
- Understanding Packet-Based Processing
- Selective Stateless Packet-Based Services Configuration Overview
- Example: Configuring Selective Stateless Packet-Based Services for End-to-End Packet-Based Forwarding
- Example: Configuring Selective Stateless Packet-Based Services for Packet-Based to Flow-Based Forwarding
- Additional Information
- Packet-Based Processing Feature Guide for Security Devices
Published: 2014-12-15
Supported Platforms
Related Documentation
- LN, SRX Series
- Understanding Packet-Based Processing
- Selective Stateless Packet-Based Services Configuration Overview
- Example: Configuring Selective Stateless Packet-Based Services for End-to-End Packet-Based Forwarding
- Example: Configuring Selective Stateless Packet-Based Services for Packet-Based to Flow-Based Forwarding
- Additional Information
- Packet-Based Processing Feature Guide for Security Devices