Configuring CoS on an MPLS Provider Edge Switch Using IP Over MPLS (CLI Procedure)
You can use class of service (CoS) within MPLS networks to prioritize certain types of traffic during periods of congestion. This topic describes configuring CoS components on a provider edge (PE) switch that is using IP Over MPLS.
This task describes how to create a custom DSCP classifier and a custom EXP rewrite rule on the ingress PE switch. It includes configuring a policer firewall filter and applying it to the customer-edge interface of the ingress PE switch. The policer firewall filter ensures that the amount of traffic forwarded through the MPLS tunnel never exceeds the requested bandwidth allocation.
Before you begin, configure the basic components for an MPLS network:
Configure two PE switches. See Configuring MPLS on Provider Edge EX8200 and EX4500 Switches Using Circuit Cross-Connect (CLI Procedure).
Configure one or more provider switches. See Configuring MPLS on EX8200 and EX4500 Provider Switches (CLI Procedure).
This topic includes:
To configure CoS on a provider edge switch:
- Import the default DSCP classifier classes to the custom
DSCP classifier that you are creating:
user@switch# set classifiers dscp classifier-name import default
- Add a forwarding class to this custom DSCP classifier
and specify a loss priority and code point:
user@switch# set classifiers dscp classifier-name forwarding-class forwarding-class loss-priority loss-priority code-points code-point
- Specify the values for the custom EXP rewrite rule, e1:
user@switch# set rewrite-rules exp e1 forwarding-class forwarding-class loss-priority loss-priority code-points code-point
- On EX8200 switches only, bind the custom EXP rewrite rule
to the interface:
user@switch# set class-of-service interfaces interface unit unit rewrite-rules exp e1
Configuring an LSP Policer
To configure an LSP policer:
You cannot configure LSP policers on EX8200 switches. EX8200 switches do not support LSP policers.
- Specify the number of bits per second permitted, on average, for the firewall policer, which will later be applied to the customer-edge-interface:
- Specify the maximum size permitted for bursts of data
that exceed the given bandwidth limit for this policer:
[edit firewall policer]
user@switch# set mypolicer if-exceeding burst-size-limit 33553920
- Discard traffic that exceeds the rate limits for this
[edit firewall policer]
user@switch# set mypolicer then discard
- To reference the policer, configure a filter term that includes the policer action:
- Apply the filter to the customer-edge interface:
user@switch# set ge-2/0/3 unit 0 family inet address 192.168.121.1/16 policing filter myfilter
You can also configure schedulers and shapers as needed. See Defining CoS Schedulers and Scheduler Maps (CLI Procedure).