JUNOSe™ Software
for E Series™ Broadband Services Routers
Policy Management Configuration Guide
Release 11.1.x
Juniper Networks, Inc.
1194 North Mathilda Avenue
Sunnyvale, California 94089
USA
408-745-2000
www.juniper.net
Published: 2010-04-06
Page 2
Juniper Networks, the Juniper Networks logo, JUNOS, NetScreen, ScreenOS, and Steel-Belted Radius are registered trademarks of Juniper Networks, Inc. in
the United States and other countries. JUNOSe is a trademark 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.
JUNOSe™ Software for E Series™ Broadband Services Routers Policy Management Configuration Guide
Writing: Subash Babu Asokan, Krupa Chandrashekar, Diane Florio, Bruce Gillham, Sarah Lesway-Ball, Brian Wesley Simmons, Namrata Mehta
Editing: Benjamin Mann
Illustration: Nathaniel Woodward
Cover Design: Edmonds Design
Revision History
April 2010—FRS JUNOSe 11.1.x
The information in this document is current as of the date listed in the revision history.
YEAR 2000 NOTICE
Juniper Networks hardware and software products are Year 2000 compliant. The JUNOS Software has no known time-related limitations through the year
2038. However, the NTP application is known to have some difficulty in the year 2036.
ii■
Page 3
END USER LICENSE AGREEMENT
READ THIS END USER LICENSE AGREEMENT (“AGREEMENT”) BEFORE DOWNLOADING, INSTALLING, OR USING THE SOFTWARE. BY DOWNLOADING,
INSTALLING, OR USING THE SOFTWARE OR OTHERWISE EXPRESSING YOUR AGREEMENT TO THE TERMS CONTAINED HEREIN, YOU (AS CUSTOMER
OR IF YOU ARE NOT THE CUSTOMER, AS A REPRESENTATIVE/AGENT AUTHORIZED TO BIND THE CUSTOMER) CONSENT TO BE BOUND BY THIS
AGREEMENT. IF YOU DO NOT OR CANNOT AGREE TO THE TERMS CONTAINED HEREIN, THEN (A) DO NOT DOWNLOAD, INSTALL, OR USE THE SOFTWARE,
AND (B) YOU MAY CONTACT JUNIPER NETWORKS REGARDING LICENSE TERMS.
1. The Parties. The parties to this Agreement are (i) Juniper Networks, Inc. (if the Customer’s principal office is located in the Americas) or Juniper Networks
(Cayman) Limited (if the Customer’s principal office is located outside the Americas) (such applicable entity being referred to herein as “Juniper”), and (ii)
the person or organization that originally purchased from Juniper or an authorized Juniper reseller the applicable license(s) for use of the Software (“Customer”)
(collectively, the “Parties”).
2. The Software. In this Agreement, “Software” means the program modules and features of the Juniper or Juniper-supplied software, for which Customer
has paid the applicable license or support fees to Juniper or an authorized Juniper reseller, or which was embedded by Juniper in equipment which Customer
purchased from Juniper or an authorized Juniper reseller. “Software” also includes updates, upgrades and new releases of such software. “Embedded
Software” means Software which Juniper has embedded in or loaded onto the Juniper equipment and any updates, upgrades, additions or replacements
which are subsequently embedded in or loaded onto the equipment.
3. License Grant. Subject to payment of the applicable fees and the limitations and restrictions set forth herein, Juniper grants to Customer a non-exclusive
and non-transferable license, without right to sublicense, to use the Software, in executable form only, subject to the following use restrictions:
a. Customer shall use Embedded Software solely as embedded in, and for execution on, Juniper equipment originally purchased by Customer from Juniper
or an authorized Juniper reseller.
b. Customer shall use the Software on a single hardware chassis having a single processing unit, or as many chassis or processing units for which Customer
has paid the applicable license fees; provided, however, with respect to the Steel-Belted Radius or Odyssey Access Client software only, Customer shall use
such Software on a single computer containing a single physical random access memory space and containing any number of processors. Use of the
Steel-Belted Radius or IMS AAA software on multiple computers or virtual machines (e.g., Solaris zones) requires multiple licenses, regardless of whether
such computers or virtualizations are physically contained on a single chassis.
c. Product purchase documents, paper or electronic user documentation, and/or the particular licenses purchased by Customer may specify limits to
Customer’s use of the Software. Such limits may restrict use to a maximum number of seats, registered endpoints, concurrent users, sessions, calls,
connections, subscribers, clusters, nodes, realms, devices, links, ports or transactions, or require the purchase of separate licenses to use particular features,
functionalities, services, applications, operations, or capabilities, or provide throughput, performance, configuration, bandwidth, interface, processing,
temporal, or geographical limits. In addition, such limits may restrict the use of the Software to managing certain kinds of networks or require the Software
to be used only in conjunction with other specific Software. Customer’s use of the Software shall be subject to all such limitations and purchase of all applicable
licenses.
d. For any trial copy of the Software, Customer’s right to use the Software expires 30 days after download, installation or use of the Software. Customer
may operate the Software after the 30-day trial period only if Customer pays for a license to do so. Customer may not extend or create an additional trial
period by re-installing the Software after the 30-day trial period.
e. The Global Enterprise Edition of the Steel-Belted Radius software may be used by Customer only to manage access to Customer’s enterprise network.
Specifically, service provider customers are expressly prohibited from using the Global Enterprise Edition of the Steel-Belted Radius software to support any
commercial network access services.
The foregoing license is not transferable or assignable by Customer. No license is granted herein to any user who did not originally purchase the applicable
license(s) for the Software from Juniper or an authorized Juniper reseller.
4. Use Prohibitions. Notwithstanding the foregoing, the license provided herein does not permit the Customer to, and Customer agrees not to and shall
not: (a) modify, unbundle, reverse engineer, or create derivative works based on the Software; (b) make unauthorized copies of the Software (except as
necessary for backup purposes); (c) rent, sell, transfer, or grant any rights in and to any copy of the Software, in any form, to any third party; (d) remove
any proprietary notices, labels, or marks on or in any copy of the Software or any product in which the Software is embedded; (e) distribute any copy of
the Software to any third party, including as may be embedded in Juniper equipment sold in the secondhand market; (f) use any ‘locked’ or key-restricted
feature, function, service, application, operation, or capability without first purchasing the applicable license(s) and obtaining a valid key from Juniper, even
if such feature, function, service, application, operation, or capability is enabled without a key; (g) distribute any key for the Software provided by Juniper
to any third party; (h) use the Software in any manner that extends or is broader than the uses purchased by Customer from Juniper or an authorized Juniper
reseller; (i) use Embedded Software on non-Juniper equipment; (j) use Embedded Software (or make it available for use) on Juniper equipment that the
Customer did not originally purchase from Juniper or an authorized Juniper reseller; (k) disclose the results of testing or benchmarking of the Software to
any third party without the prior written consent of Juniper; or (l) use the Software in any manner other than as expressly provided herein.
5. Audit. Customer shall maintain accurate records as necessary to verify compliance with this Agreement. Upon request by Juniper, Customer shall furnish
such records to Juniper and certify its compliance with this Agreement.
■iii
Page 4
6. Confidentiality. The Parties agree that aspects of the Software and associated documentation are the confidential property of Juniper. As such, Customer
shall exercise all reasonable commercial efforts to maintain the Software and associated documentation in confidence, which at a minimum includes
restricting access to the Software to Customer employees and contractors having a need to use the Software for Customer’s internal business purposes.
7. Ownership. Juniper and Juniper’s licensors, respectively, retain ownership of all right, title, and interest (including copyright) in and to the Software,
associated documentation, and all copies of the Software. Nothing in this Agreement constitutes a transfer or conveyance of any right, title, or interest in
the Software or associated documentation, or a sale of the Software, associated documentation, or copies of the Software.
8. Warranty, Limitation of Liability, Disclaimer of Warranty. The warranty applicable to the Software shall be as set forth in the warranty statement that
accompanies the Software (the “Warranty Statement”). Nothing in this Agreement shall give rise to any obligation to support the Software. Support services
may be purchased separately. Any such support shall be governed by a separate, written support services agreement. TO THE MAXIMUM EXTENT PERMITTED
BY LAW, JUNIPER SHALL NOT BE LIABLE FOR ANY LOST PROFITS, LOSS OF DATA, OR COSTS OR PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
OR FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, THE SOFTWARE, OR ANY JUNIPER OR
JUNIPER-SUPPLIED SOFTWARE. IN NO EVENT SHALL JUNIPER BE LIABLE FOR DAMAGES ARISING FROM UNAUTHORIZED OR IMPROPER USE OF ANY
JUNIPER OR JUNIPER-SUPPLIED SOFTWARE. EXCEPT AS EXPRESSLY PROVIDED IN THE WARRANTY STATEMENT TO THE EXTENT PERMITTED BY LAW,
JUNIPER DISCLAIMS ANY AND ALL WARRANTIES IN AND TO THE SOFTWARE (WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE), INCLUDING
ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT DOES JUNIPER
WARRANT THAT THE SOFTWARE, OR ANY EQUIPMENT OR NETWORK RUNNING THE SOFTWARE, WILL OPERATE WITHOUT ERROR OR INTERRUPTION,
OR WILL BE FREE OF VULNERABILITY TO INTRUSION OR ATTACK. In no event shall Juniper’s or its suppliers’ or licensors’ liability to Customer, whether
in contract, tort (including negligence), breach of warranty, or otherwise, exceed the price paid by Customer for the Software that gave rise to the claim, or
if the Software is embedded in another Juniper product, the price paid by Customer for such other product. Customer acknowledges and agrees that Juniper
has set its prices and entered into this Agreement in reliance upon the disclaimers of warranty and the limitations of liability set forth herein, that the same
reflect an allocation of risk between the Parties (including the risk that a contract remedy may fail of its essential purpose and cause consequential loss),
and that the same form an essential basis of the bargain between the Parties.
9. Termination. Any breach of this Agreement or failure by Customer to pay any applicable fees due shall result in automatic termination of the license
granted herein. Upon such termination, Customer shall destroy or return to Juniper all copies of the Software and related documentation in Customer’s
possession or control.
10. Taxes. All license fees payable under this agreement are exclusive of tax. Customer shall be responsible for paying Taxes arising from the purchase of
the license, or importation or use of the Software. If applicable, valid exemption documentation for each taxing jurisdiction shall be provided to Juniper prior
to invoicing, and Customer shall promptly notify Juniper if their exemption is revoked or modified. All payments made by Customer shall be net of any
applicable withholding tax. Customer will provide reasonable assistance to Juniper in connection with such withholding taxes by promptly: providing Juniper
with valid tax receipts and other required documentation showing Customer’s payment of any withholding taxes; completing appropriate applications that
would reduce the amount of withholding tax to be paid; and notifying and assisting Juniper in any audit or tax proceeding related to transactions hereunder.
Customer shall comply with all applicable tax laws and regulations, and Customer will promptly pay or reimburse Juniper for all costs and damages related
to any liability incurred by Juniper as a result of Customer’s non-compliance or delay with its responsibilities herein. Customer’s obligations under this
Section shall survive termination or expiration of this Agreement.
11. Export. Customer agrees to comply with all applicable export laws and restrictions and regulations of any United States and any applicable foreign
agency or authority, and not to export or re-export the Software or any direct product thereof in violation of any such restrictions, laws or regulations, or
without all necessary approvals. Customer shall be liable for any such violations. The version of the Software supplied to Customer may contain encryption
or other capabilities restricting Customer’s ability to export the Software without an export license.
12. Commercial Computer Software. The Software is “commercial computer software” and is provided with restricted rights. Use, duplication, or disclosure
by the United States government is subject to restrictions set forth in this Agreement and as provided in DFARS 227.7201 through 227.7202-4, FAR 12.212,
FAR 27.405(b)(2), FAR 52.227-19, or FAR 52.227-14(ALT III) as applicable.
13. Interface Information. To the extent required by applicable law, and at Customer's written request, Juniper shall provide Customer with the interface
information needed to achieve interoperability between the Software and another independently created program, on payment of applicable fee, if any.
Customer shall observe strict obligations of confidentiality with respect to such information and shall use such information in compliance with any applicable
terms and conditions upon which Juniper makes such information available.
14. Third Party Software. Any licensor of Juniper whose software is embedded in the Software and any supplier of Juniper whose products or technology
are embedded in (or services are accessed by) the Software shall be a third party beneficiary with respect to this Agreement, and such licensor or vendor
shall have the right to enforce this Agreement in its own name as if it were Juniper. In addition, certain third party software may be provided with the
Software and is subject to the accompanying license(s), if any, of its respective owner(s). To the extent portions of the Software are distributed under and
subject to open source licenses obligating Juniper to make the source code for such portions publicly available (such as the GNU General Public License
(“GPL”) or the GNU Library General Public License (“LGPL”)), Juniper will make such source code portions (including Juniper modifications, as appropriate)
available upon request for a period of up to three years from the date of distribution. Such request can be made in writing to Juniper Networks, Inc., 1194
N. Mathilda Ave., Sunnyvale, CA 94089, ATTN: General Counsel. You may obtain a copy of the GPL at http://www.gnu.org/licenses/gpl.html, and
a copy of the LGPL at http://www.gnu.org/licenses/lgpl.html.
15. Miscellaneous. This Agreement shall be governed by the laws of the State of California without reference to its conflicts of laws principles. The provisions
of the U.N. Convention for the International Sale of Goods shall not apply to this Agreement. For any disputes arising under this Agreement, the Parties
hereby consent to the personal and exclusive jurisdiction of, and venue in, the state and federal courts within Santa Clara County, California. This Agreement
constitutes the entire and sole agreement between Juniper and the Customer with respect to the Software, and supersedes all prior and contemporaneous
iv■
Page 5
agreements relating to the Software, whether oral or written (including any inconsistent terms contained in a purchase order), except that the terms of a
separate written agreement executed by an authorized Juniper representative and Customer shall govern to the extent such terms are inconsistent or conflict
with terms contained herein. No modification to this Agreement nor any waiver of any rights hereunder shall be effective unless expressly assented to in
writing by the party to be charged. If any portion of this Agreement is held invalid, the Parties agree that such invalidity shall not affect the validity of the
remainder of this Agreement. This Agreement and associated documentation has been written in the English language, and the Parties agree that the English
version will govern. (For Canada: Les parties aux présentés confirment leur volonté que cette convention de même que tous les documents y compris tout
avis qui s'y rattaché, soient redigés en langue anglaise. (Translation: The parties confirm that this Agreement and all related documentation is and will be
in the English language)).
■v
Page 6
vi■
Page 7
Abbreviated Table of Contents
About the Documentationxxiii
Part 1Policy Management
Chapter 1Managing Policies on the E Series Router3
Chapter 2Creating Classifier Control Lists for Policies7
Chapter 3Creating Policy Lists17
Chapter 4Creating Classifier Groups and Policy Rules31
Chapter 5Creating Rate-Limit Profiles61
Chapter 6Merging Policies101
Chapter 7Creating Hierarchical Policies for Interface Groups129
If the information in the latest release notes differs from the information in the
documentation, follow the JUNOSe Release Notes.
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/.
Audience
This guide is intended for experienced system and network specialists working with
Juniper Networks E Series Broadband Services Routers in an Internet access
environment.
E Series and JUNOSe Text and Syntax Conventions
Table 1 on page xxiv defines notice icons used in this documentation.
E Series and JUNOSe Documentation and Release Notes■xxiii
Table 2 on page xxiv defines text and syntax conventions that we use throughout the
E Series and JUNOSe documentation.
DescriptionMeaningIcon
Indicates important features or instructions.Informational note
Indicates a situation that might result in loss of data or hardware damage.Caution
Alerts you to the risk of personal injury or death.Warning
Alerts you to the risk of personal injury from a laser.Laser warning
Table 2: Text and Syntax Conventions
Represents commands and keywords in text.Bold text like this
Bold text like this
Fixed-width text like this
Represents text that the user must type.
Represents information as displayed on your
terminal’s screen.
Italic text like this
Emphasizes words.
■
Identifies variables.
■
Identifies chapter, appendix, and book
■
names.
Plus sign (+) linking key names
keys simultaneously.
Syntax Conventions in the Command Reference Guide
ExamplesDescriptionConvention
Issue the clock source command.
■
Specify the keyword exp-msg.
■
host1(config)#traffic class low-loss1
host1#show ip ospf 2
Routing Process OSPF 2 with Router
ID 5.5.0.250
Router is an Area Border Router
(ABR)
There are two levels of access: user and
■
privileged.
clusterId, ipAddress.
■
Appendix A, System Specifications
■
Press Ctrl + b.Indicates that you must press two or more
terminal lengthRepresents keywords.Plain text like this
| (pipe symbol)
xxiv■E Series and JUNOSe Text and Syntax Conventions
mask, accessListNameRepresents variables.Italic text like this
diagnostic | lineRepresents a choice to select one keyword
or variable to the left or to the right of this
symbol. (The keyword or variable can be
either optional or required.)
Represent required keywords or variables.{ } (braces)
Obtaining Documentation
To obtain the most current version of all Juniper Networks technical documentation,
see the Technical Documentation page on the Juniper Networks Web site at
http://www.juniper.net/.
To download complete sets of technical documentation to create your own
documentation CD-ROMs or DVD-ROMs, see the Offline Documentation page at
Copies of the Management Information Bases (MIBs) for a particular software release
are available for download in the software image bundle from the Juniper Networks
Web site athttp://www.juniper.net/.
We encourage you to provide feedback, comments, and suggestions so that we can
improve the documentation to better meet your needs. Send your comments to
techpubs-comments@juniper.net, or fill out the documentation feedback form at
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
Requesting Technical Support
Technical product support is available through 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,
■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/
Opening a Case with JTAC
You can open a case with JTAC on the Web or by telephone.
■
Use the Case Management tool in the CSC at http://www.juniper.net/cm/ .
■Call 1-888-314-JTAC (1-888-314-5822 toll-free in the USA, Canada, and Mexico).
For international or direct-dial options in countries without toll-free numbers, see
This chapter introduces policy-based routing management on E Series routers. Policy
management enables you to configure, manage, and monitor policies that selectively
cause packets to take different paths without requiring a routing table lookup. The
JUNOSe software’s packet-mirroring feature uses secure policies.
Policy management enables network service providers to configure services that
customize the treatment of individual packet flows received on a subscriber’s
interface. The main tool for implementing policy management is a policy list. A policy
list is a set of rules, each of which specifies a policy action. A rule is a policy action
optionally combined with a classification.
Packets are sorted at ingress or egress into packet flows based on attributes defined
in classifier control lists (CLACLs). You can apply policy lists to packets arriving and
leaving an interface. You can use policy management on ATM, Frame Relay, generic
routing encapsulation (GRE), IP, IPv6, Layer 2 Tunneling Protocol (L2TP), Multiprotocol
Label Switching (MPLS), and virtual local area network (VLAN) traffic.
Policy management provides:
■Policy routing—Predefines a classified packet flow to a destination port or IP
address. The router does not perform a routing table lookup on the packet. This
provides superior performance for real-time applications.
■Bandwidth management—Rate-limits a classified packet flow at ingress to enforce
ingress data rates below the physical line rate of a port, A rate-limit profile with
a policy rate-limit profile rule provides this capability. You can construct policies
to provide rate limiting for individual packet flows or for the aggregate of multiple
packet flows. Juniper Networks E Series Broadband Services Router rate limits
are calculated based on the layer 2 packet size. To configure rate limiting, you
first create a rate-limit profile, which is a set of bandwidth attributes and
associated actions. You next create a policy list with a rule that has rate limit as
the action and associate a rate-limit profile with this rule. You can configure
rate-limit profiles to provide a variety of services, including tiered bandwidth
service where traffic conforming to configured bandwidth levels is treated
differently than traffic that exceeds the configured values, and a hard-limit service
where a fixed bandwidth limit is applied to a traffic flow. Finally, you can
configure rate-limit profiles to provide a TCP-friendly rate-limiting service that
works in conjunction with TCP’s native flow-control functionality.
■Security—Provides a level of network security by using policy rules that selectively
forward or filter packet flows. You can use a filter rule to stop a denial-of-service
attack. You can use secure policies to mirror packets and send them to an
analyzer.
■RADIUS policy support—Enables you to create and attach a policy to an interface
through RADIUS.
■Packet tagging—Enables the traffic-class rule in policies to tag a packet flow so
that the Quality of Service (QoS) application can provide traffic-class queuing.
Policies can perform both in-band and out-of-band packet tagging.
■Packet forwarding—Allows forwarding of packets in a packet flow.
■Packet filtering—Drops packets in a packet flow.
■Packet mirroring—Uses secure policies to mirror packets and send them to an
analyzer.
■Packet logging—Logs packets in a packet flow.
Policy management gives you the CLI tools to build databases, which can then be
drawn from to implement a policy. Each database contains global traffic specifications.
When building a policy, you specify input from one or more of these databases and
then attach the policy to an interface. By combining the information from the various
databases into policies, you can deploy a wide variety of services.
NOTE: When applying policies to interfaces that are managed by the SRC, avoid
using any other policy management tools, such as CLI, RADIUS, CoA, or Service
Manager. SRC is not compatible with other types of policy management tools. When
policies are applied to the interface before SRC management begins, such as at
access-accept time, these policies are properly replaced. However, if other policy
managers change existing policies while SRC management is active, problems can
occur. The precedence of each source when modifying configurations is:
■If you have a pre-configured policy through CLI as part of subscriber PVC/VLAN
provisioning, SRC overwrites the policy when the SRC manages the interface
■If you have a policy in the Access-Accept, SRC overwrites the policy when the
SRC manages the interface
4■Policy Management Overview
Page 31
Description of a Policy
A policy is a condition and an action that is attached to an interface. The condition
and action cause the router to handle the packets passing through the interface in a
certain way. A policy can be attached to IP interfaces and certain layer 2 interfaces
such as Frame Relay, L2TP, MPLS, and VLAN interfaces. The policies do not need to
be the same in both directions.
Packets are sorted at ingress or egress into packet flows based on attributes defined
in classifier control lists. Policy lists contain rules that associate actions with these
CLACLs. A rule is a policy action optionally combined with a classification.
When packets arrive on an interface, you can have a policy evaluate a condition
before the normal route lookup; this kind of policy is known as an input policy. You
can also have conditions evaluated after a route lookup; this kind of policy is known
as a secondary input policy. You can use secondary input policies to defeat
denial-of-service attacks directed at a router’s local interface or to protect a router
from being overwhelmed by legitimate local traffic. If you have a policy applied to
packets before they leave an interface, this is known as an output policy.
Chapter 1: Managing Policies on the E Series Router
Classification is the process of taking a single data stream in and sorting it into
multiple output substreams. The classifier engine on an E Series router is a
combination of PowerPC processors, working with a Field Programmable Gate Array
(FPGA) for a hardware assist.
In the Differentiated Services (DiffServ) architecture, two basic types of classifiers
exist. The first classifier type is a multifield (MF) classifier, which examines multiple
fields in the IP datagram header to determine the service class to which a packet
belongs. The second type of classifier is a behavior aggregate (BA) classifier, which
examines a single field in an IP datagram header and assigns the packet to a service
class based on what it finds.
There are two categories of hardware classifiers, depending on the type of line module
being used. ES2 4G LM, ES2 10G Uplink LM, ES2 10G LM, OC48/STM16, GE-2, and
GE-HDE line modules support content-addressable memory (CAM) hardware
classifiers—all other line modules support FPGA hardware classifiers.
The maximum number of policies that you can attach to interfaces on an E Series
router depends on the classifier entries that make up the policy and the number of
attachment resources available on the interface. JUNOSe software allocates interface
attachment resources when you attach policies to interfaces. E Series routers support
software and hardware classifiers. A policy can be made up of any combination of
software and hardware classifiers.
Policy Platform Considerations
Policy services are supported on all E Series routers.
For information about the modules supported on E Series routers:
■See the ERX Module Guide for modules supported on ERX7xx models, ERX14xx
models, and the Juniper Networks ERX310 Broadband Services Router.
■See the E120 and E320 Module Guide for modules supported on the Juniper
Networks E120 and E320 Broadband Services Routers.
Policy References
For more information about policy management, see the following resources:
■RFC 2474—Definition of the Differentiated Services Field (DS Field) in the IPv4
and IPv6 Headers (December 1998)
■RFC 2475—An Architecture for Differentiated Services (December 1998)
■RFC 2697—A Single Rate Three Color Marker (September 1999)
■RFC 2698—A Two Rate Three Color Marker (September 1999)
■RFC 3198—Terminology for Policy-Based Management (November 2001)
Policy Management Configuration Tasks
Perform the required tasks and also any optional tasks that you need for your policy
management configuration:
1.Create a CLACL (optional).
See “Classifier Control Lists Overview” on page 7
2.Create a rate-limit profile (optional).
See “Creating Rate-Limit Profiles” on page 77
3.Create a policy list.
See “Policy Lists Overview” on page 17
4.Create a classifier group.
See “Classifier Groups and Policy Rules Overview” on page 31
5.Create one or more policy rules within the classifier group.
See “Rate Limits for Interfaces Overview” on page 62
6.Apply a policy list to an interface or profile.
See “Classifier Groups and Policy Rules Overview” on page 31
6■Policy References
Page 33
Chapter 2
Creating Classifier Control Lists for
Policies
This chapter provides information for configuring policy-based routing management
on E Series routers. See the E120 and E320 Module Guide for modules supported on
the E120 and E320 Broadband Services Routers. The chapter discusses the following
topics:
■Classifier Control Lists Overview on page 7
■Creating or Modifying Classifier Control Lists for ATM Policy Lists on page 10
■Creating or Modifying Classifier Control Lists for Frame-Relay Policy
Lists on page 10
■Creating or Modifying Classifier Control Lists for GRE Tunnel Policy
Lists on page 10
■Creating or Modifying Classifier Control Lists for IP Policy Lists on page 11
■Creating or Modifying Classifier Control Lists for IPv6 Policy Lists on page 14
■Creating or Modifying Classifier Control Lists for L2TP Policy Lists on page 14
■Creating or Modifying Classifier Control Lists for MPLS Policy Lists on page 14
■Creating or Modifying Classifier Control Lists for VLAN Policy Lists on page 15
Classifier Control Lists Overview
Classifier control lists (CLACLs) specify the criteria by which the router defines a
packet flow. Table 3 on page 7 lists the criteria that you can use to create CLACLs
for different types of traffic flows.
Chapter 2: Creating Classifier Control Lists for Policies
IPv6
L2TP
MPLS
Color
■
Destination IPv6 address
■
Destination port
■
Destination route class
■
Internet Control Message Protocol version 6 (ICMPv6)
■
IPv6 traffic class
■
Locally destined traffic
■
Multicast Listener Discovery (MLD)
■
Next header
■
Source IPv6 address
■
Source port
■
Source route class
■
Traffic class
■
Transmission Control Protocol (TCP)
■
User Datagram Protocol (UDP)
■
User packet class
■
Color
■
Traffic class
■
User packet class
■
Color
■
Mark experimental (EXP) bit
■
Traffic class
■
User packet class
■
VLAN
Color
■
Traffic class
■
User packet class
■
User priority
■
You configure CLACLs with a name and then values to match in the IP datagram
header. A CLACL does not include an action: actions take place when a match is
included in a policy list.
NOTE: Do not use the asterisk (*) for the name of a classifier list. The asterisk is used
as a wildcard for the classifier-group command.
If you do not specify one of the frame-relay, gre-tunnel, ip, ipv6, l2tp, mpls, or
vlan keywords, the router creates an IP classifier list. This version of the command
has been deprecated and may be removed in a future release.
Related TopicsFor information about the hardware and software CLACLs that are supported
■
for each interface type, see Policy Resources Overview on page 159.
■For information about monitoring Classifier Lists, see Monitoring Policy
Management Overview on page 181.
Creating or Modifying Classifier Control Lists for ATM Policy Lists
You can create or modify a classifier control list that can be used only in ATM policy
lists.
■Issue the atm classifier-list command:
host1(config)#atm classifier-list atmclassifier color red user-packet-class 10
clp 1
Related Topics■atm classifier-list
Creating or Modifying Classifier Control Lists for Frame-Relay Policy Lists
You can create or modify a classifier control list that can be used only in Frame Relay
policy lists.
■Issue the frame-relay classifier-list command.;
host1(config)#frame-relay classifier-list frclassifier color red user-packet-class
10 de-bit 1
Related Topics■frame-relay classifier-list
Creating or Modifying Classifier Control Lists for GRE Tunnel Policy Lists
You can create or modify a classifier control list that can be used only in GRE tunnel
policy lists.
■Issue the gre-tunnel classifier-list command:
host1(config)#gre-tunnel classifier-list greClassifier50 color yellow
user-packet-class 7 dsfield 40
10■Creating or Modifying Classifier Control Lists for ATM Policy Lists
Page 37
Chapter 2: Creating Classifier Control Lists for Policies
Related Topics■gre-tunnel classifier-list
Creating or Modifying Classifier Control Lists for IP Policy Lists
Tasks to create or modify classifier control lists for IP policy lists:
■Creating Classifier Control List for Only IP Policy Lists on page 11
■Setting Up an IP Classifier Control List to Accept Traffic from All
Sources on page 11
■Classifying IP Traffic Based on Source and Destination Addresses on page 11
■Using IP Classifier Control Lists to Match Route Class Values on page 12
■Creating IP Classifier Control Lists for TCP and UDP Ports on page 12
■Creating an IP Classifier Control List That Matches the ToS Byte on page 13
■Creating an IP Classifier Control List That Filters ICMP Echo Requests on page 13
■Creating IP Classifier Control Lists That Use TCP or IP Flags on page 13
■Creating IP Classifier Control Lists That Match the IP Fragmentation
Offset on page 13
Creating Classifier Control List for Only IP Policy Lists
You can create or modify a classifier control list that can be used only in IP policy
lists.The behavior of multiple-element classifier-list classification is the logical OR of
the elements in the CLACL.
■Issue the ip classifier-list command to match all packets that have a source IP
address of 192.168.30.100 or have a destination IP address of 192.168.30.200:
host1(config)#ip classifier-list boston5 ip host 192.168.30.100 any
host1(config)#ip classifier-list boston5 ip any host 192.168.30.200
Setting Up an IP Classifier Control List to Accept Traffic from All Sources
You can set up a CLACL to accept IP traffic from all source addresses on the subnet.
■Issue the ip classifier-list command:
host1(config)#ip classifier-list XYZCorpPermit ip 192.168.0.0 0.0.255.255 any
Classifying IP Traffic Based on Source and Destination Addresses
You can classify traffic based on source and destination addresses, You can specify
the address as a host address, or a subnet with a wildcard. If you specify the address
as a subnet, the mask, in binary notation, must be a series of contiguous zeros,
followed by a series of contiguous ones. The any keyword is the address wildcard,
matching traffic for any address.
Creating or Modifying Classifier Control Lists for IP Policy Lists■11
■Issue the ip classifier-list command to classify traffic on any source or destination
address:
host1(config)#ip classifier-list YourListName ip any any
host1(config)#ip classifier-list YourListName ip host 10.10.10.10 any
host1(config)#ip classifier-list YourListName ip 10.10.0.0 0.0.255.255 host
10.10.10.2
Using IP Classifier Control Lists to Match Route Class Values
You can set up classifier control lists to match route-class values. In this example,
svale20 matches the source address lookup route-class value of 1, svale30 matches
the destination address lookup route-class value of 1 and a ToS byte value of 10,
svale40 matches the source address lookup route-class value of 1 and the packets
destined to a local interface, and west20 matches the source address lookup
route-class value of 1 and packets that are not destined for a local interface (packets
destined for remote interfaces).
■Issue the ip classifier-list command:
host1(config)#ip classifier-list svale20 source-route-class 1 ip any any
host1(config)#ip classifier-list svale30 destination-route-class 1 ip any any
tos 10
host1(config)#ip classifier-list svale40 source-route-class 1 local true ip any any
host1(config)#ip classifier-list west25 source-route-class 1 local false ip any
any
Creating IP Classifier Control Lists for TCP and UDP Ports
You can specify a single TCP or UDP port or a range of ports, where packets are
matched with source address 198.168.30.100 and UDP source port numbers in the
range 1–10.
■Issue the ip classifier-list command to create a CLACL on a UDP host:
host1(config)#ip classifier-list YourListName udp host 192.168.30.100 range
1 10 any
To create a CLACL that matches all traffic on UDP source ports greater than 100:
host1(config)#ip classifier-list XYZCorpUdp udp any gt 100 172.17.2.1
0.0.255.255
To match a non-TCP packet originating from IP address 172.28.100.52:
To specify a single TCP or UDP port or range of ports, an ICMP code and optional
type, or an IGMP type, which matches packets with source address
198.168.30.100 and ICMP type 2 and code 10:
12■Using IP Classifier Control Lists to Match Route Class Values
host1(config)#ip classifier-list YourListName not tcp host 172.28.100.52 any
host1(config)#ip classifier-list YourListName icmp host 192.168.30.100 any 2
10
Page 39
Chapter 2: Creating Classifier Control Lists for Policies
Creating an IP Classifier Control List That Matches the ToS Byte
You can create an IP CLACL that matches the ToS byte in the IP header.
■Issue the ip classifier-list command using the tos keyword.
host1(config)#ip classifier-list tos128 ip any any tos 128
host1(config)#ip classifier-list low-drop-prec ip any any dsfield 10
host1(config)#ip classifier-list priority ip any any precedence 1
Creating an IP Classifier Control List That Filters ICMP Echo Requests
You can create a CLACL that filters all ICMP echo requests headed toward an access
link under a denial-of-service attack.
■Issue the ip classifier-list command:
host1(config)#ip classifier-list XYZCorpIcmpEchoReqs icmp any any 8 0
host1(config)#ip classifier-list XYZCorpIgmpType1 igmp any any 1
Creating IP Classifier Control Lists That Use TCP or IP Flags
You can create CLACLs that use TCP or IP flags. For both IP flags and TCP flags, if
you specify only a single flag, the logical equation does not require quotation marks.
■Issue the ip classifier-list command with the tcp-flags keyword and a logical
equation (a quotation-enclosed string using ! for NOT, & for AND) to match one
or more of the ack, fin, psh, rst, syn, or urg TCP flags:
NOTE: You cannot configure classifier control lists (CLACLs) for policy lists to be
attached to VLAN interfaces, without specifying the criteria by which the router
defines a packet flow. Although the carriage return, <cr>, option is displayed when
you type a question mark (?) after entering the vlan classifier list classiferName
command without defining any other keyword or CLACL criterion, an error message
is displayed when you press Enter to configure the VLAN CLACL with only the name.
You must specify at least one criterion for the VLAN CLACL to be successfully
configured.
Related Topics■vlan classifier-list
Creating or Modifying Classifier Control Lists for VLAN Policy Lists■15
16■Creating or Modifying Classifier Control Lists for VLAN Policy Lists
Page 43
Chapter 3
Creating Policy Lists
This chapter provides information for configuring policy lists on E Series Broadband
Services Routers. See the E120 and E320 Module Guide for modules supported on the
E120 and E320 Broadband Services Routers. The chapter discusses the following
topics:
■Policy Lists Overview on page 17
■Creating Policy Lists for ATM on page 19
■Creating Policy Lists for Frame Relay on page 21
■Creating Policy Lists for GRE Tunnels on page 23
■Creating Policy Lists for IP on page 24
■Creating Policy Lists for IPv6 on page 25
■Creating Policy Lists for L2TP on page 27
■Creating Policy Lists for MPLS on page 27
■Creating Policy Lists for VLANs on page 28
Policy Lists Overview
You create a policy rule by specifying a policy action within a classifier group that
references a CLACL. These rules become part of a policy list that you can attach to
an interface as either an input policy, secondary-input policy, or output policy. The
router applies the rules in the attached policy list to the packets traversing that
interface.
You can apply policy lists to packets:
■Arriving at an interface (input policy); on IP and IPv6 interfaces the packets arrive
■Arriving at the interface, but after route lookup (secondary input policy);
■Leaving an interface (output policy)
Figure 1 on page 18 shows how a sample IP policy list is constructed.
before route lookup
secondary input policies are supported only on IP and IPv6 interfaces
You can create a policy list with an unlimited number of classifier groups, each
containing an unlimited number of rules. These rules can reference up to 512 classifier
entries.
If you enter a policy-list command and then enter exit, the router creates a policy
list with no rules. If the router does not find any rules in a policy, it inserts a default
filter rule. Attaching this policy list to an interface filters all packets on that interface.
NOTE: If you do not specify one of the frame-relay, gre-tunnel, ip, ipv6, l2tp, mpls,
or vlan keywords, the router creates an IP policy list. This version of the command
has been deprecated and may be removed in a future release.
You can create policy lists for ATM, Frame Relay, IP, IPv6, GRE tunnels, L2TP, MPLS,
and VLANs.
NOTE: Commands that you issue in Policy Configuration mode do not take effect
until you exit from that mode.
■Monitoring Policy Management Overview on page 181
18■Policy Lists Overview
Page 45
Creating Policy Lists for ATM
In the following example, you create two policies: one for CBR traffic and one for
UBR traffic. One policy is attached to an interface that contains CBR traffic and the
other to an interface that contains UBR traffic.
4.Display interface information to view the applied policies.
host1#show frame-relay subinterface
Frame relay sub-interface SERIAL5/0:1/1.1, status is up
Number of sub-interface down transitions is 0
Time since last status change 03:04:59
No baseline has been set
In bytes: 660 Out bytes: 660
In frames: 5 Out frames: 5
In errors: 0 Out errors: 0
In discards: 0 Out discards: 0
In unknown protos: 0
Frame relay policy output frOutputPolicy
classifier-group frGroupA entry 1
5 packets, 640 bytes
mark-de 1
Frame relay sub-interface SERIAL5/1:1/1.1, status is up
Number of sub-interface down transitions is 0
Time since last status change 03:05:09
No baseline has been set
In bytes: 660 Out bytes: 660
In frames: 5 Out frames: 5
In errors: 0 Out errors: 0
In discards: 0 Out discards: 0
In unknown protos: 0
Frame relay policy input frInputPolicy
classifier-group frMatchDeSet entry 1
5 packets, 660 bytes
color red
5.Display the classifier list.
host1#show classifier-list detailed
Classifier Control List Table
---------- ------- ---- ----Frame relay Classifier Control List frMatchDeSet
Reference count: 1
Entry count: 1
Frame relay Policy frInputPolicy
Administrative state: enable
Reference count: 0
Classifier control list: frGroupA, precedence 100
color red
22■Creating Policy Lists for Frame Relay
Page 49
Related Topics■frame-relay policy-list
Creating Policy Lists for GRE Tunnels
The following example creates a GRE tunnel policy list named routeGre50. For
information about creating the CLACL used in this example, see the previous sections.
1.Create the policy list routeGre50.
host1(config)#gre-tunnel policy-list routeGre50
2.Create the classification group for the CLACL named gre8 and assign a precedence
The following example creates an IP policy list named routeForABCCorp. For
information about creating the CLACLs and rate-limit profile used in this example,
see the previous sections.
3.Add a rule that specifies a group of forwarding solutions based on classifier list
ipCLACL10.
host1(config-policy-list-classifier-group)#forward next-hop 192.0.2.12 order 10
host1(config-policy-list-classifier-group)#forward next-hop 192.0.100.109
order 20
host1(config-policy-list-classifier-group)#forward next-hop 192.120.17.5 order 30
host1(config-policy-list-classifier-group)#forward interface ip 3/1 order 40
4.Add a rule that sets a ToS byte value of 125 for packets based on classifier list
ipCLACL10.
host1(config-policy-list-classifier-group)#mark tos 125
5.Add a rule that uses rate-limit profile ipRLP25.
------ ----IP Policy routeForABCCorp
Administrative state: enable
Reference count: 0
Classifier control list: ipCLACL10, precedence 75
forward
Virtual-router: default
List:
next-hop 192.0.2.12, order 10, rule 2 (active)
next-hop 192.0.100.109, order 20, rule 3 (reachable)
next-hop 192.120.17.5, order 30, rule 4 (reachable)
interface ip3/1, order 40, rule 5
mark tos 125
rate-limit-profile ipRLP25
Classifier control list: ipCLACL20, precedence 125
filter
Related Topics■ip policy-list
Creating Policy Lists for IPv6
The following example creates an IPv6 policy list named routeForIPv6. For information
about creating the CLACL used in this example, see the previous sections.
------ ----IPv6 Policy routeForIPv6
Administrative state: enable
Reference count: 0
Classifier control list: ipv6tc67, precedence 75
color red
mark tc-precedence 7
You use the exception http-redirect command to create an exception rule within a
policy classifier group to specify the client application for the destination of packets
rather than forwarding them using the forwarding controller (FC).
In lower-numbered releases, the exception http-redirect command only supported
the creation of exception rules within IPv4 policy lists. You can now configure the
exception http-redirect command to create exception rules within IPv4 and IPv6
policy lists.
The following example creates an IPv6 policy list, epIPv6 for the http-redirect
exception:
This chapter provides information for configuring policy-based routing management
on E Series routers. See the E120 and E320 Module Guide for modules supported on
the E120 and E320 routers. The chapter discusses the following topics:
■Classifier Groups and Policy Rules Overview on page 31
■Policy Rule Precedence on page 32
■Using Policy Rules to Provide Routing Solutions on page 35
■Configuring Policies to Provide Network Security on page 35
■Creating an Exception Rule within a Policy Classifier Group on page 36
■Defining Policy Rules for Forwarding on page 37
■Assigning Values to the ATM CLP Bit on page 38
■Enabling ATM Cell Mode on page 39
■Enabling IP Options Filtering on page 39
■Packet Tagging Overview on page 40
■Creating Multiple Forwarding Solutions with IP Policy Lists on page 40
■Creating a Classifier Group for a Policy List on page 42
■Applying Policy Lists to Interfaces and Profiles Overview on page 43
■Using RADIUS to Create and Apply Policies Overview on page 46
■Examples: Using the Ascend-Data-Filter Attribute for IPv4 Subscribers on page 51
■Examples: Using the Ascend-Data-Filter Attribute for IPv6 Subscribers on page 56
Classifier Groups and Policy Rules Overview
Classifier groups contain the policy rules that make up a policy list. A policy rule is
an association between a policy action and an optional CLACL. The CLACL defines
the packet flow on which the policy action is taken.
A policy list might contain multiple classifier groups—you can specify the precedence
in which classifier groups are evaluated. Classifier groups are evaluated starting with
the lowest precedence value. Classifier groups with equal precedence are evaluated
in the order of creation.
NOTE: For IP policies, the forward command supports the order keyword, which
enables you to order multiple forward rules within a single classifier group. (See
“Using Policy Rules to Provide Routing Solutions” on page 35.)
From Policy Configuration mode, you can assign a precedence value to a CLACL by
using the precedence keyword when you create a classifier group. The default
precedence value is 100. For example:
The classifier-group command puts you in Classifier Group Configuration mode. In
this mode you configure the policy rules that make up the policy list. For example:
To stop and start a policy rule without losing statistics, you can suspend the rule.
Suspending a rule maintains the policy rule with its current statistics, but the rule no
longer affects packets in the forwarding path.
From Classifier Group Configuration mode, you can suspend a rule by using the
suspend version of that policy rule command. The no suspend version reactivates
a suspended rule. For example:
You can add, remove, or suspend policy rules while the policy is attached to one or
more interfaces. The modified policy takes effect once you exit Policy Configuration
mode.
Policy Rule Precedence
Because of the flexibility in creating policy lists and classifier groups, you can configure
a classifier group that has multiple policy rules.
If a classifier group has multiple rules, the router uses the rules according to their
precedence—not in the order in which you created the rules. The first rule listed (the
forward rule) for a policy list type has the highest precedence and the last rule has
the lowest. The precedence is based on the order in which the router performs rules.
Rules are performed in order from lower to higher precedence. In the event of a
conflict, a higher precedence rule overrides the lower precedent rule.
The precedence of rules is important if you want a specific rule to be applied. For
example, if an IP policy list has both a rate-limit-profile rule (which specifies a color)
and a color rule in the same classifier-group, the color specified by the color rule is
always used rather than the color implied in the rate-limit-profile rule (the color rule
has a higher precedence).
Table 4 on page 33 lists the policy rule commands that you can use for each type of
policy list. The table lists the rules in their order of precedence.
32■Policy Rule Precedence
Page 59
NOTE: The ES2 10G Uplink LM and the ES2 10G LM support only IP, MPLS, and VLAN
interfaces.
Table 4: Policy Rule Commands and Precedence
Frame
RelayATM
Chapter 4: Creating Classifier Groups and Policy Rules
Table 4: Policy Rule Commands and Precedence (continued)
Frame
RelayATM
VLANMPLSL2TPIPv6IPGRE
–––
supported
on ES2 10G
Uplink LM
or ES2 10G
LM)
NOTE: The commands listed in this section replace the Policy List Configuration
mode versions of the commands. For example, the color command replaces the
Policy List Configuration mode version of the color command. The original command
may be removed completely in a future release.
Related Topics■Classifier Groups and Policy Rules Overview on page 31
■Monitoring Policy Management Overview on page 181
■color
■color-mark-profile
■filter
■green-mark
■log
––––log (not
■mark
■mark-clp
■mark-de
■mark-exp
■mark-user-priority
■next-hop
■next-interface
■rate-limit-profile
■red-mark
■reference-rate
■traffic-class
■user-packet-class
■yellow-mark
34■Policy Rule Precedence
Page 61
Using Policy Rules to Provide Routing Solutions
The next-interface, next-hop, filter, and forward rules provide routing solutions for
traffic matching a classifier. A classifier can have only one action that provides a
routing solution.
If you configure two routing solution rules, such as filter and forward, in the same
classifier group, the router displays a warning message, and the rule configured last
replaces the previous rule.
For IP policy lists, policy rules are available to enable you to make a forwarding
decision that includes the next interface and next hop:
■Forward next interface—Causes an interface to forward all packets that satisfy
the classification associated with that rule to the next interface specified
■Forward next hop—Causes an interface to forward all packets that satisfy the
classification associated with that rule to the next-hop address specified
Chapter 4: Creating Classifier Groups and Policy Rules
For example, you can route packets arriving at IP interface ATM 0/0.0 so that they
area handled as indicated:
■Packets from source 1.1.1.1 are forwarded out of interface ATM 0/0.1.
■Packets from source 2.2.2.2 are forwarded out of interface ATM 2/1.1.
■All other packets are dropped.
To configure this routing policy, issue the following commands:
host1(config)#ip classifier-list claclA ip host 1.1.1.1 any
host1(config)#ip classifier-list claclB ip host 2.2.2.2 any
host1(config)#ip policy-list IpPolicy100
host1(config-policy-list)#classifier-group claclA
host1(config-policy-list-classifier-group)#forward interface atm 0/0.1
host1(config-policy-list-classifier-group)#exit
host1(config-policy-list)#classifier-group claclB
host1(config-policy-list-classifier-group)#forward interface atm 2/1.1
host1(config-policy-list-classifier-group)#exit
■Filter—Causes the interface to drop all packets of the packet flow that satisfy the
classification associated with the rule
To stop a denial-of-service attack, you can use a policy with a filter rule. You need
to construct the classifier list associated with the filter rule so that it isolates the
attacker’s traffic into a flow. To determine the criteria for this classifier list, you need
to analyze the traffic received on an interface. “Monitoring Policy Management
Overview” on page 181 describes how to capture packets into a log.
For example, you can route packets entering an IP interface (ATM 0/0.0) so that they
are handled as indicated:
■Packets from source 1.1.1.1 are routed.
■TCP packets from source 2.2.2.2 with the IP fragmentation offset set to one are
dropped.
■All other TCP packets are routed.
■All other packets are dropped.
To configure this policy, issue the following commands:
Creating an Exception Rule within a Policy Classifier Group
To create the exception rule within an IP policy classifier group to specify the client
application for the destination of packets rather than forwarding them by the
forwarding controller (FC), use the exception http-redirect command. Doing this
enables the application to then perform an application-dependent action on the
content of the packet. The exception rule applies to input and secondary-input policies.
The guidelines for creating exception rules within an IPv6 policy classifier group are
the same as those for creating exception rules within an IPv4 policy classifier group.
36■Creating an Exception Rule within a Policy Classifier Group
Page 63
Chapter 4: Creating Classifier Groups and Policy Rules
NOTE: The exception http-redirect command is not supported for the ES2 10G
Uplink LM.
An exception rule in the input policy only takes effect if neither the input policy nor
the secondary policy drops the packet. Packets dropped by input or secondary policies
are not exceptioned to the SRP module. HTTP redirect is the only application that is
available as a destination of the exception rule.
Because classifier groups can contain multiple actions, the following list describes
how each rule interacts with the exception rule:
■color—Packets are colored and the exception rule is applied.
■filter—Packets are filtered and the exception rule is not applied. When the filter
rule is present, other rules are not applied.
■forward—Forward rule is ignored and the exception rule is applied to packets.
■log—Packets are logged and the exception rule is applied.
■mark—Packets are marked and the exception rule is applied.
■next-hop—Next-hop rule is ignored and the exception rule is applied to packets.
■next-interface—Next-interface rule is ignored and the exception rule is applied
to packets.
■rate-limit-profile—Rate limit is applied and the exception rule is applied to
packets.
■traffic-class—Traffic class is set and the exception rule is applied to packets.
■user-packet-class—User packet class is set and the exception rule is applied to
packets.
■exception—Exception rule is applied to packets.
Related Topicsexception http-redirect■
■Classifier Groups and Policy Rules Overview on page 31
Defining Policy Rules for Forwarding
The forward next-hop command defines a rule that creates the forwarding solution
for packets matching the current CLACL.The forward command can be used while
the policy list is referenced by interfaces. The suspend version suspends the forward
rule within the classifier group.
■You can use the forward interface command to specify multiple interfaces and
the forward next-hop command to specify next-hop addresses as possible
forwarding solutions. If you define multiple forwarding solutions for a single
CLACL, use the order keyword to specify the order in which the router chooses
the solutions. The router uses the first reachable solution in the list, starting with
the solution with the lowest order value. The default order value is 100.
NOTE: The forward interface and forward next-hop commands replace the
nest-interface and next-hop commands.
The switch route processor (SRP) module Fast Ethernet port cannot be the destination
of the forward next-hop and forward next-interface commands.
■If you specify a next-hop address as the forwarding solution, you can specify
that the default route is not used as a routing solution for the next-hop address
when selecting a reachable forward rule entry.
■IP interfaces referenced with this command can be tracked if they move. Policies
attached to an interface also move if the interface moves. However, statistics
are not maintained across the move.
■You can no longer use an interface specifier of tunnel:mpls with the forward
interface command, because that usage requires IP interfaces on top of RSVP-TE
tunnels. Such interfaces are no longer present in the redesigned MPLS
architecture. However, you can configure a static route for an address that is not
otherwise used to point to a tunnel, and then use the forward next-hop command
in the policy:
The mark-clp command assigns a value of 0 or 1 to the ATM CLP bit for packets
conforming to the current classifier control list.
Modules on E Series routers support classifying and marking of the ATM CLP bit
according to the following rules:
■Modules on E120 and E320 routers support classifying of the ATM CLP bit only
for frame-based interfaces (ATM Adaptation Layer 5 [AAL5] encapsulation), but
not for individual ATM cells (ATM Adaptation Layer 0 [AAL0] encapsulation). In
38■Assigning Values to the ATM CLP Bit
Page 65
this case, if the CLP bit in any cell in the frame has a value of 1, the router treats
the reassembled AAL5 frame as if it also had a CLP value of 1.
■Modules on E120 and E320 routers support marking of the ATM CLP bit on
frame-based interfaces. In this case, every cell of the segmented frame leaves
the router with the same CLP value.
■Modules on ERX7xx models, ERX14xx models, and the ERX310 Broadband
Services Router support classifying and marking of the ATM CLP bit for individual
ATM cells (AAL0 encapsulation), but not for frame-based interfaces (AAL5
encapsulation).
Related Topics■mark-clp
Enabling ATM Cell Mode
Chapter 4: Creating Classifier Groups and Policy Rules
When you configure a rate limit profile to account for ATM cell tax, the forwarding
code calculates this information to determine the size of a frame instead of using
only the frame size.
■Issue the atm-cell-mode command to account for the ATM cell tax in statistics
and rate calculations:
host1(config-policy-list)#atm-cell-mode
Use the show rate-limit-profile command to display the state of the mode.
Related TopicsMonitoring Policy Management Overview on page 181■
■atm-cell-mode
■show rate-limit-profile
Enabling IP Options Filtering
You can filter packets with IP options on an interface:
■Issue the ip filter-options all command.
host1(config-if)#ip filter-options all
When a packet arrives on an interface, the router checks to see if the packet contains
IP options. If it does and if IP options filtering is enabled, that packet is dropped. IP
options filtering is disabled by default.
Related TopicsClassifier Groups and Policy Rules Overview on page 31■
You can use the traffic-class rule in policies to tag a packet flow so that the QoS
application can provide traffic-class queuing. Policies can perform both in-band and
out-of-band packet tagging:
■Policies perform in-band tagging by using their respective mark rule to modify
a packet header field. For example, IP policies use the mark rule to modify an
IP packet heard ToS field, and Frame Relay policies use the mark-de rule to
modify the DE bit.
■Policies perform out-of-band tagging by using the traffic class or color rule. Explicit
packet coloring lets you configure prioritized packet flows without having to
configure a rate-limit profile. The router uses the color to queue packets for egress
queue threshold dropping as described in “Creating Rate-Limit Profiles” on
page 77.
For example, an Internet service provider (ISP) provides a Broadband Remote Access
Server (B-RAS) service that has both video and data components, and the ISP wants
to guarantee that the video traffic gets priority treatment relative to the data traffic.
The ISP’s users have a 1.5 Mbps virtual circuit (VC) terminating on a digital subscriber
line access multiplexer (DSLAM). The ISP wants to allocate 800 Kbps of this link for
video, if there is a video stream.
The ISP creates a classifier list to define a video packet flow, creates a policy to color
the packets, and applies the policy to the interface:
host1(config)#ip classifier-list video ip any any dsfield 16
host1(config)#ip classifier-list data ip any any dsfield 32
host1(config)#ip policy-list colorVideoGreen
host1(config-policy-list)#classifier-group video
host1(config-policy-list-classifier-group)#color green
host1(config-policy-list-classifier-group)#exit
host1(config-policy-list)#classifier-group data
host1(config-policy-list-classifier-group)#color yellow
host1(config-policy-list-classifier-group)#exit
host1(config-policy-list)#exit
host1(config)#interface atm 12/1.1
host1(config-if)#ip policy input colorVideoGreen statistics enabled
Creating Multiple Forwarding Solutions with IP Policy Lists
By default, the router uses a single route table lookup to determine the forwarding
solution for packets. For IP policy lists only, the forward command enables you to
configure one or more unique forwarding solutions (interfaces or next-hop addresses)
that override the route table lookup. By creating a group of forwarding solutions, you
can ensure that there is a reachable solution for the packets.
You can use the order keyword to specify the order of the group of forwarding
solutions within a single forward rule. If no order value is specified, then the default
order of 100 is assigned to a solution. The router evaluates the forwarding solutions
in the group, starting at the solution with the lowest order value, and then uses the
40■Packet Tagging Overview
Page 67
Chapter 4: Creating Classifier Groups and Policy Rules
first reachable solution. To be considered a reachable solution, a solution must be a
reachable interface or a next-hop address that has a route in the routing table. If no
solutions are reachable, the traffic is dropped.
The following guidelines apply when you create a group of forwarding solutions in
an IP policy list:
■You can specify a maximum of 20 forwarding solutions for a classifier.
■The interface and next-hop elements of a forwarding solution must exist within
a single virtual router:
■Next-interface elements are associated with the virtual router where that
interface exists.
■You can include an optional parameter to specify the virtual router when
you define next-hop elements.
■If only next-hop elements exist and you do not use the virtual router option,
then the policy assumes the virtual router context of the command-line
interface (CLI), making the policy specific to that VR. The policy can be
attached only to interfaces that belong to that VR. However, the policy can
still be displayed and modified from any VR. The output of the showconfiguration command displays the policy in the section of output related
to that VR rather than in the section for the default VR. This behavior ensures
that when you use that output for a configuration script, the policy is specific
to the correct VR, and the original configuration is re-created.
■If you specify both an interface element and a next-hop address element, then
they both must be reachable to be used. Also, the interface must be the correct
interface for the next-hop address.
■If you specify a next-hop address, then you can optionally specify that the default
route be ignored.
■If you delete the target (interface or next-hop address) referenced in a rule, that
solution is replaced by the null interface but retains the same order number in
the policy list. The null interface is always considered unreachable.
■When a forwarding solution with a lower order value than the currently active
solution becomes reachable, the router switches to the lower-ordered solution.
■If two rules that have the same order value are reachable, then the rule that was
created first is used.
NOTE: The forward interface and forward next-hop commands are replacing the
next-interface and next-hop commands, which do not support multiple forwarding
solutions in a single forward rule.
In the following sample classifier group of a policy list, the forwarding solution of
ATM interface 0/0.1 has the lowest order value in the group, and would therefore be
selected as the solution for the policy list. However, if this interface is not reachable,
the router then attempts to use the solution with the next higher order; which would
be ATM interface 12/0.1. If none of the solutions in the group is reachable, the traffic
is dropped.
Creating Multiple Forwarding Solutions with IP Policy Lists■41
host1(config-policy-list)#classifier-group westfordClacl precedence 200
host1(config-policy-list-classifier-group)#forward interface atm 0/0.1 order 10
host1(config-policy-list-classifier-group)#forward interface atm 12/0.1 order 50
host1(config-policy-list-classifier-group)#forward interface atm 3/0.25 order 300
NOTE: You can use the suspend version of the command to suspend an individual
entry in a group of forwarding solutions. The forward rule remains active as long as
there is a reachable or active entry in the group of forwarding solutions. If you suspend
all entries in the group, the status of the forward rule is changed to suspended.
Creating a Classifier Group for a Policy List
To create a classifier group for a policy list and assigns precedence to the specific
CLACL that is referenced in the group:
host1(config)#policy-parameter A hierarchical
host1(config)#parent-group EPG1
host1(config-parent-group)#exit
host1(config)#ip policy-list POL
host1(config-policy-list)#classifier-group C1 external parent-group EPG1 parameter
A
host1(config-policy-list)#exit
The no version removes the classifier group and its rules from a policy list. The
precedence keyword specifies the order in which a classifier group is evaluated
compared to other classifier groups. Classifier groups are evaluated from lowest
to highest precedence value (for example, a classifier group with a precedence
of 1 is used before a classifier group with a precedence of 2). Classifier groups
with equal precedence are evaluated in the order of creation, with the group
created first having precedence. A default value of 100 is used if no precedence
is specified.
The parent-group keyword creates a parent group in a rate-limit hierarchy for
IP, IPv6, L2TP, and MPLS. The external parent-group keyword creates an
external parent group in a rate-limit hierarchy for IP, IPv6, L2TP, and MPLS. All
packets matching the classifier are sent to the parent group for further processing,
except for packets dropped by the classifier using the filter rule.
More than one classifier group can have the same parent group, which enables
you to create hierarchies.
42■Creating a Classifier Group for a Policy List
Page 69
Chapter 4: Creating Classifier Groups and Policy Rules
NOTE: Empty classifier groups have no effect on the router’s classification of packets
and are ignored by the router. You might inadvertently create empty classifier groups
in a policy if you use both the newer CLI style and the older CLI style, which used
the Policy List Configuration mode version of the classifier list commands.
Related Topics■Classifier Groups and Policy Rules Overview on page 31
■Creating Rate-Limit Profiles on page 77
■Monitoring Policy Management Overview on page 181
■aggregation-node
■classifier-group
■ip policy-parameter hierarchical
■ip policy-parameter reference-rate
■ipv6 policy-parameter hierarchical
■ipv6 policy-parameter reference-rate
■l2tp policy-parameter hierarchical
■l2tp policy-parameter reference-rate
■mpls policy-parameter hierarchical
■mpls policy-parameter reference-rate
■next-parent
■parent-group
■policy-parameter hierarchical
Applying Policy Lists to Interfaces and Profiles Overview
You can assign a policy list to supported interfaces and profiles. Policy lists are
supported on Frame Relay, IP, IPv6, GRE tunnel, MPLS layer 2, and VLAN interfaces.
You can also specify IP, IPv6, and L2TP policies in profiles to assign a policy list to
an interface. In either case, you can enable or disable the recording of statistics for
bytes and packets affected by the assigned policy.
You can also preserve statistics when you attach a new policy that has a classifier
list that is the same for both the original and the new policy attachments.
You can use policy commands to assign an ATM, Frame Relay, GRE tunnel, IP, IPv6,
MPLS, or VLAN policy list to an interface. Also, you can use them to specify an IP,
IPv6, or L2TP policy list to a profile, which then assigns the policy to the interfaces
to which the profile is attached
Applying Policy Lists to Interfaces and Profiles Overview■43
■The mpls policy command is used to attach policies to MPLS Layer 2 circuits
only.
■The SRP module Fast Ethernet port does not support policy attachments, nor
can the module be the destination for the forward next-hop, forward
next-interface, next-hop, and next-interface commands
Use the input or output keyword to assign the policy list to the ingress or egress of
the interface. For ATM, IP, and IPv6 policy lists, use the secondary-input keyword to
assign the policy list, after route lookup, to data destined for local or remote
destinations. For IP and IPv6 policy lists, use the secondary-input keyword to assign
the policy list, after route lookup, to data destined to local or remote destinations.
The router supports secondary input policies whose principal applications are:
■To defeat denial-of-service attacks directed at a router’s local IP or IPv6 stack
■To protect a router from being overwhelmed by legitimate local traffic
■To apply policies on packets associated with the route class
NOTE: The local-input keyword for the ip policy and ipv6 policy commands is
deprecated, and may be completely removed in a future release. We recommend
you remove the keyword from scripts. Re-create any local input policies using the
ip classifier-list local true command and attaching the policies using the ip policy
secondary-input command.
You can enable or disable the recording of routing statistics for bytes and packets
affected by the policy. If you enable statistics, you can enable or disable baselining
of the statistics. The router implements the baseline by reading and storing the
statistics at the time the baseline is set and then subtracting this baseline whenever
baseline-relative statistics are retrieved. You must also enable baselining on the
interface with the appropriate baseline command.
NOTE: The gre-tunnel policy command does not support the baseline keyword.
You can use the preserve keyword to save the existing statistics when you attach a
policy to an interface that already has a policy attached. This keyword saves the
statistics for any classifier-list that is the same for both the new and old policy
attachments. Without the preserve keyword, all statistics are deleted when you attach
the new policy.
For example, when you replace a policy attachment that references the original
policy-list plOne with a new attachment referencing policy-list plTwo, the existing
44■Applying Policy Lists to Interfaces and Profiles Overview
Page 71
Chapter 4: Creating Classifier Groups and Policy Rules
statistics for the classifier group referencing clOne and the default classifier group
are saved.
Using RADIUS to Create and Apply Policies Overview
E Series routers enable you to use RADIUS to create and apply policies on IPv4 and
IPv6 interfaces. This feature supports the Ascend-Data-Filter attribute [242] through
a RADIUS vendor-specific attribute (VSA) that specifies a hexadecimal field. The
hexadecimal field is encoded with policy attachment, classification, and policy action
information
The policy defined in the Ascend-Data-Filter attribute is applied when RADIUS receives
a client authorization request and replies with an Access-Accept message.
When you use RADIUS to apply policies, a subset of the router’s classification fields
and actions is supported. The supported actions and classification fields are:
■Actions
■Filter
■Forward
■Packet marking
■Rate limit
■Traffic class
■Classifiers
■Destination address
■Destination port
■Protocol
■Source address
■Source port
NOTE: An E Series router dynamically assigns names to the new classifier list and
policy list as described in “Ascend-Data-Filter Attribute for IPv4/IPv6 Subscribers in
a Dual Stack” on page 49.
To create a policy, you use hexadecimal format to configure the Ascend-Data-Filter
attribute on the RADIUS server. For example:
Differentiated Services Code Point (DSCP)—for IPv6
0= no packet marking1 byteMarking mask
1–41 bytesTraffic class
0= no traffic class (required if there is no profile)
■
First byte specifies the length of the ASCII name of the traffic
■
class
Traffic class must be statically configured
■
Name can optionally be null terminated, which consumes 1
■
byte
Although the traffic class name field supports up to 41 bytes,
■
you can create an Ascend-Data-Filter attribute with the traffic
class name field set to a maximum of 32 bytes only (including
null characters). This restriction occurs because the traffic class
group configuration enables a traffic class name of up to 31
characters only.
1–41 bytesRate-limit profile
NOTE: To create a rate-limit profile, traffic class, or marking rule, you must first
configure the filter/forward field as forward.
A single RADIUS record can contain two policies—one ingress policy and one egress
policy. Each policy can have a maximum of 512 ascend-data filters. Each ascend
data-filter creates a classifier group and the action associated with the classifier group.
48■Using RADIUS to Create and Apply Policies Overview
0= no rate limit (required if there is no profile)
■
First byte specifies the length of the ASCII, followed by the ASCII
■
name of the profile
Profile must be statically configured
■
Name can optionally be null terminated, which consumes 1
■
byte
Page 75
Chapter 4: Creating Classifier Groups and Policy Rules
Construction of IPv6 Classifiers from the Hexadecimal Ascend-Data-Filter Attribute
If both the source and destination IP prefixes are 128, the IPv6 classifier is created
using the IPv6 host argument as follows:
If either the source or destination IP prefix is non-zero, but less than 128 bits, (for
example, 64 bits), the IPv6 classifier is created using the IPv6 address argument as
follows:
NOTE: In JUNOSe Release 10.1.x and earlier, the maximum width of a CAM hardware
classifier entry for IPv4 or IPv6 in a single policy was 128 bits. In JUNOSe Release
10.2.x and later, based on the size limit for a combined IPv6 classifier entry, a
maximum of 336 bits of CAM entry is supported for full IPv6 classification with an
additional 16 bits for rule set ID. However, OC48/STM16 line modules on ERX14xx
models, ERX7xx models, and the ERX310 router support only 128-bit IPv6
classification. For more information on size limits for IP and IPv6 classifiers, see
“Size Limit for IP and IPv6 CAM Hardware Classifiers” on page 163.
Ascend-Data-Filter Attribute for IPv4/IPv6 Subscribers in a Dual Stack
The PPP link between the customer premises equipment (CPE) and the provider
edge (PE) device or E Series router equipment might require both IPv4 and IPv6
protocols for transmission of data. Such networks require that PE devices run a dual
stack of IPv4 and IPv6 services. Dual-stack routers allow simultaneous support for
both IPv4 and IPv6 applications. The following guidelines are used to create a policy
defined in the Ascend-Data-Filter attribute when IPv4 and IPv6 subscribers are in a
network:
■If a subscriber requires only IPv4 services, only the Type 1 action is used in the
Access-Accept message returned from the RADIUS server in response to the
client authentication request.
■If a subscriber requires only IPv6 services, only the Type 3 action is used in the
Access-Accept message returned from the RADIUS server.
■If both IPv4 and IPv6 addresses are assigned to the subscriber interface, then
either Type 1 or Type 3 or both the actions are used in the Access-Accept
message.
■If the Type 1 action is used and the Indirection action field is set to 01 in the
Ascend-Data-Filter attribute, one primary input policy is created and applied on
the ingress IPv4 interface.
■If the Type 3 action is used and the Indirection action field is set to 01 in the
Ascend-Data-Filter attribute, one primary input policy is created and applied on
the ingress IPv6 interface.
Using RADIUS to Create and Apply Policies Overview■49
■If the Type 1 action is used and the Indirection action field is set to 00 in the
Ascend-Data-Filter attribute, one primary output policy is created and applied
on the egress IPv4 interface.
■If the Type 3 action is used and the Indirection action field is set to 00 in the
Ascend-Data-Filter attribute, one primary output policy is created and applied
on the egress IPv6 interface.
■Ascend-Data-Filter attributes for both IPv4 and IPv6 interfaces are stored on the
RADIUS server and the appropriate policies are created and applied to the
corresponding interfaces when they come up, depending on the type of
subscribers.
In lower-numbered releases, the formats of the input and output classifier list names
and policy list names were as follows:
■clin_<InterfaceId>_<filterNum>
■clout_<InterfaceId>_<filterNum>
■plin_<InterfaceId>
■plout_<InterfaceId>
where:
■clin—Classifier list included in an input policy list
■clout—Classifier list included in an output policy list
■plin—Policy list applied to the ingress interface
■plout—Policy list applied to the egress interface
■InterfaceId—A unique identifier for the interface to which the policy is applied
■filterNum—A value that denotes the sequence of Ascend-Data-Filter attribute
configured on the RADIUS server
In this release, the formats of the input and output classifier list names and policy
list names are modified to support IPv6 subscribers. The following is the new format
of the input and output classifier list and policy list:
■clin_<AuthId>_<filterNum>
■clout_<AuthId>_<filterNum>
■plin_<ip/ipv6>_<AuthId>
■plout_<ip/ipv6>_<AuthId>
where:
■AuthId—A unique identifier that is used during the authentication of the client
with the RADIUS server
■ip/ipv6—Type of protocol used based on the Type action field
Related TopicsExamples: Using the Ascend-Data-Filter Attribute for IPv4 Subscribers on page 51■
50■Using RADIUS to Create and Apply Policies Overview
Page 77
Chapter 4: Creating Classifier Groups and Policy Rules
■Examples: Using the Ascend-Data-Filter Attribute for IPv6 Subscribers on page 56
Examples: Using the Ascend-Data-Filter Attribute for IPv4 Subscribers
This section provides examples showing the configuration of policies that use the
Ascend-Data-Filter attribute for IPv4 subscribers.
In this example, the following Ascend-Data-Filter attribute creates a RADIUS record
that configures an input policy. The policy filters all packets from network 10.2.1.0
with wildcard mask 0.0.0.255 to any destination.
Referenced by interface(s):
ATM4/0.0 input policy, statistics enabled, virtual-router default
Referenced by profile(s):
No profile references
In this example, the Ascend-Data-Filter attribute is used to create RADIUS records
that configure two policies. The first policy is an input policy that filters all TCP packets
that come from a port greater than 9000 on host 10.2.1.1 and that go to any
destination. The second policy is an output policy that filters all UDP packets from
network 20.1.0.0 to host 10.2.1.1, port 3090.
Using the show classifier-list and show policy-list commands produces the following
information about the new policies:
host1#show classifier-list
Classifier Control List Table
---------- ------- ---- ----IP clin_1800022_00.1 tcp host 10.2.1.1 20.0.0.0 0.255.255.255
IP clin_1800022_01.1 tcp host 10.2.1.1 any
IP clin_1800022_02.1 ip host 10.2.1.1 any
IP clout_1800022_04.1 tcp 20.0.0.0 0.255.255.255 host 10.2.1.1
IP clout_1800022_05.1 tcp any host 10.2.1.1
IP clout_1800022_06.1 ip any host 10.2.1.1
host1#show policy-list
Policy Table
------ ----IP Policy plin_ip_1800022
Administrative state: enable
Reference count: 1
Classifier control list: clin_1800022_00, precedence 100
forward
Classifier control list: clin_1800022_01, precedence 100
filter
Classifier control list: clin_1800022_02, precedence 100
forward
Classifier control list: *, precedence 100
filter
Referenced by interface(s):
ATM4/0.0 input policy, statistics enabled, virtual-router default
Referenced by profile(s):
No profile references
IP Policy plout_ip_1800022
Administrative state: enable
Reference count: 1
Classifier control list: clout_1800022_04, precedence 100
forward
Classifier control list: clout_1800022_05, precedence 100
filter
Classifier control list: clout_1800022_06, precedence 100
forward
Classifier control list: *, precedence 100
filter
Referenced by interface(s):
ATM4/0.0 output policy, statistics enabled, virtual-router default
Referenced by profile(s):
No profile reference
54■Examples: Using the Ascend-Data-Filter Attribute for IPv4 Subscribers
Page 81
In this example, the following Ascend-Data-Filter attribute creates a RADIUS record
that configures an input policy on an IPv4 interface. The policy filters TCP packets
from host address 10.2.1.2 to any destination. The policy marks the packets with a
ToS byte of 5 and a mask of 170. The policy also applies a traffic class named someTcl
and a rate-limit profile named someRlp.
Referenced by interface(s):
ATM11/0.0 input policy, statistics enabled, virtual-router default
Referenced by profile(s):
No profile references
Related TopicsExamples: Using the Ascend-Data-Filter Attribute for IPv6 Subscribers on page 56■
■Using RADIUS to Create and Apply Policies Overview on page 46
Examples: Using the Ascend-Data-Filter Attribute for IPv6 Subscribers
This section provides examples showing the configuration of policies that use the
Ascend-Data-Filter attribute when there are IPv6 subscribers in a network.
In this example, the following two Ascend-Data-Filter attributes are used to create
RADIUS records that configure two policies. The first policy is an output policy that
filters all UDP packets from network 2001:82ab:1020:87ec::0/64 to host
2001:82ab:1020:87ec:1234:0917:3415:0012, port 3090. The second policy is an
input policy that filters all TCP packets that come from a port greater than 9000 on
host 2001:82ab:1020:87ec:1234:0917:3415:0012 and that go to any destination.
60■Examples: Using the Ascend-Data-Filter Attribute for IPv6 Subscribers
Page 87
Chapter 5
Creating Rate-Limit Profiles
This chapter provides information for configuring rate-limit policy management on
E Series routers. For information on monitoring rate-limit profiles, see “Monitoring
Rate-Limit Profiles” on page 211
This chapter discusses the following topics:
■Rate Limits for Interfaces Overview on page 62
■Hierarchical Rate Limits Overview on page 63
■Percent-Based Rates for Rate-Limit Profiles Overview on page 73
■Policy Parameter Quick Configuration on page 77
■Creating Rate-Limit Profiles on page 77
■One-Rate Rate-Limit Profiles Overview on page 82
■Creating a One-Rate Rate-Limit Profile on page 83
■Configuring a TCP-Friendly One-Rate Rate-Limit Profile on page 84
■Two-Rate Rate-Limits Overview on page 86
■Creating a Two-Rate Rate-Limit Profile on page 88
■Setting the Committed Action for a Rate-Limit Profile on page 89
■Setting the Committed Burst for a Rate-Limit Profile on page 90
■Setting the Committed Rate for a Rate-Limit Profile on page 91
■Setting the Conformed Action for a Rate-Limit Profile on page 91
■Setting the Exceeded Action for a Rate-Limit Profile on page 91
■Setting the Excess Burst for a Rate-Limit Profile on page 92
■Setting the Mask Value for MPLS Rate-Limit Profiles on page 92
■Setting the Mask Value for IP and IPv6 Rate-Limit Profiles on page 92
■Setting the Peak Burst for Two-Rate Rate-Limit Profiles on page 93
■Setting the Peak Rate for Rate-Limit Profiles on page 93
To configure rate limiting for interfaces, you first create a rate-limit profile, which is
a set of bandwidth attributes and associated actions. Your router supports two types
of rate-limit profiles—one-rate and two-rate—for IP, IPv6, LT2P, and MPLS Layer 2
transport traffic. You next create a policy list with a rule that has rate limit as the
action and associate a rate-limit profile with this rule.
You configure rate limit profiles from Global Configuration Mode.
NOTE: Commands that you issue in Rate Limit Profile Configuration mode do not
take effect until you exit from that mode.
When packets enter an interface that has a rate-limit profile applied, the router
performs the following:
■Counts the number of bytes (packets) over time
■Categorizes each packet as committed, conformed, or exceeded
■Assigns a transmit, drop, or mark action
NOTE: Mark actions and mask values are supported only on IP, IPv6, and MPLS
rate-limit profiles. They are not supported on hierarchical rate limits, but are replaced
by color-mark profiles.
An additional function of rate limiting is to apply a color code to packets assigned to
each category: green for committed, yellow for conformed, and red for exceeded.
The system uses the color code internally to indicate drop preference when an
outbound interface is congested.
Rate limiters are implemented using a dual token bucket scheme: a token bucket for
conformed (yellow) packets and a token bucket for committed (green) packets. One
token is synonymous with one byte. The capacity of the buckets is the maximum
number of tokens that can be placed in each bucket.
You configure the bucket capacity with the peak burst parameter or the committed
burst parameter. The burst parameters are in bytes (not bytes per second), which is
the number of tokens in a full bucket. When a packet passes through a rate limiter,
its size is compared to the contents of both buckets, the packet is categorized, and
the rate-limiter action is taken on the packet.
Peak rate and committed rate determine the fill rate of their respective buckets. If
you set the committed rate to 128,000 bps, tokens are added to the committed
(green) bucket at a rate of 128,000 bps (16 K bytes per second), regardless of the
traffic. If no traffic passes through the rate limiter, the bucket continues to fill until
it reaches the committed burst setting.
62■Rate Limits for Interfaces Overview
Page 89
Traffic passes through the rate limiter causing a draining of tokens. The drain rate
is dependent on how large the packets are and how much time elapses between
packets. At any given instant the level of tokens in each bucket is a function of the
fill rate, size of packets, and elapsed time between packets.
When packets are received on an interface with a rate limiter applied, the level of
tokens in each bucket dynamically changes in both of the following ways:
■Tokens are added every 100-ms sample period
■Tokens are removed based on the size and rate of incoming packets
Hierarchical Rate Limits Overview
In another type of rate limiting, rate-limit hierarchies enable lower priority traffic to
access unused bandwidth allocated for real-time traffic, such as voice or video, during
times when no real-time traffic is flowing. IP subscribers receive multiple services,
such as Web, video, and file transfer, that have a maximum bandwidth. A rate-limit
hierarchy can apply a common rate limit to several classified flows, enabling them
to share bandwidth according to the preferences set in the hierarchical rate limits.
Chapter 5: Creating Rate-Limit Profiles
You can also use rate-limit hierarchies in a layer 2 (ATM) access network for DSL
where many routing gateways lead into one Broadband Access Server. The Broadband
Access Server uses rate-limit hierarchies to allocate shareable bandwidth to each
routing gateway, which enables unused bandwidth from one routing gateway to be
used by others. The hierarchy in the rate limit represents the hierarchy in the access
network.
Rate-limit hierarchies enable you to share unused bandwidth dynamically, taking
unused preferred bandwidth. They also enable real-time traffic to use all guaranteed
bandwidth at any time without violating the configured limit on the total interface
bandwidth. While preferred traffic fluctuates, the interface rate limit adjusts, dropping
non-preferred packets to keep the total flow through the interface under a configured
maximum rate, because preferred packets cannot be dropped by the shared rate
limits, only by their individual rate limits.
Shared rate limits in the hierarchy keep the combined traffic below a configured
maximum without dropping preferred packets. Preferred packets always reduce
tokens on these rate limits, making their token counts negative, if necessary. Later
non-preferred packets are then dropped in greater volume, bringing the total traffic
through the shared rate limit below its configured maximum.
Every packet passing through a rate limit hierarchy has an owner, which is the last
rate limit that can modify the packet; for example, by changing its color or dropping
it. Preferred packets are owned by their individual preferred rate limits, which do
not transfer ownership of the packet while the packet traverses the hierarchy.
Ownership of non-preferred packets is transferred while they move from one rate-limit
to the next in the hierarchy, so shared rate limits can change the packet color or
drop them.
Rate-limit hierarchies can be intra-interface, where different flows from classifier
groups are in one policy attachment on an interface. Each time the policy is attached
to another interface the rate-limit hierarchy is replicated, with no rate limits shared
between attachments. Hierarchical rate-limits are only applied at forwarding interfaces
because they provide the most accurate classification of packets.
You can configure rate-limit hierarchies by defining a hierarchy of policy classifier
and parent groups, each with a rate limit. This hierarchy applies to the packet flow
on one interface attachment for the policy. Each policy attachment creates its own
copy of the rate-limit hierarchy. There are no shared rate limits across interface
attachments.
A policy-based rate-limit hierarchy consists of classifier groups with an aggregate
node policy object. Aggregate nodes create the interior nodes of a policy-based
hierarchy; they are not classifier groups and the only policy rule applicable to them
is the rate limit rule. Every classifier group or aggregate node can select another
aggregate node as its parent. The policy manager ensures that these choices always
result in a hierarchy. Not every classifier group with a parent aggregate node must
have a rate limit rule; multiple classifier groups can share a common parent group,
which may have a rate limit rule.
A policy imposes a limit of three parent groups that can be traversed from any
classifier group. However, the total number of parent groups in one policy can be
up to 512, but every packet must pass through no more than three parent groups at
any point.
In a hierarchy of rate limits, a rate limit can be color-blind or color-aware; color-blind
rate limits run the same algorithm for all packets, regardless of their color. Color-aware
rate limits can change the algorithm used, depending on the color of the incoming
packet (possibly set in the previous rate limit or an earlier policy, such as a VLAN
policy on ingress or an IP policy). The color mark profile action changes the ToS field
for the packet, depending on packet type (EXP for MPLS, DSCP or ToS for IPv4), and
transmits the packet. If the mark action uses a color-mark profile, the ToS values
marked can depend on the color of the packet.
Hierarchical Rate-Limit Profiles
Hierarchical rate-limit profiles are independent from interface types. You can apply
the green, yellow, or red mark values to the rate-limit profile for every type of
forwarding interface that accepts ToS marking for packets. The same rate limit can
be reused for a different interface type. Hierarchical rate limits have two-rate or
TCP-friendly rate types.
The value applied to the ToS field is configured in the CLACL group for green, yellow,
or red packets but the coloring of the packet as green, yellow, or red depends on the
entire rate-limit hierarchy.
64■Hierarchical Rate Limits Overview
Page 91
Chapter 5: Creating Rate-Limit Profiles
■Preferred packets are transmitted unconditionally. Rate limits that process packets
transmitted unconditionally always decrement their token count, if necessary,
making it negative.
■Red packets cannot be transmitted unconditionally, to avoid cases where an
aggregate rate limit is oversubscribed with transmit-unconditional rates.
■Color-aware uses the incoming packet color in its algorithm
■Not promoting packets means that if the packet enters the rate limit as yellow
and the rate-limit then determines that it is green, the packet remains yellow. If
the rate limit determines it is red, then the packet is colored red.
A rate-limit rule is an instance of a rate-limit profile. The same profile can be used
to create many rate-limit rules in the same hierarchy or in different rate-limit
hierarchies. The classifier group that defines the flow can use a mark rule with
color-mark profile to set the packet ToS field based on the packet color. A rate-limit
hierarchy invoked from the classifier group is one way of changing the packet color;
the rate-limit hierarchy is invoked before the classifier group runs the mark rule to
set the packet ToS.
Hierarchical Rate-Limit Actions
Every packet traversing a rate-limit hierarchy has an owner that is defined by the
last rate limit that can apply its actions to the packet; this is a configuration option.
A rate limit in the hierarchy that does not own the packet only decrements its tokens,
but cannot perform any of the following actions:
■Transfer ownership of the packet to the next rate limit.
■Retain ownership of the packet but consume tokens from the remaining rate
limits in the hierarchy.
■Exit the rate-limit hierarchy, making that rate limit the final one for the packet.
These actions become the same action if the hierarchy has only one rate limit.
Combining these actions with the additional choices to transmit or drop packets
results in the following possible actions:
■Drop—Drops the packet at that rate limit in the hierarchy. The packet does not
change the state of any rate limit further down the hierarchy.
■Transmit final—Sets the packet color and ends the packet's traversal of the
rate-limit hierarchy at the current rate limit. The packet is forwarded and the
rate limits further down the hierarchy are not affected. Because transmit final is
based on the result of the rate limit, transmit is not an attribute of the node in
the rate-limit hierarchy. Committed packets can exit the hierarchy while
conformed and exceeded packets continue to the next rate limit.
■Transmit conditional—Sets the packet color to the result calculated by the rate
limit and forwards the packet to the next rate limit for processing, also
transferring ownership of the packet to the next rate limit. The next rate limit
can then set the packet color according to the state of its token buckets and apply
its actions to the packet. The transmit conditional option is the same as
connecting the two rate limits in series.
■Transmit unconditional—Sets the packet color to the result calculated by the rate
limit, retains ownership of the packet, and forwards the packet to the next rate
limit. Later rate limits only decrement their current token counts by the packet
length but do not otherwise affect the packet, either by changing its color or
applying their actions to it. Although the packet is not affected, the remaining
rate limits change because the token counts are reduced, making them more
likely to make other packets conformed or exceeded. Transmit unconditional is
not allowed as an exceeded action.
After the transmit-unconditional completes, the packet traverses to the end of
the hierarchy. Because ownership of the packet has been retained, no rate limit
further down can apply its actions to it. Some of the later rate limits might already
have very low token counts, which must still be decremented when processing
a transmit-unconditional packet (if necessary, by making the token count
negative). Negative token counts enable the remaining rate limits to restrict the
total traffic through them to their peak rate (over a large enough averaging
interval, which is a function of rates and burst sizes only). Transmit unconditional
packets traversing the rate-limit hierarchy reduce the number of tokens available
for other packets.
A rate limit has one of the four preceding actions configured for each possible result:
committed, conformed, and exceeded. (Transmit unconditional is not allowed as an
exceeded action.) The action taken depends only on the result of that rate limit, its
rates, burst sizes, and current token state. In addition, the rate limit assigns a color
to the packet, depending on both the result of the rate limit and the packet's incoming
color. The final color after a packet has finished traversing a rate-limit hierarchy is
a function of all the rate limits that owned the packet.
Policy actions are processed in the following order:
1.log
2.filter
3.traffic class
4.user packet class
5.next hop
6.rate limit
7.color status
8.color action
9.parent group
10. mark
The mark action is the last action that occurs, after parent-group, so that the
color-mark profile can mark the packet with the final color from the hierarchy.
66■Hierarchical Rate Limits Overview
Page 93
Chapter 5: Creating Rate-Limit Profiles
NOTE: To avoid saturation when using dual token buckets, the total amount of yellow
transmit unconditional traffic should be less than the peak rate minus the committed
rate; the green transmit unconditional traffic should be less than the committed rate.
Figure 2 on page 67 shows an interface with an attached policy that has a Video
classifier that singles out a substream of the packets flowing on that interface. The
Video classifier can be allocated 6 Mbps out of the 10 Mbps interface rate. All other
packets on the interface are Internet. The common rate limit cannot drop Video
packets, but must limit the total flow (Video and Internet) to under 10 Mbps. Internet
traffic can use the Video bandwidth when there are no active Video calls, while
avoiding hard partitioning of interface bandwidth.
NOTE: To avoid rate-limit saturation, we recommend that you set the rate limit profile
to color-aware when the rate limit is set to receive transmit conditional.
In this example, the rate limit Common is color-aware, using the color of the incoming
packets instead of setting them to Green. This causes the rate limit Preferred to send
6 Mbps of yellow, transmit unconditional packets. The rate limit Common counts
the packets against the yellow token bucket, which has a rate of 10 Mbps. However,
if the rate limit Common is color-blind, it treats all packets as Green so the green
token bucket gets 6 Mbps of transmit unconditional traffic, which eventually causes
all packets to be saturated and dropped.
Example: Multiple Flows Sharing a Rate Limit Hierarchical Policy
Figure 3 on page 68 shows an interface that has one rate limit and three classified
flows, A, B, and C. The combined traffic for A, B, and C must be below a peak rate
of 4 Mbps, but each individual flow can burst up to that amount. Statistics can be
collected separately on A, B, and C, while limiting only the aggregate of all three.
None of the flows has any preference in accessing the rate limit, and the rate limit
is shared on a first-come first-serve basis.
Figure 3: Multiple Packet Flows Sharing a Rate Limit
This example uses committed and conformed actions for a preferred rate limit profile
so that the common rate limit drops only exceeded packets (those packets that raise
the traffic load above 4 Mbps); packets below 4 Mbps are transmitted. By specifying
classifier-group * parent-group all, all packets are sent to the parent group. There
is no individual rate limit so that those packet use any available, unused bandwidth
in the parent group rate limit.
host1(config)# rate-limit-profile All two-rate hierarchical
host1(config-rate-limit-profile)# committed-action transmit conditional
host1(config-rate-limit-profile)# conformed-action transmit conditional
host1(config-rate-limit-profile)# exceeded-action drop
host1(config-rate-limit-profile)# peak-rate 40000000
host1(config-rate-limit-profile)# exit
host1(config)# policy-list rlpshare
host1(config-policy-list)# classifier-group A parent-group All
host1(config-policy-list-classifier-group)# forward
host1(config-policy-list-classifier-group)# exit
host1(config-policy-list)# classifier-group B parent-group All
68■Hierarchical Rate Limits Overview
Page 95
Chapter 5: Creating Rate-Limit Profiles
host1(config-policy-list-classifier-group)# forward
host1(config-policy-list-classifier-group)# exit
host1(config-policy-list)# classifier-group C parent-group All
host1(config-policy-list-classifier-group)# forward
host1(config-policy-list-classifier-group)# exit
host1(config-policy-list)# parent-group All
host1(config-policy-list-parent-group)# rate-limit-profile All
host1(config-policy-list-parent-group)# exit
Example: Shared Pool of Additional Bandwidth with Select Flows Rate-Limiting Hierarchical
Policy
Figure 4 on page 69 shows three classified flows, A, B, and C, each of which has an
individual rate limit with a peak rate of 1 Mbps. If flow A is exceeding its peak rate,
rather than drop the packet, the flow tries to use any bandwidth left in a shared rate
limit (extrabw) of peak rate of 2 Mbps. The packet is dropped only if both the
individual and the shared rate limit have no bandwidth left.
The total flow is limited to 5 Mbps, which is the sum of all the individual peak rates
plus the peak rate of the shared rate limit. Individual flows A, B, and C are limited
to a maximum of 3 Mbps (1 Mbps from its individual rate limit and up to 2 Mbps if
it can consume the entire shared pool); however, it cannot go below a 1 Mbps rate
because of the other flows. A shared rate limit enables many flows to share the extra
bandwidth dynamically.
Figure 4: Shared Pool of Additional Bandwidth with Select Flows
This example uses transmit final so that those packets do not pass through the
common rate limit. Transmit final also indicates that there is no shared maximum.
If the packets are committed or conformed, they do not need to borrow extra
bandwidth or subtract tokens from it. The example uses exceeded action transmitconditional so that packets above the individual rate-limit maximum are not dropped
but sent to the next rate limit in the hierarchy. Because this is transmit conditional,
ownership of the packet also transfers so the common rate limit can drop these
packets if it has no bandwidth left.
Example: Aggregate Marking with Oversubscription Rate-Limiting Hierarchical Policy
Figure 5 on page 71 shows an aggregate rate limit that enables up to 2 Mbps of traffic
to be sent with ToS marking TOS1. Traffic above that rate is sent with marking TOS2
or TOS3 (depending on packet type) and traffic above 6 Mbps is dropped. The 2
Mbps of TOS1 is oversubscribed among individual flows A, B, and C, each of which
can have up to 1 Mbps of TOS1 traffic. An individual flow can mark a packet TOS1,
but if there is insufficient bandwidth at the shared rate limit because of
oversubscription, the packet is demoted and remarked.
The demoted packets from flow A are marked as TOS2 but the demoted packets
from flows B and C are marked as TOS3. The shared rate limit determines whether
to demote the packet, in which case each individual rate limit selects the new ToS
marking. Individual flows are not required to mark demoted packets with the same
value.
The committed and conformed actions are transmit conditional so that all packets
also go through rate limit S, because rate limit S imposes the limit of 2 Mbps of TOS1
traffic (total across A, B, and C).
70■Hierarchical Rate Limits Overview
Page 97
Chapter 5: Creating Rate-Limit Profiles
Committed packets are transmitted conditionally to rate limit S, which has a peak
rate of 6 Mbps and a committed rate of 2 Mbps; these packets can be demoted by
S to Y (yellow), in which case they are remarked TOS2 or TOS3. If S leaves them as
G (green), they are marked as TOS1. All conformed packets from A, B, and C are
also transmitted conditionally to S but arrive as Y because rate limits do not promote
packets in color. S is color-aware so these Y packets do not take away G tokens,
leaving them reserved only for the G packets coming from A, B, and C.
host1(config-color-mark-profile)# yellow-mark TOS3
host1(config-color-mark-profile)# red-mark TOS3
host1(config--color-mark-profile)# exit
host1(config)# policy-list TOS1_oversubsribed
host1(config-policy-list)# classifier-group A parent-group S
host1(config-policy-list-classifier-group)# rate-limit-profile indiv
host1(config-policy-list-classifier-group)# mark profile A
host1(config--classifier-group)# exit
host1(config-policy-list)# classifier-group B parent-group S
host1(config-policy-list-classifier-group)# rate-limit-profile indiv
host1(config-policy-list-classifier-group)# mark profile BC
host1(config--classifier-group)# exit
host1(config-policy-list)# classifier-group C parent-group S
host1(config-policy-list-classifier-group)# rate-limit-profile indiv
host1(config-policy-list-classifier-group)# mark profile BC
host1(config-policy-list-classifier-group)# exit
host1(config-policy-list)# parent-group S
host1(config-policy-list-parent-group)# rate-limit-profile S
host1(config-policy-list-parent-group)# exit
Color-Aware Configuration for Rate-Limiting Hierarchical Policy
Common to many rate-limit hierarchies is a large aggregate rate limit that receives
packets from many smaller individual rate limits. An individual rate limit can mark
a packet yellow but, if few individual flows are active, the aggregate rate limit is likely
to try to promote it to green, overriding the individual rate limit. For this reason, rate
limits never promote packets in color; color-aware rate limits use the incoming color
in their algorithm, but the final result is always equal to or less than the initial packet
color.
Rate-limit profiles for rate-limit hierarchies include a non-default configuration option
for color-aware. For two-rate rate limits this option enables the color-aware algorithm.
If hierarchical, TCP-friendly one-rate rate limits have a color-aware algorithm defined.
In the following color-aware example, the non-preferred packets do not take any
green tokens from rate-limit A, leaving them all for preferred packets. Preferred
packets may take green and also take yellow tokens (which reduces the flow of
non-preferred). In this way the non-preferred packets do not reduce the number of
green preferred packets, only the number of yellow preferred packets; preferred
packets are then marked from a color-mark profile.
class non-preferred parent A
color yellow
class preferred parent A
mark profile cm
parent A
rate-limit A !! a color-aware rate limit
The color-mark profile translates the packet color, which is independent of its type,
to a type-dependent mark for ToS or EXP and applies it to a packet after it has exited
the rate-limit hierarchy. If no translation is configured for a color, then packets of
that color are not changed.
72■Hierarchical Rate Limits Overview
Page 99
Chapter 5: Creating Rate-Limit Profiles
Transmit-unconditional packets entering a color-aware rate limit uses the color on
the packet for the rate-limit algorithm. Doing this ensures that the color-aware rate
limit depletes tokens from the token buckets to account for these packets.
Every packet sent through a rate-limit hierarchy is either dropped inside the hierarchy
or emerges with a green, yellow, or red color assigned to it by the rate-limit hierarchy.
The color depends on the last rate limit in the hierarchy that owned the packet and
all prior rate limits. The green, yellow, or red classification applies to packets of any
type and is not interface-type dependent.
A packet that has traversed the hierarchy either has been dropped or emerges with
a color (green, yellow or red). This final color can be used by a mark rule with a
color-mark profile to select the ToS marking for the packet. Because this operation
is interface-type dependent, the actual value is configured where the packet entered
the hierarchy; however, the color is set by the entire rate-limit hierarchy.
We recommend that all rate-limit profiles that receive transmit unconditional packets
should be color-aware. If not color-aware, yellow transmit unconditional packets are
processed through both the green and yellow token buckets; if the green rate is low,
this causes an oversubscription of transmit unconditional packets and leads to
saturation. By making the rate limit color-aware, the yellow transmit unconditional
packets ar counted only against the yellow token bucket.
Related Topics■color
■color-aware
■color-mark-profile
■green-mark
■red-mark
■yellow-mark
Percent-Based Rates for Rate-Limit Profiles Overview
Percent-based rate-limit profiles enable you to divide the reference rate as percentages
instead of specific values. You can specify the reference rate on each interface and
specify these rates in terms of percentage of this reference rate within the rate-limit
profile to derive the appropriate rate. This enables you to define rate-limit profiles
with rates in terms of percentage and bursts in terms of milliseconds.
You can use percent-based rate-limit profiles to:
■Configure rates in rate-limit profiles based on a percentage of a parameter. You
can assign values to these parameters at the time of attachment, which enables
you to use the same policy for multiple interfaces with different parameter values.
■Specify burst sizes in milliseconds when you configure percent-based rate-limits.
■Provide a generic way to configure and use policy parameters. You can use
parameter names when you create policy objects and defer assigning values to
these parameters until policy attachment. This enables you to share policy objects
by attaching the same policy at multiple interfaces with different parameter
Percent-Based Rates for Rate-Limit Profiles Overview■73
values. You do not have to specify values each time you attach a policy; if you
do not specify interface-specific, the system uses the global value.
Policy Parameter Reference-Rate
You can use a policy parameter reference-rate to derive the rates in rate-limit profiles.
You can configure rate-limit profiles as a percentage of this parameter. The system
calculates the rate at the time of attachment using the value assigned to this parameter
for that interface.
If you do not specify a value for this parameter in Interface Configuration mode, then
the Global configuration value is used.
You can modify the value of this parameter in Global Configuration mode or Interface
Configuration mode. In Interface Configuration mode, you can change the value
using the increase keyword.
If you use the no version of the command in Interface Configuration mode, the
parameter value is set to the global default value. The no version of the command
with the increase keyword decrements the value. The parameter value cannot have
a negative value. The no version of the command in Global Configuration mode
deletes the parameter if it is not used anywhere else.
Modified values affect the rates in the rate-limit profiles that are using the
reference-rate parameter.
NOTE: Beginning with JUNOSe Release 10.3.x, you cannot modify the policy
reference-rate parameter in Interface Configuration mode, if the percent-based
rate-limit profile is used in external parent groups. If you attempt to change the
reference-rate parameter that is referenced by multiple classification operations using
the policy-parameter reference-rate command at the interface level, an error
message is displayed in the CLI interface. This restriction exists because multiple
interfaces might refer to the same external parent group resource and to prevent
such interfaces from losing their reference to the older external parent group
resources. However, you can modify the percent-based rate-limit profiles for external
parent groups at the hierarchical rate-limit profile level.
Specifying Rates Within Rate-Limit Profiles
Within a rate-limit profile you can specify the rate either as a percentage or a specific
value. In two-rate rate-limit profiles, you can select committed rate and peak rate.
You can specify one rate in terms of percentage and another as a specific value. Also,
one rate can be a percentage of one parameter and another rate can be a percentage
of another parameter.
If the rate in a rate-limit profile is x percent, then the actual rate can be calculated
from a parameter value as:
Actual rate (in bits per second) = (parameter value *x)/100
74■Percent-Based Rates for Rate-Limit Profiles Overview
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.