Re: tcng questions ?

Linux Advanced Routing and Traffic Control

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

 



raptor@unacs.bg wrote:
> - Does tcng support HTB ? syntax ? 

Not yet. Someone's working on implementing support for it, so I
hope to have it in the not too distant future.

> - what is the difference between "if" and "on" ?

"on" gives direct access to the filters of Linux traffic control,
while "if" provides a more abstract language.

 I'm reading the docs but can get it right ! 

>   "if" uses bool expressions and "on" is using only "u32", correct ?!

Half of it ;-) "on" supports all filters except u32. "if" uses u32
to do its work.

> what more?

Eventually, I plan to phase out "on". If you look at the documentation,
the elements in "The tcng language" are here to stay, while the ones in
"Under the hood" may change, and the ones in "Historical constructs"
should eventually disappear.

> - how can I tell tcng to use iptables for classifying and what is the
> syntax for it ?

You'll have to use the "fw" classifier. tcng doesn't touch iptables
directly, so you'd have to set up that classification separately.
For static classification, "if" is probably more convenient to use
than a mixture of iptables and tcng.

> if I want all packets that are not classified to be dropped what i have to do, is this correct :
> 
> dev eth0 {
>    class (1) if ....;
>    class (2) if ....;
>    class (3) drop if 1;   
> }

It's either

dev eth0 {
    name_of_qdisc { /* except if that qdisc is prio and your kernel isn't
		       very very recent */
	class (1) if ...;
	class (2) if ...;
	drop if 1;
    }
}

Or, better

dev eth0 {
    egress {
	class (<$c1>) if ...;
	class (<$c2>) if ...;
	drop if 1;

	name_of_qdisc {
	    $c1 = class (1);
	    $c2 = class (1);
	}
    }
}

The second form gives you a better separation of classification
and queuing, and you also don't have to worry about drop not
working (in the case of "prio"). As a disadvantage, the second
form adds an indirection through "dsmark" and "tcindex".

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://icapeople.epfl.ch/almesber/_____________________________________/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
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