Networking Forums

Networking Forums > Computer Networking > Linux Networking > Traffic Shaping problem resilient to further analysis.

Reply
Thread Tools Display Modes

Traffic Shaping problem resilient to further analysis.

 
 
Anonymous ANONYMAT
Guest
Posts: n/a

 
      09-09-2006, 06:14 PM
Hi, all.

My network :
I and other stations have access to the Internet through an ADSL
modem/router on LAN ; no other hardware, no other LAN segment.

What I want:
I want to throttle the Internet download rate of my own work station
without disturbing others' or pure LAN traffic.

The configuration :
On my Eternet LAN of ip/mask 192.168.2.0/24 I have static IP 192.168.2.2
and my gateway has IP 192.168.2.1 (an ADSL modem + 4-port Ethernet SWITCH).

The problem:
I didn't manage to setup proper QoS/Shaping policies.

Here are the commands I executed in order :

======================================

debian:~/TrafficControl# ./ModProbe
+ export LC_ALL=C
+ LC_ALL=C
+ TC=/sbin/tc
+ IP=/sbin/ip
+ MP=/sbin/modprobe
+ '[' -x /sbin/tc -a -x /sbin/ip ']'
+ HTB_PROBE='sch_htb sch_sfq cls_fw cls_u32 cls_route'
+ for module in '$HTB_PROBE'
+ /sbin/modprobe sch_htb
+ for module in '$HTB_PROBE'
+ /sbin/modprobe sch_sfq
+ for module in '$HTB_PROBE'
+ /sbin/modprobe cls_fw
+ for module in '$HTB_PROBE'
+ /sbin/modprobe cls_u32
+ for module in '$HTB_PROBE'
+ /sbin/modprobe cls_route
debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./tc_clear
+ tc qdisc del dev eth0 root
debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./ModList
+ lsmod
+ grep '^sch'
sch_sfq 5824 0
sch_htb 16192 0
+ lsmod
+ grep '^cls'
cls_route 6976 0
cls_fw 4992 0
cls_u32 7428 0
debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./ShowLinks
+ ip link show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:16:17:88:46:86 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ieee1394 00:10:dc:00:00:fb:a5:b0 brd ff:ff:ff:ff:ff:ff:ff:ff
4: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./Statistics
+ tc -s -d qdisc show dev eth0
qdisc pfifo_fast 0: bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
Sent 184 bytes 4 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
+ tc -s -d class show dev eth0
+ tc filter show dev eth0
debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./go_test
--19:48:30-- http://packages.debian.org/testing/a...ages.fr.txt.gz
=> `allpackages.fr.txt.gz.1'
Resolving packages.debian.org... 87.106.4.56
Connecting to packages.debian.org|87.106.4.56|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 390,966 (382K) [text/plain]

100%[====================================>] 390,966 63.53K/s
ETA 00:00

19:48:37 (62.66 KB/s) - `allpackages.fr.txt.gz.1' saved [390966/390966]

debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./tc_Throttle_HTB_Internet_Download
+ echo 'Begin of script.'
Begin of script.
+ KBITPSLIMIT=32
+ echo 'We won'\''t download from the Internet at rates higher than 32
KiloBits Per Second.'
We won't download from the Internet at rates higher than 32 KiloBits Per
Second.+ tc qdisc add dev eth0 root handle 1: htb default 11
+ tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit ceil 100mbit
+ tc class add dev eth0 parent 1:1 classid 1:10 htb rate 102368kbit ceil
100mbit+ tc class add dev eth0 parent 1:1 classid 1:11 htb rate 32kbit
ceil 32kbit mpu 64 cburst 2kb burst 4kb
+ tc filter add dev eth0 protocol ip parent 1:0 prio 14 u32 match ip src
192.168.2.0/24 flowid 1:10
+ tc filter add dev eth0 protocol ip parent 1:0 prio 15 u32 match ip src
0.0.0.0/0 flowid 1:11
+ echo 'End of script.'
End of script.
debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./ModList
+ lsmod
+ grep '^sch'
sch_sfq 5824 0
sch_htb 16192 1
+ lsmod
+ grep '^cls'
cls_route 6976 0
cls_fw 4992 0
cls_u32 7428 2
debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./ShowLinks
+ ip link show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc htb qlen 1000
link/ether 00:16:17:88:46:86 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ieee1394 00:10:dc:00:00:fb:a5:b0 brd ff:ff:ff:ff:ff:ff:ff:ff
4: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./Statistics
+ tc -s -d qdisc show dev eth0
qdisc htb 1: r2q 10 default 11 direct_packets_stat 0 ver 3.17
Sent 92 bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
+ tc -s -d class show dev eth0
class htb 1:11 parent 1:1 prio 0 quantum 1000 rate 32000bit ceil
32000bit burst 4Kb/8 mpu 64b overhead 0b cburst 2Kb/8 mpu 64b overhead
0b level 0
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
lended: 0 borrowed: 0 giants: 0
tokens: 1048574 ctokens: 524286

