- play_arrow Understanding and Configuring Junos Routing Policies
- play_arrow Overview
- Policy Framework Overview
- Comparison of Routing Policies and Firewall Filters
- Prefix Prioritization Overview
- FIB Prefix Prioritization
- Accounting of the Policer Overhead Attribute at the Interface Level
- Configuring the Accounting of Policer Overhead in Interface Statistics
- Understanding Routing Policies
- Protocol Support for Import and Export Policies
- Example: Applying Routing Policies at Different Levels of the BGP Hierarchy
- Default Routing Policies
- Example: Configuring a Conditional Default Route Policy
- play_arrow Evaluating Routing Policies Using Match Conditions, Actions, Terms, and Expressions
- How a Routing Policy Is Evaluated
- Categories of Routing Policy Match Conditions
- Routing Policy Match Conditions
- Route Filter Match Conditions
- Actions in Routing Policy Terms
- Summary of Routing Policy Actions
- Example: Configuring a Routing Policy to Advertise the Best External Route to Internal Peers
- Example: Configuring BGP to Advertise Inactive Routes
- Example: Using Routing Policy to Set a Preference Value for BGP Routes
- Example: Enabling BGP Route Advertisements
- Example: Rejecting Known Invalid Routes
- Example: Using Routing Policy in an ISP Network
- Understanding Policy Expressions
- Understanding Backup Selection Policy for OSPF Protocol
- Configuring Backup Selection Policy for the OSPF Protocol
- Configuring Backup Selection Policy for IS-IS Protocol
- Example: Configuring Backup Selection Policy for the OSPF or OSPF3 Protocol
- play_arrow Evaluating Complex Cases Using Policy Chains and Subroutines
- play_arrow Configuring Route Filters and Prefix Lists as Match Conditions
- Understanding Route Filters for Use in Routing Policy Match Conditions
- Understanding Route Filter and Source Address Filter Lists for Use in Routing Policy Match Conditions
- Understanding Load Balancing Using Source or Destination IP Only
- Configuring Load Balancing Using Source or Destination IP Only
- Walkup for Route Filters Overview
- Configuring Walkup for Route Filters to Improve Operational Efficiency
- Example: Configuring Route Filter Lists
- Example: Configuring Walkup for Route Filters Globally to Improve Operational Efficiency
- Example: Configuring Walkup for Route Filters Locally to Improve Operational Efficiency
- Example: Configuring a Route Filter Policy to Specify Priority for Prefixes Learned Through OSPF
- Example: Configuring the MED Using Route Filters
- Example: Configuring Layer 3 VPN Protocol Family Qualifiers for Route Filters
- Understanding Prefix Lists for Use in Routing Policy Match Conditions
- Example: Configuring Routing Policy Prefix Lists
- Example: Configuring the Priority for Route Prefixes in the RPD Infrastructure
- Configuring Priority for Route Prefixes in RPD Infrastructure
- play_arrow Configuring AS Paths as Match Conditions
- Understanding AS Path Regular Expressions for Use as Routing Policy Match Conditions
- Example: Using AS Path Regular Expressions
- Understanding Prepending AS Numbers to BGP AS Paths
- Example: Configuring a Routing Policy for AS Path Prepending
- Understanding Adding AS Numbers to BGP AS Paths
- Example: Advertising Multiple Paths in BGP
- Improve the Performance of AS Path Lookup in BGP Policy
- play_arrow Configuring Communities as Match Conditions
- Understanding BGP Communities, Extended Communities, and Large Communities as Routing Policy Match Conditions
- Understanding How to Define BGP Communities and Extended Communities
- How BGP Communities and Extended Communities Are Evaluated in Routing Policy Match Conditions
- Example: Configuring Communities in a Routing Policy
- Example: Configuring Extended Communities in a Routing Policy
- Example: Configuring BGP Large Communities
- Example: Configuring a Routing Policy Based on the Number of BGP Communities
- Example: Configuring a Routing Policy That Removes BGP Communities
- play_arrow Increasing Network Stability with BGP Route Flapping Actions
- play_arrow Tracking Traffic Usage with Source Class Usage and Destination Class Usage Actions
- Understanding Source Class Usage and Destination Class Usage Options
- Source Class Usage Overview
- Guidelines for Configuring SCU
- System Requirements for SCU
- Terms and Acronyms for SCU
- Roadmap for Configuring SCU
- Roadmap for Configuring SCU with Layer 3 VPNs
- Configuring Route Filters and Source Classes in a Routing Policy
- Applying the Policy to the Forwarding Table
- Enabling Accounting on Inbound and Outbound Interfaces
- Configuring Input SCU on the vt Interface of the Egress PE Router
- Mapping the SCU-Enabled vt Interface to the VRF Instance
- Configuring SCU on the Output Interface
- Associating an Accounting Profile with SCU Classes
- Verifying Your SCU Accounting Profile
- SCU Configuration
- SCU with Layer 3 VPNs Configuration
- Example: Grouping Source and Destination Prefixes into a Forwarding Class
- play_arrow Avoiding Traffic Routing Threats with Conditional Routing Policies
- Conditional Advertisement and Import Policy (Routing Table) with certain match conditions
- Conditional Advertisement Enabling Conditional Installation of Prefixes Use Cases
- Example: Configuring a Routing Policy for Conditional Advertisement Enabling Conditional Installation of Prefixes in a Routing Table
- play_arrow Protecting Against DoS Attacks by Forwarding Traffic to the Discard Interface
- play_arrow Improving Commit Times with Dynamic Routing Policies
- play_arrow Testing Before Applying Routing Policies
-
- play_arrow Configuring Traffic Policers
- play_arrow Understanding Traffic Policers
- Policer Implementation Overview
- ARP Policer Overview
- Example: Configuring ARP Policer
- Understanding the Benefits of Policers and Token Bucket Algorithms
- Determining Proper Burst Size for Traffic Policers
- Controlling Network Access Using Traffic Policing Overview
- Traffic Policer Types
- Order of Policer and Firewall Filter Operations
- Understanding the Frame Length for Policing Packets
- Supported Standards for Policing
- Hierarchical Policer Configuration Overview
- Understanding Enhanced Hierarchical Policers
- Packets-Per-Second (pps)-Based Policer Overview
- Guidelines for Applying Traffic Policers
- Policer Support for Aggregated Ethernet Interfaces Overview
- Example: Configuring a Physical Interface Policer for Aggregate Traffic at a Physical Interface
- Firewall and Policing Differences Between PTX Series Packet Transport Routers and T Series Matrix Routers
- Hierarchical Policers on ACX Series Routers Overview
- Guidelines for Configuring Hierarchical Policers on ACX Series Routers
- Hierarchical Policer Modes on ACX Series Routers
- Processing of Hierarchical Policers on ACX Series Routers
- Actions Performed for Hierarchical Policers on ACX Series Routers
- Configuring Aggregate Parent and Child Policers on ACX Series Routers
- play_arrow Configuring Policer Rate Limits and Actions
- play_arrow Configuring Layer 2 Policers
- Hierarchical Policers
- Configuring a Policer Overhead
- Two-Color and Three-Color Policers at Layer 2
- Layer 2 Traffic Policing at the Pseudowire Overview
- Configuring a Two-Color Layer 2 Policer for the Pseudowire
- Configuring a Three-Color Layer 2 Policer for the Pseudowire
- Applying the Policers to Dynamic Profile Interfaces
- Attaching Dynamic Profiles to Routing Instances
- Using Variables for Layer 2 Traffic Policing at the Pseudowire Overview
- Configuring a Policer for the Complex Configuration
- Creating a Dynamic Profile for the Complex Configuration
- Attaching Dynamic Profiles to Routing Instances for the Complex Configuration
- Verifying Layer 2 Traffic Policers on VPLS Connections
- Understanding Policers on OVSDB-Managed Interfaces
- Example: Applying a Policer to OVSDB-Managed Interfaces
- play_arrow Configuring Two-Color and Three-Color Traffic Policers at Layer 3
- Two-Color Policer Configuration Overview
- Basic Single-Rate Two-Color Policers
- Bandwidth Policers
- Prefix-Specific Counting and Policing Actions
- Policer Overhead to Account for Rate Shaping in the Traffic Manager
- Three-Color Policer Configuration Overview
- Applying Policers
- Three-Color Policer Configuration Guidelines
- Basic Single-Rate Three-Color Policers
- Basic Two-Rate Three-Color Policers
- Example: Configuring a Two-Rate Three-Color Policer
- play_arrow Configuring Logical and Physical Interface Traffic Policers at Layer 3
- play_arrow Configuring Policers on Switches
- Overview of Policers
- Traffic Policer Types
- Understanding the Use of Policers in Firewall Filters
- Understanding Tricolor Marking Architecture
- Configuring Policers to Control Traffic Rates (CLI Procedure)
- Configuring Tricolor Marking Policers
- Understanding Policers with Link Aggregation Groups
- Understanding Color-Blind Mode for Single-Rate Tricolor Marking
- Understanding Color-Aware Mode for Single-Rate Tricolor Marking
- Understanding Color-Blind Mode for Two-Rate Tricolor Marking
- Understanding Color-Aware Mode for Two-Rate Tricolor Marking
- Example: Using Two-Color Policers and Prefix Lists
- Example: Using Policers to Manage Oversubscription
- Assigning Forwarding Classes and Loss Priority
- Configuring Color-Blind Egress Policers for Medium-Low PLP
- Configuring Two-Color and Three-Color Policers to Control Traffic Rates
- Verifying That Two-Color Policers Are Operational
- Verifying That Three-Color Policers Are Operational
- Troubleshooting Policer Configuration
- Troubleshooting Policer Configuration
-
- play_arrow Configuration Statements and Operational Commands
- play_arrow Troubleshooting
- play_arrow Knowledge Base
-
Firewall Filter Match Conditions and Actions (QFX and EX Series Switches)
Limitations, Caveats, and, Supporting Information
(QFX5100, QFX5110, QFX5200) When using filter-based forwarding on
IPv6 interfaces, only these match conditions are supported in
the (ingress direction): |
(QFX5110) When you enable the |
(QFX5100, QFX5110, QFX5120, QFX5130-32CD, QFX5220, QFX5700) In an
EVPN-VXLAN environment, only these match conditions are
supported: |
(QFX5100, QFX5110, QFX5200, and QFX5120) You cannot apply a firewall filter in the egress direction on a EVPN-VXLAN IRB interface. |
(QFX5700) You cannot apply a firewall filter in the egress direction on a loopback interface. |
(QFX5100, QFX5110) If you are using firewall filters to implement MAC filtering in an EVPN-VXLAN environment, see MAC Filtering, Storm Control, and Port Mirroring Support in an EVPN-VXLAN Environment for the supported match conditions. |
(QFX5100, QFX5110) For each firewall filter that you apply to a
VXLAN, you can specify |
(EX4100, EX4400, EX4600, EX4650, QFX5100, QFX5110, QFX5120,
QFX5200, QFX5210) Use only available interfaces when using the
|
On switches that do not support Layer 2 features, use only those match conditions that are valid for IPv4 and IPv6 interfaces. |
(QFX5120, EX4650) Starting with Junos Release 21.4R1, the
following match conditions are supported in an EVPN-VXLAN
environment on QFX5120, and EX4650:
|
Starting in Junos OS Release 21.4R1, the
source-port-range-optimize and the
destination-port-range-optimize conditions are supported under
|
Starting with Junos Release 22.4R1, the following match
conditions are supported for GBP tagging in an EVPN-VXLAN
environment on supported EX4100, EX4400, EX4650, and QFX5120
Series switches: |
Starting with Junos Release 23.2R1, new IPV4 and IPv6 L4 matches are supported for policy enforcement on the EX4100 series, EX4400 series, EX4650 series, QFX5120-32C and QFX5120-48Y switches. |
Starting in Junos OS Release 23.4R1 and later, the
|
Starting in Junos OS Release 24.4R1, |
Starting in Junos OS Evolved Release 24.4R1, |
Firewall Filter Match Conditions and Actions (EX4100, EX4100-F, EX4100-H, EX4400, EX4600, EX4650, QFX5100, QFX5110, QFX5120, QFX5200, QFX5210)
Each term in a firewall filter consists of match conditions and an action. Match conditions are the fields and values that a packet must contain to be considered a match. You can define single or multiple match conditions in match statements. You can also include no match statement, in which case the term matches all packets.
When a packet matches a filter, a switch takes the action specified in the term. In addition, you can specify action modifiers to count, mirror, rate-limit, and classify packets. If no match conditions are specified for the term, the switch accepts the packet by default.
Table 2 describes the match conditions you can specify when configuring a firewall filter. Some of the numeric range and bit-field match conditions allow you to specify a text synonym. To see a list of all the synonyms for a match condition, type
?
at the appropriate place in a statement.Table 3 shows the actions that you can specify in a term.
Table 4 shows the action modifiers you can use to count, mirror, rate-limit, and classify packets.
For match conditions on specific switches, these limitations apply:
Match Condition | Description | Direction and Interface |
---|---|---|
| ARP request packet or ARP reply packet. | Egress and ingress interfaces. |
arp-type | ARP request packet or ARP reply packet. | Ingress ports and VLANs |
arp-sender-address | ARP header sender IPv4 address to match | Ingress ports and VLANs |
arp-target-address | ARP header target IPv4 address to match | Ingress ports and VLANs |
| IP destination address field, which is the address of the final destination node. | Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. |
| Destination media access control (MAC) address of the packet. | Ingress ports, VLANs and IPv4 (inet) interfaces. Egress ports and VLANs. |
| TCP or UDP destination port field. Typically, you specify this match
in conjunction with the
| Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| Match a range of TCP or UDP port ranges while using the available memory more efficiently. Using this condition allows you to configure more firewall filters than if you configure individual destination ports. (Not supported with filter-based forwarding.) | Ingress ports, VLANs, IPv4 (inet) interfaces. |
| IP destination prefix list field. You can define a list of IP address
prefixes under a prefix-list alias for frequent use. Define this
list at the | Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces and IPv6 (inet6) interfaces. |
| Differentiated Services code point (DSCP). The DiffServ protocol uses the type-of-service (ToS) byte in the IP header. The most-significant 6 bits of this byte form the DSCP. You can specify DSCP in hexadecimal, binary, or decimal form. In place of the numeric value, you can specify one of the following text synonyms (the field values are also listed):
| Ingress ports, VLANs, and IPv4 (inet) interfaces. Egress IPv4 (inet) interfaces. |
| Ethernet type field of a packet. The EtherType value specifies what protocol is being transported in the Ethernet frame. In place of the numeric value, you can specify one of the following text synonyms (the field values are also listed):
| Ingress ports and VLANs. Egress ports and VLANs. |
| Include this option to increase the number of egress VLAN firewall filter terms from 1024 to 2048. | Egress VLAN IPv4 (inet) interfaces and IPv6 (inet6) interfaces. |
| Match on MPLS EXP bits. | Ingress MPLS interfaces. Egress MPLS interfaces. |
| IP fragmentation flags. In place of the numeric value, you can specify one of the following text synonyms (the hexadecimal values are also listed):
| Ingress ports and VLANs. |
| Match the destination tag, for use with micro-segmentation on a VXLAN, as described here: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN. | Not applicable |
| Match the source tag, for use with micro-segmentation on a VXLAN, as described here: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN. | Not applicable |
| ICMP code field. Because the meaning of the value depends upon the
associated
| Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| Match the specified hop limit or set of hop limits. Specify a single value or a range of values from 0 through 255. | Ingress and egress IPv6 (inet6) interfaces. Note: Not supported in the egress direction on the QFX3500, QFX3600, QFX5100, QFX5120, QFX5110, QFX5200, and QFX5210 switches. |
| Match the IPv4 or IPv6 source or destination address, for use with micro-segmentation on a VXLAN, as described here: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress and egress (system wide). |
ip-version ipv4 destination-port
DST_PORT | Match the TCP/UDP destination port, for use with GBP policy filter L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv4 source-port
SRC_PORT | Match the TCP/UDP source port, for use with for use with GBP policy filter L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv4 ip-protocol
PROTOCOL | Match the IP protocol type, for use with GBP policy filter L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv4
is-fragment | Match if the packet is a fragment, for use with GBP policy filter L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv4 fragment-flag
FLAGS | Match the fragment flags (in symbolic or hex formats), for use with GBP policy filter L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv4
ttlValue | IP Time-to-live (TTL) field in decimal. The value can be 1-255. For use with GBP policy filter L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv4
tcp-flagsFLAGS | Match one or more TCP flags (in symbolic or hex formats), for use with GBP policy L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv4 tcp-initial
| Match the first TCP packet of a connection. For use with GBP policy L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv4 tcp-established
| Match the packets of an established TCP connection, for use with GBP policy L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv6 source-port
SRC_PORT | Match the TCP/UDP source port, for use with GBP policy L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv6 destination-port
DST_PORT | Match the TCP/UDP destination port, for use with for use with GBP policy filter L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv6 next-header
PROTOCOL | Match the next header protocol type, for use with GBP policy L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv6
tcp-flagsFLAGS | Match the TCP flags, for use with GBP policy L4 matches, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv6 tcp-initial
| Match the initial packets of an established TCP connection, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
ip-version ipv6 tcp-established
| Match the packets of an established TCP connection, as described in: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN | Ingress only. |
| ICMP message type field. Typically, you specify this match in
conjunction with the IPv4: IPv6: See also | Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| Interface on which the packet is received, including the logical
unit. You can include the wildcard character ( Note: An interface from which a packet is sent cannot be used as a match condition. Match a list of interfaces under the same term in a filter. For use with micro-segmentation on a VXLAN, as described here: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN. | Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces and IPv6 (inet6) interfaces. |
| IPv4 address that is the final destination node address for the packet. | Ingress ports and VLANs. |
| IPv6 address that is the final destination node address for the packet. | Ingress ports and VLANs. (You cannot simultaneously apply a filter with this match criterion to a Layer 2 port and VLAN that includes that port.) |
| Specify | Ingress ports, VLANs, and IPv4 (inet) interfaces. Egress IPv4 (inet) interfaces. |
| IP precedence field. In place of the numeric field value, you can
specify one of the following text synonyms (the field values are
also listed): | Ingress ports, VLANs, and IPv4 (inet) interfaces. Egress IPv4 (inet) interfaces. |
| IP protocol field. | Ingress ports, VLANs, and IPv4 (inet) interfaces. Egress IPv4 (inet) interfaces. |
| IPv4 address of the source node sending the packet. | Ingress ports and VLANs. |
| IPv6 address of the source node sending the packet. | Ingress ports and VLANs. (You cannot simultaneously apply a filter with this match criterion to a Layer 2 port and VLAN that includes that port.) |
| IP version of the packet. Use this condition to match IPv4 or IPv6 header fields in traffic that arrives on a Layer 2 port or VLAN interface. | Ingress ports and VLANs. |
| Using this condition causes a match if the More Fragments flag is enabled in the IP header or if the fragment offset is not zero. | Ingress ports, VLANs, and IPv4 (inet) interfaces. Egress IPv4 (inet) interfaces. |
| Match on logical link control (LLC) layer packets for non-Subnet Access Protocol (SNAP) Ethernet Encapsulation type. | Ingress ports and VLANs. Egress ports and VLANs. |
| Match on MPLS label bits. | Ingress MPLS interfaces. Egress MPLS interfaces. |
| Matches the ID of a normal VLAN or the ID of the outer (service) VLAN (for Q-in-Q VLANs). The acceptable values are 1-4095. Note: Not supported on QFX3600, QFX5100, QFX5110, QFX5120, QFX5200,
QFX5210, QFX5220, EX4600, EX4650, EX4400, EX4100 and EX4300-MP
switches. Use the | Ingress ports and VLANs. Egress ports and VLANs. |
| Match the source media access control (MAC) address, for use with micro-segmentation on a VXLAN, as described here: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN. | Ingress and egress (system wide) . |
| IPv4 or IPv6 protocol value. In place of the numeric value, you can specify one of the following text synonyms (the numeric values are also listed):
| Ingress ports, VLANs, and IPv6 (inet6) interfaces. Egress IPv6 (inet6) interfaces. |
| Packet length in bytes. You must enter a value between 0 and 65535. | Ingress ports, VLANs, IPv4 (inet), and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| IPv4 or IPv6 protocol value. In place of the numeric value, you can specify one of the following text synonyms (the numeric values are also listed):
Note: Not supported on the QFX3500, QFX3600, QFX5100, QFX5110, QFX5200, QFX5210 switches. | Ingress ports, VLANs, and IPv6 (inet6) interfaces. Egress IPv6 (inet6) interfaces. |
| The port qualifier will install two entries in the packet forwarding engine. One with the source-port and second one with the destination-port. Note: Port qualifier is not supported on EX4400, EX4300, EX4100, EX4300 (Multigigabit PoE), EX2300, EX2300 (Multigigabit PoE), and EX3400 platforms. | Ingress ports, VLANs, IPv4 (inet), and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| IP precedence bits in the type-of-service (ToS) byte in the IP header. (This byte can also used for the DiffServ DSCP.) In place of the numeric value, you can specify one of the following text synonyms (the numeric values are also listed):
| Ingress ports, VLANs, and IPv4 (inet) interfaces. Egress IPv4 (inet) interfaces. |
| IPv4 or IPv6 protocol value. In place of the numeric value, you can specify one of the following text synonyms (the numeric values are also listed):
| Ingress ports, VLANs and IPv4 (inet) interfaces. Egress IPv4 (inet) interfaces. |
| Match the radio-access technology (RAT) type specified in the 8-bit Tech-Type field of Proxy Mobile IPv4 (PMIPv4) access technology type extension. The technology type specifies the access technology through which the mobile device is connected to the access network. Specify a single value, a range of values, or a set of values. You can specify a technology type as a numeric value from 0 through 255 or as a system keyword.
| Egress and ingress IPv4 (inet) interfaces. |
| Sample the packet traffic. Apply this option only if you have enabled traffic sampling. | Egress and ingress IPv4 (inet) interfaces. |
| IP source address field, which is the address of the node that sent the packet. | Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| Source media access control (MAC) address of the packet. | Ingress ports and VLANs. Egress ports and VLANs. |
| TCP or UDP source port. Typically, you specify this match in
conjunction with the | Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| Match a range of TCP or UDP port ranges while using the available memory more efficiently. Using this condition allows you to configure more firewall filters than if you configure individual source ports. (Not supported with filter-based forwarding.) | Ingress ports, VLANs, IPv4 (inet) interfaces. |
| IP source prefix list. You can define a list of IP address prefixes
under a prefix-list alias for frequent use. Define this list at the
| Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| Matches packets of an established TCP three-way handshake connection
(SYN, SYN-ACK, ACK). The only packet not matched is the first packet
of the handshake since only the SYN bit is set. For this packet, you
must specify When you specify | Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| One or more TCP flags:
| Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| Match the first TCP packet of a connection. A match occurs when the
TCP flag When you specify | Ingress ports, VLANs, IPv4 (inet) interfaces, and IPv6 (inet6) interfaces. Egress IPv4 (inet) interfaces. |
| 8-bit field that specifies the class-of-service (CoS) priority of the packet. The traffic-class field is used to specify a DiffServ code point (DSCP) value. This field was previously used as the type-of-service (ToS) field in IPv4, and, the semantics of this field (for example, DSCP) are identical to those of IPv4. You can specify one of the following text synonyms (the field values are also listed):
| Ingress ports, VLANs, and IPv6 (inet6) interfaces. Egress IPv6 (inet6) interfaces. |
| IP Time-to-live (TTL) field in decimal. The value can be 1-255. | Ingress IPv4 (inet) interfaces. Egress IPv4 (inet) interfaces. |
| Matches the specified 802.1p VLAN priority in the range
| Ingress and egress ports and VLANs. |
| Matches the ID of the inner (customer) VLAN for a Q-in-Q VLAN. The acceptable values are 1-4095. Note: For QFX3600, QFX5100, QFX5110, QFX5120, QFX5200, QFX5210, EX4600,
EX4650, EX4400, EX4100 and EX4300-MP switches, use
For QFX5220 Series switches, and MX and ACX Series routers, use
| Ingress and egress ports and VLANs. |
| Match the VLAN identifier, vlan-range (the first and last VLAN ID number for the group of VLANs), or vlan list (list of numbers) for use with micro-segmentation on a VXLAN, as described here: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN. Note: Not supported on the EX4100 switches. | Ingress and egress (system wide) |
Use then
statements to define actions that should occur if a packet
matches all conditions in a from
statement. Table 3shows the
actions that you can specify in a term. (If you do not include a then
statement, the system accepts packets that match the filter.)
Action | Description |
---|---|
| Accept a packet. This is the default action for packets that match a term. |
| Discard a packet silently without sending an Internet Control Message Protocol (ICMP) message. |
| Discard a packet and send a “destination unreachable” ICMPv4 message
(type 3). To log rejected packets, configure the
You can specify one of the following message types:
If you specify If you do not specify a message type, the ICMP notification “destination unreachable” is sent with the default message “communication administratively filtered.” Note: The |
| Forward matched packets to a virtual routing instance. |
| Forward matched packets to a specific VLAN. Note: The Note: This action is not supported on OCX series switches. |
You can also specify the action modifiers listed in Table 4 to count, mirror, rate-limit, and classify packets.
Action Modifier | Description |
---|---|
| (Non-ELS platforms) Mirror traffic (copy packets) to an analyzer
configured at the You can specify port mirroring for ingress port, VLAN, and IPv4 (inet) firewall filters only. |
| Count the number of packets that match the term. |
| De-encapsulate GRE packets or forward de-encapsulated GRE packets to the specified routing instance |
| Differentiated Services code point (DSCP). The DiffServ protocol uses the type-of-service (ToS) byte in the IP header. The most-significant 6 bits of this byte form the DSCP. You can specify DSCP in hexadecimal, binary, or decimal form. In place of the numeric value, you can specify one of the following text synonyms (the field values are also listed):
|
| Classify the packet in one of the following default forwarding classes, or in a user-defined forwarding class:
Note: To configure a forwarding class, you must also configure loss priority. |
(QFX5120 and EX4650 only) | Set the group based policy source tag (0..65535) for use with micro-segmentation on VXLAN, as described here: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN. |
(EX4100, EX4400, EX4650 and QFX5120) | Set the group based policy source tag (1..65535) for use with micro-segmentation on VXLAN, as described here: Example: Micro and Macro Segmentation using Group Based Policy in a VXLAN. Note: Applies to Junos OS releases 22.4R1 and later. |
| Switch the traffic to the specified interface without performing a lookup on it. This action is valid only when the filter is applied on ingress. |
| Log the packet's header information in the Routing Engine. To view
this information, enter the Note: The |
| Set the packet loss priority (PLP). Note: The Note: The |
| Send packets to a policer (for the purpose of applying rate limiting). You can specify a policer for ingress port, VLAN, IPv4 (inet), IPv6 (inet6), and MPLS filters. Note: The |
| (ELS platforms) Mirror traffic (copy packets) to an output interface
configured in a port-mirroring instance at the You can specify port mirroring for ingress port, VLAN, and IPv4 (inet) firewall filters only. |
| (ELS platforms) Mirror traffic to a port-mirroring instance
configured at the You can specify port mirroring for ingress port, VLAN, and IPv4 (inet) firewall filters only. Note: This action modifier is not supported on OCX series switches. |
| Log an alert for this packet. Note: The |
| Send packets to a three-color policer (for the purpose of applying rate limiting). You can specify a three-color policer for ingress and egress port, VLAN, IPv4 (inet), IPv6 (inet6), and MPLS filters. Note: The |
See Also
Firewall Filter Match Conditions and Actions (QFX5220, QFX5700 and the QFX5130-32CD)
This topic describes the supported firewall filter match conditions, actions, and action modifiers for the QFX5220-CD, QFX5220-128C, and QFX5130-32CD switches.
Each term in a firewall filter consists of match conditions and an action. Match conditions are the fields and values that a packet must contain to be considered a match. You can define single or multiple match conditions in match statements. You can also include no match statement, in which case the term matches all packets.
When a packet matches a filter, a switch takes the action specified in the term. If you apply no match condition, the switch accepts the packet by default.
Table 5 shows the match conditions for IPv4 (
inet
) and the IPv6 (inet6
) interfaces. It also contains the match conditions for ports and VLANs (ethernet-switching
).Table 6 shows the actions and the action modifiers that you can specify in a term.
For match conditions, some of the numeric range and the bit-field match conditions
allow you to specify a text synonym. To see a list of all the synonyms for a match
condition, type ?
at the appropriate place in a statement.
Match Condition | Description | Direction and Interface |
---|---|---|
| ARP request packet or an ARP reply packet. | Ingress and egress ports and VLANs |
| IP destination address field, which is the address of the final destination node. | Ingress and egress IPv4 and IPv6 interfaces Ingress ports and VLANs |
| Destination MAC address of the packet. | Ingress and egress ports and VLANs |
| TCP or UDP destination port field. You must specify this match with
the For the following well-known ports and port numbers you can specify text synonyms.
| Ingress and egress IPv4 interfaces Ingress IPv6 interfaces. Ingress ports and VLANs |
| Match a range of the TCP or UDP port ranges while using the available memory more efficiently. Using this condition allows you to configure more firewall filters than if you configure individual destination ports. (Not supported with filter-based forwarding.) | Ingress IPv4 interfaces |
| IP destination prefix list field. You can define a list of IP address
prefixes under a prefix-list alias for frequent use. Define this
list at the | Ingress and egress IPv4 and IPv6 interfaces Ingress ports and VLANs. |
| Differentiated Services code point (DSCP). The DiffServ protocol uses the type-of-service (ToS) byte in the IP header. The most-significant 6 bits of this byte form the DSCP. You can specify DSCP in hexadecimal, binary, or decimal form. In place of the numeric value, you can specify one of the following text synonyms and field listed.
| Ingress and egress IPv4 interfaces Ingress ports and VLANs |
| Ethernet type field of a packet. The EtherType value specifies what protocol is being transported in the Ethernet frame. In place of the numeric value, you can specify one of the following text synonyms. The field values are also listed.
| Ingress and egress ports and VLANs |
first-fragment | Match if the packet is the first fragment of a fragmented packet. Avoiding matching the packet if it is a trailing fragment of a fragmented packet. The first fragment of a fragmented packet has a fragment offset value of 0. This match condition is an alias for the bit-field match condition fragment-offset 0 match condition. To match both first and trailing fragments, you can use two terms
that specify different match conditions: | Ingress IPv4 interfaces |
| ICMP code field. Because the meaning of the value depends upon the
associated
| Ingress and egress IPv4 interfaces Ingress IPv6 interfaces Ingress ports and VLANs |
| ICMP message type field. You must specify this match along with the
In place of the numeric value, you can specify one of the following text synonyms (the field values are also listed): IPv4: IPv6: See also | Ingress and egress IPv4 interfaces Ingress IPv6 interfaces Ingress ports and VLANs |
| Interface on which the packet is received, including the logical
unit. You can include the wildcard character ( Note: An interface from which a packet is sent cannot be used as a match condition. | Ingress ports and VLANs |
| IPv4 address that is the final destination node address for the packet. | Ingress ports and VLANs |
| Specify | Ingress IPv4 interfaces |
| IP protocol field. | Ingress ports and VLANs |
| IP precedence field. In place of the numeric field value, you can
specify one of the following text synonyms (the field values are
also listed): | Ingress ports and VLANs |
| IPv4 address of the source node sending the packet. | Ingress ports and VLANs |
| IP version of the packet. Use this condition to match IPv4 or IPv6 header fields in traffic that arrives on a Layer 2 port or VLAN interface. | Ingress ports and VLANs |
is-fragment | Using this condition causes a match if the More Fragments flag is enabled in the IP header or if the fragment offset is not zero. | Ingress and egress IPv4 interfaces (QFX5220) Ingress IPv4 interfaces (QFX5130) |
learn-vlan-id
number | VLAN identifier for MAC learning. | Ingress and egress ports and VLANs (QFX5220) Ingress ports and VLANS (QFX5130) |
learn-vlan-1p-priority
value | Match on the IEEE 802.1p learned VLAN priority bits in the provider VLAN tag (the only tag in a single-tag frame with 802.1Q VLAN tags or the outer tag in a dual-tag frame with 802.1Q VLAN tags). Specify a single value or multiple values from 0 through 7. | Ingress ports and VLANs |
| IPv4 or IPv6 protocol value. In place of the numeric value, you can specify one of the following text synonyms (the numeric values are also listed):
| Ingress and egress IPv6 interfaces |
| Packet length in bytes. You must enter a value between 0 and 65535. | Ingress IPv4 and IPv6 interfaces |
| IP precedence bits in the type-of-service (ToS) byte in the IP header. (This byte can also used for the DiffServ DSCP.) In place of the numeric value, you can specify one of the following text synonyms (the numeric values are also listed):
| Ingress and egress IPv4 interfaces |
| IP protocol value. In place of the numeric value, you can specify one of the following text synonyms (the numeric values are also listed):
| Ingress and egress IPv4 interfaces. Ingress IPv4 interfaces and VLANs |
| IP source address field, which is the address of the node that sent the packet. | Ingress and egress IPv4 interfaces Ingress IPv6 interfaces Ingress ports and VLANs |
| Source media access control (MAC) address of the packet. | Ingress and egress IPv4 interfaces and VLANs |
| TCP or UDP source port. You must specify this match in conjunction
with the In place of the numeric field, you can specify one of the text
synonyms listed under | Ingress and egress IPv4 interfaces Ingress IPv6 interfaces Ingress ports and VLANs |
| Match a range of TCP or UDP port ranges while using the available memory more efficiently. Using this condition allows you to configure more firewall filters than if you configure individual source ports. (Not supported with filter-based forwarding.) | Ingress IPv4 interfaces |
| IP source prefix list. You can define a list of IP address prefixes
under a prefix-list alias for frequent use. Define this list at the
| Ingress and egress IPv4 interfaces Ingress IPv6 interfaces Ingress ports and VLANs |
tcp-established | Match TCP packets of an established TCP session (packets other than
the first packet of a connection). This is an alias for
This match condition does not implicitly check that the protocol is
TCP. To check this, specify the | Ingress and egress IPv4 interfaces (QFX5220) Ingress and egress IPv4 interfaces (QFX5130) Ingress IPv6 interfaces (QFX5130) |
| TCP flags (only one value is supported):
| Ingress and egress IPv4 interfaces Ingress IPv6 interfaces Ingress ports and VLANs |
tcp-initial | Match the first TCP packet of a connection. A match occurs when the
TCP flag When you specify | Ingress and egress IPv4 interfaces (QFX5220) Ingress and egress IPv4 interfaces, Ingress IPv6 interfaces (QFX5130) |
| 8-bit field that specifies the class-of-service (CoS) priority of the packet. The traffic-class field is used to specify a DiffServ code point (DSCP) value. This field was previously used as the type-of-service (ToS) field in IPv4, and, the semantics of this field (for example, DSCP) are identical to those of IPv4. You can specify one of the following text synonyms (the field values are also listed):
| Ingress and egress IPv6 interfaces |
| IP Time-to-live (TTL) field in decimal. The value can be 1-255. | Ingress and egress IPv4 interfaces |
| Matches the ID of the inner (customer) VLAN for a Q-in-Q VLAN. The acceptable values are 1-4095. | Ingress ports and VLANs (QFX5130) |
| Matches the specified 802.1p VLAN priority in the range
| Ingress ports and VLANs (QFX5130) |
Use then
statements to define actions that should occur if a packet
matches all conditions in a from
statement. Table 6 shows
the actions that you can specify in a term. (If you do not include a
then
statement, the system accepts packets that match the
filter.)
For egress IPv4 interfaces, IPv6 interfaces, and egress ports, you can only apply the accept, discard, and count actions. For egress VLANs, you can only apply the accept action.
Action | Description |
---|---|
| Accept a packet. This is the default action for packets that match a term. |
| Specify which groups not to inherit configuration data from. You can specify more than one group name. |
| Count the number of packets that match the term. |
| Discard a packet silently without sending an Internet Control Message Protocol (ICMP) message. |
| Classify the packet in one of the following default forwarding classes, or in a user-defined forwarding class:
Note: To configure a forwarding class, you must also configure loss priority. |
| Log the packet's header information in the Routing Engine. To view
this information, enter the |
| Set the packet loss priority (PLP). Note: The Note: The |
| Send packets to a policer (for the purpose of applying rate limiting). Note: The |
| Mirror traffic (copy packets) to an output interface configured in a
port-mirroring instance at the |
| Mirror traffic to a port-mirroring instance configured at the
You can specify port mirroring for ingress port, VLAN, and IPv4 (inet) firewall filters only. |
| Discard a packet and send a “destination unreachable” ICMPv4 message
(type 3). To log rejected packets, configure the
You can specify one of the following message types:
If you do not specify a message type, the ICMP notification “destination unreachable” is sent with the default message “communication administratively filtered.” Note: The |
| Send packets to a three-color policer (for the purpose of applying rate limiting). Note: The Note: The |
| Forward matched packets to a specific VLAN. To activate this action profile on these platforms, you have to apply
the Note: The |