Next:ResultsUp:Core Router ConfigurationPrevious:Core Router ConfigurationContents


The Two Bit DiffServ Architecture at the core routers allows for the coexistance of AF and EF. The figure shows the architecture.

 Figure 2: Two Bit DiffServ Architecture

The first level queue in the architecture is the ds_mark queuing discipline, which will be directly associated with the output device. This queuing discipline will extract the TOS byte from the incoming packet and pass it on to the tc_index classifier. The first level tc_index classifier extracts the DSCP from the TOS byte by masking with 0xfc and then right shifting by 2. For example, if the TOS is 0xb8,
TOS          0xb8        10111000
mask         0xfc        10111000
shift        2           00101110 (0x2e, the codepoint for EF)
It then stores the DSCP in skb->tc_index and feeds it onto the next level of tc_index filters. These filters are used to identify the AF class and drop precedence to which the packet belongs, if at all it belongs to the AF class. If it does, then it creates a new class based on the AF codepoint and stores the result of the classification in skb->tc_index. The value stored in the AF codepoint will be based on the AF class and the drop precedence within the AF class to which the packet belongs. The TOS byte, the corresponding DSCP and the class ids for the different AF classes are summarised below.
TOS(decimal) hex binary DSCP(decimal) hex binary Classid AFClass
40 0x28 00101000 10 0x0a 00001010 1:111 AF 11
48 0x30 00110000 12 0x0c 00001100 1:112 AF 12
56 0x38 00111000 14 0x0e 00001110 1:113 AF 13
72 0x48 01001000 18 0x12 00010010 1:121 AF 21
80 0x50 01010000 20 0x14 00010100 1:122 AF 22
88 0x58 01011000 22 0x16 00010110 1:123 AF 23
104 0x68 01101000 26 0x1a 00011010 1:131 AF 31
112 0x70 01110000 28 0x1c 00011100 1:132 AF 32
120 0x78 01111000 30 0x1e 00011110 1:133 AF 33
136 0x88 10001000 34 0x22 00100010 1:141 AF 41
144 0x90 10010000 36 0x24 00100100 1:142 AF 42
152 0x98 10011000 38 0x26 00100110 1:143 AF 43
Once this classification is done, the packet is then handed over to a Class Based Queue (CBQ) 2:0.This CBQ will be used to differentiate between AF, EF and best effort. When the packets enter this CBQ, the EF packets are directed to class 2:1 by the 0x2e filter and all other packets belonging to the different AF classes and BE are sent to class 2:2 by the handle 0 filter. For EF, a pfifo is associated with the class 2:1. The EF class is configured to be bounded and isolated to ensure that it receives the bandwidth allocated for it. Now another CBQ 3:0 is derived from class 2:2 for AF and BE. In turn for each of the AF classes and BE traffic, classes 3:1 .. 3:5 are present. Each of the AF classes is associated with a GRED to allow for multiple drop precedences (there is a virtual queue for every drop precedence within an AF class) and the BE class has a RED queuing discipline. In this 3:0 CBQ, there is the 0xf0 filter which extracts the class number from the skb->tc_index. Then there are tc_index filters for each of the classes with handles 1,2,3,4 and 5 respectively. The AF packets are then queued in the appropriate Generalised Random Early Detection (GRED) queuing discipline. The GRED is more generalised form of the RED. In times of congestion, when it has to drop packets, it will drop them with the drop probability that is associated with the queue. The GRED then queues up the packet in the CBQ, which in turn sends the packet to the ds_mark queuing discipline for the packet to be transmitted.

Next:ResultsUp:Core Router ConfigurationPrevious:Core Router ConfigurationContents
Anupama Sundaresan