Hi all, Suppose I have two IPv6 flows, one's flowlabel is 0 ,the other's is not 0 . Can I make a filter which filte with the flowlabel? -Scottin Beauty is our Business . -----Dijkstra
Scottin
2002-Apr-26 08:16 UTC
Re: [Linux Diffserv] Has TC can act as a filter with IPv6 Flow Label ?
Hi, Thank u for giving me the advice.> Scottin wrote: > > Suppose I have two IPv6 flows, one's flowlabel is 0 ,the other's is > > not 0 . Can I make a filter which filte with the flowlabel? > > Something like this ought to work (completely untested, of course): > > tc filter add dev eth0 parent 1:0 protocol ipv6 prio 1 u32 \ > match u32 0x0 0xfffff at 0 classid 1:1I think it could work.But if I do match on IPv6 Flowlabel ,I think it should be : tc filter add dev eth0 parent 1:0 protocol ipv6 prio 1 u32 \ match u32 0x0 0x000fffff at 0 classid 1:1 for the IPv6 header's first 4 bits is the Version field and following 8 bit is the TC field. What is tcng? I haven't heard about it.> Or you could use tcng, where it then becomes:> > field ipv6_flowlabel = raw[0].nl & 0xfffff; > > prio { > class (1) if ipv6_flowlabel == 0; > } > > You have to tweak the output and change "ip" to "ipv6" in this > case, though, because tcng doesn't really support IPv6 at the > moment. > > - Werner > > -- > _________________________________________________________________________ > / Werner Almesberger, Buenos Aires, Argentina werner@almesberger.net / > /_http://icapeople.epfl.ch/almesber/_____________________________________/ > > _______________________________________________ > Diffserv-general mailing list > Diffserv-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/diffserv-general >-Scottin ____ Beauty is our Business . -----Dijkstra
Scottin
2002-Apr-26 08:43 UTC
Re: [Linux Diffserv] Has TC can act as a filter with IPv6 Flow Label ?
----- Original Message ----- From: "Werner Almesberger" <wa@almesberger.net> To: "Scottin" <scottin1980@hotmail.com> Cc: "lartc" <lartc@mailman.ds9a.nl>; "diffserv-general" <diffserv-general@lists.sourceforge.net> Sent: Friday, April 26, 2002 4:36 PM Subject: Re: [Linux Diffserv] Has TC can act as a filter with IPv6 Flow Label ?> Scottin wrote: > > > tc filter add dev eth0 parent 1:0 protocol ipv6 prio 1 u32 \ > > > match u32 0x0 0xfffff at 0 classid 1:1 > > > > I think it could work.But if I do match on IPv6 Flowlabel ,I think it should be : > > > > tc filter add dev eth0 parent 1:0 protocol ipv6 prio 1 u32 \ > > match u32 0x0 0x000fffff at 0 classid 1:1 > > 0xfffff equals 0x000fffff, lo and behold, even in iproute2/tc :-)Yeah,yeah...My fool :-)> So if this is all you've changed, either version should work. > > > What is tcng? I haven't heard about it. > > tcng ("Traffic Control, Next Generation") is a revision of the > traffic control infrastructure. One of its features is a more > human-friendly configuration language. > > It's at http://tcng.sourceforge.netOk,I will browse it later . I had thought it is a kind of API ;-)> > - Werner > > -- > _________________________________________________________________________ > / Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net / > /_http://icapeople.epfl.ch/almesber/_____________________________________/ >