PF + ALTQ + NAT - pri shapingu to pada furt do default queue

Petr H. freebsdcz at gg8.cz
Sun Feb 1 20:07:57 CET 2009


Ahoj,

testuju, zkousim, ale uz nevim, kde muze byt chyba, proto prosim timto o 
radu.

Testuju shaping s PF + ALTQ. Rozhrani jsou 2, em0 do internetu, em1 do 
lan (192.168.2.0/24). Problem je ten, ze to shapuje jakekoliv PC v 
podsiti 192.168.2.0/24 na rychlost 5 Mbit, a ne 20 Kbit.
Zkratka to pada do queue std_in a ne do test_in (viz prilozeny vypis z 
pfctl -vs queue).

Poradite, prosim?

System FreeBSD 7.1 AMD 64 (7.1-STABLE FreeBSD 7.1-STABLE #3)


Jeste prikladam vypisy z pfctl -vs queue a pf.conf.

pfctl -vs queue
queue root_em1 on em1 bandwidth 100Mb priority 0 cbq( wrr root ) 
{std_in, test_in}
  [ pkts:       2990  bytes:    4522524  dropped pkts:      0 
bytes:      0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
queue  std_in on em1 bandwidth 5Mb cbq( default )
  [ pkts:       2990  bytes:    4522524  dropped pkts:      1 bytes:   
1514 ]
  [ qlength:   0/ 50  borrows:      0  suspends:     82 ]
queue  test_in on em1 bandwidth 20Kb
  [ pkts:          0  bytes:          0  dropped pkts:      0 
bytes:      0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]


pf.conf
--
ext_if="em0"
int_if="em1"

set skip on lo

scrub in

altq on em1 cbq queue { std_in, test_in }
queue std_in bandwidth 5Mb cbq(default)
queue test_in bandwidth 20Kb cbq

nat on $ext_if from !($ext_if) -> ($ext_if:0)

pass in on $ext_if proto tcp to ($ext_if) port ssh

pass out on em1 from any to 192.168.2.0/24 queue test_in
--


Diky za kazdou radu.

Petr





More information about the Users-l mailing list