Effect of Two-Color Policers on Shaping Rate Changes
When you configure a change in shaping rate, it is important to consider the effect on the bandwidth limit. Whenever the shaping rate changes, the bandwidth limit is adjusted based on whether a logical interface (unit) or bandwidth percentage policer is configured.
When a logical interface bandwidth policer is configured, the order of priority for the shaping rate (if configured at that level) is:
The shaping rate applied to the logical interface (unit).
The shaping rate applied to the physical interface (port).
The physical interface speed.
When a bandwidth percentage policer is configured, the order of priority for the shaping rate (if configured at that level) is:
The shaping rate applied to the physical interface (port).
The physical interface speed.
These guidelines must be kept in mind when calculating the logical link speed and link speed from the configured shaping rate, which determines the rate-limited bandwidth after the policer is applied.
In the following configuration, for example, a shaping rate has been configured for the logical interface, but a bandwidth percentage policer is also configured and applied to the same logical interface. Therefore policing is based on the physical interface speed of 1 Gbps.
[edit interfaces] ge-0/1/0 { per-unit-scheduler; vlan-tagging; unit 0 { vlan-id 1; family inet { policer { output policer_test; } address 10.0.7.1/24; } } } [edit firewall] policer policer_test { if-exceeding { bandwidth-percent 75; burst-size-limit 256k; } then discard; } [edit] class-of-service { interfaces { ge-0/1/0 { unit 0 { shaping-rate 15m; } } } }