Juniper speed limit and burst-size-limit calculation for policer
Let’s look at examples of setting up policers to limit speed on Juniper routers, and also talk about how to calculate the burst-size-limit value.
Burst-size-limit calculation for juniper
To configure the speed limit, the first thing you need to do is calculate the burst-size value. There are different calculation options. I suggest using the simplest way to calculate the burst-size from the interface speed with a maximum burst time of 5 ms. Actually this method is recommended by juniper.
We recommend that you use a value of 5 ms (0.005 seconds) as the starting point for the allowable amount of time for a burst of traffic
Formula for calculating burst size limit:
burst-size limit in bytes = interface media rate x allowable time for bursty traffic / 8 bits
For convenience, we write the formula in abbreviated form:
burst-size-limit = (INTERFACE_RATE * 0.005)/8
Depending on the interface speed, we get the following values:
- Fast Ethernet - 62,500 bytes
- Gigabit Ethernet - 625,000 bytes
- 10-Gigabit Ethernet - 6,250,000 bytes
- 25-Gigabit Ethernet - 15,625,000 bytes
- 40-Gigabit Ethernet - 25,000,000 bytes
- 100-Gigabit Ethernet - 62,500,000 bytes
So we got several options for the burst-size-limit value depending on the speed of the physical interface:
burst-size-limit 62.5k
- for Fast Ethernetburst-size-limit 625k
- for Gigabit Ethernetburst-size-limit 6250k
- for 10-Gigabit Ethernetburst-size-limit 15625k
- for 25-Gigabit Ethernetburst-size-limit 25m
- for 40-Gigabit Ethernetburst-size-limit 62m
- for 100-Gigabit Ethernet