Juniper Networks, Junos, Steel-Belted Radius, NetScreen, and ScreenOS are registered trademarks of Juniper Networks, Inc. in the United
States and other countries. The Juniper Networks Logo, the Junos logo, and JunosE are trademarks of Juniper Networks, Inc. All other
trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right to change, modify,
transfer, or otherwise revise this publication without notice.
Products made or sold by Juniper Networks or components thereof might be covered by one or more of the following patents that are
owned by or licensed to Juniper Networks: U.S. Patent Nos. 5,473,599, 5,905,725, 5,909,440, 6,192,051, 6,333,650, 6,359,479, 6,406,312,
6,429,706, 6,459,579, 6,493,347, 6,538,518, 6,538,899, 6,552,918, 6,567,902, 6,578,186, and 6,590,785.
Class of Service Overview and Examples for EX9200 Switches
The information in this document is current as of the date on the title page.
YEAR 2000 NOTICE
Juniper Networks hardware and software products are Year 2000 compliant. Junos OS has no known time-related limitations through the
year 2038. However, the NTP application is known to have some difficulty in the year 2036.
END USER LICENSE AGREEMENT
The Juniper Networks product that is the subject of this technical documentation consists of (or is intended for use with) Juniper Networks
software. Use of such software is subject to the terms and conditions of the End User License Agreement (“EULA”) posted at
http://www.juniper.net/support/eula.html. By downloading, installing or using such software, you agree to the terms and conditions of
To obtain the most current version of all Juniper Networks®technical documentation,
see the product documentation page on the Juniper Networks website at
http://www.juniper.net/techpubs/.
If the information in the latest release notes differs from the information in the
documentation, follow the product Release Notes.
Juniper Networks Books publishes books by Juniper Networks engineers and subject
matter experts. These books go beyond the technical documentation to explore the
nuances of network architecture, deployment, and administration. The current list can
be viewed at http://www.juniper.net/books.
Supported Platforms
For the features described in this document, the following platforms are supported:
•
EX Series
Using the Examples in This Manual
If you want to use the examples in this manual, you can use the load merge or the load
merge relative command. These commands cause the software to merge the incoming
configuration into the current candidate configuration. The example does not become
active until you commit the candidate configuration.
If the example configuration contains the top level of the hierarchy (or multiple
hierarchies), the example is a full example. In this case, use the load merge command.
Class of Service Overview and Examples for EX9200 Switches
If the example configuration does not start at the top level of the hierarchy, the example
is a snippet. In this case, use the load merge relative command. These procedures are
described in the following sections.
Merging a Full Example
To merge a full example, follow these steps:
1. From the HTML or PDF version of the manual, copy a configuration example into a
text file, save the file with a name, and copy the file to a directory on your routing
platform.
For example,copy the following configuration to a file and name the file ex-script.conf.
Copy the ex-script.conf file to the /var/tmp directory on your routing platform.
system {
scripts {
commit {
file ex-script.xsl;
}
}
}
interfaces {
fxp0 {
disable;
unit 0 {
family inet {
address 10.0.0.1/24;
}
}
}
}
Merging a Snippet
2. Merge the contents of the file into your routing platform configuration by issuing the
Class of Service Overview and Examples for EX9200 Switches
Table 2: Text and Syntax Conventions (continued)
ExamplesDescriptionConvention
Italic text like this
Text like this
| (pipe symbol)
# (pound sign)
[ ] (square brackets)
Indention and braces ( { } )
; (semicolon)
Represents variables (options for which
you substitute a value) in commands or
configuration statements.
Represents names of configuration
statements, commands, files, and
directories;configurationhierarchylevels;
or labels on routing platform
components.
Indicates a choice between the mutually
exclusivekeywords or variables on either
side of the symbol. The set of choices is
often enclosed in parentheses for clarity.
same line as the configuration statement
to which it applies.
Enclose a variable for which you can
substitute one or more values.
Identify a level in the configuration
hierarchy.
Identifies a leaf statement at a
configuration hierarchy level.
Configure the machine’s domain name:
[edit]
root@# set system domain-name
domain-name
•
To configure a stub area, include the
stub statement at the[edit protocols
ospf area area-id] hierarchy level.
•
The console port is labeled CONSOLE.
stub <default-metric metric>;Enclose optional keywords or variables.< > (angle brackets)
broadcast | multicast
(string1 | string2 | string3)
rsvp { # Required for dynamic MPLS onlyIndicates a comment specified on the
community name members [
community-ids ]
[edit]
routing-options {
static {
route default {
nexthop address;
retain;
}
}
}
GUI Conventions
Bold text like this
> (bold right angle bracket)
Documentation Feedback
We encourage you to provide feedback, comments, and suggestions so that we can
improve the documentation. You can send your comments to
techpubs-comments@juniper.net, or fill out the documentation feedback form at
Representsgraphicaluser interface (GUI)
items you click or select.
Separates levels in a hierarchy of menu
selections.
•
In the Logical Interfaces box, select
All Interfaces.
•
To cancel the configuration, click
Cancel.
In the configuration editor hierarchy,
select Protocols>Ospf.
https://www.juniper.net/cgi-bin/docbugreport/ . If you are using e-mail, be sure to include
the following information with your comments:
•
Document or topic name
•
URL or page number
•
Software release version (if applicable)
Requesting Technical Support
Technical product support is availablethrough the Juniper Networks Technical Assistance
Center (JTAC). If you are a customer with an active J-Care or JNASC support contract,
or are covered under warranty, and need post-sales technical support, you can access
our tools and resources online or open a case with JTAC.
•
JTAC policies—For a complete understanding of our JTAC procedures and policies,
review the JTAC User Guide located at
JTAC hours of operation—The JTAC centers have resources available 24 hours a day,
7 days a week, 365 days a year.
Self-Help Online Tools and Resources
For quick and easy problem resolution, Juniper Networks has designed an online
self-service portal called the Customer Support Center (CSC) that provides you with the
following features:
Find solutions and answer questions using our Knowledge Base: http://kb.juniper.net/
•
Download the latest versions of software and review release notes:
http://www.juniper.net/customers/csc/software/
•
Search technical bulletins for relevant hardware and software notifications:
https://www.juniper.net/alerts/
•
Join and participate in the Juniper Networks Community Forum:
http://www.juniper.net/company/communities/
•
Open a case online in the CSC Case Management tool: http://www.juniper.net/cm/
To verify service entitlement by product serial number, use our Serial Number Entitlement
(SNE) Tool: https://tools.juniper.net/SerialNumberEntitlementSearch/
Understanding Packet Flow Across a Network on page 4
•
Junos CoS Components on page 5
•
Default CoS Settings on page 6
•
CoS Applications Overview on page 8
•
Interface Types That Do Not Support CoS on page 9
•
VPLS and Default CoS Classification on page 10
CoS Overview
When a network experiences congestion and delay, some packets must be dropped. The
Juniper Networks®Junos®operating system (Junos OS) class of service (CoS) enables
you to divide traffic into classes and offer various levels of throughput and packet loss
when congestion occurs. This allows packet loss to happen according to rules that you
configure.
For interfaces that carry IPv4, IPv6, and MPLS traffic, you can configure the Junos OS
CoS features to provide multiple classes of service for different applications. On the
routing device, you can configure multiple forwarding classes for transmitting packets,
define which packets are placed into each output queue, schedule the transmission
service level for each queue, and manage congestion using a random early detection
(RED) algorithm.
The Junos OS CoS features provide a set of mechanisms that you can use to provide
differentiated services when best-effort traffic delivery is insufficient. In designing CoS
applications, you must give careful consideration to your service needs, and you must
thoroughly plan and design your CoS configuration to ensure consistency across all
routing devices in a CoS domain. You must also consider all the routing devices and other
networking equipment in the CoS domain to ensure interoperabilityamong all equipment.
Because Juniper Networks routing devices implement CoS in hardware rather than in
software, you can experiment with and deploy CoS features without adversely affecting
packet forwarding and routing performance.
Class of Service Overview and Examples for EX9200 Switches
CoS Standards
The standards for Juniper Networks®Junos®operatingsystem (Junos OS) class of service
(CoS) capabilities are defined in the following RFCs:
•
RFC 2474, Definition of the Differentiated Services Field in the IPv4 and IPv6 Headers
•
RFC 2597, Assured Forwarding PHB Group
•
RFC 2598, An Expedited Forwarding PHB
•
RFC 2698, A Two Rate Three Color Marker
Understanding Packet Flow Across a Network
CoS works by examining traffic entering at the edge of your network. The edge routing
devices classify traffic into defined service groups, to provide the special treatment of
traffic across the network. For example, voice traffic can be sent across certain links, and
data traffic can use other links. In addition, the data traffic streams can be serviced
differently along the network path to ensure that higher-paying customers receive better
service. As the traffic leaves the network at the far edge, you can reclassify the traffic.
To support CoS, you must configure each routing device in the network. Generally, each
routing device examines the packets that enter it to determine their CoS settings. These
settings then dictate which packets are first transmitted to the next downstream routing
device. In addition, the routing devices at the edges of the network might be required to
alter the CoS settings of the packets that enter the network from the customer or peer
networks.
In Figure 1 on page 4, Router A is receiving traffic from a customer network. As each
packet enters, Router A examines the packet’s current CoS settings and classifies the
traffic into one of the groupings defined by the Internet service provider (ISP). This
definition allows Router A to prioritize its resources for servicing the traffic streams it is
receiving. In addition, Router A might alter the CoS settings (forwarding class and loss
priority) of the packets to better match the ISP’s traffic groups. When Router B receives
the packets, it examines the CoS settings, determines the appropriate traffic group, and
processesthe packet according to those settings. It then transmits the packetsto RouterC,
which performs the same actions. Router D also examines the packets and determines
the appropriate group. Because Router D sits at the far end of the network, the ISP might
decide once again to alter the CoS settings of the packets before Router D transmits
them to the neighboring network.
The Juniper Networks®Junos®operating system (Junos OS) CoS consists of many
components that you can combine and tune to provide the level of services required by
customers.
The Junos OS CoS components include:
•
Code-point aliases—A code-point alias assigns a name to a pattern of code-point bits.
You can use this name instead of the bit pattern when you configure other CoS
components, such as classifiers, drop-profile maps, and rewrite rules.
•
Classifiers—Packet classification refers to the examination of an incoming packet. This
function associates the packet with a particular CoS servicing level. In the Junos OS,
classifiers associate incoming packets with a forwarding class and loss priority and,
based on the associated forwarding class, assign packets to output queues. Two
general types of classifiers are supported:
•
Chapter 1: CoS Overview
Behavior aggregate or CoS value traffic classifiers—A behavior aggregate (BA) is a
method of classification that operates on a packet as it enters the routing device.
The CoS value in the packet header is examined, and this single field determines the
CoS settings applied to the packet. BA classifiers allow you to set the forwarding
class and loss priority of a packet based on the Differentiated Services code point
(DSCP) value, DSCP IPv6 value, IP precedence value, MPLS EXP bits, and IEEE 802.1p
value. The default classifier is based on the IP precedence value.
•
Multifield traffic classifiers—A multifield classifier is a second method for classifying
traffic flows. Unlike a behavior aggregate, a multifield classifier can examine multiple
fields in the packet. Examples of some fields that a multifield classifier can examine
include the source and destination address of the packet as well as the source and
destination port numbers of the packet. With multifield classifiers, you set the
forwarding class and loss priority of a packet based on firewall filter rules.
•
Forwarding classes—The forwarding classes affect the forwarding, scheduling, and
marking policies applied to packets as they transit a routing device. The forwarding
class plus the loss priority define the per-hop behavior. Four categories of forwarding
classes are supported: best effort, assured forwarding, expedited forwarding, and
network control. For Juniper Networks M Series Multiservice Edge Routers, four
forwarding classes are supported. You can configure up to one each of the four types
of forwarding classes. For M120 and M320 Multiservice Edge Routers,Juniper Networks
MX Series 3D Universal Edge Routers, Juniper Networks T Series Core Routers and EX
Series switches, 16 forwarding classes are supported, so you can classify packets more
granularly. For example, you can configure multiple classes of expedited forwarding
(EF) traffic: EF, EF1, and EF2.
•
Loss priorities—Loss priorities allow you to set the priority of dropping a packet. Loss
priority affects the scheduling of a packet without affecting the packet’s relative
ordering. You can use the packet loss priority (PLP) bit as part of a congestion control
strategy. You can use the loss priority setting to identify packets that have experienced
congestion. Typically you mark packets exceeding some service level with a high loss
Class of Service Overview and Examples for EX9200 Switches
priority. You set loss priority by configuring a classifier or a policer. The loss priority is
used later in the workflow to select one of the drop profiles used by RED.
•
Forwarding policy options—These options allow you to associate forwarding classes
with next hops. Forwarding policy also allows you to create classification overrides,
which assign forwarding classes to sets of prefixes.
•
Transmission scheduling and rate control—These parameters provide you with a variety
of tools to manage traffic flows:
•
Queuing—After a packet is sent to the outgoing interface on a routing device, it is
queued for transmission on the physical media. The amount of time a packet is
queued on the routing device is determined by the availabilityof the outgoing physical
media as well as the amount of traffic using the interface.
•
Schedulers—An individual routing device interface has multiple queues assigned to
store packets. The routing device determines which queue to service based on a
particular method of scheduling. This process often involves a determination of
which type of packet should be transmitted before another.The Junos OS schedulers
allow you to define the priority, bandwidth, delay buffer size, rate control status, and
RED drop profiles to be applied to a particular queue for packet transmission.
Default CoS Settings
•
Fabric schedulers—For M320 and T Series routers only, fabric schedulers allow you
to identify a packet as high or low priority based on its forwarding class, and to
associate schedulers with the fabric priorities.
•
Policers for traffic classes—Policers allow you to limit traffic of a certain class to a
specified bandwidth and burst size. Packets exceeding the policer limits can be
discarded, or can be assigned to a different forwarding class, a different loss priority,
or both. You define policers with filters that can be associated with input or output
interfaces.
•
Rewrite rules—A rewrite rule sets the appropriate CoS bits in the outgoing packet. This
allows the next downstream routing device to classify the packet into the appropriate
service group. Rewriting, or marking, outbound packets is useful when the routing device
is at the border of a network and must alter the CoS values to meet the policies of the
targeted peer.
If you do not configure any CoS settings on your routing device, the software performs
some CoS functions to ensure that user traffic and protocol packets are forwarded with
minimum delay when the network is experiencing congestion. Some default mappings
are automatically applied to each logical interface that you configure. Other default
mappings, such as explicit default classifiers and rewrite rules, are in operation only if
you explicitly associate them with an interface.
You can display default CoS settings by issuing the show class-of-service operational
mode command. This section includes sample output displaying the defaultCoS settings.
The sample output is truncated for brevity.
Code point type: dscp
Alias Bit pattern
af11 001010
af12 001100
...
Code point type: dscp-ipv6
...
Code point type: exp
...
Code point type: ieee-802.1
...
Code point type: inet-precedence
...
Chapter 1: CoS Overview
Default Classifiers
Classifier: dscp-default, Code point type: dscp, Index: 7
...
Classifier: dscp-ipv6-default, Code point type: dscp-ipv6, Index: 8
...
Classifier: exp-default, Code point type: exp, Index: 9
...
Classifier: ieee8021p-default, Code point type: ieee-802.1, Index: 10
...
Classifier: ipprec-default, Code point type: inet-precedence, Index: 11
...
Classifier: ipprec-compatibility, Code point type: inet-precedence, Index: 12
...
Default Frame Relay Loss Priority Map
Loss-priority-map: frame-relay-de-default, Code point type: frame-relay-de, Index:
13
Code point Loss priority
0 low
1 high
Default Rewrite Rules
Rewrite rule: dscp-default, Code point type: dscp, Index: 24
Forwarding class Loss priority Code point
best-effort low 000000
You can configureCoS features to meet your application needs. Because the components
are generic, you can use a single CoS configurationsyntaxacross multiple routing devices.
CoS mechanisms are useful for two broad classes of applications. These applications
can be referred to as in the box and across the network.
In-the-box applications use CoS mechanisms to provide special treatment for packets
passing through a single node on the network. You can monitor the incoming traffic on
each interface, using CoS to provide preferred service to some interfaces (that is, to some
customers) while limiting the service provided to other interfaces. You can also filter
outgoing traffic by the packet’s destination, thus providing preferred service to some
destinations.