Networking Forums

Networking Forums > Computer Networking > Linux Networking > MTU size for a 3g mobile broadband dongle

Reply
Thread Tools Display Modes

MTU size for a 3g mobile broadband dongle

 
 
Mark Hobley
Guest
Posts: n/a

 
      09-27-2010, 02:42 PM
My LAN is ethernet based. However, for connectivity to the internet, I have
an Edimax 3g-6200n router, which connects to the internet via a 3g mobile
broadband stick.

Can a 3g mobile broadband stick route the 1500 byte packets arriving from
the LAN without fragmentation, or should I reduce the size of the MTU for
outbound traffic? If so, what should I reduce it to? (My internet service
provider is Three Mobile, if that matters.)

My next question is ...

Will Linux allow me to configure two MTU sizes on a single network interface,
depending on whether or not the destination address is local or remote?

If I need to reduce the MTU for outbound traffic, can I keep using a 1500
byte MTU for LAN traffic?

(The computers have only one ethernet connection onto a single subnet. There
is a single ethernet based router (Netgear) before the Edimax unit, which
forwards internet bound traffic via the Edimax unit).

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

 
Reply With Quote
 
 
 
 
Rick Jones
Guest
Posts: n/a

 
      09-27-2010, 05:31 PM
In comp.protocols.tcp-ip Mark Hobley <(E-Mail Removed)> wrote:
> Will Linux allow me to configure two MTU sizes on a single network
> interface, depending on whether or not the destination address is
> local or remote?


No, but you can manually introduce PMTU routes up in your routing
table to accomplish that task.

rick jones
--
denial, anger, bargaining, depression, acceptance, rebirth...
where do you want to be today?
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a

 
      09-27-2010, 09:03 PM
["Followup-To:" header set to comp.protocols.tcp-ip.]

On Mon, 2010-09-27, Morten Reistad wrote:
> In article <i7qage$ej$(E-Mail Removed)>,
> Mark Hobley <(E-Mail Removed)> wrote:
>>My LAN is ethernet based. However, for connectivity to the internet, I have
>>an Edimax 3g-6200n router, which connects to the internet via a 3g mobile
>>broadband stick.
>>
>>Can a 3g mobile broadband stick route the 1500 byte packets arriving from
>>the LAN without fragmentation, or should I reduce the size of the MTU for
>>outbound traffic? If so, what should I reduce it to? (My internet service
>>provider is Three Mobile, if that matters.)

>
> You expect us to answer this? You are sitting on the network. Fire
> up wireshark, or even tcpdump, and send som max-sized ping packets
> to somewhere, and then you can tell us.


Yeah.

I can add that there's most likely at least one bottleneck: at one
point your packets go over GTP over UDP over IP, on Ethernet.
*Someone* will get hurt if you use 1500-octet packets -- possibly the
operator.

>>My next question is ...
>>
>>Will Linux allow me to configure two MTU sizes on a single network interface,
>>depending on whether or not the destination address is local or remote?
>>
>>If I need to reduce the MTU for outbound traffic, can I keep using a 1500
>>byte MTU for LAN traffic?

>
> No. You can use a setsocopt to set tcp segment sizes on sockets. I would
> like to see this as a sysctl variable. One mtu for all. The linux box
> will ACCEPT bigger muts though.


You've mentioned this several times recently. What about PMTU
discovery -- doesn't that work for you? It seems to work well enough
(or never kick in) for me.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
Andy Furniss
Guest
Posts: n/a

 
      09-28-2010, 02:48 PM
Morten Reistad wrote:

> You expect us to answer this? You are sitting on the network. Fire
> up wireshark, or even tcpdump, and send som max-sized ping packets
> to somewhere, and then you can tell us.


Telling us what the somewhere he pinged has set their mtu to may be a
bit misleading as to the nature of his ISP settings, though.
 
Reply With Quote
 
Andy Furniss
Guest
Posts: n/a

 
      09-28-2010, 03:27 PM
Mark Hobley wrote:
> My LAN is ethernet based. However, for connectivity to the internet, I have
> an Edimax 3g-6200n router, which connects to the internet via a 3g mobile
> broadband stick.
>
> Can a 3g mobile broadband stick route the 1500 byte packets arriving from
> the LAN without fragmentation, or should I reduce the size of the MTU for
> outbound traffic? If so, what should I reduce it to? (My internet service
> provider is Three Mobile, if that matters.)


Don't know, but if it works OK for all sites then I guess so.

That's a bit oversimplistic because I have no idea about 3G devices, eg.
they may be doing some mss clamping that reduces the size of packets in
tcp connections.

Tcpdump/wireshark etc will show this - but don't just rely on looking at
one connection as you may be just seeing how they have set things up
rather than learning about your ISP.

I have seen threads where people claim better results by using smaller
MTU due to smaller packets having more chance of getting through rf
noise type loss, so experimenting if you have problems could improve
things - if you don't have problems I wouldn't bother.


>
> My next question is ...
>
> Will Linux allow me to configure two MTU sizes on a single network interface,
> depending on whether or not the destination address is local or remote?
>
> If I need to reduce the MTU for outbound traffic, can I keep using a 1500
> byte MTU for LAN traffic?


Like Rick has said you can do things with ip route. Another way would be
to use iptables to mss clamp non local tcp connections.

>
> (The computers have only one ethernet connection onto a single subnet. There
> is a single ethernet based router (Netgear) before the Edimax unit, which
> forwards internet bound traffic via the Edimax unit).


A quick test I just did using ip route shows it is possible to just
modify the default route, which I assume is all you would need.

