Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

rule (Services CoS Next Gen Services)

date_range 20-Nov-23

Syntax

content_copy zoom_out_map
rule rule-name {
    match-direction (input | input-output | output);
    policy policy-name {
        match {
            application [ application-names ];
            destination-address address;
            destination-address-range low minimum-value high maximum-value;
            destination-port port-number;
            destination-prefix-list list-name;
            source-address address;
            source-address-range low minimum-value high maximum-value;
            source-prefix-list list-name;
        }
        then {
            application-profile profile-name;
            dscp (alias | bits);
            forwarding-class class-name;
            reflexive; | revert; | reverse { 
                application-profile profile-name;
                dscp (alias | bits);
                forwarding-class class-name;
            }
        }
    }
}

Hierarchy Level

content_copy zoom_out_map
[edit services cos]

Description

Configure a services CoS rule, which specifies Differentiated Services (DiffServ) code point (DSCP) marking and forwarding-class assignment for packets that are processed by a service set. The CoS rule identifies the matching conditions for packet source and destination addresses and for packet applications, and the actions to take on those packets.

The service set that the CoS rule is assigned to must include at least one stateful firewall rule or NAT rule, or CoS does not work. Only stateful firewall and NAT rules can be used with CoS rules in a service set.

Options

match-direction (input | input-output | output)

The direction in which the rule is matched.

input

Apply the rule match on input. If the CoS rule is assigned to an interface service set, input means traffic entering the interface. If the CoS rule is assigned to a next-hop service set, input means traffic routed with the inside interface.

input-output

Apply the rule match in both directions.

output

Apply the rule match on output. If the CoS rule is assigned to an interface service set, input means traffic leaving the interface. If the CoS rule is assigned to a next-hop service set, output means traffic routed with the outside interface.

rule-name

Name of the CoS rule.

The remaining statements are explained separately. See CLI Explorer.

Required Privilege Level

interface—To view this statement in the configuration.

interface-control—To add this statement to the configuration.

Release Information

Statement introduced in Junos OS Release 19.3R2.

footer-navigation