How to Prevent Queue Starvation on Junos Routers

To prevent starvation of your other queues, you may want to configure an outbound policer that defines a limit for the amount of traffic the queue can service.


With strict priority queuing configured, your voice packets will be serviced as soon as they enter the router. There is actually a problem with this approach, though. If enough voice traffic enters the box, you could effectively starve the other queues because the voice traffic will always be serviced first instead of those queues.


To address this issue, you actually want to configure two separate policers. The first policer identifies the bandwidth limit for the voice traffic. If total voice traffic exceeds 256kpps or the traffic bursts exceed 15kpps, you want to flag the traffic as out-of-profile. As you recall, traffic that is out of profile is sent using available bandwidth from the other queues (if available bandwidth exists). Otherwise, it’s dropped.


The second policer sets an upper limit. If the total voice traffic exceeds the upper threshold (set here at 512kpps) or the burst size exceeds 30kpps, you want to discard the packets, regardless of congestion on the interface.


Examine the following firewall policers:


[edit]
firewall {
policer voice-excess-policer {
if-exceeding {
bandwidth-limit 256k;
burst-size-limit 15k;
}
then out-of-profile;
}
policer voice-upper-limit-policer {
if-exceeding {
bandwidth-limit 512k;
burst-size-limit 30k;
}
then discard;
}
}

After creating the policers, you have to tie them to the voice forwarding class. Essentially, you want to make sure that all traffic identified as part of the cos-voice forwarding class is policed with the previously configured firewalls.


 filter voice-filter {
term upper-limit {
from {
forwarding-class cos-voice;
}
then {
policer voice-upper-limit-policer;
next term;
}
}
term excess {
from {
forwarding-class cos-voice;
}
then {
policer voice-excess-policer;
}
}
term accept {
then accept;
}
}

This configuration first evaluates the traffic against the upper limit. If the traffic exceeds the upper limit, you want to discard it, so you should check that condition first. If the traffic isn’t discarded, the excess bandwidth policy is evaluated. If the forwarding class exceeds the allocated bandwidth, the traffic is flagged as out of profile and is accepted. It will be forwarded with available bandwidth (if any exists) or dropped.




dummies

Source:http://www.dummies.com/how-to/content/how-to-prevent-queue-starvation-on-junos-routers.html

No comments:

Post a Comment