lkml.org 
[lkml]   [2000]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjecttraffic shapping problem with fragmented packets
Date
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>Hi,<BR><BR>I
have a question regarding the token bucket filter queuing in the
TC<BR>package.<BR>I'm trying to shape a bursty traffic to make it conferment to
the EF<BR>requirements in terms of rate<BR>and burst size.<BR>The traffic, as I
said, is bursty and its burst size is 11 packets<BR>(Video server output running
on microsoft platform) and it has<BR>an average rate of 1Mbit per sec. The catch
is , the microsoft<BR>application sends very large datagram size &gt;1500B
to<BR>the ip stack to be fragmented and what I see on the wire is 10
fragments<BR>plus the first packet. I<BR>want to shape this stream using TC to
an output of an ave. rate of 1MB<BR>and burst size of 2 packets (without any
dropping)<BR><BR>I have tried several ways of doing that the script shown below
does the<BR>shaping ok but for packet less than the Ethernet MTU. if I start to
have<BR>fragments everything is missed up. I tried it with pings
givinig<BR>different packet size in the command line.<BR><BR>ANy help is very
much appreciated.<BR><BR>#!
/bin/sh<BR><BR>TC=tc<BR>IP=ip<BR>DEVICE=eth0<BR>BANDWIDTH="bandwidth
10Mbit"<BR>#Delete all QDISC<BR><BR>$TC qdisc del dev $DEVICE parent 1:2<BR>$TC
qdisc del dev $DEVICE root<BR># Attach CBQ on $DEVICE. It will have handle
1:.<BR>#&nbsp;&nbsp; $BANDWIDTH is real $DEVICE bandwidth
(10Mbit).<BR>#&nbsp;&nbsp; avpkt is average packet size.<BR>#&nbsp;&nbsp; mpu is
minimal packet size.<BR><BR>$TC qdisc add dev $DEVICE&nbsp; root&nbsp; handle
1:&nbsp; cbq cell 8 \<BR>$BANDWIDTH avpkt 1500 mpu 64<BR><BR># Create root class
with classid 1:1. This step is not necessary.<BR>#&nbsp;&nbsp; bandwidth is the
same as on CBQ itself.<BR>#&nbsp;&nbsp; rate == all the
bandwidth<BR>#&nbsp;&nbsp; allot is MTU + MAC header<BR>#&nbsp;&nbsp; maxburst
measure allowed class burstiness (please,read S.Floyd and<BR>VJ
papers<BR>#&nbsp;&nbsp; est 1sec 8sec means, that kernel will evaluate average
rate<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
on this class with period 1sec and time constant
8sec.<BR><BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
This rate is viewed with "tc -s class ls dev $DEVICE"<BR><BR>$TC class add dev
$DEVICE parent 1:0 classid 1:1 est 1sec 8sec cbq \<BR>$BANDWIDTH rate 10Mbit
allot 1514 maxburst 11 avpkt 1500<BR>$TC class add dev eth0 parent 1:1 classid
1:2 cbq $BANDWIDTH rate<BR>1.1Mbit allot 1514 maxburst 11 avpkt 1500 weight 1
prio 1 isolated<BR><BR>$TC qdisc add dev $DEVICE parent 1:2 est 1sec 8sec tbf
limit 1mb burst<BR>30Kb rate 1.1Mbit peakrate 1200mbps mtu 150<BR>$TC filter add
dev $DEVICE parent 1:0 prio 1 handle 1: protocol ip u32<BR>divisor 1<BR><BR>$TC
filter add dev $DEVICE parent 1:0 prio 1 u32 match ip&nbsp;
dst<BR>158.130.20.0/24&nbsp; flowid 1:2<BR><BR><BR>The problem is when I have
the MTU with this size all packets with<BR>fragments (datagrams with
size<BR>&gt;1500) are not sent and dropped, but when I make it larger (15000)
the<BR>packets are sent but the<BR>rate is veery slow.<BR><BR>Any Idea is
welcome...<BR><BR>Thanks<BR>Wael</FONT><BR><BR></FONT></DIV></BODY></HTML>
\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.071 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site