Ingress Rate Limiting on MX Series Routers with MPCs
Beginning with Junos OS Release 16.2R1, on MPCs that support ingress queueing, you can perform rate limiting on incoming packets based on the forwarding class and packet loss priority (PLP) defined for each packet at ingress. You can define the ingress forwarding class either through behavior aggregate (BA) classification or through multifield (MF) ingress-queuing-filter classification.
A packed entering an interface that has ingress queuing and ingress rate-limiting enabled has the following path through the device:
Packet in -> BA classification -> MF classification -> Ingress rate-limiting -> Ingress queuing -> Loopback through the interface -> BA classification -> MF classification -> Firewall filters -> Routing -> Egress pipeline
As the packet enters the interface, BA and MF classification are used to determine the forwarding class and PLP for the packet. Ingress rate-limiting is applied to the packet based on the forwarding class and PLP just determined. If no BA classifier is defined for the packet, the default BA classifier is used. Use of MF classification is optional and overrides any BA classification, including default BA classification.
Ingress rate limiting can be applied to physical and logical interfaces as well as interface sets.
To configure ingress rate-limiting:
Configure the
traffic-manager
statement withingress-and-egress
mode:[edit chassis fpc slot-number pic pic-number]
user@router# set traffic-manager mode ingress-and-egress;Configure a rate-limited scheduler. For example:
[edit class-of-service]
user@router# set schedulers sched_RL transmit-rate percent 70; user@router# set schedulers sched_RL transmit-rate rate-limit;Apply the scheduler to a scheduler map. For example:
[edit class-of-service]
user@router# set scheduler-maps SMap_RL forwarding-class expedited-forwarding scheduler sched_RL;Apply the scheduler map as an
input-scheduler-map
to a physical or logical interface or interface set. For example:[edit class-of-service]
user@router# set interfaces interface-set my-set input-scheduler-map SMap_RL; user@router# set interfaces ge-8/0/2 input-scheduler-map SMap_RL; user@router# set interfaces ge-8/0/3 unit 0 input-scheduler-map SMap_RL;Note:Alternatively, apply the scheduler map to a traffic control profile, then apply the traffic control profile as an
input-traffic-control-profile
to a physical or logical interface or interface set.