Related Documentation
- M, MX, T Series
- Gigabit Ethernet Accounting and Policing Overview
- Configuring Gigabit Ethernet Policers
- Configuring MAC Address Accounting
- Configuring a Policer Overhead
- Additional Information
- Junos® OS Ethernet Interfaces
Configuring Gigabit Ethernet Two-Color and Tricolor Policers
For Gigabit Ethernet and 10-Gigabit Ethernet IQ2 and IQ2-E interfaces on M Series and T Series routers, you can configure two-color and tricolor marking policers and apply them to logical interfaces to prevent traffic on the interface from consuming bandwidth inappropriately.
Networks police traffic by limiting the input or output transmission rate of a class of traffic on the basis of user-defined criteria. Policing traffic allows you to control the maximum rate of traffic sent or received on an interface and to partition a network into multiple priority levels or classes of service.
Policers require you to apply a burst size and bandwidth limit to the traffic flow, and set a consequence for packets that exceed these limits—usually a higher loss priority, so that packets exceeding the policer limits are discarded first.
Juniper Networks router architectures support three types of policer:
- Two-color policer—A two-color policer (or “policer” when used without qualification) 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 in some way, or simply discard them. A policer is most useful for metering traffic at the port (physical interface) level.
- Single-rate tricolor marking (srTCM)—A single-rate tricolor marking 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 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). Single-rate TCM is most useful when a service is structured according to packet length and not peak arrival rate.
- Two-rate Tricolor Marking (trTCM)—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 EBS. 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). Two-rate TCM is most useful when a service is structured according to arrival rates and not necessarily packet length.
Unlike policing (described in Configuring Gigabit Ethernet Policers), configuring two-color policers and tricolor marking policers requires that you configure a firewall filter.
This section contains the following topics:
Configuring a Policer
Two-color and tricolor marking policers are configured at the [edit firewall] hierarchy level.
A tricolor marking policer polices traffic on the basis of metering rates, including the CIR, the PIR, their associated burst sizes, and any policing actions configured for the traffic.
To configure tricolor policer marking, include the three-color-policer statement with options at the [edit firewall] hierarchy level:
For more information about configuring tricolor policer markings, see the Routing Policy Configuration Guide and the Junos OS Class of Service Configuration Guide.
Applying a Policer
Apply a two-color policer or tricolor policer to a logical interface to prevent traffic on the interface from consuming bandwidth inappropriately. To apply two-color or tricolor policers, include the layer2-policer statement:
You can include these statements at the following hierarchy levels:
- [edit interfaces interface-name unit logical-unit-number]
- [edit logical-systems logical-system-name interfaces interface-name unit logical-unit-number]
Use the input-policer statement to apply a two-color policer to received packets on a logical interface and the input-three-color statement to apply a tricolor policer. Use the output-policer statement to apply a two-color policer to transmitted packets on a logical interface and the output-three-color statement to apply a tricolor policer. The specified policers must be configured at the [edit firewall] hierarchy level. For each interface, you can configure a three-color policer or two-color input policer or output policers—you cannot configure both a three-color policer and a two-color policer.
Example: Configuring and Applying a Policer
Configure tricolor policers and apply them to an interface:
Configure a two-color policer and apply it to an interface:
Related Documentation
- M, MX, T Series
- Gigabit Ethernet Accounting and Policing Overview
- Configuring Gigabit Ethernet Policers
- Configuring MAC Address Accounting
- Configuring a Policer Overhead
- Additional Information
- Junos® OS Ethernet Interfaces
Published: 2012-12-11
Related Documentation
- M, MX, T Series
- Gigabit Ethernet Accounting and Policing Overview
- Configuring Gigabit Ethernet Policers
- Configuring MAC Address Accounting
- Configuring a Policer Overhead
- Additional Information
- Junos® OS Ethernet Interfaces