> Hello misc, I'm a bit confusion with understanding such things.
> I have a symmetrical channel to the Internet with 20 Mbits and
> openbsd5.2 as gateway, with NAT.
> Imagine I defined ALTQ on $ext_if and on $int_if.
> Am I right that:
> 1) ALTQ on $ext_if will be applied for upstream channel (i.e. "upload speed"
> from the point of view the client behind the NAT)?
> 2) ALTQ on $int_if will be applied for download channel (i.e. "download 
> speed"
> from the point of view the client behind the NAT)?
> If be much more simple, get for example http://speedtest.net.
> After the test I have two result: download and upload speed.
> Is it true, that if I apply queue for myself in filter rule, it will 
> work both,
> for download and upload in the terms of speedtest.net, but only for
> upstream channel in the terms of ALTQ?
> Or am I totally wrong? Because I read man, faq, ca/REMOVED\org,
> BANDWIDTH MANAGEMENT by Benjamin Heckmann, misc, etc
> and still can't understood how upstream and downstream channel speed
> correlates with ALTQ and upload and download speeds for clients behind NAT.

ext_if=xl0
int_if=fxp0

queues_for_download="small big"
queues_for_upload="how about you go try it first and post a real problem"

altq on $ext_if hfsc bandwidth 20Mb queue { $queues_for_download }
altq on $int_if hfsc bandwidth 20Mb queue { $queues_for_upload }

queue small on $ext_if bandwidth 1Mb hfsc(default ecn)
queue big on $ext_if bandwidth 10Mb hfsc(ecn upperlimit 20Mb)

queue how bandwidth 1Mb hfsc(ecn realtime 2Mb)
queue about bandwidth 5Mb hfsc(default ecn upperlimit (10Mb, 10000, 5Mb))

queue you bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))
queue go bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))
queue try bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))
queue it bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))
queue first bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))
queue and bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))
queue post bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))
queue a bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))
queue real bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))
queue problem bandwidth 64Kb hfsc(ecn upperlimit (1Mb, 3000, 300Kb))

pass out on $ext_if to speedtest.net    queue big
pass out on $int_if from speedtest.net  queue problem


# Hint: it really helps if queues in both directions are the same name,
# if you're, say, shaping multiple customers in both ways.
# Remember, the rules create state, and queueing applies to that state.
# So, if anything matches to queue "big", it'll look for "big" on each
# direction, and appear on the queue it goes out on.
# This way you'll get bi-directional shaping using just one rule.
#
# Remember, never trust anything you didn't test yourself first.
--
Martin Pelikan

Reply via email to