Juniper Networks
Log in
|
How to Buy
|
Contact Us
|
United States (Change)
Choose Country
Close

Choose Country

North America

  • United States

Europe

  • Deutschland - Germany
  • España - Spain
  • France
  • Italia - Italy
  • Россия - Russia
  • United Kingdom

Asia Pacific

  • Asean Region (Vietnam, Indonesia, Singapore, Malaysia)
  • Australia
  • 中国 - China
  • India
  • 日本 - Japan
  • 대한민국 - Korea
  • 台灣 - Taiwan
Solutions
Products & Services
Company
Partners
Support
Education
Community
Security Intelligence Center

Technical Documentation

Download Software
Research a Problem Login required
Case Management Login required
Contract & Product Management Login required
Technical Documentation
Documentation Archive
Enterprise MIBs
File Format Help
Glossary
Portable Libraries
End-of-Life Products
Contact Support
Guidelines and Policies
Security Resources
Home > Support > Technical Documentation > EX Series > Understanding the Use of Policers in Firewall Filters
Print
Rate and give feedback:  Feedback Received. Thank You!
Rate and give feedback: 
Close
This document helped resolve my issue.  Yes No

Additional Comments

800 characters remaining

May we contact you if necessary?

Name:  
E-mail: 
Submitting...
 

Related Documentation

  • EX Series
  • Firewall Filters for EX Series Switches Overview
  • Understanding Tricolor Marking Architecture
  • Example: Configuring Firewall Filters for Port, VLAN, and Router Traffic on EX Series Switches
  • Descriptions of Firewall Filter Match Conditions, Actions, and Action Modifiers for EX Series Switches
 

Understanding the Use of Policers in Firewall Filters

Policing, or rate limiting, is an important component of firewall filters that lets you control the amount of traffic that enters an interface on Juniper Networks EX Series Ethernet Switches.

This topic describes:

  • Policers Overview
  • Policer Types
  • Policer Actions
  • Policer Levels
  • Color Modes
  • Naming Conventions for Policers

Policers Overview

A single firewall filter configured with a policer permits only traffic within a specified set of rate limits to provide protection from denial-of-service (DoS) attacks. Traffic that exceeds the rate limits specified by the policer is either discarded immediately or is marked as lower priority than traffic that is within the rate limits. The switch discards the lower-priority traffic if traffic becomes congested.

A policer applies two types of rate limits on traffic:

  • Bandwidth—The number of bits per second permitted, on average.
  • Maximum burst size—The maximum size permitted for bursts of data that exceed the given bandwidth limit.

Policing uses an algorithm to enforce a limit on average bandwidth while allowing bursts up to a specified maximum value. You can define specific classes of traffic on an interface and apply a set of rate limits to each class. After you name and configure a policer, it is stored as a template. You can then use a policer in a firewall filter configuration.

Each policer that you configure includes an implicit counter that counts the number of packets that exceed the rate limits that are specified for the policer. To get filter-specific or term-specific packets counts, you must configure a different policer for each filter or term that performs policing.

Policer Types

Switches support three types of policers:

  • Single-rate two-color—A two-color policer (sometimes called simply “policer”) meters the traffic stream and classifies packets into two categories of packet loss priority (PLP) according to a configured bandwidth and burst-size limit. You can mark packets that exceed the bandwidth and burst-size limit or simply discard them. A two-color policer is most useful for metering traffic at the port (physical interface) level.
  • Single-rate three-color—This type of policer is defined in RFC 2697, A Single Rate Three Color Marker, as part of an assured forwarding (AF) per-hop-behavior (PHB) classification system for a Differentiated Services (DiffServ) environment. This type of policer meters traffic based on the configured committed information rate (CIR), committed burst size (CBS), and the excess burst size (EBS). Traffic is marked as belonging to one of three categories (green, yellow, or red) based on whether the packets arriving are below the CBS (green), exceed the CBS (yellow) but not the EBS, or exceed the EBS (red). A single-rate three-color policer is most useful when a service is structured according to packet length and not according to peak arrival rate.
  • Two-rate three-color—This type of policer is defined in RFC 2698, A Two Rate Three Color Marker, as part of an assured forwarding (AF) per-hop-behavior (PHB) classification system for a Differentiated Services (DiffServ) environment. This type of policer meters traffic based on the configured CIR and peak information rate (PIR), along with their associated burst sizes, the CBS and peak burst size (PBS). Traffic is marked as belonging to one of three categories (green, yellow, or red) based on whether the packets arriving are below the CIR (green), exceed the CIR (yellow) but not the PIR, or exceed the PIR (red). A two-rate three-color policer is most useful when a service is structured according to arrival rates and not to packet length.

