All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] tc filter
@ 2003-11-03 13:21 raz
  2003-11-04  5:43 ` Catalin BOIE
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: raz @ 2003-11-03 13:21 UTC (permalink / raw)
  To: lartc

hello
my name is razvan and I'm from Romania

my problem is kinda' stupid but I have tried all the posible ways of
getting things to work an it still seems i'm missing something, maybe you
can help me
problem:
i have a routing server, that is the gateway to the internet for a network
and a file server the same time
so I want to allocate 90Mbit for file sharing and the 10 mbit for internet
trafic where 80.97.88.16/28 would have only 64kbit of downlink and
80.97.88.0/24 the rest.

what I wright is

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: htb default 20 r2q 100

tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit ceil 100mbit
tc class add dev eth0 parent 1: classid 1:2 htb rate 1mbit ceil 10mbit
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 90mbit ceil 90mbit
tc class add dev eth0 parent 1:2 classid 1:20 htb rate 940kbit ceil 1mbit
tc class add dev eth0 parent 1:2 classid 1:21 htb rate 64kbit ceil 128kbit

tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
80.97.88.1 flowid 1:10
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
80.97.85.3 flowid 1:10
tc filter add dev eth0 protocol ip parent 1:2 prio 1 u32 match ip dst
80.97.88.16/28 flowid 1:12


but tc -s -d class show dev eth0 tells me that noting goes throuth 1:21

class htb 1:12 parent 1:2 prio 0 quantum 1000 rate 64Kbit ceil 128Kbit
burst 1680b/8 mpu 0b cburst 1762b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 168099 ctokens: 88149

I appologize for cutting and pasting so much text but I just want to make
the situation as clear as posible for someone that wants to help me

thanks
raz

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] tc filter
  2003-11-03 13:21 [LARTC] tc filter raz
@ 2003-11-04  5:43 ` Catalin BOIE
  2006-08-03 16:06 ` doudouyam
  2006-08-07 15:06 ` Andy Furniss
  2 siblings, 0 replies; 4+ messages in thread
From: Catalin BOIE @ 2003-11-04  5:43 UTC (permalink / raw)
  To: lartc

> what I wright is
>
> tc qdisc del dev eth0 root
> tc qdisc add dev eth0 root handle 1: htb default 20 r2q 100
>
> tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit ceil 100mbit
> tc class add dev eth0 parent 1: classid 1:2 htb rate 1mbit ceil 10mbit
> tc class add dev eth0 parent 1:1 classid 1:10 htb rate 90mbit ceil 90mbit
> tc class add dev eth0 parent 1:2 classid 1:20 htb rate 940kbit ceil 1mbit
> tc class add dev eth0 parent 1:2 classid 1:21 htb rate 64kbit ceil 128kbit
>
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
> 80.97.88.1 flowid 1:10
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src
> 80.97.85.3 flowid 1:10

Replace:
> tc filter add dev eth0 protocol ip parent 1:2 prio 1 u32 match ip dst
> 80.97.88.16/28 flowid 1:12
with:
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst
80.97.88.16/28 flowid 1:21

Note that class 1:12 doesn't exists.

>
>
> but tc -s -d class show dev eth0 tells me that noting goes throuth 1:21
>
> class htb 1:12 parent 1:2 prio 0 quantum 1000 rate 64Kbit ceil 128Kbit
Look, it's 1:12 above!

> burst 1680b/8 mpu 0b cburst 1762b/8 mpu 0b level 0
>  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
>  lended: 0 borrowed: 0 giants: 0
>  tokens: 168099 ctokens: 88149
>
> I appologize for cutting and pasting so much text but I just want to make
> the situation as clear as posible for someone that wants to help me
>
> thanks
> raz
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>

---
Catalin(ux) BOIE
catab@deuroconsult.ro
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LARTC] tc filter
  2003-11-03 13:21 [LARTC] tc filter raz
  2003-11-04  5:43 ` Catalin BOIE
@ 2006-08-03 16:06 ` doudouyam
  2006-08-07 15:06 ` Andy Furniss
  2 siblings, 0 replies; 4+ messages in thread
From: doudouyam @ 2006-08-03 16:06 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 214 bytes --]

Hi,
Is it possible to make a filter with tc which exclude an IP like iptables ??

ex:
iptable -t mangle -A PREROUTING -i eth0 -d ! 192.168.1.222 -j MARK ...

I try the ! with tc but it doesn't work.
Thanks,
doude.

[-- Attachment #1.2: Type: text/html, Size: 358 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LARTC] tc filter
  2003-11-03 13:21 [LARTC] tc filter raz
  2003-11-04  5:43 ` Catalin BOIE
  2006-08-03 16:06 ` doudouyam
@ 2006-08-07 15:06 ` Andy Furniss
  2 siblings, 0 replies; 4+ messages in thread
From: Andy Furniss @ 2006-08-07 15:06 UTC (permalink / raw)
  To: lartc

doudouyam wrote:
> Hi,
> Is it possible to make a filter with tc which exclude an IP like 
> iptables ??
> 
> ex:
> iptable -t mangle -A PREROUTING -i eth0 -d ! 192.168.1.222 -j MARK ...
> 
> I try the ! with tc but it doesn't work.
> Thanks,
> doude.

Not directly, but you can just match the address then follow it with a 
filter that matches everything else.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-07 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-03 13:21 [LARTC] tc filter raz
2003-11-04  5:43 ` Catalin BOIE
2006-08-03 16:06 ` doudouyam
2006-08-07 15:06 ` Andy Furniss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.