Classifiers and Rewrite Rules
This topic highlights aspects of classifiers and rewrite rules that are particular to ACX Series routers and EX Series switches.
ACX Series Routers and EX Series switches Running Junos OS
Most ACX Series routers and EX Series switches that run Junos OS support applying classifier and rewrite rules at the global level and physical interface levels.
At a global level, you can define EXP classification.
At a physical interface level, you can define the following features:
-
DSCP, DSCP-IPV6, and IPv4 precedence classifiers
-
DSCP, DSCP-IPV6, and IPv4 precedence rewrites
-
IEEE 802.1p and IEEE 802.1ad classifiers (inner and outer)
-
IEEE 802.1p and IEEE 802.1ad rewrites (outer)
The IEEE 802.1ad classifier uses IEEE 802.1p and DEI bits together.
You cannot configure both IEEE 802.1p and IEEE 802.1ad classifiers together at the physical interface level.
The ACX6360 router does not support rewrite rules or Layer 2 (IEEE802.1p and IEEE802.1ad) classifiers.
At a logical interface level, you can define fixed classification and EXP rewrites.
To configure global EXP classifiers, include the classfiers exp classifier-name statement at the [edit class-of-service system-defaults] hierarchy level.
To configure classifiers or rewrite rules at the physical interface, include either the classifiers statement or the rewrite-rules statement at the [edit class-of-service interfaces interface-name] hierarchy level.
To configure fixed classifiers at the logical interface, include the forwarding-class fc] or the rewrite-rules statement at the [edit class-of-service interfaces interface-name unit number] hierarchy level.
To configure EXP rewrite at the logical interface, include the [edit class-of-service interfaces interface-name unit number rewrite-rules exp rewrite-rule] statement.
To display classifiers configured under system-defaults, enter the show class-of-service system-defaults command.
To display classifiers and rewrite rules bound to physical interfaces, enter the show class-of-service interfaces interface-name command.
ACX Series Routers Running Junos OS Evolved
ACX Series routers that run Junos OS Evolved support applying classifier and rewrite rules at the logical interface level.
ACX Series routers that run Junos OS Evolved additionally support applying multiple classifier and rewrite rules simultaneously to a single logical interface. For example, the following configuration is valid:
[edit class-of-service interfaces] user@host# show et-0/0/0 { unit 0 { classifiers { dscp dscp-classifier; dscp-ipv6 dscp6-classifier; exp exp-classifier; } rewrite-rules { dscp dscp-rewrite; dscp-ipv6 dscp6-rewrite; exp exp-rewrite; } } }
When you apply multiple classifier rewrite rules to a logical interface, if a packet has multiple headers, there can be ambiguity in which classifier or rewrite rule to select. Table 1 lists the classifier the logical interface selects in different scenarios. Table 2 lists the rewrite rule the logical interface selects in different scenarios.
Ingress packet | Configured families on the interface | Classifiers applied to the interface | Selected classifier profile |
---|---|---|---|
L3 packet with IPv4 header | IPv4, IPv6 | DSCP plus any other | DSCP classifier based on IPv4 forwarding |
L3 packet with IPv4 header | IPv4, IPv6 | INET precedence plus any other | INET precedence classifier based on IPv4 forwarding |
L3 packet with IPv6 header | IPv4, IPv6 | DSCP-IPv6 plus any other | DSCP-IPv6 classifier based on IPv6 forwarding |
VLAN tagged L3 packet | L3, MPLS | Custom IEEE-802.1ad, default L3 (DSCP, DSCP-IPv6, INET precedence) | Custom IEEE-802.1ad classifier |
VLAN tagged L3 packet | L3, MPLS | Custom IEEE-802.1ad, custom L3 | Custom L3 classifier |
VLAN tagged L3 packet | L3, MPLS | Custom IEEE-802.1ad, default EXP | Custom IEEE-802.1ad classifier |
VLAN tagged L3 packet | L3, MPLS | Custom IEEE-802.1ad, custom EXP | Custom EXP classifier |
Ingress packet | Configured families on the interface | Rewrite rules applied to the interface | Selected rewrite rule |
---|---|---|---|
L3 packet with IPv4 header | IPv4, IPv6 | DSCP plus any other | DSCP rewrite rule based on IPv4 forwarding |
L3 packet with IPv4 header | IPv4, IPv6 | INET precedence plus any other | INET precedence rewrite rule based on IPv4 forwarding |
L3 packet with IPv6 header | IPv4, IPv6 | DSCP-IPv6 plus any other | DSCP-IPv6 rewrite rule based on IPv4 or IPv6 forwarding |