Solved

MTU: max send and max receive?

Posted on 2007-03-19
7
657 Views
Last Modified: 2007-07-23
On linux (rhes4) I am testing different MTU settings.  I am finding my best results when sending packets (acorss wans,etc) when I lower the MTU (to say 1400); however the lower MTU setting on the lan causes problems communicating with devices on the lan that run a default mtu (1500).
Is there a way to specify (max receive) and (max send) seperately? In the ppp world this seemed to be seperated as MTU/MRU ...?  
0
Comment
Question by:medent
  • 3
  • 2
  • 2
7 Comments
 
LVL 20

Expert Comment

by:nedvis
ID: 18751111
You should be able to achieve that goal by creating alias for your network card:
one address for communicating with nodes on your intranet (LAN) and other one
for Internet cloud.

Linux creating or adding new network alias to a network card (NIC):
http://articles.techrepublic.com.com/5100-10877_11-5590748.html
http://www.cyberciti.biz/faq/linux-creating-or-adding-new-network-alias-to-a-network-card-nic/
Then configure MTU separately for either IP addresses:
http://www.debianhelp.co.uk/mtu.htm
http://linux.about.com/od/lna_guide/a/gdelna48.htm

the other work around the throughput /baandwith problem would be port bonding:
http://www.howtoforge.com/nic_bonding
http://www.howtoforge.com/network_bonding_ubuntu_6.10
0
 
LVL 27

Expert Comment

by:Nopius
ID: 18754224
nedvis: impossible with this way, I just tested.
Virtual network alias shares the same MTU as physical NIC.

 medent: probably you will have no luck with your proble. I thought of some kind of internal  'tunnel' but it doesn't solve your problem...
0
 
LVL 20

Expert Comment

by:nedvis
ID: 18754357
Artyom, you're right MTU set to the physical NIC  is the value shared between eth0 as real/physical device and etho:0 as virtual device ( alias).
Whatever is the value for mtu size set with
ip link set eth0:0 mtu xyzw
it does apply to eth0 too.
I was wrong.
Sorry , medent,
sincerely nedvis
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 27

Expert Comment

by:Nopius
ID: 18754613
medent, I found one workaround, that may help you:
iptables --insert OUTPUT --jump TCPMSS --protocol tcp --set-mss 1360

1360 is for 'MRU' 1400. Use MSS=MRU-40.
Read here: http://www.wlug.org.nz/MSS

You may test slightly different iptables with condition for 'SYN' packet only with "--tcp-flags SYN".
OUTPUT chain works only for locally generated packets going out. With SYN set you will restrict receiving side to use supplied MSS for the entire TCP session.

It doesn't work for UDP and ICMP however...
0
 

Author Comment

by:medent
ID: 18772809
We dont have iptables running on the servers in question and I would need ICMP to work fully as well.  I do understand why I cannot easily configure a seperate maximum for receive. I would like to be able to receive 1500 and send 1400.  Thank You
0
 
LVL 27

Accepted Solution

by:
Nopius earned 500 total points
ID: 18786951
> We dont have iptables running on the servers in question and I would need ICMP to work fully as well.
1) iptables doesn't stop ICMP itself.
2) In very rare case ICMP packets exceed 100 bytes, and they are not affected by MTU 1400 or 1500

> I do understand why I cannot easily configure a separate maximum for receive.
You mean you don't understand? Because ethernet is not a point-to-point protocol and you have no means to tell all ethernet neighbors how much MRU do you have. Common bus topology has only MTU=MRU

> I would like to be able to receive 1500 and send 1400.
My workaround is a kind of solution where you can have different send and receive packet size only for TCP sessions.
0
 

Author Comment

by:medent
ID: 19548319
This works and also appears to be the best solution... Thank You.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question