Solved

MTU: max send and max receive?

Posted on 2007-03-19
7
646 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now