Re: complete linux and shaping newbie needs help

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/2/07, Javier Ors <jaorani@xxxxxxxxx> wrote:
>
> I don't know. You can also limit with iptables, but should be ok with
> this tc filter. Did the script run without errors after making the
> changes? Can you check that the filter is really present with tc
> filter show dev (your-device) and paste the result... Now that I
> think, what device have you got configured in the script? It should be
> eth0 (the cable modem).


Hi again Javier.

Yes, the script runs fine, no errors, see:

root@fw:/sbin# ./wshaper.htb
+ DOWNLINK=3000
+ UPLINK=273
+ DEV=eth0
+ NOPRIOHOSTSRC=
+ NOPRIOHOSTDST=
+ NOPRIOPORTSRC=
+ NOPRIOPORTDST=
+ '[' start = status ']'
+ tc qdisc del dev eth0 root
+ tc qdisc del dev eth0 ingress
+ '[' start = stop ']'
+ tc qdisc add dev eth0 root handle 1: htb default 20
+ tc class add dev eth0 parent 1: classid 1:1 htb rate 273kbit burst 6k
+ tc class add dev eth0 parent 1:1 classid 1:10 htb rate 273kbit burst 6k prio 1
+ tc class add dev eth0 parent 1:1 classid 1:20 htb rate 245kbit burst 6k prio 2
+ tc class add dev eth0 parent 1:1 classid 1:30 htb rate 218kbit burst 6k prio 2
+ tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
+ tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
+ tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10
+ tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 match ip
tos 0x10 0xff flowid 1:10
+ tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 match ip
protocol 1 0xff flowid 1:10
+ tc filter add dev eth0 parent 1: protocol ip prio 10 u32 match ip
protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2
match u8 0x10 0xff at 33 flowid 1:10
+ tc filter add dev eth0 parent 1: protocol ip prio 18 u32 match ip
dst 0.0.0.0/0 flowid 1:20
+ tc qdisc add dev eth0 handle ffff: ingress
+ tc filter add dev eth0 parent ffff: protocol ip prio 49 u32 match ip
dst 192.168.0.7/32 police rate 1500kbit burst 10k drop flowid :1
+ tc filter add dev eth0 parent ffff: protocol ip prio 50 u32 match ip
src 0.0.0.0/0 police rate 3000kbit burst 10k drop flowid :1

I changed the ip to match my machine (192.168.0.7), in order to do
some tests, to make sure everything was working. That shouldn't be a
problem, shoud it?

And this is the output of tc filter show dev eth0:

root@fw:/sbin# tc filter show dev eth0
filter parent 1: protocol ip pref 10 u32
filter parent 1: protocol ip pref 10 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 10 u32 fh 800::800 order 2048 key ht
800 bkt 0 flowid 1:10
  match 00100000/00ff0000 at 0
filter parent 1: protocol ip pref 10 u32 fh 800::801 order 2049 key ht
800 bkt 0 flowid 1:10
  match 00010000/00ff0000 at 8
filter parent 1: protocol ip pref 10 u32 fh 800::802 order 2050 key ht
800 bkt 0 flowid 1:10
  match 00060000/00ff0000 at 8
  match 05000000/0f00ffc0 at 0
  match 00100000/00ff0000 at 32
filter parent 1: protocol ip pref 18 u32
filter parent 1: protocol ip pref 18 u32 fh 801: ht divisor 1
filter parent 1: protocol ip pref 18 u32 fh 801::800 order 2048 key ht
801 bkt 0 flowid 1:20
  match 00000000/00000000 at 16


Is everything the way it is supposed to be?

Thanks again for your time.


Regards,

Aidan
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux