ON THIS PAGE
Example: Configuring CoS with DSCP IPv6 BA Classifiers
This example shows how to associate an interface with a default or user-defined DSCP IPv6 BA classifier.
Requirements
Before you begin, configure the ge-0/0/0 interface on the device for IPv6 and define your user-defined DSCP IPv6 classifier settings. See Understanding CoS with DSCP IPv6 BA Classifier.
Overview
In this example, you configure CoS and define forwarding classes. You create the behavior aggregate classifier for DiffServ CoS as dscp-ipv6-example and import the default DSCP IPv6 classifier.
You then specify the best-effort forwarding class as be-class, the expedited forwarding class as ef-class, the assured forwarding class as af-class, and the network control forwarding class as nc-class. Finally, you apply your user-defined classifier to interface ge-0/0/0.
Configuration
Procedure
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.
set class-of-service forwarding-classes queue 0 be-class set class-of-service forwarding-classes queue 1 ef-class set class-of-service forwarding-classes queue 2 af-class set class-of-service forwarding-classes queue 3 nc-class set class-of-service classifiers dscp-ipv6 dscp-ipv6-example import default set class-of-service classifiers dscp-ipv6 dscp-ipv6-example forwarding-class be-class loss-priority high code-points 000001 set class-of-service classifiers dscp-ipv6 dscp-ipv6-example forwarding-class ef-class loss-priority high code-points 101111 set class-of-service classifiers dscp-ipv6 dscp-ipv6-example forwarding-class af-class loss-priority high code-points 001100 set class-of-service classifiers dscp-ipv6 dscp-ipv6-example forwarding-class nc-class loss-priority high code-points 110001 set class-of-service interfaces ge-0/0/0 unit 0 classifiers dscp-ipv6 dscp-ipv6-example
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 Junos OS CLI User Guide.
To configure CoS with a user-defined DSCP IPv6 BA classifier:
Configure CoS.
[edit] user@host# edit class-of-service
Define forwarding classes.
[edit class-of-service] user@host# set forwarding-classes queue 0 be-class user@host# set forwarding-classes queue 1 ef-class user@host# set forwarding-classes queue 2 af-class user@host# set forwarding-classes queue 3 nc-class
Create a behavior aggregate classifier for DiffServ CoS.
[edit class-of-service] user@host# edit classifiers dscp-ipv6 dscp-ipv6-example
Import a DSCP IPv6 classifier.
[edit class-of-service classifiers dscp-ipv6 dscp-ipv6-example] user@host# set import default
Specify a best-effort forwarding class classifier.
[edit class-of-service classifiers dscp-ipv6 dscp-ipv6-example] user@host# set forwarding-class be-class loss-priority high code-points 000001
Specify an expedited forwarding class classifier.
[edit class-of-service classifiers dscp-ipv6 dscp-ipv6-example] user@host# set forwarding-class ef-class loss-priority high code-points 101111
Specify an assured forwarding class classifier.
[edit class-of-service classifiers dscp-ipv6 dscp-ipv6-example] user@host# set forwarding-class af-class loss-priority high code-points 001100
Specify a network control forwarding class classifier.
[edit class-of-service classifiers dscp-ipv6 dscp-ipv6-example] user@host# set forwarding-class nc-class loss-priority high code-points 110001
Associate a user-defined classifier with an interface.
[edit class-of-service] user@host# set interfaces ge-0/0/0 unit 0 classifiers dscp-ipv6 dscp-ipv6-example
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.
[edit]
user@host# show class-of-service
classifiers {
dscp-ipv6 dscp-ipv6-example {
import default;
forwarding-class be-class {
loss-priority high code-points 000001;
}
forwarding-class ef-class {
loss-priority high code-points 101111;
}
forwarding-class af-class {
loss-priority high code-points 001100;
}
forwarding-class nc-class {
loss-priority high code-points 110001;
}
}
}
forwarding-classes {
queue 0 be-class;
queue 1 ef-class;
queue 2 af-class;
queue 3 nc-class;
}
interfaces {
ge-0/0/0 {
unit 0 {
classifiers {
dscp-ipv6 dscp-ipv6-example;
}
}
}
}
If you are done configuring the device, enter commit from configuration mode.