Shaper & prio qdisc

Linux Advanced Routing and Traffic Control

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

 



Hello. Sorry for my poor english =)
I have following config for traffic prioritization:

  tc qdisc add dev eth0 root handle 1: prio
  tc qdisc add dev eth0 parent 1:1 handle 10: tbf rate 7000kbit buffer 1600 
latency 2msec
  tc qdisc add dev eth0 parent 1:2 handle 20: sfq
  tc qdisc add dev eth0 parent 1:3 handle 30: tbf rate 3000kbit buffer 1600 
latency 50msec

  tc qdisc add dev eth1 root handle 1: prio
  tc qdisc add dev eth1 parent 1:1 handle 10: tbf rate 7000kbit buffer 1600 
latency 2msec
  tc qdisc add dev eth1 parent 1:2 handle 20: sfq
  tc qdisc add dev eth1 parent 1:3 handle 30: tbf rate 3000kbit buffer 1600 
latency 50msec

Where is 'eth0' is interface connected to backbone network 192.168.0.x/24, and 
'eth1' is interface to hub, with network 172.18.x.y/24

I have some filters:
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip dport 22 
0xffff flowid 1:1
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip sport 22 
0xffff flowid 1:1
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip sport 80 
0xffff flowid 1:1
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip dport 80 
0xffff flowid 1:1
....
tc filter add dev eth0 protocol ip parent 1: prio 5 u32 match ip sport 20 
0xffff flowid 1:3
tc filter add dev eth0 protocol ip parent 1: prio 5 u32 match ip dport 20 
0xffff flowid 1:3
....
and same for eth1.

Now i need to add shapers for some client connecting from eth1 via vpn and 
gain real ip addresses (like 218.33.x.x)

I think, it must looks like this:
tc qdisc add dev ppp7 root tbf rate 150kbit buffer 1600 latency 10msec
it's shape outgoing traffic from client, right?
But how to shape incoming traffic? I think, it must be class on eth0 with 
parent 1:1(tbf qdisc), but tbf is classless, so i need to replace it? For 
example, with htb.

I have 2 questions:
a) Which qdisc i should use to replace tbf and save traffic prioritization 
works?
b) Which class i should use for shaping incoming traffic to client?
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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