Juniper qos JNCIA
QOS? Converged networks supports various applications and flows. Need to prioritize sensitive traffic Intserv, diffserv
Main QOS building blocks Classification Marking Congestion management Congestion avoidance Traffic policing and shaping Link efficiency Congestion avoidance and Link effeciency
Diffserv – L2 Priority Code Point (PCP) for Ethernet encapsulation PCP Acronym Traffic Types 1 0 (lowest) BK Background BE Best Effort 2 EE Excellent Effort 3 CA Critical Applications 4 VI Video, < 100 ms latency and jitter 5 VO Voice, < 10 ms latency and jitter 6 IC Internetwork Control 7 7 (highest) NC Network Control
DIFFSERV – L3
DSCP Class DSCP (bin) DSCP (dec) IP precedence ToS (dec) none cs1 1000 8 1 32 af11 1010 10 40 af12 1100 12 48 af13 1110 14 56 cs2 10000 16 2 64 af21 10010 18 72 af22 10100 20 80 af23 10110 22 88 cs3 11000 24 3 96 af31 11010 26 104 af32 11100 28 112 af33 11110 30 120 cs4 100000 4 128 af41 100010 34 136 af42 100100 36 144 af43 100110 38 152 cs5 101000 5 160 ef 101110 46 184 cs6 110000 6 192 cs7 111000 7 224
Classification Match traffic and put it into proper queue Firewall filters user@host# show from { protocol [ udp tcp ]; port 5060; } then { forwarding-class cos-voice; accept;
marking Rewrites DSCP value with a new one per forwarding class Forwarding classes should be the same across whole network There is no special meaning of particular classes [edit class-of-service] rewrite-rules { dscp rewrite-dscps { forwarding-class cos-voice { loss-priority low code-points ef; } forwarding-class cos-video { loss-priority low code-points cs5; forwarding-class cos-critical { loss-priority low code-points af31; forwarding-class cos-bulk { loss-priority low code-points af11; loss-priority high code-points cs1;
Congestion management Queuing mechanisms FIFO WFQ CBWFQ CBWFQ + PQ = LLQ CQ, PQ WFQ gives each flow same BW. Lower weight = better priority. Weight depends on IP prec.
LLQ
Congestion avoidance RED WRED, CBWRED Configured as drop-profile under [edit class-of-service schedulers scheduler-name] Tail drop RED – min and max threshold
Traffic shaping and policing Single token bucket Dual Token Bucket (single rate three color marker) Dual rate token bucket (two rate three color marker) [edit firewall] three-color-policer 1m-cir { two-rate { committed-burst-size 3k; committed-information-rate 1m; peak-burst-size 3k; peak-information-rate 2m; }
TWO RATE THREE COLOR MARKER CIR (bps) = Bc/Tc Default Tc = 125 ms
LAB Task 1: [ ] Mark and classify HTTP and ICMP traffic between C1 and C2. [ ] Use DSCP EF for HTTP traffic and assign it to Queue1. [ ] Use DSCP AF1x for ICMP traffic and assign it Queue2. [ ] Verify your setting on C1 and C2 in Wireshark. Task 2: [ ] Assign to EF traffic 10% of BW and assign it to strict priority queue. [ ] Assign to AF traffic 30% of BW. [ ] Use default BW assignment for NC and rest for BE.
root@JR1# show interfaces fe-0/0/3 unit 0 { description To-PC1; root@JR1# show firewall filter qos-marker { term icmp { from { source-address { 10.0.0.2/32; } protocol icmp; then { forwarding-class expedited-forwarding; accept; term http { destination-port 80; forwarding-class assured-forwarding; term default { then accept; root@JR1# show interfaces fe-0/0/3 unit 0 { description To-PC1; family inet { filter { input qos-marker; } address 10.0.0.1/24; root@JR1# show class-of-service interfaces { fe-0/0/3 { classifiers { dscp default; rewrite-rules {
class-of-service { interfaces { fe-* { scheduler-map http-icmp-qos; } schedulers { sched-ef { transmit-rate percent 10; buffer-size percent 10; priority strict-high; sched-af { transmit-rate percent 30; buffer-size percent 30; priority high; sched-be { transmit-rate percent 55; buffer-size percent 55; sched-nc { transmit-rate percent 5; buffer-size percent 5; class-of-service { scheduler-maps { http-icmp-qos { forwarding-class network-control scheduler sched-nc; forwarding-class best-effort scheduler sched-be; forwarding-class assured-forwarding scheduler sched-af; forwarding-class expedited-forwarding scheduler sched-ef; }
END