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
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Example: Configuring CoS Rules on Services PICs

date_range 13-Jan-21

The following example show a CoS configuration containing two rules, one for input matching on a specified application set and the other for output matching on a specified source address:

content_copy zoom_out_map
[edit services]
cos {
    application-profile cosprofile {
        ftp {
            data {
                dscp af11;
                forwarding-class 1;
            }
        }
    }
    application-profile cosrevprofile {
        ftp {
            data {
                dscp af22;
            }
        }
    }
    rule cosrule {
        match-direction input;
        term costerm {
            from {
                source-address {
                    any-unicast;
                }
                applications junos-ftp;
            }
            then {
                dscp af33;
                forwarding-class 3;
                application-profile cosprofile;
                reverse {
                    dscp af43;
                    application-profile cosrevprofile;
                }
            }
        }
    }
}
stateful-firewall {
    rule r1 {
        match-direction input;
        term t1 {
            from {
                application-sets junos-algs-outbound;
            }
            then {
                accept;
            }
        }
        term t2 {
            then {
                accept;
            }
        }
    }
    service-set test {
        stateful-firewall-rules r1;
        cos-rules cosrule;
        interface-service {
            service-interface sp-1/3/0;
        }
    }
}
footer-navigation