All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [LARTC] howto spare the "tc filter" - lines with htb
@ 1980-01-03 23:25 Stef Coene
  2002-04-29 14:28 ` Tobias Geiger
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Stef Coene @ 1980-01-03 23:25 UTC (permalink / raw)
  To: lartc

> > As far as I understood Devik, this should look like:
> > tc filter add dev imq1 parent 10:0 protocol ip prio 1 handle 1 fw
>
> output:
> "RTNETLINK answers: Invalid argument"
> i can try this in whatever stage of my script (before iptables, after
> qdiscs and classes, whatever), it's always that "answer" :)
You have to remove the handle parameter.  That parameter = mark, so marking 
with 20 will put the packets in 10:20.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* [LARTC] howto spare the "tc filter" - lines with htb
  1980-01-03 23:25 [LARTC] howto spare the "tc filter" - lines with htb Stef Coene
@ 2002-04-29 14:28 ` Tobias Geiger
  2002-04-29 14:59 ` Patrick McHardy
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Tobias Geiger @ 2002-04-29 14:28 UTC (permalink / raw)
  To: lartc

Hi,

recently Martin explained, how to avoid these "tc filter" lines in our
scripts.
unfortunatly it doesn't work with my setup.
i add a "dummy" tc filter - line:

tc filter add dev imq1 parent 10:0 protocol ip prio 1 handle 1 fw classid 10:10

which of course works, but i have no fwmark "1", but as i thought it's
just a "dummy" -line for tc filter to work, i gues/think that's ok.

further i just set marks with iptables, and generate the right
qdiscs/classes for them:

  ack=0x00100010 # for classid 10:10
 high=0x00100011 #	       10:11
 norm=0x00100012 # and so
  low=0x00100013 # on

but it doesn't work :(

am i missing something?! i gues it's the "not-really-dummy" tc-filter
line ?! :)

thank you very much

Tobias

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

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

* Re: [LARTC] howto spare the "tc filter" - lines with htb
  1980-01-03 23:25 [LARTC] howto spare the "tc filter" - lines with htb Stef Coene
  2002-04-29 14:28 ` Tobias Geiger
@ 2002-04-29 14:59 ` Patrick McHardy
  2002-04-29 15:29 ` Tobias Geiger
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2002-04-29 14:59 UTC (permalink / raw)
  To: lartc

Hi :)

Tobias Geiger wrote:
> Hi,
> 
> recently Martin explained, how to avoid these "tc filter" lines in our
> scripts.
> unfortunatly it doesn't work with my setup.
> i add a "dummy" tc filter - line:
> 
> tc filter add dev imq1 parent 10:0 protocol ip prio 1 handle 1 fw classid 10:10
> 
> which of course works, but i have no fwmark "1", but as i thought it's
> just a "dummy" -line for tc filter to work, i gues/think that's ok.
> 
> further i just set marks with iptables, and generate the right
> qdiscs/classes for them:
> 
>   ack=0x00100010 # for classid 10:10
>  high=0x00100011 #	       10:11
>  norm=0x00100012 # and so
>   low=0x00100013 # on
> 

I guess the problem are the encoded id's, in my opinion they have to be 
calculated like this:

(classid << 16) + leafid
So 10:10 would translate to 655370 decimal or 0xa000a hex.

bye,
patrick

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

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

* Re: [LARTC] howto spare the "tc filter" - lines with htb
  1980-01-03 23:25 [LARTC] howto spare the "tc filter" - lines with htb Stef Coene
  2002-04-29 14:28 ` Tobias Geiger
  2002-04-29 14:59 ` Patrick McHardy
