* HFSC scheduling and Linux vlans
@ 2009-07-18 4:38 Jorge Dávila
2009-07-18 6:22 ` Patrick McHardy
0 siblings, 1 reply; 3+ messages in thread
From: Jorge Dávila @ 2009-07-18 4:38 UTC (permalink / raw)
To: netfilter
Good night list,
I have to implement a configuration for bandwidth management in a
Linux router. The network topology is like this
Internet
|
|
eth0
|
|
vlanX (public address)
|
|
eth1
|
|
+------ vlanY1 (private networks)
|
|
+------ vlanY2 (public servers: e-mail, www, dns)
|
|
+------ vlanY3 (internal servers: e-mail, dns)
The actual configuration works using HTB scheduling but when I tried
apply the HFSC configuration there is no traffic through any
interfaces.
This is the output
tc -s filter show dev eth1; tc -s class show dev eth1
filter parent 1: protocol ip pref 1 fw
filter parent 1: protocol ip pref 1 fw handle 0x17 classid 1:23
filter parent 1: protocol ip pref 1 fw handle 0x30 classid 1:48
filter parent 1: protocol ip pref 2 fw
filter parent 1: protocol ip pref 2 fw handle 0x10 classid 1:16
filter parent 1: protocol ip pref 3 fw
filter parent 1: protocol ip pref 3 fw handle 0x20 classid 1:32
filter parent 1: protocol ip pref 3 fw handle 0x80 classid 1:128
filter parent 1: protocol ip pref 4 fw
filter parent 1: protocol ip pref 4 fw handle 0x5 classid 1:5
filter parent 1: protocol ip pref 4 fw handle 0x15 classid 1:21
filter parent 1: protocol ip pref 6 fw
filter parent 1: protocol ip pref 6 fw handle 0x4 classid 1:4
filter parent 1: protocol ip pref 6 fw handle 0x6 classid 1:6
filter parent 1: protocol ip pref 6 fw handle 0x9 classid 1:9
filter parent 1: protocol ip pref 7 fw
filter parent 1: protocol ip pref 7 fw handle 0x2 classid 1:102
filter parent 1: protocol ip pref 7 fw handle 0x3 classid 1:3
filter parent 1: protocol ip pref 7 fw handle 0x7 classid 1:7
filter parent 1: protocol ip pref 7 fw handle 0x8 classid 1:8
filter parent 1: protocol ip pref 7 fw handle 0xa classid 1:10
filter parent 1: protocol ip pref 7 fw handle 0xe classid 1:14
filter parent 1: protocol ip pref 7 fw handle 0x11 classid 1:17
filter parent 1: protocol ip pref 7 fw handle 0x13 classid 1:19
class hfsc 1: root
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 1
class hfsc 1:1 parent 1: sc m1 0bit d 0us m2 3800Kbit ul m1 0bit d 0us
m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:10 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:23 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:32 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:102 parent 1: sc m1 0bit d 0us m2 114000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:3 parent 1: sc m1 0bit d 0us m2 114000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:21 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:4 parent 1: sc m1 0bit d 0us m2 114000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:5 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:14 parent 1: sc m1 0bit d 0us m2 114000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:6 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:17 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:7 parent 1: sc m1 0bit d 0us m2 114000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:16 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:8 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:19 parent 1: sc m1 0bit d 0us m2 228000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:9 parent 1: sc m1 0bit d 0us m2 114000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:128 parent 1: sc m1 0bit d 0us m2 380000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
class hfsc 1:48 parent 1: sc m1 0bit d 0us m2 380000bit ul m1 0bit d
0us m2 3800Kbit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
period 0 level 0
The firewall rules are similar to this
$IPT -t mangle -I POSTROUTING -j CLASSIFY --set-class 1:8 -o $OUT -s
192.168.8.0/24
where $OUT is vlan201 (a virtual interface at interface eth0)
HFSC scheduling does not works with linux vlans?
Thanks in advance for your answers and advices.
--
Jorge Isaac Dávila López
+505 8430 5462
jorgedavilalopez@gmail.com
---
Esta tierra es Linux. En las noches calladas puede escucharse a las
máquinas Windows re-iniciándose...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: HFSC scheduling and Linux vlans
2009-07-18 4:38 HFSC scheduling and Linux vlans Jorge Dávila
@ 2009-07-18 6:22 ` Patrick McHardy
2009-07-18 13:56 ` Jorge Dávila
0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2009-07-18 6:22 UTC (permalink / raw)
To: Jorge Dávila; +Cc: netfilter
Jorge Dávila wrote:
> The actual configuration works using HTB scheduling but when I tried
> apply the HFSC configuration there is no traffic through any
> interfaces.
>
> This is the output
>
> tc -s filter show dev eth1; tc -s class show dev eth1
> filter parent 1: protocol ip pref 1 fw
> filter parent 1: protocol ip pref 1 fw handle 0x17 classid 1:23
> filter parent 1: protocol ip pref 1 fw handle 0x30 classid 1:48
> filter parent 1: protocol ip pref 2 fw
> filter parent 1: protocol ip pref 2 fw handle 0x10 classid 1:16
> filter parent 1: protocol ip pref 3 fw
> filter parent 1: protocol ip pref 3 fw handle 0x20 classid 1:32
> filter parent 1: protocol ip pref 3 fw handle 0x80 classid 1:128
> filter parent 1: protocol ip pref 4 fw
> filter parent 1: protocol ip pref 4 fw handle 0x5 classid 1:5
> filter parent 1: protocol ip pref 4 fw handle 0x15 classid 1:21
> filter parent 1: protocol ip pref 6 fw
> filter parent 1: protocol ip pref 6 fw handle 0x4 classid 1:4
> filter parent 1: protocol ip pref 6 fw handle 0x6 classid 1:6
> filter parent 1: protocol ip pref 6 fw handle 0x9 classid 1:9
> filter parent 1: protocol ip pref 7 fw
> filter parent 1: protocol ip pref 7 fw handle 0x2 classid 1:102
> filter parent 1: protocol ip pref 7 fw handle 0x3 classid 1:3
> filter parent 1: protocol ip pref 7 fw handle 0x7 classid 1:7
> filter parent 1: protocol ip pref 7 fw handle 0x8 classid 1:8
> filter parent 1: protocol ip pref 7 fw handle 0xa classid 1:10
> filter parent 1: protocol ip pref 7 fw handle 0xe classid 1:14
> filter parent 1: protocol ip pref 7 fw handle 0x11 classid 1:17
> filter parent 1: protocol ip pref 7 fw handle 0x13 classid 1:19
You're missing arp classification.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: HFSC scheduling and Linux vlans
2009-07-18 6:22 ` Patrick McHardy
@ 2009-07-18 13:56 ` Jorge Dávila
0 siblings, 0 replies; 3+ messages in thread
From: Jorge Dávila @ 2009-07-18 13:56 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter
Thanks for your answer.
Can you provide me, please, an example?
Thanks again,
Jorge Dávila.
2009/7/18 Patrick McHardy <kaber@trash.net>:
> Jorge Dávila wrote:
>> The actual configuration works using HTB scheduling but when I tried
>> apply the HFSC configuration there is no traffic through any
>> interfaces.
>>
>> This is the output
>>
>> tc -s filter show dev eth1; tc -s class show dev eth1
>> filter parent 1: protocol ip pref 1 fw
>> filter parent 1: protocol ip pref 1 fw handle 0x17 classid 1:23
>> filter parent 1: protocol ip pref 1 fw handle 0x30 classid 1:48
>> filter parent 1: protocol ip pref 2 fw
>> filter parent 1: protocol ip pref 2 fw handle 0x10 classid 1:16
>> filter parent 1: protocol ip pref 3 fw
>> filter parent 1: protocol ip pref 3 fw handle 0x20 classid 1:32
>> filter parent 1: protocol ip pref 3 fw handle 0x80 classid 1:128
>> filter parent 1: protocol ip pref 4 fw
>> filter parent 1: protocol ip pref 4 fw handle 0x5 classid 1:5
>> filter parent 1: protocol ip pref 4 fw handle 0x15 classid 1:21
>> filter parent 1: protocol ip pref 6 fw
>> filter parent 1: protocol ip pref 6 fw handle 0x4 classid 1:4
>> filter parent 1: protocol ip pref 6 fw handle 0x6 classid 1:6
>> filter parent 1: protocol ip pref 6 fw handle 0x9 classid 1:9
>> filter parent 1: protocol ip pref 7 fw
>> filter parent 1: protocol ip pref 7 fw handle 0x2 classid 1:102
>> filter parent 1: protocol ip pref 7 fw handle 0x3 classid 1:3
>> filter parent 1: protocol ip pref 7 fw handle 0x7 classid 1:7
>> filter parent 1: protocol ip pref 7 fw handle 0x8 classid 1:8
>> filter parent 1: protocol ip pref 7 fw handle 0xa classid 1:10
>> filter parent 1: protocol ip pref 7 fw handle 0xe classid 1:14
>> filter parent 1: protocol ip pref 7 fw handle 0x11 classid 1:17
>> filter parent 1: protocol ip pref 7 fw handle 0x13 classid 1:19
>
> You're missing arp classification.
>
--
Jorge Isaac Dávila López
+505 8430 5462
jorgedavilalopez@gmail.com
---
Esta tierra es Linux. En las noches calladas puede escucharse a las
máquinas Windows re-iniciándose...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-18 13:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-18 4:38 HFSC scheduling and Linux vlans Jorge Dávila
2009-07-18 6:22 ` Patrick McHardy
2009-07-18 13:56 ` Jorge Dávila
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox