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

Header Data

From: Ali Farajpahlou <al***u@gmail.com>
Message Hash: e9c53683b5179323439da67f3fa3960a7c1dbb5d8d425bc0351d6580328639c8
Message ID: <3a7f8609-c787-4b3c-9f59-3b4bc9a2b7de@grasehotspot.org>
Reply To: <2B6DC6D5-4F9A-44B9-A590-44FDC059DE8E@argyle.com.au>
UTC Datetime: 2016-04-10 03:46:53 UTC
Raw Date: Sun, 10 Apr 2016 03:46:53 -0700

Raw message

thank you for your reply suggestions. i already tried pinging with 
different sizes, the problem is the hotspot device i think. the device is 
connected to the internet through a firewall (firewall is the dhcp server 
assigning ip to the wan side of the hotspot device). i tried connecting 
directly to the firewall and there was no issue with uploading and packet 
fragmentation. i have determined an mtu of 576 behind the hotspot device 
(pinging the hotspot device), and i think the probelm is that the device 
needs to fragment the packets, but they contain a DF header i think. so it 
drops them. i cant find where this mtu is set on the device, checking the 
interfaces mtu didnt solve the issue (they were already set at 1500 on 
every interface (yes even the tunnels xD )). havn't checked mss clampings 
but i'm assuming that it's not causing the problem.

the first iptables command didnt output anyresponse. gonna search some more 
myself and see what more info i can find about this.

btw i forgot to mention that im working on the latest Debian release with 
the latest version of grase (stable version not nightly)


again, thanx for your help and suggestions.

On Sunday, April 10, 2016 at 1:33:55 AM UTC+4:30, dave wrote:
>
> 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***.@gmail.com 
> <javascript:>> 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
> --- 
> 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***.@grasehotspot.org <javascript:>.
> To post to this group, send email to gr***.@grasehotspot.org 
> <javascript:>.
> Visit this group at 
> 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