You configure a multifield (MF) classifier to detect packets of interest to CoS and assign the packet to the proper forwarding class independently of the DiffServ code point (DSCP). To configure a multifield classifier on a customer-facing or host-facing link, configure a firewall filter to classify traffic. Packets are classified as they arrive on an interface.
One common way to detect packets of CoS interest is by source or destination address. The destination address is used in this example, but many other matching criteria for packet detection are available to firewall filters.
This example shows how to configure the firewall filter mf-classifier and apply it to the Services Router's Fast Ethernet interface fe-0/0/0. The firewall filter consists of the rules (terms) listed in Table 162.
Table 162: Sample mf-classifier Firewall Filter Terms
|
Rule (Term) |
Purpose |
Contents |
|
assured forwarding |
Detects packets destined for 192.168.44.55, assigns them to an assured forwarding class, and gives them a low likelihood of being dropped. |
Match condition: destination address 192.168.44.55 Forwarding class: af-class Loss priority: low |
|
expedited-forwarding |
Detects packets destined for 192.168.66.77, assigns them to an expedited forwarding class, and subjects them to the EF policer configured in Configuring a Policer for a Firewall Filter (Required). |
Match condition: destination address 192.168.66.77 Forwarding class: ef-class Policer: ef-policer |
|
network control |
Detects packets with a network control precedence and forwards them to the network control class. |
Match condition: precedence net-control Forwarding class: nc-class |
|
best-effort-data |
Detects all other packets and assigns them to the best effort class. |
Forwarding class: be-class |
For more information about firewalls filters see Configuring Firewall Filters and NAT and the JUNOS Policy Framework Configuration Guide.
To configure a firewall filter for a multifield classifier for the Services Router:
Table 163: Configuring and Applying a Firewall Filter for a Multifield Classifier
|
Task |
J-Web Configuration Editor |
CLI Configuration Editor |
|
Navigate to the Firewall level in the configuration hierarchy. |
In the configuration editor hierarchy, select Firewall. |
From the top of the configuration hierarchy, enter edit firewall |
|
Create the multifield classifier filter and name it—for example, mf-classifier. |
|
Enter edit filter mf-classifier set interface-specific |
|
Create the term for the assured forwarding traffic class, and give it a name—for example, assured-forwarding. |
|
Enter edit term assured-forwarding |
|
Create the match condition for the assured forwarding traffic class. Use the destination address for assured forwarding traffic—for example, 192.168.44.55. |
|
Enter set from destination-address 192.168.44.55 |
|
Create the forwarding class for assured forwarding DiffServ traffic—for example, af-class. Set the loss priority for the assured forwarding traffic class—for example, low. |
|
From the top of the configuration hierarchy, enter edit firewall filter mf-classifier term assured-forwarding set then forwarding-class af-class set then loss-priority low |
|
Create the term for the expedited forwarding traffic class, and give it a name—for example, expedited-forwarding. |
|
Enter edit term expedited-forwarding |
|
Create the match condition for the assured forwarding traffic class. Use the destination address for assured forwarding traffic—for example, 192.168.66.77. |
|
Enter set from destination-address 192.168.66.77 |
|
Create the forwarding class for expedited forwarding DiffServ traffic—for example, ef-class. Apply the policer for the expedited forwarding traffic class. Use the EF policer previously configured for expedited forwarding DiffServ traffic—ef-policer. (See Configuring a Policer for a Firewall Filter (Required).) |
|
From the top of the configuration hierarchy, enter edit firewall filter mf-classifier term expedited-forwarding set then forwarding-class ef-class set then policer ef-policer |
|
Create the term for the network control traffic class, and give it a name—for example, network-control. |
|
Enter edit term network-control |
|
Create the match condition for the network control traffic class. |
|
Enter set from traffic-class net-control |
|
Create the forwarding class for the network control traffic class, and give it a name—for example, nc-class. |
|
From the top of the configuration hierarchy, enter edit firewall filter mf-classifier term network-control set then forwarding-class nc-class |
|
Create the term for the best-effort traffic class, and give it a name—for example, best-effort-data. |
|
Enter edit term best-effort-data |
|
Create the forwarding class for the best-effort traffic class, and give it a name—for example, be-class. (Because this is the last term in the filter, it has no match condition.) |
|
From the top of the configuration hierarchy, enter set then forwarding-class be-class |
|
Navigate to the Interfaces level in the configuration hierarchy. |
In the configuration editor hierarchy, select Interfaces. |
From the top of the configuration hierarchy, enter edit interfaces |
|
Apply the multifield classifier firewall filter mf-classifier as an input filter on each customer-facing or host-facing interface that needs the filter—for example, on fe-0/0/0, unit 0. |
|
Enter set fe-0/0/0 unit 0 family inet filter input mf-classifier |