This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C1C9C9.A42B11A0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C1C9C9.A42B11A0" ------_=_NextPart_001_01C1C9C9.A42B11A0 Content-Type: text/plain; charset="utf-8" -----Original Message----- From: Allan Gee Sent: Tuesday, March 12, 2002 3:27 PM To: 'lartc-request@mailman.ds9a.nl' Subject: Rate goes over setting Hi guys I have a small problem that I want to limit each network behind us to different rates. The box sits between our router to the internet and the clients. I have attached a mrtg graph to show the stats and one can see that every now and then the rate goes over the limit. This is the code I use for that client who has 64kbit from us and we give him 16kbit only with no borrowing. As you can see from the script I have tried to set the burst rate to as low as possible but it still goes over. What am I doing wrong? #!/bin/sh cbq stop /home/allang/resetFW TCHTB="/sbin/tc" BURS="burst 0.1kbit cburst 0.1kbit" # Destination TCCLASSDST="/sbin/tc class add dev eth1 parent" TCQDISCDST="/sbin/tc qdisc add dev eth1 parent" TCFILTERDST="/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32" # Source TCCLASSSRC="/sbin/tc class add dev eth0 parent" TCQDISCSRC="/sbin/tc qdisc add dev eth0 parent" TCFILTERSRC="/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32" # # For Transparent Proxy # iptables -A PREROUTING -t nat -s 192.168.178.0/24 -p tcp --dport 80 -j DNAT --to 192.168.177.231:3128 iptables -A POSTROUTING -t nat -s 192.168.178.0/24 -d 192.168.177.231 -j SNAT --to 192.168.177.15 # Root & Default Class $TCHTB qdisc add dev eth1 root handle 1: htb default 11 $TCCLASSDST 1: classid 1:10 htb rate 100Mbit $TCCLASSDST 1:10 classid 1:11 htb rate 100Mbit ceil 100Mbit $TCQDISCDST 1:11 handle 12: sfq perturb 10 $TCHTB qdisc add dev eth0 root handle 1: htb default 11 $TCCLASSSRC 1: classid 1:10 htb rate 100Mbit $TCCLASSSRC 1:10 classid 1:11 htb rate 100Mbit ceil 100Mbit $TCQDISCSRC 1:11 handle 12: sfq perturb 10 # The 16kbit client $TCCLASSDST 1: classid 1:20 htb rate 16kbit ceil 16kbit $BURS $TCCLASSDST 1:20 classid 1:21 htb rate 16kbit ceil 16kbit $BURS $TCQDISCDST 1:21 handle 22: sfq perturb 10 $TCFILTERDST match ip dst 129.0.0.0/24 flowid 1:21 $TCCLASSSRC 1: classid 1:20 htb rate 16kbit ceil 16kbit $BURS $TCCLASSSRC 1:20 classid 1:21 htb rate 16kbit ceil 16kbit $BURS $TCQDISCSRC 1:21 handle 22: sfq perturb 10 $TCFILTERSRC match ip src 129.0.0.0/24 flowid 1:21 Regards Allan Gee Equation 021 4181777 ------_=_NextPart_001_01C1C9C9.A42B11A0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dutf-8"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2653.12"> <TITLE>FW: Rate goes over setting</TITLE> </HEAD> <BODY> <BR> <BR> <P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>From: Allan Gee </FONT> <BR><FONT SIZE=3D2>Sent: Tuesday, March 12, 2002 3:27 PM</FONT> <BR><FONT SIZE=3D2>To: 'lartc-request@mailman.ds9a.nl'</FONT> <BR><FONT SIZE=3D2>Subject: Rate goes over setting</FONT> </P> <BR> <P><FONT SIZE=3D2>Hi guys I have a small problem that I want to limit = each network behind us to different rates. The box sits between our = router to the internet and the clients. I have attached a mrtg graph to = show the stats and one can see that every now and then the rate goes = over the limit. This is the code I use for that client who has 64kbit = from us and we give him 16kbit only with no borrowing. As you can see = from the script I have tried to set the burst rate to as low as = possible but it still goes over.</FONT></P> <P><FONT SIZE=3D2>What am I doing wrong?</FONT> </P> <P><FONT SIZE=3D2>#!/bin/sh</FONT> <BR><FONT SIZE=3D2>cbq stop</FONT> <BR><FONT SIZE=3D2>/home/allang/resetFW</FONT> <BR><FONT SIZE=3D2>TCHTB=3D"/sbin/tc"</FONT> <BR><FONT SIZE=3D2>BURS=3D"burst 0.1kbit cburst = 0.1kbit"</FONT> </P> <P><FONT SIZE=3D2># Destination</FONT> <BR><FONT SIZE=3D2>TCCLASSDST=3D"/sbin/tc class add dev eth1 = parent"</FONT> <BR><FONT SIZE=3D2>TCQDISCDST=3D"/sbin/tc qdisc add dev eth1 = parent"</FONT> <BR><FONT SIZE=3D2>TCFILTERDST=3D"/sbin/tc filter add dev eth1 = parent 1:0 protocol ip prio 1 u32"</FONT> </P> <P><FONT SIZE=3D2># Source</FONT> <BR><FONT SIZE=3D2>TCCLASSSRC=3D"/sbin/tc class add dev eth0 = parent"</FONT> <BR><FONT SIZE=3D2>TCQDISCSRC=3D"/sbin/tc qdisc add dev eth0 = parent"</FONT> <BR><FONT SIZE=3D2>TCFILTERSRC=3D"/sbin/tc filter add dev eth0 = parent 1:0 protocol ip prio 1 u32"</FONT> <BR><FONT SIZE=3D2>#</FONT> <BR><FONT SIZE=3D2># For Transparent Proxy</FONT> <BR><FONT SIZE=3D2>#</FONT> <BR><FONT SIZE=3D2>iptables -A PREROUTING -t nat -s 192.168.178.0/24 -p = tcp --dport 80 -j DNAT --to 192.168.177.231:3128 </FONT> <BR><FONT SIZE=3D2>iptables -A POSTROUTING -t nat -s 192.168.178.0/24 = -d 192.168.177.231 -j SNAT --to 192.168.177.15</FONT> </P> <P><FONT SIZE=3D2># Root & Default Class </FONT> <BR><FONT SIZE=3D2>$TCHTB qdisc add dev eth1 root handle 1: htb default = 11</FONT> <BR><FONT SIZE=3D2>$TCCLASSDST 1: classid 1:10 htb rate 100Mbit </FONT> <BR><FONT SIZE=3D2>$TCCLASSDST 1:10 classid 1:11 htb rate 100Mbit ceil = 100Mbit </FONT> <BR><FONT SIZE=3D2>$TCQDISCDST 1:11 handle 12: sfq perturb 10</FONT> </P> <P><FONT SIZE=3D2>$TCHTB qdisc add dev eth0 root handle 1: htb default = 11</FONT> <BR><FONT SIZE=3D2>$TCCLASSSRC 1: classid 1:10 htb rate 100Mbit </FONT> <BR><FONT SIZE=3D2>$TCCLASSSRC 1:10 classid 1:11 htb rate 100Mbit ceil = 100Mbit </FONT> <BR><FONT SIZE=3D2>$TCQDISCSRC 1:11 handle 12: sfq perturb 10</FONT> </P> <P><FONT SIZE=3D2># The 16kbit client</FONT> <BR><FONT SIZE=3D2>$TCCLASSDST 1: classid 1:20 htb rate 16kbit ceil = 16kbit $BURS</FONT> <BR><FONT SIZE=3D2>$TCCLASSDST 1:20 classid 1:21 htb rate 16kbit ceil = 16kbit $BURS</FONT> <BR><FONT SIZE=3D2>$TCQDISCDST 1:21 handle 22: sfq perturb 10</FONT> <BR><FONT SIZE=3D2>$TCFILTERDST match ip dst 129.0.0.0/24 flowid = 1:21</FONT> </P> <P><FONT SIZE=3D2>$TCCLASSSRC 1: classid 1:20 htb rate 16kbit ceil = 16kbit $BURS</FONT> <BR><FONT SIZE=3D2>$TCCLASSSRC 1:20 classid 1:21 htb rate 16kbit ceil = 16kbit $BURS</FONT> <BR><FONT SIZE=3D2>$TCQDISCSRC 1:21 handle 22: sfq perturb 10</FONT> <BR><FONT SIZE=3D2>$TCFILTERSRC match ip src 129.0.0.0/24 flowid = 1:21</FONT> </P> <P><FONT SIZE=3D2>Regards Allan Gee</FONT> <BR><FONT SIZE=3D2>Equation</FONT> <BR><FONT SIZE=3D2>021 4181777</FONT> </P> <P><FONT FACE=3D"Arial" SIZE=3D2 COLOR=3D"#000000"></FONT> </BODY> </HTML> ------_=_NextPart_001_01C1C9C9.A42B11A0-- ------_=_NextPart_000_01C1C9C9.A42B11A0 Content-Type: image/gif; name="computer_specialists-day[1].gif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="computer_specialists-day[1].gif" R0lGODdh9AGHAOMAAPX19cLCwmRkZP8AAADMAAAAAABmAO+fT/8A/wAA/wAAAAAAAAAAAAAAAAAA A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