Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

policy-map (Class of Service)

Syntax

Hierarchy Level

Description

Define the packet-marking scheme (rewrite rules) for a customer. Traditionally, packet marking in Junos uses the forwarding class and loss priority determined from a behavior aggregate (BA) classifier or multifield classifier. This approach does not allow rewrite rules to be directly assigned for each customer because of the limited number of combinations of forwarding class and loss priority. policy-map enables you to define rewrite rules on a per-customer basis.

Note:

On devices running Junos OS, creating a policy map requires you to enable enhanced-ip, enhanced-ethernet, or enhanced-mode under [edit chassis network-services].

Note:

Policy maps have the following configuration restrictions:

  • When configuring both proto-ip and proto-mpls options for inet-precedence, inet6-precedence, dscp, or dscp-ipv6, you must configure both options with the same code point or code point alias.

  • You cannot configure inet-precedence and dscp in the same policy map.

  • You cannot configure inet6-precedence and dscp-ipv6 in the same policy map.

  • In case of MPLS SWAP/PUSH operation, only the new labels are marked on all label-switching routers (LSRs), except the penultimate hop case where if it exposes the next label in the stack, then the exposed label is marked. Therefore, with the penultimate hop, the service label is changed.

  • You cannot configure ieee-802.1 and ieee-802.1ad in the same policy map.

  • You cannot configure both outer and outer-and-inner options for ieee-802.1 and ieee-802.1ad code points in the same policy map.

  • For IEEE 802.1ad with the outer-and-inner option, the discard eligibility (DE) bit is marked only for the outer VLAN header. For the inner VLAN header, only the three CoS Bits are marked.

You assign the policy map to a customer through a firewall action on an ingress or egress firewall filter (where the match conditions identify the customer). Alternatively, you can also assign a policy map to an ingress interface or a routing instance. A policy map is executed on a packet just before it is queued, so it overrides any other packet-marking scheme that was previously applied to the packet.

Options

alias

The predefined CoS code point alias on the device.

bits

The bit pattern for the CoS code point.

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 16.1R1.

inet6-precedence options added in Junos OS Release 24.2R1.