All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] A litlle bit of Theory questions...
@ 2003-05-22 15:56 Osgaldo Suanzes
  2003-05-22 16:39 ` Stef Coene
  0 siblings, 1 reply; 2+ messages in thread
From: Osgaldo Suanzes @ 2003-05-22 15:56 UTC (permalink / raw)
  To: lartc

I have 2 questions.

    1. I have 4 pcs in a lan, every box has assigned some bandwith, with 4
filters that matches the Ip source and send it to the right class.
       If I set up another Class/Filter, that matches WWW-trafic and so
assign bandwidth to www traffic, what happends if
       one Pc starts to Browse websites, which filter has preference? the
one that matches the traffic coming from the Ip?,
        or the one that matches the www-trafic?
        Into which class does the traffic go generated by that Ip?


    2.Is this below Correct?
(Can I redirect 3 different IP matches by the filters to one same class?
or do I have to setup a class for every Ip address Im gonna shape and match
with a filter?


#tc qdisc del dev eth1 root

#tc qdisc add dev eth1 root handle 1: htb

#tc class add dev eth1 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps

#tc class add dev eth1 parent 1:1 classid 1:10 htb rate 25kbps ceil 25kbps
#tc class add dev eth1 parent 1:1 classid 1:11 htb rate 25kbps ceil 25kbps
#tc class add dev eth1 parent 1:1 classid 1:12 htb rate 50kbps ceil 50kbps

#tc filter add dev eth1 protocol ip parent 1:1 prio 1 u32 match ip src
10.3.0.2 flowid 1:10
#tc filter add dev eth1 protocol ip parent 1:1 prio 1 u32 match ip src
10.3.0.3 flowid 1:10
#tc filter add dev eth1 protocol ip parent 1:1 prio 1 u32 match ip src
10.3.0.4 flowid 1:11
#tc filter add dev eth1 protocol ip parent 1:1 prio 1 u32 match ip src
10.3.0.5 flowid 1:12




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

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

* Re: [LARTC] A litlle bit of Theory questions...
  2003-05-22 15:56 [LARTC] A litlle bit of Theory questions Osgaldo Suanzes
@ 2003-05-22 16:39 ` Stef Coene
  0 siblings, 0 replies; 2+ messages in thread
From: Stef Coene @ 2003-05-22 16:39 UTC (permalink / raw)
  To: lartc

On Thursday 22 May 2003 17:56, Osgaldo Suanzes wrote:
> I have 2 questions.
>
>     1. I have 4 pcs in a lan, every box has assigned some bandwith, with 4
> filters that matches the Ip source and send it to the right class.
>        If I set up another Class/Filter, that matches WWW-trafic and so
> assign bandwidth to www traffic, what happends if
>        one Pc starts to Browse websites, which filter has preference? the
> one that matches the traffic coming from the Ip?,
>         or the one that matches the www-trafic?
>         Into which class does the traffic go generated by that Ip?
You can order the filters with the prio parameter, the lowes prio filters will 
be checked first.

>     2.Is this below Correct?
> (Can I redirect 3 different IP matches by the filters to one same class?
> or do I have to setup a class for every Ip address Im gonna shape and match
> with a filter?
You can mutilple filters pointing to the same class.  

> #tc qdisc del dev eth1 root
>
> #tc qdisc add dev eth1 root handle 1: htb
>
> #tc class add dev eth1 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
>
> #tc class add dev eth1 parent 1:1 classid 1:10 htb rate 25kbps ceil 25kbps
> #tc class add dev eth1 parent 1:1 classid 1:11 htb rate 25kbps ceil 25kbps
> #tc class add dev eth1 parent 1:1 classid 1:12 htb rate 50kbps ceil 50kbps
>
> #tc filter add dev eth1 protocol ip parent 1:1 prio 1 u32 match ip src
> 10.3.0.2 flowid 1:10
> #tc filter add dev eth1 protocol ip parent 1:1 prio 1 u32 match ip src
> 10.3.0.3 flowid 1:10
> #tc filter add dev eth1 protocol ip parent 1:1 prio 1 u32 match ip src
> 10.3.0.4 flowid 1:11
> #tc filter add dev eth1 protocol ip parent 1:1 prio 1 u32 match ip src
> 10.3.0.5 flowid 1:12
But you add the filters to 1:1 but there is no filter that puts that traffic 
in that class.  Shouldn't you attach the filters to the root qdisc 1: ??

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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

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

end of thread, other threads:[~2003-05-22 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-22 15:56 [LARTC] A litlle bit of Theory questions Osgaldo Suanzes
2003-05-22 16:39 ` Stef Coene

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.