Config Router

  • Google Sheets
  • CCNA Online training
    • CCNA
  • CISCO Lab Guides
    • CCNA Security Lab Manual With Solutions
    • CCNP Route Lab Manual with Solutions
    • CCNP Switch Lab Manual with Solutions
  • Juniper
  • Linux
  • DevOps Tutorials
  • Python Array
You are here: Home / Juniper / Example – Configuring bandwidth control using CoS with policer

Example – Configuring bandwidth control using CoS with policer

June 11, 2016 by James Palmer

The Junos OS class of service (CoS) enables users to use filters to divide traffic into classes and offer various levels of throughput and packet loss. A policer is a filter that limits traffic of a certain class to a specified bandwidth. This article describes how to apply the policer to control the bandwidth in both directions.

  • How to determine the direction to give on the filter
  • Utility of having two policers rather than one policer

Assume that a source IP address 10.10.10.20 wants to access any destination, and a bandwidth of 1 MB has been configured in both directions.

Configure the upload traffic:

root# show firewall filter upload
term t1 {
    from {
        source-address {
            10.10.10.20/32;
        }
    }
    then policer p1;
}
term t2 {
    then accept;
}

[edit firewall policer p1]
root# show
if-exceeding {
    bandwidth-limit 1m;
    burst-size-limit 10k;
}
then
{
   forwarding-class best-effort
}
Apply this filter in the input direction of the LAN interface. 

Configure the download traffic from the Internet to the destination 10.10.10.20:

root# show firewall filter download
term t1 {
    from {
        destination-address {
            10.10.10.20/32;
        }
    }
    then policer p2;
}
term t2 {
    then accept;
}

[edit firewall policer p2]
root# show
if-exceeding {
    bandwidth-limit 1m;
    burst-size-limit 10k;
}
then
{
   forwarding-class best-effort
}

Note: The policer is p2 and not p1. If the same policer p1 were to be applied for the download traffic, then the bandwidth 1MB would be distributed in both upload and the download direction. This would mean that a different policer would be applied for upload and download even though the bandwidth limit is the same.

Note: When troubleshooting CoS issues, confirm whether the Internet bandwidth is the same in both directions, for example, 2 MB for the download direction and 2 MB for the upload direction. In Ethernet terms, whether it is full duplex and half duplex.

Related

Filed Under: Juniper

Recent Posts

  • How do I give user access to Jenkins?
  • What is docker volume command?
  • What is the date format in Unix?
  • What is the difference between ARG and ENV Docker?
  • What is rsync command Linux?
  • How to Add Music to Snapchat 2021 Android? | How to Search, Add, Share Songs on Snapchat Story?
  • How to Enable Snapchat Notifications for Android & iPhone? | Steps to Turn on Snapchat Bitmoji Notification
  • Easy Methods to Fix Snapchat Camera Not Working Black Screen Issue | Reasons & Troubleshooting Tips to Solve Snapchat Camera Problems
  • Detailed Procedure for How to Update Snapchat on iOS 14 for Free
  • What is Snapchat Spotlight Feature? How to Make a Spotlight on Snapchat?
  • Snapchat Hack Tutorial 2021: Can I hack a Snapchat Account without them knowing?

Copyright © 2025 · News Pro Theme on Genesis Framework · WordPress · Log in