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

QoS with pf and ALTQ



Hi there,

I recently switched to PF and ALTQ from IPF. The only thing I cannot get to work is the Quality of Servie issue. I have actually thought it is alright now, but looking at a normal hardware router of my friend, I believe I did not succeed :-(. This hardware router does the job much better, even without QoS or taffic shaping of any kind.

The only thing I'm trying to accomplish is to make sure real time online game connections do not time out when someone else is using the bandwith for sending a big e-mail etc.

If I do so here with FreeBSD 5.3 / PF / ALTQ packets of the online game go up to a ping of infinite (999). However normal ICMP ping sent from the console only go up to something around 150-200 ms. So the "in-game" packets seem to be much more infected. Without altq ICMP ping goes up to 500, if someone is using the bandwith at the same time. So it is kinda working.

If I do so behind that hardware router without any kind of traffic shaping, the in-game ping only goes up to 150 ms. So queueing seems to be much more effective there.

So, as I am out of ideas, attached you find the interesting part of my config... hopefully someone can explain to me what I'm missing.


Cheers, Jochen
nic_to_lan = "sis0"
dsl_device = "tun0"
lan = "10.0.0.0/8"
boese_netze = "{ 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8, 0.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 192.0.2.0/24, 204.152.64.0/23, 224.0.0.0/3  }"
altq on $dsl_device priq bandwidth 120Kb queue { std_0, high_prio_0, low_prio_0  }
queue std_0 priority 1 priq ( default ecn )
queue high_prio_0 priority 7 priq ( ecn )
queue low_prio_0 priority 0 priq ( ecn )
altq on $karte_zum_lan cbq bandwidth 100Mb queue { std_1, low_speed_in, low_speed_out }
queue std_1 priority 7 cbq ( default ecn )
queue low_speed_out bandwidth 500Kb priority 0 cbq ( ecn )
queue low_speed_in bandwidth 8Kb priority 0 cbq ( ecn )
                                                                                                                
pass out quick on $nic_to_lan from any to 10.0.0.6/32 queue low_speed_out                                                          
pass out quick on $nic_to_lan                                                                                                      
pass in quick on $nic_to_lan from 10.0.0.6/32 to any queue low_speed_in                                                           
pass in quick on $nic_to_lan                                                                                                      
antispoof log quick for $dsl_device                                                                                                        
block out quick on $dsl_device from any to $boese_netze                                                                                
block in quick on $dsl_device from $boese_netze to any                                                                                
pass out quick on $dsl_device inet proto icmp from ($dsl_device) to any keep state queue high_prio_0
pass out quick on $dsl_device proto udp from ($dsl_device) to any port 53 keep state queue high_prio_0
pass out quick on $dsl_device proto {tcp, udp} from ($dsl_device) to any port 27000:28000 keep state queue (high_prio_0, high_prio_0)
pass out quick on $dsl_device from ($dsl_device) to any keep state queue low_prio
pass in quick on $dsl_device inet proto icmp all icmp-type 8 keep state