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

Header Data

From: David Wilson <da***e@argyle.com.au>
Message Hash: c2faf0de99e3a88dd909331cdb9d60d43fcbc463c7e769ae6073802772acad6c
Message ID: <47CB3802-43B2-4C8F-AF27-427C8C4436E5@argyle.com.au>
Reply To: <3a7f8609-c787-4b3c-9f59-3b4bc9a2b7de@grasehotspot.org>
UTC Datetime: 2016-04-10 05:40:30 UTC
Raw Date: Sun, 10 Apr 2016 22:40:30 +1000

Raw message

MTU will normally always be 1500 for ethernet devices. 

MSS Clamping is different to the MTU.
Getting an MTU of 576 from the client to the hotspot device is not that important, you need to know what size ping you can get out to somewhere on the internet (www.yahoo.com <http://www.yahoo.com/>) without fragmentation. 

What was the result of running the pings (commands below) from a client on the LAN side of the hotspot?
You can run the same from the firewall lan if you like, but if your issue is with Grase clients then best to do it from the client. 

Then you set the command in IPTables to Clamp all packets to that size. 

The first command probably won’t give you an output but will create a new firewall rule. 
Just make sure you runt that command without the initial # (The # is just a comment delimiter from where those commands came from 


Dave 


> On 10 Apr 2016, at 8:46 pm, Ali Farajpahlou <al***u@gmail.com <mailto:al***u@gmail.com>> wrote:
> 
> 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 <http://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 <http://www.dslreports.com/>
> 
> OS X users:
> 	ping -D -s 1472 www.dslreports.com <http://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 <ali.far...@ <>gmail.com <http://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 grase-hotspo...@ <>grasehotspot.org <http://grasehotspot.org/>.
>> To post to this group, send email to grase-...@ <>grasehotspot.org <http://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>.
> 
> 
> -- 
> 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/3a7f8609-c787-4b3c-9f59-3b4bc9a2b7de%40grasehotspot.org <https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/3a7f8609-c787-4b3c-9f59-3b4bc9a2b7de%40grasehotspot.org?utm_medium=email&utm_source=footer>.


Thread