Policer Actions

Policer actions are implicit or explicit and vary by policer type. The term implicit means that Junos OS assigns a loss-priority value automatically; explicit means that you configure the action. Table 1 lists policer actions.

Table 1: Policer Actions

Policer

Marking

Implicit Action

Configurable Action

Single-rate two-color

Green (Conforming)

Assign low loss priority

None

Red (Nonconforming)

None

Assign low or high loss priority, assign a forwarding class, or discard

Single-rate three-color

Green (Conforming)

Assign low loss None priority

None

Red (Above the EBS)

Assign high loss priority

Discard

Two-rate three-color

Green (Conforming)

Assign low loss priority

None

Red (Above the PIR and PBS)

Assign high loss priority

Discard

Policer Levels

You can configure policers at the queue level, logical interface level, or Layer 2 (MAC) level. Only a single policer is applied to a packet at the egress queue, and the search for policers occurs in this order:

  • Queue level
  • Logical interface level
  • Layer 2 (MAC) level

Color Modes

Tricolor marking (TCM) policers are not bound by a green-yellow-red coloring convention. Packets are marked with low or high PLP bit configurations based on color, so both three-color policer types extend the functionality of class-of-service (CoS) traffic policing by providing three levels of drop precedence (loss priority) instead of the two normally available in policers. Both single-rate and two-rate three-color policer types can operate in two modes:

  • Color-blind—In color-blind mode, the three-color policer operates without reference to whether the examined packets have been previously marked or metered. In other words, the three-color policer is “blind” to any previous coloring a packet might have had.
  • Color-aware—In color-aware mode, the three-color policer operates with reference to any previous marking or metering of the examined packets. In other words, the three-color policer is “aware” of the previous coloring a packet might have had. In color-aware mode, the three-color policer can increase the PLP of a packet but can never decrease it. For example, if a color-aware three-color policer meters a packet with a low PLP marking, it can raise the PLP level to high. But, a high PLP level cannot be reduced to low.

Naming Conventions for Policers

We recommend you use the naming convention policernumber-TCMnumber-colortype when configuring three-color policers and policernumber when configuring two-color policers. TCM stands for tricolor marking. Because policers can be numerous and must be applied correctly to work, a simple naming convention makes it easier to apply the policers properly.

For example, if the first policer you configure is a single-rate, color-aware, three-color policer, name it srTCM1-ca. If the second policer you configure is a two-rate, color-blind, three-color policer, name it trTCM2-cb.

 

Related Documentation

  • EX Series
  • Firewall Filters for EX Series Switches Overview
  • Understanding Tricolor Marking Architecture
  • Example: Configuring Firewall Filters for Port, VLAN, and Router Traffic on EX Series Switches
  • Descriptions of Firewall Filter Match Conditions, Actions, and Action Modifiers for EX Series Switches
 

Published: 2011-10-25

 
  • About Juniper
  • The New Network
  • Investor Relations
  • Press Releases
  • Newsletters
  • Juniper Offices
  • Resources
  • How to Buy
  • Partner Locator
  • Image Library
  • Visio Templates
  • Security Center
  • Community
  • Forums
  • Blogs
  • Junos Central
  • Social Media
  • Support
  • Technical Documentation
  • Knowledge Base (KB)
  • Software Downloads
  • Product Licensing
  • Contact Support
Site Map / RSS Feeds / Careers / Accessibility / Feedback / Privacy & Policy / Legal Notices
Copyright© 1999-2012 Juniper Networks, Inc. All rights reserved.
Help
|
My Account
|
Log Out