[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

its confusing me



Hello,

i have some problems realizing this plan:
pf/altq is shaping inbound/outbound traffic between upstream/default-route(fxp0) and customer vlans(fxp1). every vlan is having individually configured bandwidth limitations for all traffic coming in to the vlans and going out from the vlans to the upstream.
to get it now complicated: f.e. vlan1 has a generally bandwidth limit of 1mbit and vlan2 of 10mbit and a host in vlan2 is downloading from a ftp-server in vlan1. now the rate should go down to 1mbit, but this isnt the case with my rules, the queue which is primarily used is the queue on vlan2 with 10mbit, even though both queues are rotationaly hitting.


the rules:
-----------
pass in log-all on vlan1 all keep state queue vlan1
pass out log-all on vlan1 proto {icmp tcp udp} from any to any
pass in log-all on vlan2 all keep state queue vlan2
pass out log-all on vlan2 proto {icmp tcp udp} from any to any
-----------

the queues:
-----------
altq on vlan1 cbq bandwidth 100% queue { vlan1 }
queue vlan1 bandwidth 1Mb  cbq(default,red)
altq on vlan2 cbq bandwidth 100% queue { vlan2 }
queue vlan2 bandwidth 10Mb cbq(default,red)
-----------

the rules that are matching all the time are the keep state rules:
-----------
Jan 23 01:17:28.121478 rule 23/0(match): pass in on vlan2: y.y.y.y.62708 > x.x.x.x.80: . ack 750065 win 32580 <nop,nop,timestamp 29419283[|tcp]> (DF)
Jan 23 01:17:28.121490 rule 19/0(match): pass out on vlan1: y.y.y.y.62708 > x.x.x.x.80: . ack 750065 win 32580 <nop,nop,timestamp 29419283[|tcp]> (DF)
Jan 23 01:17:28.121584 rule 19/0(match): pass in on vlan10: x.x.x.x.80 > y.y.y.y.62708: . 754409:755857(1448) ack 0 win 33304 <nop,nop,timestamp 641841239[|tcp]> (DF)
Jan 23 01:17:28.121595 rule 23/0(match): pass out on vlan11: x.x.x.x.80 > y.y.y.y.62708: . 754409:755857(1448) ack 0 win 33304 <nop,nop,timestamp 641841239[|tcp]> (DF)
-----------


pftop shows me that:
-----------
root_vlan1 100M cbq 0 15099 1004514 0 0 0 0 0 418 28K
vlan1 1M cbq 15099 1004514 0 0 0 0 0 418 28K
root_vlan2 100M cbq 0 21480 32441618 0 0 0 0 0 586 887K
vlan2 10M cbq 21480 32441618 66 99924 1 0 2809 586 887K
-----------



i dont understand why the queue on vlan10 is the only really used queue. i tried to set up the queues on fxp1 instead of on the vlans but with no success, the queueing behavior didnt changed.
maybe someone got some explanation for this and could help to get this working.



best regards,


jesk