Configuring Byte Count 972

Configure the byte-count queues carefully, because if the setting is too high, the algorithm will
take longer than necessary to move from one queue to the next. This is not a problem while the
processor empties the queue, but if it takes the processor too long to get back to other queues,
they could fill up and start to drop packets.
This is why it’s important to understand how to configure the bandwidth percentage relationship
by using the byte-count command. Because frame sizes vary from protocol to protocol,
you’ll need to know the average frame sizes of the protocols using the custom queued interface to
define the byte count efficiently. You can do this by using simple math.
Suppose you have a router that uses IP, IPX, and SNA as its protocols. Let’s arbitrarily assign
frame sizes, realizing that the values aren’t the real ones. Assign a frame size of 800 bytes to IP,
1,000 bytes to IPX, and 1,500 bytes to SNA. You calculate a simple ratio by taking the highest
frame value and dividing it by the frame size of each protocol:
IP = 1,500 ÷ 800 = 1.875
IPX = 1,500 ÷ 1,000 = 1.5
SNA = 1,500 ÷ 1,500 = 1.0
These values equal your frame size ratios. To assign correct bandwidth percentages, multiply
each ratio by the bandwidth percentage you want to assign to that protocol. For example, assign
40 percent to IP, 30 percent to IPX, and 30 percent to SNA:
IP = 1.875 × (0.4) = 0.75
IPX = 1.5 × (0.3) = 0.45
SNA = 1 × (0.3) = 0.30
These values now need to be normalized by dividing the results by the smallest value:
IP = 0.75 ÷ 0.3 = 2.5
IPX = 0.45 ÷ 0.3 = 1.5
SNA = 0.3 ÷ 0.3 = 1
Custom queuing will send only complete frames. Because the ratios are fractions, you must
round them up to the nearest integer values that maintain the same ratio. To arrive at the nearest
integer value, multiply the original ratios by a common number that will cause the ratios to
become integers. In this case, you can multiply everything by 2 and get the resulting ratio of
5:3:2. What does this mean? Well, five frames of IP, three frames of IPX, and two frames of SNA
will be sent. Because of the protocols’ varying frame size, the bandwidth percentage works out
just the way you calculated:
IP = 5 frames × 800 bytes = 4,000 bytes
IPX = 3 frames × 1,000 bytes = 3,000 bytes
SNA = 2 frames × 1,500 bytes = 3,000 bytes
Total bandwidth is 10,000 bytes. Percentages are verified by dividing the protocol rate
by the total. After doing the math, you verify that IP = 40 percent, IPX = 30 percent, and
SNA = 30 percent.
Now that the byte count has been calculated (4,000, 3,000, and 3,000), you can apply the
results in the queue-list command. The custom queuing algorithm will forward 4,000 bytes
worth of IP packets, move to the IPX queue and forward 3,000 bytes, and then go to the SNA
queue and forward 3,000 bytes.
The following queue list does not follow the IP, IPX, and SNA example we’ve
been discussing.

See the following example on how to configure and apply custom queuing lists:
Router_B#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router_B(config)#queue-list 1 interface Ethernet0 1
Router_B(config)#queue-list 1 protocol ip 2 tcp 23
Router_B(config)#queue-list 1 protocol ip 3 tcp 80
Router_B(config)#queue-list 1 protocol ip 4 udp snmp
Router_B(config)#queue-list 1 protocol ip 5
Router_B(config)#queue-list 1 default 6
Router_B(config)#queue-list 1 queue 1 limit 40
Router_B(config)#queue-list 1 queue 5 byte-count 4000
Router_B(config)#queue-list 1 queue 4 byte-count 500
Router_B(config)#queue-list 1 queue 3 byte-count 4000
Router_B(config)#queue-list 1 queue 2 byte-count 1000
Router_B(config)#interface serial0
Router_B(config-if)#custom-queue-list 1
Router_B(config-if)#^Z
Router_B#
After analyzing the list, you can see that six queues were configured. The first one was configured
to handle incoming traffic from interface Ethernet 0, and the second is reserved for
Telnet traffic. Queue number 3 is configured for WWW traffic, and the fourth is configured
to handle SNMP traffic. The fifth queue will handle all other IP traffic, while queue number 6
is set up as the default queue where all unspecified traffic will go. A limit of 40 packets was
placed on queue 1 (from the default of 20), and the byte count was changed from the default
value of 1,500 for queues 2, 3, 4, and 5. Finally, after the queue list was created, it was applied
to interface serial 0.
Here is what the configuration looks like:
!
interface Serial0
ip address 10.1.1.1
255.255.255.0
custom-queue-list 1
!
queue-list 1 protocol ip 2 tcp telnet
queue-list 1 protocol ip 3 tcp www
queue-list 1 protocol ip 4 udp snmp
queue-list 1 protocol ip 5
queue-list 1 default 6
queue-list 1 interface Ethernet0 1
queue-list 1 queue 1 limit 40

queue-list 1 queue 2 byte-count 1000
queue-list 1 queue 3 byte-count 4000
queue-list 1 queue 4 byte-count 500
queue-list 1 queue 5 byte-count 4000
As with the other queuing algorithms, you need to verify both the configuration and the
status of custom queuing. Issuing the same command as before, except this time substituting
custom for priority, produces the following output:
Router_B#show queueing custom
Current custom queue configuration:
List Queue Args
1 6 default
1 1 interface Ethernet0
1 2 protocol ip tcp port telnet
1 3 protocol ip tcp port www
1 4 protocol ip udp port snmp
1 5 protocol ip
1 1 limit 40
1 2 byte-count 1000
1 3 byte-count 4000
1 4 byte-count 500
1 5 byte-count 4000
Router_B#
This output information gives you a breakdown of the custom queue lists configured
on the device, detailing queue assignments and any limits or byte counts assigned to each
custom queue.