To configure CoS match conditions, include the from statement at the [edit services cos rule rule-name term term-name] hierarchy level:
- [edit services cos rule rule-name term term-name]
-
from {
-
applications [ application-names ];
-
application-sets [ set-names ];
-
destination-address address;
-
source-address address;
- }
You can use either the source address or the destination address as a match condition, in the same way that you would configure a firewall filter; for more information, see the JUNOS Policy Framework Configuration Guide.
If you omit the from term, the router accepts all traffic and the default protocol handlers take effect:
You can also include application protocol definitions that you have configured at the [edit applications] hierarchy level; for more information, see the JUNOS Services Interfaces Configuration Guide.
![]() |
Note: If you include a statement that specifies application protocols, the router derives port and protocol information from the corresponding configuration at the [edit applications] hierarchy level; you cannot specify these properties as match conditions. |