16.03.2014 Views

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Junos 10.4 <strong>Policy</strong> <strong>Framework</strong> <strong>Configuration</strong> <strong>Guide</strong><br />

The policer classifies traffic into two groups: traffic that conforms to the bandwidth limit<br />

or the peak burst size, and traffic that exceeds the bandwidth limit and the peak burst<br />

size. Each category is associated with an action. For conforming traffic (also called green<br />

traffic), the action is to transmit the packet. For nonconforming traffic (also called red<br />

traffic), the action might be to discard the packet or to first mark the packet with a higher<br />

drop priority and then transmit the packet. If congestion occurs downstream, the packets<br />

with higher loss priority are more likely to be discarded.<br />

The following configuration demonstrates how the policer works in a sample scenario.<br />

firewall {<br />

policer two-color-policer {<br />

logical-interface-policer;<br />

if-exceeding {<br />

bandwidth-percent 90;<br />

burst-size-limit 300k;<br />

}<br />

then loss-priority high;<br />

}<br />

}<br />

If traffic arriving on or exiting the interface exceeds 90 percent of the available bandwidth<br />

and exceeds the 300 KB burst-size limit, the packets are marked with a high loss priority.<br />

As the traffic rate slows and the newly arriving traffic conforms to the configured limits,<br />

Junos OS stops marking packets with the high loss priority.<br />

Configuring a Single-Rate Two-Color Policer<br />

You can apply a single-rate two-color policer to incoming packets, outgoing packets, or<br />

both.<br />

To configure a single-rate two-color policer:<br />

1. Configure the policer.<br />

[edit firewall policer policer1]<br />

user@host# set if-exceeding bandwidth-percent 90 burst-size-limit 300k<br />

user@host# set then loss-priority high<br />

Instead of specifying the bandwidth limit as a percentage, you can configure an<br />

absolute size limit with the bandwidth-limit statement.<br />

2. Configure the policer type.<br />

[edit firewall policer policer1]<br />

user@host# set logical-interface-policer<br />

Instead of logical-interface-policer, you can use physical-interface-policer or<br />

logical-bandwidth-policer. Physical interface policers are for policers that you reference<br />

in firewall filters. Logical bandwidth policers are based on a percentage of the logical<br />

interface shaping rate rather than a percentage of the physical interface media rate.<br />

3. (Optional) Reference the policer in a firewall filter, for all traffic types or for a specific<br />

traffic type.<br />

[edit firewall]<br />

user@host# set filter limit-hosts term term1 then policer policer1<br />

284<br />

Copyright © 2010, <strong>Juniper</strong> <strong>Networks</strong>, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!