ON THIS PAGE
Example: Configuring Strict-Priority Queuing
This example shows how to configure strict-priority queuing and prevent starvation of other queues.
Requirements
Before you begin, review how to create and configure forwarding classes. See Forwarding Classes Overview.
Overview
In this example, you create a BA classifier to classify traffic based on the IP precedence of the packet. The classifier defines IP precedence value 101 as voice traffic and 000 as data traffic. You assign forwarding-class priority queue 0 to voice traffic and queue 1 as data traffic. You then configure the scheduler map as corp-map and voice scheduler as voice-sched.
Then you set the priority for the voice traffic scheduler as strict-high and for the data traffic scheduler as strict-low. You apply the BA classifier to input interface ge-0/0/0 and apply the scheduler map to output interface e1-1/0/0. You then configure two policers called voice-drop and voice-excess. You set the burst size limit and bandwidth limit for voice-drop policer and for voice-excess policer. You then create a firewall filter that includes the new policers and add the policer to the term.
Finally, you apply the filter to output interface e1-1/0/1 and set the IP address as 203.0.113.1/24.
Configuration
Configuring a BA Classifier
CLI Quick Configuration
To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.
Step-by-Step Procedure
To configure a BA classifier:
- Create a BA classifier and set the IP precedence value
for voice traffic.[edit]user@host# edit class-of-service classifiers inet-precedence corp-traffic forwarding-class voice-class loss-priority lowuser@host# set code-points 101
- Create a BA classifier and set the IP precedence value
for data traffic.[edit]user@host# edit class-of-service classifiers inet-precedence corp-traffic forwarding-class data-class loss-priority highuser@host# set code-points 000
Results
From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Configuring Forwarding Classes
CLI Quick Configuration
To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.
Step-by-Step Procedure
To configure forwarding classes:
- Assign priority queuing to voice traffic.[edit]user@host# set class-of-service forwarding-classes queue 0 voice-class
- Assign priority queuing to data traffic.[edit]user@host# set class-of-service forwarding-classes queue 1 data-class
Results
From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Configuring a Scheduler Map
CLI Quick Configuration
To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.
Step-by-Step Procedure
To configure a scheduler map:
- Configure a scheduler map and voice scheduler.[edit]user@host# edit class-of-service scheduler-maps corp-map forwarding-class voice-classuser@host# set scheduler voice-sched
- Configure a scheduler map and data scheduler.[edit]user@host# edit class-of-service scheduler-maps corp-map forwarding-class data-classuser@host# set scheduler data-sched
Results
From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Configuring a Scheduler
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.
Step-by-Step Procedure
To configure schedulers:
- Configure a voice traffic scheduler and set the priority.[edit]user@host# edit class-of-service schedulers voice-scheduser@host# set priority strict-high
- Configure a data traffic scheduler and set the priority.[edit]user@host# edit class-of-service schedulers data-scheduser@host# set priority low
Results
From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Applying a BA Classifier to an Input Interface
CLI Quick Configuration
To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To apply a BA classifier to an input interface:
- Configure an interface.[edit]user@host# edit class-of-service interfaces ge-0/0/0 unit 0
- Apply a BA classifier to an input interface.[edit class-of-service interfaces ge-0/0/0 unit 0]user@host# set classifiers inet-precedence corp-traffic
Results
From configuration mode, confirm your configuration by entering the show class-of-service interfaces command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Applying a Scheduler Map to an Output Interface
CLI Quick Configuration
To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To apply the scheduler map to an output interface:
- Configure an interface.[edit]user@host# edit class-of-service interfaces e1-1/0/0 unit 0
- Apply a scheduler map to an output interface.[edit class-of-service interfaces e1-1/0/0 unit 0]user@host# set scheduler-map corp-map
Results
From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Configuring Two Policers
CLI Quick Configuration
To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.
Step-by-Step Procedure
To configure two policers:
- Configure a policer voice drop.[edit]user@host# edit firewall policer voice-dropuser@host# set if-exceeding burst-size-limit 200000 bandwidth-limit 2000000user@host# set then discard
- Configure a policer voice excess.[edit]user@host# edit firewall policer voice-excessuser@host# set if-exceeding burst-size-limit 200000 bandwidth-limit 1000000user@host# set then out-of-profile
- Create a firewall filter that includes the new policers.[edit]user@host# edit firewall filter voice-term term 01user@host# set from forwarding-class voice-classuser@host# set then policer voice-drop next term
- Add the policer to the term.[edit]user@host# edit firewall filter voice-term term 02user@host# set from forwarding-class voice-classuser@host# set then policer voice-excess accept
Results
From configuration mode, confirm your configuration by entering the show firewall command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Applying a Filter to an Output Interface
CLI Quick Configuration
To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.
Step-by-Step Procedure
To apply a filter to an output interface:
- Apply a filter to an interface.[edit]user@host# edit interfaces e1-1/0/1 unit 0 family inet filter outputuser@host# set voice-term
- Set an IP address.[edit]user@host# set interfaces e1-1/0/1 unit 0 family inet address 203.0.113.1/24
Results
From configuration mode, confirm your configuration by entering the show interfaces command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
If you are done configuring the device, enter commit from configuration mode.
Verification
Confirm that the configuration is working properly.
Verifying the Scheduler Map
Purpose
Verify that the scheduler map is configured properly.
Action
From operational mode, enter the show class-of-service scheduler-map corp-map command.
Verifying the Interfaces
Purpose
Verify that the interfaces are configured properly.
Action
From configuration mode, enter the show interfaces command.
Verifying the Interface Queues
Purpose
Verify that the interface queues are configured properly.
Action
From configuration mode, enter the show interfaces queue command.