Saturday, July 23, 2005

the magic and evil of the MTU

2 days ago I was trying to share the internet between my two XP machines and something strange happened, I would open and everything was fine, I was even able to do searches on it, but most other pages did not open, I had already seen this before, even on my linux box, when sharing the internet from my XP box, to my Ubuntu box, so I started digging here and there, finally found some articles that described that the problem might be the MTU (maximun transmission unit), so I decided to give that a try and sure enough that fixed the problem
I guess google and some pages somehow break the packages into smaller ones, which cause them to work ok
to find out you MTU, you can just ping any site, specifying the size:
ping -t -l 1500
then, if that doesn't return, decrease the size, and keep doing that until you get a result back

then go ahead on open your registry editor (regedit.exe), navigate to:


(you may have more than one, find the one that matches the address 192.168.something)

if you see a MTU key there, modify it's value, it you don't see it, add it (DWORD), and put the value that you found out from pinging the site, this value however has to be hexadecimal value, so fire out the windows calculator and convert that number to HEX... you know, menu View, Scientific, put the decimal value, then click in Hex

you can find a lot more detail article here:

after you make the changes, reboot your machine and you should be good to go

to change the MTU in Linux, it would be something like:
sudo ifconfig en0 mtu 1400


No comments: