Hello,

For some reason I cannot get this to work properly... We have a
1Megabyte/sec connection, and I want this box to be capped at up to
200KiloBytes/sec .

However everytime I try, it just always ends up using the entire link.
If I modify it to 1Kb , it ends up using around 80Kilobytes/sec .


# cat /etc/pf.conf
t_externa = "re0"

## Queueing
altq on $t_externa bandwidth 200Kb hfsc queue { bulk, ack }
  queue ack        bandwidth 20% priority 2 qlimit 500 hfsc (realtime 20%)
  queue bulk       bandwidth 80% priority 1 qlimit 500 hfsc (realtime
60% default)

block all
#pass out from self to any
antispoof quick for { lo0 }

pass in quick on $t_externa inet proto tcp from any to ($t_externa) \
    port 22 keep state

pass out quick on $t_externa inet proto { tcp, udp } from ($t_externa) to any \
     port 53 keep state

pass out quick on $t_externa inet proto tcp from ($t_externa) to any \
    port { 80 443 }

########### ICMP
pass inet proto icmp all icmp-type { echoreq, unreach } keep state



This is what systat queues says:

 5 users    Load 0.77 0.53 0.42                      Wed Dec  9 17:59:16 2009

QUEUE                             BW SCH  PRIO     PKTS    BYTES
DROP_P   DROP_B QLEN BORROW SUSPEN     P/S     B/S
root_re0                        200K hfsc    0        0        0
 0        0    0                     0       0
 ack                           40000 hfsc    2        0        0
 0        0    0                     0       0
 bulk                           160K hfsc         27060  1818302
 0        0   62                   373   25006

This is what I can download at:776 KiB/sec using lynx


Iam using OPenBSD 4.6 .



Thanks

Andres

Reply via email to