cancel
Showing results for 
Search instead for 
Did you mean: 

MTU Tweak help

Firejack
Grafter
Posts: 921
Registered: 26-06-2007

MTU Tweak help

Not looked at tweaking my MTU since I was on 512Kbps but since I'm on 4000Kbps now it seems to be a good time to tweak it again.

My setup is a bit different to normal. I have an ADSL Modem with an Ethernet port that is setup as a passive Bridge. It is connected by Cat5 cable to my Linux box using my eth0 device that I use for external connections to my network. Because I need to use PPPoE to dial from my Linux box I have always used an MTU of 1492 to allow for the PPPoE overhead.

Running some tests on my Linux mchine to find the best MTU I got
Quote
tngc@rhea:~> ping -M do -s 1464 -c 4 www.plus.net
PING portal.plus.net (212.159.8.137) 1464(1492) bytes of data.
1472 bytes from portal.plus.net (212.159.8.137): icmp_seq=1 ttl=249 time=73.7 ms
1472 bytes from portal.plus.net (212.159.8.137): icmp_seq=2 ttl=249 time=68.7 ms
1472 bytes from portal.plus.net (212.159.8.137): icmp_seq=3 ttl=249 time=70.5 ms
1472 bytes from portal.plus.net (212.159.8.137): icmp_seq=4 ttl=249 time=70.2 ms

--- portal.plus.net ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 68.763/70.847/73.794/1.834 ms
Strangely high ping but we'll ignore that for now. 1464 was the largest packet size I could use before fragmentation.

eth1 on my machine connects to a switch that joins my home network together. Running tests from my machine I got;
Quote
C:\Documents and Settings\Andrew>ping -f -l 1426 www.plus.net

Pinging portal.plus.net [212.159.8.137] with 1426 bytes of data:

Reply from 212.159.8.137: bytes=1426 time=70ms TTL=248
Reply from 212.159.8.137: bytes=1426 time=69ms TTL=248
Reply from 212.159.8.137: bytes=1426 time=70ms TTL=248
Reply from 212.159.8.137: bytes=1426 time=68ms TTL=248

Ping statistics for 212.159.8.137:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 68ms, Maximum = 70ms, Average = 69ms

C:\Documents and Settings\Andrew>
1426 was the largest packet I could sent before fragmentation.

First question: Why would I get a lower MTU on my machine to my Linux machine?

Second question: What is my optimal MTU?
Looking at Kitz's site I need to add 28 for the header size of IP + ICMP. So that gives 1454 on my machine and 1492 on my Linux machine.

In my mind I'm thinking I should be setting both to the lowest MTU value, so 1452. However I don't want to slow performance of my LAN because I Stream a lot of media from my Linux machine.
So since I only want my external connection optimized while keeping my LAN's high throughput. Surely I need to set eth0 to 1454 and leave the rest of my network at 1500 with eth1 at 1500 too.
However I realise I can't do this because my Linux machine is acting as a Router and I've always been told MTU on a router cannot be smaller then the machine sending data through it.

Help please!