On 2015/03/25 12:28, Petr Topiarz wrote:
> Stuart Henderson <sthen <at> openbsd.org> writes:
> 
> > 
> > On 2015/03/25 10:56, Petr Topiarz wrote:
> > > Cannot queue inbound traffic, is that a BUG or PEBCAK?
> > > I am on 5.6 default kernel (tried amd64 and i386 - the same result).
> .
> .
> .
> > Queueing is only done on output. For input, you have already received
> > the packet by the time it hits your machine, it is too late to queue.
> > 
> > Try somethinhg like this (adjust bw as needed).
> > 
> > queue rootq on $ext_if bandwidth 40M, min 40M, max 40M
> > queue http on $ext_if parent rootq bandwidth 6M, min 1M, max 7M 
> > queue std on $ext_if parent rootq bandwidth 1M, min 500K, max 2M default
> > 
> > queue rootq on $int_if bandwidth 40M, min 40M, max 40M
> > queue http on $int_if parent rootq bandwidth 6M, min 1M, max 7M 
> > queue std on $int_if parent rootq bandwidth 1M, min 500K, max 2M default
> > 
> > 
> 
> Thanks for your quick reply, however, the solution did not work. For every
> queue you have to have one default, but once I assigned default to each of
> the queues it took the first as default.

I don't understand what you mean here.

Did you notice that the lines I included all have "on <interface>"?

> Also, you write "Queueing is only done on output." but if you see my
> example, I am doing it on the OUTPUT, I use "pass out". And it should be the
> same if packages come from the internet and are sent to my home net or if
> they come from my home net and are sent to the internet. My openbsd machine
> is always queuing on the OUTput of each interface. 

The direction on the "pass" rule is related to which packets that rule
matches. So a packet comes in and matches a rule and creates a state
table entry. If that rule has a queue specifier, the state entry is
marked with the queue name.

Now when you have any packet matching that state, that queue assignment
is used; if the outbound interface that this packet will be sent over
has a queue with that name, traffic will be queued.



Reply via email to