This article explains how to change the forwarding mode on SRX devices from flow-based to packet-based for IPv4 traffic. Packet based forwarding mode is supported on the following SRX models: SRX300-series, SRX1500, SRX4100, SRX4200, vSRX.
Note: The solution described here does not apply to the following SRX models: SRX1600, SRX2300, SRX4300, SRX4600, SRX5400, SRX5600, SRX5800.
An SRX device can operate in different forwarding modes: packet mode and flow mode. In flow mode, SRX processes all traffic by analyzing the state or session of traffic. This is also called stateful processing of traffic. In packet mode, SRX processes the traffic as a traditional router on a per-packet basis. This is also known as stateless processing of traffic. Security features like IPsec, NAT, UTM, and so on, do not work in packet mode. By default, Junos OS on SRX devices work in flow mode.
To check the forwarding mode:
show security flow status
root> show security flow status Flow forwarding mode: Inet forwarding mode: flow based Inet6 forwarding mode: flow based MPLS forwarding mode: drop ISO forwarding mode: drop ...
As you can see, the device is in flow-based mode for IPv4 (inet) and IPv6 (inet6) traffic.
[edit] root# delete security
[edit] root# set security forwarding-options family inet mode packet-based
[edit] root# set security forwarding-options family mpls mode packet-based
[edit] root# set security forwarding-options family inet6 mode packet-based
[edit] root# commit warning: You have changed mpls flow mode. You have to reboot the system for your change to take effect. If you have deployed a cluster, be sure to reboot all nodes. warning: Inet flow mode has been changed to packet-based mode for mpls mode modification. warning: You must reboot the system for your change to take effect. If you have deployed a cluster, be sure to reboot all nodes. commit complete
[edit] root# run request system reboot Reboot the system ? [yes,no] (no) yes
he system ? [yes,no] (no) yes
Once the device is up after reboot, check the flow status again. As you can see, the forwarding mode is now packet-based.
root> show security flow status Flow forwarding mode: Inet forwarding mode: packet based Inet6 forwarding mode: packet based MPLS forwarding mode: packet based ISO forwarding mode: drop ...
Note: As of Junos 15.1X49-D70, for the SRX1500 series, SRX4100, SRX4200, devices and vSRX, you do not need to reboot the device when you are switching modes between flow mode and packet mode. For SRX300-Series you do need to reboot.
Note: As of Junos 24.2R1, packet mode configuration changed. Each family (inet, inet6, mpls) can be configured in packet based forwarding mode separately. In earlier releases, setting family mpls to packet based would automatically set family inet to packet based as well.
2024-06-15: Updated to new behavior on how to set packet mode from Junos 24.2R1 onwards2020-01-13: Added note about solution not applying to some SRX High End devices2017-03-21: Added note that solution is not supported on SRX High End devices2017-06-22: Added that no need to reboot after 15.1X49-D702017-08-07: Reboot is required for entire SRX300-Series