@ 2002-04-29 15:29 ` Tobias Geiger
  2002-04-30  9:33 ` Nils Lichtenfeld
  2002-04-30 10:27 ` Tobias Geiger
  4 siblings, 0 replies; 6+ messages in thread
From: Tobias Geiger @ 2002-04-29 15:29 UTC (permalink / raw)
  To: lartc

On Mon, Apr 29, 2002 at 04:59:33PM +0200, Patrick McHardy wrote:
> Hi :)
> 
> Tobias Geiger wrote:
> >Hi,
> >
> >recently Martin explained, how to avoid these "tc filter" lines in our
> >scripts.
> >unfortunatly it doesn't work with my setup.
> >i add a "dummy" tc filter - line:
> >
> >tc filter add dev imq1 parent 10:0 protocol ip prio 1 handle 1 fw classid 
> >10:10
> >
> >which of course works, but i have no fwmark "1", but as i thought it's
> >just a "dummy" -line for tc filter to work, i gues/think that's ok.
> >
> >further i just set marks with iptables, and generate the right
> >qdiscs/classes for them:
> >
> >  ack=0x00100010 # for classid 10:10
> > high=0x00100011 #	       10:11
> > norm=0x00100012 # and so
> >  low=0x00100013 # on
> >
> 
> I guess the problem are the encoded id's, in my opinion they have to be 
> calculated like this:
> 
> (classid << 16) + leafid
> So 10:10 would translate to 655370 decimal or 0xa000a hex.
> 
> bye,
> patrick
> 

hi patrick :)

hmm. here's a posting from martin:

--------------------------------

	> > You can use only one
	> > tc filter add dev ppp0 parent 1: protocol ip prio 1 handle 1 fw
	> >
	> > and set classid directly in iptables like:
	> > iptables -t mangle -A to-dsl -p tcp --dport 80 -j MARK --set-mark 0x10010
	> > iptables -t mangle -A to-dsl -p tcp --sport 24 -j MARK --set-mark 0x10020
	> >
	> > and so on ..
	> > devik
	> Thx.
	> Even I 'm learning from this list :)
	> But how do you translate xx:xx to HEX ?
	
	handle numbers in tc ARE in hex, so that:
	
	... classid a23f:334d
	
	can be written as --set-mark 0xa23f334d
	devik

--------------------------------------------

but nevertheless i tried to convert the classid's to hex ... no success :(

Greetings

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

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

* Re: [LARTC] howto spare the "tc filter" - lines with htb
  1980-01-03 23:25 [LARTC] howto spare the "tc filter" - lines with htb Stef Coene
                   ` (2 preceding siblings ...)
  2002-04-29 15:29 ` Tobias Geiger
@ 2002-04-30  9:33 ` Nils Lichtenfeld
  2002-04-30 10:27 ` Tobias Geiger
  4 siblings, 0 replies; 6+ messages in thread
From: Nils Lichtenfeld @ 2002-04-30  9:33 UTC (permalink / raw)
  To: lartc

Hello Tobias!

> unfortunatly it doesn't work with my setup.
> i add a "dummy" tc filter - line:
>
> tc filter add dev imq1 parent 10:0 protocol ip prio 1 handle 1 fw classid
10:10

As far as I understood Devik, this should look like:
tc filter add dev imq1 parent 10:0 protocol ip prio 1 handle 1 fw

So no classid term (makes sense, since the classid term is incorporated into
the --mark statement).

Greetings Nils

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

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

* Re: [LARTC] howto spare the "tc filter" - lines with htb
  1980-01-03 23:25 [LARTC] howto spare the "tc filter" - lines with htb Stef Coene
                   ` (3 preceding siblings ...)
  2002-04-30  9:33 ` Nils Lichtenfeld
@ 2002-04-30 10:27 ` Tobias Geiger
  4 siblings, 0 replies; 6+ messages in thread
From: Tobias Geiger @ 2002-04-30 10:27 UTC (permalink / raw)
  To: lartc

On Tue, Apr 30, 2002 at 11:33:12AM +0200, Nils Lichtenfeld wrote:
> Hello Tobias!
> 
Hello Nils,

> > unfortunatly it doesn't work with my setup.
> > i add a "dummy" tc filter - line:
> >
> > tc filter add dev imq1 parent 10:0 protocol ip prio 1 handle 1 fw classid
> 10:10
> 
> As far as I understood Devik, this should look like:
> tc filter add dev imq1 parent 10:0 protocol ip prio 1 handle 1 fw
output:
"RTNETLINK answers: Invalid argument"
i can try this in whatever stage of my script (before iptables, after
qdiscs and classes, whatever), it's always that "answer" :)
> 
> So no classid term (makes sense, since the classid term is incorporated into
> the --mark statement).
yes, i thought so too. that's why i wanted to call it "dummy"-line :)
> 
> Greetings Nils
> 
Greetings Tobias
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

end of thread, other threads:[~2002-04-30 10:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1980-01-03 23:25 [LARTC] howto spare the "tc filter" - lines with htb Stef Coene
2002-04-29 14:28 ` Tobias Geiger
2002-04-29 14:59 ` Patrick McHardy
2002-04-29 15:29 ` Tobias Geiger
2002-04-30  9:33 ` Nils Lichtenfeld
2002-04-30 10:27 ` Tobias Geiger

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.