Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Junos] How to police input L1 traffic rate on an L3 family inet interface

0

0

Article ID: KB35005 KB Last Updated: 06 Sep 2019Version: 1.0
Summary:

In Junos, policer works on L2 or L3 based on the filter family:

  • If the filter is attached to L2 IFF (Bridge/Vpls etc), then the policer will consider L2 Packet length.
  • If the filter is attached to L3 IFF (IPV4/IPV6 etc), then the policer will consider L3 packet length.
  • If the policer is explicitly configured as “layer2-policer”, then it will always consider L2 packet length, regardless of family of the attached interface.

As a result, when using policer to do rate limiting on Junos device, by default, it limits L2 (on L2 IFF or configured as layer2-policer) or L3 (on L3 IFF) traffic rate. In either case, L1 overhead is not taken into consideration.

This article will discuss how to police input L1 traffic rate on an L3 family inet interface.
Solution:
  1. Configure logical interface policer.

    set firewall policer 50M-POL logical-interface-policer  <-- "logical-interface-policer" needs to be specified in order to apply the policer as layer2-policer in step2.
    set firewall policer 50M-POL if-exceeding bandwidth-limit 50m
    set firewall policer 50M-POL if-exceeding burst-size-limit 312500
    set firewall policer 50M-POL then discard
  2. Apply the policer as input layer2-policer on a family inet logical unit.

    set interfaces xe-9/0/0 unit 0 layer2-policer input-policer 50M-POL
    set interfaces xe-9/0/0 unit 0 family inet address 1.1.1.2/24
  3. Add L1 policer overhead on the logical unit.

    set interfaces xe-9/0/0 unit 0 policer-overhead 16
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search