You probably won't be able to shape traffic with "prio", because it
doesn't limit the bandwidth. Therefore packets will probably be queued
on your router/modem and then get dropped in a random manner. This
queue will also add to you round-trip time.
altq won't be able to count your traffic exactly because of ethernet,
PPPoE and ATM overhead. I use the following quick fix for bw-shaping on
my pppoe connection. You will have to adapt this for your encapsulation
protocols and substract the size of the MAC headers, since you are
already shaping on an ethernet interface.


Index: altq_var.h
===================================================================
RCS file: /cvs/src/sys/altq/altq_var.h,v
retrieving revision 1.17
diff -u -p -r1.17 altq_var.h
--- altq_var.h  7 Oct 2011 17:10:08 -0000       1.17
+++ altq_var.h  10 Nov 2011 11:03:58 -0000
@@ -91,7 +91,12 @@ struct callout {

 typedef void (timeout_t)(void *);

+#if 1
+#define        m_pktlen(m)             ( 53 * (
((((m)->m_pkthdr.len)+18) / 48) \
+                                 + ((((m)->m_pkthdr.len)+18) % 48 ? 1 :
0) ) )
+#else
 #define        m_pktlen(m)             ((m)->m_pkthdr.len)
+#endif

 struct ifnet; struct mbuf;
 struct pf_altq; struct pf_qstats;


On 11/09/11 14:02, Wesley M. wrote:
> Hi,
> 
> I use OpenBSD 5.0, what is better between use "prio" or altq on em0 priq
> bandwidth 200Kb queue {q_def,q_pri}" ?
> I explain : 
> 
> altq on em0 priq bandwidth 200Kb queue {q_def,q_pri}
> queue q_def priority 1
> queue q_pri priority 7 priq(default)
> ....
> pass out on egress inet proto tcp queue(q_def,q_pri)
> ....
> 
> OR
> 
> pass out on egress inet proto tcp prio (1,7)
> 
> What is better, or perhaps, it works on the same way...
> If someone can help on ...
> Thank you very much.
> 
> Wesley

Reply via email to