Friday, December 5th

7.31.04

Traffic shaping issue fixed (Updated)

After chasing down my slow upload issue, I decided to do some serious hunting as to why my upload wasn't what I expected. My conclusion, I didn't properly configure the traffic shaper on my firewall.

My firewall is currently set with a max upload of 300k. I do this so that when people upload a large file from my server, the rest of the network traffic (namely downloading and browsing) won't suffer such a performance hit. While lowering my upload itself doesn't make the difference, controlling the priority of ACK packets does.

ACK (acknowledgement) packets are TCP/IP packets of data that have a flag set within. This flag tells a remote server to continue to send data during a download. If you are uploading at the connection's full speed, then those ACK packets will get delayed, causing the remote server to think that the recieving end is not ready for more data. For those with asymmetrical connections, this can turn a highspeed download into a 56k nightmare.

To correct this, I'm forcing all of my upload traffic into a 300k pipe made on my firewall. That traffic is further separated by being forced into one of two queues. One for high priority traffic, the latter for normal traffic. Each queue has a "weight" also. This weight basically gives a percentage of how long each queue has access to the pipe. A 10 to 1 weight says the high priority queue has 90% greater access than the normal traffic queue.

When I set a rule to check for ACK packets, those packets now have a lower delay in being sent so the remote server will continue to send data for me to download. Simple

As far as the images below...the first one shows what a simultaneous upload and download looks like without shaping. The spikes and dips shows my download ranging from around 300k to 1300k.

With traffic shaping turned on, my upload and download were consistant. That is very desirable and should scale with increases in upload speed.





Posted by danne 12:19 am in networking | 1 person viewing

2 ramblings so far

1. Hi! I'm tinkering with trafficshaping with m0n0wall here now. I'd like to prioritize the traffic for ACK packets, etc. Could you perhaps take a picture of your queues, or maybe type a description on how you have set everything up?

Kind regards, Mathias

on 2.12.05@6:26 pm by Mathias


2. Currently, my ACK packet scheme is this:

- Upload pipe set at 270kbps
- High priority queue set at 10 pointing to my 270k upload pipe
- Normal priority queue set at 5 pointing to my 270k upload pipe

- First rule is for the High Priority Queue matches TCP packets going out the WAN interface, matching a packet length between 0-150, and has the ACK flag set.
- A second rule is for the Normal Priority Queue catches all other traffic.

Make sure your rule order has the High Priority rule set first. You should be good to go!

on 2.13.05@3:27 pm by Danne


name

email - addresses are never displayed

URL - auto linked

add:

comments - comment policy