tc - shapping specific ports on ppp link

Linux Advanced Routing and Traffic Control

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

 



Hello,
I'm having some trouble to configure a proper shapping for my users.

Basically we receive pppoe connections (rp-pppoe), it activates a
interface called pppX and I'm applying something like on my script:

Example:
 tc qdisc add dev ppp41 root handle 1: htb default 10
 tc class add dev ppp41 root classid 1:0 htb rate 1024kbit burst 10k
 tc class add dev ppp41 parent 1:0 classid 1:10 htb rate 1024kbit burst 10k
 tc class add dev ppp41 parent 1:0 classid 1:20 htb rate 512kbit

Now, I'm trying some combination like s/dports
 tc filter add dev ppp41 protocol ip parent 1:0 prio 1 u32 match ip
dport 1024 0xfc00 flowid 1:20
 tc filter add dev ppp41 protocol ip parent 1:0 prio 1 u32 match ip
dport 2048 0xfc00 flowid 1:20
 tc filter add dev ppp41 protocol ip parent 1:0 prio 1 u32 match ip
dport 3072 0xffe0 flowid 1:20
 tc filter add dev ppp41 protocol ip parent 1:0 prio 1 u32 match ip
dport 4096 0xf000 flowid 1:20
 tc filter add dev ppp41 protocol ip parent 1:0 prio 1 u32 match ip
dport 8192 0xe000 flowid 1:20
 tc filter add dev ppp41 protocol ip parent 1:0 prio 1 u32 match ip
dport 16384 0xc000 flowid 1:20
 tc filter add dev ppp41 protocol ip parent 1:0 prio 1 u32 match ip
dport 32768 0x8000 flowid 1:20

I want to achieve that my user get 50% less of the main rate when
trying to download on ports above 1024, and the ports below 1024 he
get 100%.

As its not working correctly, what should I do to get that results?

Thanks very much,
Tiago
--
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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