[Contents] [Prev] [Next] [Index] [Report an Error]

Packet Flow Through the CoS Process

Perhaps the best way to understand JUNOS CoS is to examine how a packet is treated on its way through the CoS process. This section includes a description of each step, some figures illustrating the process, and a configuration example.

The following steps describe the CoS process:

  1. A logical interface has one or more classifiers of different types applied to it (at the [edit class-of-service interfaces] hierarchy level). The types of classifiers are based on which part of the incoming packet the classifier examines (for example, EXP bits, IEEE 802.1p bits, or DSCP bits). You can use a translation table to rewrite the values of these bits on ingress.
  2. The classifier assigns the packet to a forwarding class and a loss priority (at the [edit class-of-service classifiers] hierarchy level).
  3. Each forwarding class is assigned to a queue (at the [edit class-of-service forwarding-classes] hierarchy level).
  4. Input (and output) policers meter traffic and might change the forwarding class and loss priority if a traffic flow exceeds its service level.
  5. The physical or logical interface has a scheduler map applied to it (at the [edit class-of-service interfaces] hierarchy level).

    At the [edit class-of-service interfaces] hierarchy level, the scheduler-map and rewrite-rules statements affect the outgoing packets, and the classifiers statement affects the incoming packets.

  6. The scheduler defines how traffic is treated in the output queue—for example, the transmit rate, buffer size, priority, and drop profile (at the [edit class-of-service schedulers] hierarchy level).
  7. The scheduler map assigns a scheduler to each forwarding class (at the [edit class-of-service scheduler-maps] hierarchy level).
  8. The drop-profile defines how aggressively to drop packets that are using a particular scheduler (at the [edit class-of-service drop-profiles] hierarchy level).
  9. The rewrite rule takes effect as the packet leaves a logical interface that has a rewrite rule configured (at the [edit class-of-service rewrite-rules] hierarchy level). The rewrite rule writes information to the packet (for example, EXP or DSCP bits) according to the forwarding class and loss priority of the packet.

Figure 7 and Figure 8 show the components of the JUNOS CoS features, illustrating the sequence in which they interact.

Figure 7: CoS Classifier, Queues, and Scheduler

Image g016701.gif

Figure 8: Packet Flow Through CoS Configurable Components

Image g017213.gif

Each outer box in Figure 8 represents a process component. The components in the upper row apply to inbound packets, and the components in the lower row apply to outbound packets. The arrows with the solid lines point in the direction of packet flow.

The middle box (forwarding class and loss priority) represents two data values that can either be inputs to or outputs of the process components. The arrows with the dotted lines indicate inputs and outputs (or settings and actions based on settings). For example, the multifield classifier sets the forwarding class and loss priority of incoming packets. This means that the forwarding class and loss priority are outputs of the classifier; thus, the arrow points away from the classifier. The scheduler receives the forwarding class and loss priority settings, and queues the outgoing packet based on those settings. This means that the forwarding class and loss priority are inputs to the scheduler; thus, the arrow points to the scheduler. For more information, see CoS Inputs and Outputs.

Typically, only a combination of some components (not all) is used to define a CoS service offering.

The following configuration demonstrates the concepts described in this section:

[edit class-of-service]
interfaces {
so-* {
scheduler-map sched1;
unit 0 {
classifiers {
exp exp_classifier;
}
}
}
t3-* {
scheduler-map sched1;
unit 0 {
classifiers {
exp exp_classifier;
}
}
}
}
classifiers { # Step 2: Define classifiers.
exp exp_classifier {
forwarding-class data-queue {
loss-priority low code-points 000;
loss-priority high code-points 001;
}
forwarding-class video-queue {
loss-priority low code-points 010;
loss-priority high code-points 011;
}
forwarding-class voice-queue {
loss-priority low code-points 100;
loss-priority high code-points 101;
}
forwarding-class nc-queue {
loss-priority high code-points 111;
loss-priority low code-points 110;
}
}
drop-profiles {
be-red {
fill-level 50 drop-probability 100;
}
}
forwarding-classes {
queue 0 data-queue;
queue 1 video-queue;
queue 2 voice-queue;
queue 3 nc-queue;
}
schedulers {
data-scheduler {
transmit-rate percent 50;
buffer-size percent 50;
priority low;
drop-profile-map loss-priority high protocol any drop-profile be-red;
}
video-scheduler {
transmit-rate percent 25;
buffer-size percent 25;
priority strict-high;
}
voice-scheduler {
transmit-rate percent 20;
buffer-size percent 20;
priority high;
}
nc-scheduler {
transmit-rate percent 5;
buffer-size percent 5;
priority high;
}
}
scheduler-maps {
sched1 {
forwarding-class data-queue scheduler data-scheduler;
forwarding-class video-queue scheduler video-scheduler;
forwarding-class voice-queue scheduler voice-scheduler;
forwarding-class nc-queue scheduler nc-scheduler;
}
}

[Contents] [Prev] [Next] [Index] [Report an Error]