A firewall filter consists of one or more terms, and the order of the terms within a firewall filter is important. Before you configure firewall filters, you should understand how Juniper Networks EX Series Ethernet Switches evaluate the terms within a firewall filter and how packets are evaluated against the terms.
When a firewall filter consists of a single term, the filter is evaluated as follows:
When a firewall filter consists of more than one term, the firewall filter is evaluated sequentially:
This process continues until either the packet matches the conditions in the from statement in one of the subsequent terms or there are no more terms in the filter.
Figure 1 shows how an EX Series switch evaluates the terms within a firewall filter.
Figure 1: Evaluation of Terms Within a Firewall Filter

If a term does not contain a from statement, the packet is considered to match and the action in the then statement of the term is taken.
If a term does not contain a then statement, or if an action has not been configured in the then statement, and the packet matches the conditions in the from statement of the term, the packet is accepted.
Every firewall filter contains an implicit deny statement at the end of the filter, which is equivalent to the following explicit filter term:
Consequently, if a packet passes through all the terms in a filter without matching any conditions, the packet is discarded. If you configure a firewall filter that has no terms, all packets that pass through the filter are discarded.
![]() | Note: Firewall filtering is supported on packets that are at least 48 bytes long. |