Skip to contentSkip to conversation

Traffic shaping and MTU/MSS

LARTC Defekt 3 participants 3 messages Nov 24, 2003 – Nov 26, 2003

lore
Share & tools
lore

Defekt

author
#0 lore raw

Hi,

I'm using traffic shaping on my home 1.5M/256K ADSL connection. The problem I'm running into is even when I'm shaping upload traffic (web server/p2p etc...) I run into latency issues with online gaming. This is of course due to the 256Kb upload and the 1492 MTU (PPPoE) which means a single large packet will take up to 40ms to transfer.

What I would like to do is reduce the MSS for low priority traffic using ipchains based on a fwmark value. Is it possible to do this?

Appreciate any other suggestions to solve this problem.

Thanks.

Marc
--

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw

Hi Marc,

Quoted 2 lines

What I would like to do is reduce the MSS for low priority traffic using ipchains based on a fwmark value. Is it possible to do this?

ipchains, or iptables?
you should be able to do it with a single rule with iptables:

iptables -A OUTPUT -p tcp --syn -m mark --mark XX -j TCPMSS --set-mss XXX

although i've never done this myself...

Signature · 11 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Damion de Soto - Software Engineer  email:     [email protected]
SnapGear ---                           ph:         +61 7 3435 2809
  | Custom Embedded Solutions          fax:         +61 7 3891 3630
  | and Security Appliances            web: http://www.snapgear.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ---  Free Embedded Linux Distro at   http://www.snapgear.org  ---

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to Defekt
Quoted 8 lines · Defekt

Hi,

I'm using traffic shaping on my home 1.5M/256K ADSL connection. The problem I'm running into is even when I'm shaping upload traffic (web server/p2p etc...) I run into latency issues with online gaming. This is of course due to the 256Kb upload and the 1492 MTU (PPPoE) which means a single large packet will take up to 40ms to transfer.

Quoted 4 lines

What I would like to do is reduce the MSS for low priority traffic using ipchains based on a fwmark value. Is it possible to do this?

Appreciate any other suggestions to solve this problem.

One thing to consider - assuming things are the same in your country as mine, is that DSL modems are atm devices an send whole 53 byte cells. So MTU = x+1 may send 53 bytes more than MTU = x, so choose carefully. I can't tell you exactly how to see what is right for you as I use pppoa, I think the overhead on pppoe is either 32 or 40 bytes, so you would find an MTU (MSS+40) add say 32 then divide by 48 (as each 53 byte cell carries 48 data) and change MTU until you get a whole number.

If you can get your modem to give you a cell count you could test what the correct pppoe overhead is with ping -s x you could change x until the cell counter varied by 1 between x and x+1. If the overhead is 32 then ping -s 36 should send 2 cells (36 data + 8 ICMP + 20 IP +32 PPP = 96) & 37 three, s = 28 for two cells / 29 for three if it's 40.

Andy.

Andy.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/