class htb 1:1 root rate 100000Kbit ceil 100000Kbit burst 51587b/8 mpu 0b
overhead 0b cburst 51587b/8 mpu 0b overhead 0b level 7
Sent 92 bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
lended: 0 borrowed: 0 giants: 0
tokens: 4224 ctokens: 4224

class htb 1:10 parent 1:1 prio 0 quantum 200000 rate 102368Kbit ceil
100000Kbit burst 52770b/8 mpu 0b overhead 0b cburst 51587b/8 mpu 0b
overhead 0b level 0
Sent 92 bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
lended: 2 borrowed: 0 giants: 0
tokens: 4221 ctokens: 4224

+ tc filter show dev eth0
filter parent 1: protocol ip pref 14 u32
filter parent 1: protocol ip pref 14 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 14 u32 fh 800::800 order 2048 key ht
800 bkt 0 flowid 1:10
match c0a80200/ffffff00 at 12
filter parent 1: protocol ip pref 15 u32
filter parent 1: protocol ip pref 15 u32 fh 801: ht divisor 1
filter parent 1: protocol ip pref 15 u32 fh 801::800 order 2048 key ht
801 bkt 0 flowid 1:11
match 00000000/00000000 at 12
debian:~/TrafficControl#

======================================

debian:~/TrafficControl# ./go_test
--19:52:50-- http://packages.debian.org/testing/a...ages.fr.txt.gz
=> `allpackages.fr.txt.gz.2'
Resolving packages.debian.org... 87.106.4.56
Connecting to packages.debian.org|87.106.4.56|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 390,966 (382K) [text/plain]

100%[====================================>] 390,966 62.90K/s
ETA 00:00

19:52:57 (62.31 KB/s) - `allpackages.fr.txt.gz.2' saved [390966/390966]

debian:~/TrafficControl#

======================================

debian:~/TrafficControl# cat Stubborn_Computer > /dev/null
cat: Stubborn_Computer: No such file or directory
debian:~/TrafficControl#

======================================

I don't understand where is the mistake ; I'd have expeted a much slower
download for the 2nd try.

Could please someone help me.
Thanks in advance.

Sincerely,
A.A.
 
Reply With Quote
 
 
 
 
Anonymous ANONYMAT
Guest
Posts: n/a

 
      09-09-2006, 10:18 PM
Anonymous ANONYMAT wrote:
> Hi, all.

....

CRITICAL_ADVERTISEMENT : If you feel yourself offended by some of the
words or expressions I use throughout this post, please see the
'CRITICAL_NOTE' in the footer.

Sorry, it is still me :-(
'answering' to my own question :

For a few days now, I've been collecting a very wide and complete set
of references, walkthrough and other documents about Traffic Shaping and
Quality of Service under Linux (and under Cisco and under Windows ...
moreover I've got complete knowledge speaking of General concepts) so
that I'm now convinced I've got sufficient knowledge and understanding
to manage to set up properly my own rules UNDER LINUX.

But my original post denotes the fact that an error of mine has passed
unnoticed ; despite my deep understanding of both QoS/Scheduling/Shaping
theory and Linux implementation.

So, I would be grateful if you would tell me about people that use
Hierarchical-Token-Bucket-(HTB)-based Scheduling that could help me to
shape (limit) my inbound Internet traffic. It would be of great help too
if you could introduce me some people that could fix my problem another
way ;-) I'm not a HTB-ist, I just think it should be both very simple
and very efficient when set up properly.

I would be pleased to discuss more profoundly the subject with other
fiend people.

Thank you in advance.

Sincerely,
A.A.

CRITICAL_NOTE : If you've felt yourself offended by some of the words or
expressions I used in this post, it may be because I am a French native
speaker and I'm still seeking for my way into Shakespeare's tongue.
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very embarrassing traffic shaping problem. Address BOOK Linux Networking 2 09-12-2006 01:22 PM
Looking for traffic analysis/monitoring tool KR Linux Networking 7 04-08-2006 11:45 PM
MN-100 and traffic shaping Nikitas Broadband Hardware 1 07-25-2004 01:19 AM
Traffic Shaping Leonardo H. Machado Linux Networking 0 10-12-2003 03:26 AM
Traffic Shaping Problem: sch_htb doesn't load Frank Stoeckl Linux Networking 2 07-08-2003 12:05 AM



1 2 3 4 5 6 7 8 9 10 11