Normally if you set mtu on eth then the tcp advertised mss will also
adjust so that incoming tcp packets are also limited in size. Using ip
route this doesn't happen, but you can use an extra commant to specify.

Testing on this PC which already has a default route setup to
192.168.0.1, the command -

ip route change dev eth0 default via 192.168.0.1 mtu 1000 advmss 960

seems to do the trick and leaves traffic to local net unchanged.



 
Reply With Quote
 
Andy Furniss
Guest
Posts: n/a

 
      09-28-2010, 03:35 PM
Resent - forgot to re-add comp.os.linux.networking
Jorgen Grahn wrote:

> I can add that there's most likely at least one bottleneck: at one
> point your packets go over GTP over UDP over IP, on Ethernet.
> *Someone* will get hurt if you use 1500-octet packets -- possibly the
> operator.


They shouldn't get hurt if they know what they are doing - most recent
ISP type kit should be able to run MTU > 1500 to handle this.

In the UK alot of ISPs use the dominant teleco for transport and they
use L2TP - and explicitly state in the specs that the ISP must run a
higher MTU to allow for this.

> You've mentioned this several times recently. What about PMTU
> discovery -- doesn't that work for you? It seems to work well enough
> (or never kick in) for me.


Does your ISP restrict your inbound to < 1500, though. If it doesn't you
are not likely to have problems.

In the case of pppoe type ISPs the 1492 they (may) run is overcome by
the fact that consumer dsl modem/routers mss clamp TCP avoids PMTUD
black hole faliures.
 
Reply With Quote
 
Rick Jones
Guest
Posts: n/a

 
      09-28-2010, 04:58 PM
In comp.protocols.tcp-ip Andy Furniss <(E-Mail Removed)> wrote:
> Morten Reistad wrote:


> > You expect us to answer this? You are sitting on the network. Fire
> > up wireshark, or even tcpdump, and send som max-sized ping packets
> > to somewhere, and then you can tell us.


> Telling us what the somewhere he pinged has set their mtu to may be
> a bit misleading as to the nature of his ISP settings, though.


True, the reply coming-back fragmented means either the remote, or the
ISP(s) in the middle had a smaller-than-echo-size MTU. However, if
the reply comes-back unfragmented we know that both the remote and
ISP(s) in the middle had an MTU of at least that size.

rick jones
--
firebug n, the idiot who tosses a lit cigarette out his car window
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
 
Reply With Quote
 
Mark Hobley
Guest
Posts: n/a

 
      09-29-2010, 03:00 PM
On Mon, 27 Sep 2010 21:29:04 +0200, Morten Reistad wrote:

> You expect us to answer this? You are sitting on the network. Fire up
> wireshark, or even tcpdump, and send som max-sized ping packets to
> somewhere, and then you can tell us.


What is the simplest way to send a max-sized ping packet? Is there
something I can type at the command line to do this?

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

 
Reply With Quote
 
Andy Furniss
Guest
Posts: n/a

 
      09-29-2010, 04:47 PM
Mark Hobley wrote:
> On Mon, 27 Sep 2010 21:29:04 +0200, Morten Reistad wrote:
>
>> You expect us to answer this? You are sitting on the network. Fire up
>> wireshark, or even tcpdump, and send som max-sized ping packets to
>> somewhere, and then you can tell us.

>
> What is the simplest way to send a max-sized ping packet? Is there
> something I can type at the command line to do this?
>
> Mark.
>


ping -s 1472 will send a 1500 packet (1472 + 8 bytes ICMP header + 20 IP
header)
 
Reply With Quote
 
Mark Hobley
Guest
Posts: n/a

 
      09-29-2010, 05:16 PM
On Wed, 29 Sep 2010 18:16:16 +0200, jack wrote:

> ....
> -s packetsize
> Specifies the number of data bytes to be sent. The default is 56,
> which translates into 64 ICMP data bytes when combined with the 8 bytes
> of ICMP header data.


Right. I didn't realize that ping could carry a payload. Cheers, my results
are as follows:

On a system with PMTUD enabled, the maximum value for the -s switch is 1384:

ping -s 1384 www.yahoo.com
PING any-fp.wa1.b.yahoo.com (67.195.160.76) 1384(1412) bytes of data.
1392 bytes from ir1.fp.vip.ac4.yahoo.com (67.195.160.76): icmp_seq=2 ttl=45 time=305 ms

If I disable PMTUD, I can use a larger maximum value as follows:

echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc

ping www.yahoo.com -s 1472
PING any-fp.wa1.b.yahoo.com (67.195.160.76) 1472(1500) bytes of data.
1480 bytes from ir1.fp.vip.ac4.yahoo.com (67.195.160.76): icmp_seq=1 ttl=45 time=1455 ms

So, am I right in thinking that datagrams bigger than 1412 cannot be carried
without fragmentation, and that I would be better to reduce my MTU to a value of
1412 for externally bound traffic?

Mark.

--
Mark Hobley
Linux User: #370818 http://markhobley.yi.org/

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
T-Mobile PAYG internet dongle Harry Bloomfield Broadband 2 07-16-2011 10:15 AM
3 mobile broadband dongle MB Broadband 0 09-02-2009 08:17 AM
Orange Mobile Boradband Dongle jpd Broadband 3 04-14-2009 05:28 PM
Dongle or mobile handset? David W.E. Roberts Broadband 5 01-30-2009 08:00 AM
Mobile broadband dongle for Linux? David W EEE Roberts Broadband 8 01-06-2009 01:37 PM



1 2 3 4 5 6 7 8 9 10 11