On 2013-06-04, Andy <a...@brandwatch.com> wrote:
> So whilst it may seem strange to create state as the packet enters an 
> interface and record a queue name in the state which only works in the 
> opposite (egress) direction (ALTQ can only queue on egress), all 'reply' 
> packets which are part of the connection will get queued as they egress 
> the internal interface.

Just to pick up one point from this, I recommend using the same queue
names on multiple interfaces, it significantly simplifies handling reply
traffic as you don't have to worry about which direction created the
state.

e.g.

altq on bnx0 hfsc bandwidth 1000Kb queue {fast, med, low, bulk} 
  queue fast on bnx0 bandwidth 30% priority 8 qlimit 20 hfsc (realtime 180Kb)
  queue med on bnx0 bandwidth 5% priority 4 qlimit 40 hfsc (realtime (250Kb, 
10000, 90Kb))
  queue low on bnx0 bandwidth 20% priority 2 qlimit 50 hfsc (realtime (200Kb, 
10000, 60Kb) default)
  queue bulk on bnx0 bandwidth  5% priority 1 qlimit 50 hfsc

altq on em1 hfsc bandwidth 2150Kb queue {fast, med, low, bulk} 
  queue fast on em1 bandwidth 30% priority 8 qlimit 50 hfsc (realtime 256Kb)
  queue med on em1 bandwidth 5% priority 4 qlimit 50 hfsc (realtime (200Kb, 
10000, 72Kb))
  queue low on em1 bandwidth 20% priority 2 qlimit 50 hfsc (realtime (200Kb, 
10000, 72Kb) default)
  queue bulk on em1 bandwidth  5% priority 1 qlimit 50 hfsc

altq on bnx1 hfsc bandwidth 80Mb queue {local, internet}
  queue local on vlan3666 bandwidth 1% priority 8 qlimit 50 hfsc (realtime 50Mb 
upperlimit 50Mb)
  queue internet on vlan3666 bandwidth 3Mb priority 8 qlimit 50 hfsc (realtime 
3Mb upperlimit 3Mb) {fast, med, low, bulk} 
  queue   fast on vlan3666 bandwidth 1% priority 8 qlimit 50 hfsc (realtime 
256Kb)
  queue   med on vlan3666 bandwidth 1% priority 4 qlimit 50 hfsc (realtime 
(800Kb, 10000, 256Kb) upperlimit 800Kb)
  queue   low on vlan3666 bandwidth 1% priority 2 qlimit 50 hfsc (realtime 
(500Kb, 10000, 256Kb) upperlimit 500Kb default)
  queue   bulk on vlan3666 bandwidth 1% priority 1 qlimit 50 hfsc

Reply via email to