This article provides information about the implementation of the kernel firewall policer.
Check the following examples, for the difference between the Interface Policer and Interface Firewall filter with policer: In the following topology, R1 applied the Policers on the egress interface. You can see that the ICMP request traffic goes through this policer condition; without any packet discard. Topology - 1 :
10.3R1.9 policer R1(M10) ge-0/0/0------------- R2(150.0.0.2) ICMP request --->
interfaces { ge-0/0/0 { unit 0 { family inet { policer { output out-policer; } address 150.0.0.1/30; } } } } firewall { policer out-policer { if-exceeding { bandwidth-limit 32k; burst-size-limit 1500; } then discard; } } lab@R1> ping 150.0.0.2 rapid count 99999 size 1500 PING 150.0.0.2 (150.0.0.2): 1500 data bytes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! lab@m10> show policer Policers: Name Packets __default_arp_policer__ 0 out-policer-ge-0/0/0.0-inet-o 0 <--- No counter increment __policer_tmpl__-term 0
interfaces { ge-0/0/0 { unit 0 { family inet { filter { output test; } address 150.0.0.1/30; } } } } firewall { family inet { filter test { term 1 { then policer out-policer; } } } policer out-policer { if-exceeding { bandwidth-limit 32k; burst-size-limit 1500; } then discard; } } lab@R1> ping 150.0.0.2 rapid count 99999 size 1500 PING 150.0.0.2 (150.0.0.2): 1500 data bytes ping: sendto: Operation canceled .ping: sendto: Operation canceled lab@R1> show firewall Filter: __default_bpdu_filter__ Filter: test Policers: Name Packets out-policer-1 372 <--- Counters are incremented. lab@R1>