2016-04-09 - Re: [GRASE-Hotspot] Upload speed problem due to mtu?

Header Data

From: David Wilson <da***e@argyle.com.au>
Message Hash: 3d049d348f0abd21c1aa93c835442eb236af2c4fbc723b0fd180b9cef203bcf4
Message ID: <2B6DC6D5-4F9A-44B9-A590-44FDC059DE8E@argyle.com.au>
Reply To: <4be26113-f8ef-4517-9241-3d55ccfb8a8f@grasehotspot.org>
UTC Datetime: 2016-04-09 14:03:39 UTC
Raw Date: Sun, 10 Apr 2016 07:03:39 +1000

Raw message

Hi Ali


MTU issues are normally related to additional overhead created by using protocols on top of Ethernet. 

So If you have a pppoe connection to the internet, for example, then that pppoe protocol will increase the packet size and possibly cause it to fail to traverse the Internet. 

You should test to see what the maximum packet size is that you can send through your internet connection from your Grase server 
You can find this by trial and error 

The best value for MTU is that value just before your packets get fragmented. How do you find that out? By using Ping at the command prompt.

Windows users:
Go to Start/ Programs/ Accessories/ Command Prompt and type the following:
	ping -f -l 1472 www.dslreports.com
(That is a dash lower case "L"  Also note the spaces in between the sections.)

Linux users:
	ping -s 1472 www.dslreports.com

OS X users:
	ping -D -s 1472 www.dslreports.com

Press Enter. Then reduce 1472 by 10 until you no longer get the "packet needs to be fragmented" error message. Then increase by 1 until you are 1 less away from getting the "packet need to be fragmented" message again.  Add 28 more to this (since you specified ping packet size, not including IP/ICMP header of 28 bytes), and this is your MaxMTU.


Then you need to use iptables to implement the mss clamp unless you have another router between your Grase server and the internet in which case you may be able to do the MSS clamping on that router. 
(I always setup this way so I have never used Grase to do the Clamping) 
There are two options below - The first one is automatic and “may not work” as some people have had issues with this.
The second option is based on you finding the correct value above and then adding it to the command in place of the 1500 - Don’t forget to add the 28 to the successful test result above.

In order for this to work you need at least iptables-1.2.1a and Linux 2.4.3 or higher. The basic command line is:

	# iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS  --clamp-mss-to-pmtu
This calculates the proper MSS for your link. If you are feeling brave, or think that you know best, you can also do something like this:

	# iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 1500




Dave 


> On 9 Apr 2016, at 7:46 pm, Ali Farajpahlou <al***u@gmail.com> wrote:
> 
> hey there.
> 
> I've Noticed a problem with uploading files though the hotspot (client side) and after searching in the group and internet, and running some tests with MTU and ping testing with different MTU's (ping packet size), i found out that the problem is with mtu size.
> all interfaces were set to MTU:1500 by default. changing them didn't fix the issue, and after checking and adding header size i still get that the MTU that is being applied to packets is 576.
> 
> if anyone has any idea about this problem, i would appreciate any suggestions. if u want more details about anything... I'm here :)
> 
> many thanx in advance and if my writing has problems, sry for my bad english :)
> 
> -- 
> This mailing list is for the Grase Hotspot Project http://grasehotspot.org <http://grasehotspot.org/>
> --- 
> You received this message because you are subscribed to the Google Groups "Grase Hotspot" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gr***e@grasehotspot.org <mailto:gr***e@grasehotspot.org>.
> To post to this group, send email to gr***t@grasehotspot.org <mailto:gr***t@grasehotspot.org>.
> Visit this group at https://groups.google.com/a/grasehotspot.org/group/grase-hotspot/ <https://groups.google.com/a/grasehotspot.org/group/grase-hotspot/>.
> To view this discussion on the web visit https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/4be26113-f8ef-4517-9241-3d55ccfb8a8f%40grasehotspot.org <https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/4be26113-f8ef-4517-9241-3d55ccfb8a8f%40grasehotspot.org?utm_medium=email&utm_source=footer>.


Thread