GMail 007 & 008 Error Messages and MTU Settings

I had this phenomenon for a few days - I couldn’t send out any mail with the web-interface, my pop mail client won’t connect without crashing (I’m using Evolution Mail). Uploads to my blog, imageshack, GMail attachment or any other web-based upload doesn’t work at all.

Most of the time, the website does not respond at all after clicking the Send/Upload button. GMail has more courtesy, it told me “Oops! Error 007/008 …. “. Lookup at GMail help page suggests that either GMail is down or connection problem. GMail is not down. So must be my connection.

I’m clueless. And for good 3 days, I almost gave up on Linux (again). Then a few things hit my head - DNS and MTU.

(Oh if you don’t know what these two terms means, please look them up, they’re pretty common)

First, I’m guessing the big problem is that the DNS resolving is not done right, after all I configured my connection to request for DNS queries via the router (as in DNS entry points to 192.168.0.1). After looking around for a while, I figured out how to enable local-DNS caching in uBuntu, as well as make use of the TMnet’s DNS servers, DiGi DNS servers and a whole bunch of OpenDNS servers.

The Result? My web browsing is much faster, consecutive visit to the visited websites totally skips the “Looking up www.domain.ext…” part (even after reboot/clear browser cache). For those who’s using slow DSL or dialup (or EDGE/GPRS/3G), I would strongly recommend that you search about local DNS caching tool. It will speed up your browsing, really. There’s a tool called “AnalogX FastCache” (freeware) available for Windows systems solely for this purpose.

However, my initial uploading problem is still there.

So I tried looking up to the second guess - the MTU. To put it short, MTU stands for “Maximum Transmission Unit“, basically the largest chunk of data in one packet that can be sent in one go via the network. Ideally, all connected network devices should have the same MTU values to avoid packet-truncating, and if certain servers are not designed to handle such action, it might cause data corruption (as what is happening in my case).

A quick look at my PC’s MTU setting reveals that it is set at 1500, the maximum value. One thing about Windows NT/2k/XP is that they automatically adjust the MTU settings to met the current connection’s. Thus sparing the users to wonder what’s going on when they can’t surf properly. As far as I know, Linux doesn’t. Bleh.

So I logged onto my housemate’s router’s admin configuration, hoping to change the router’s MTU to meet my system’s. Oh noes! He finally password-protected the router :( (I think he noticed that I’ve been leeching ROFLpwned). Luckily though, he didn’t secure the user login. I find out that the MTU set for the router (to the modem) is 1492.

No wonder” I thought.

I find myself spending a few minutes later Googling info on how to change my PC’s MTU settings. Found it. Set my MTU to 1492 and it doesn’t work. Problem still there. Sigh. Now what?

I did some further reading, searching using keywords like “ubuntu” and “the router’s name” (not literally). Then I stumbled upon one site of a user that had the exact problem, with the exact router, and using Linux, although a different flavor. He suggested that I use the setting of 1452, which worked for him.

I crossed my finger, and modified my MTU to 1452:

$ sudo gedit /etc/network/interfaces

Then I modified the MTU (note that if the ‘MTU 1452′ entry did not exist, you can simply add them. My ethernet card is called eth0:

auto eth0
iface eth0 inet static
address 192.168.0.190
netmask 255.255.255.0
gateway 192.168.0.1
mtu 1452

Save and close the editor. Now I restarted my network interface:

$ sudo ifdown eth0
$sudo ifup eth0

I tried logging into my GMail and started composing mail. Clicked ‘Send’ and.. TADA! Everything now works like a charm!

Update: Few days back my housemate asked me if I’m having problems sending mail and/or attaching files to Yahoo! Mail. Aha! Exactly the same problem that I had. Apparently Windows XP did not adapt to MTU changes very quickly. So I asked him to change the MTU settings in his router to 1452, and everything works as usual. He’s happy, I’m happy :D

3 Comments:

Albert Ng says:

This might explain why I cannot use GMail at my office. I’m not sure if my MTU is at the mercy of the proxy server, though. (Though it’s ironic that as a geek I am DENIED all these cutting edge technologies one way or another; Firefox, GMail, Linux all do not work for me.)

Fird: If you’re on Windows, you can try look for this tool called “Dr. TCP”, since Windows hide their MTU settings somewhere not humanly-friendly


tedbundyjr says:

nicely and well explained. might explain some of my problem. :)


Mate, you are life saver. I had been struggling with this problem for the past 2 days, but your article solved it in 2 minutes. The MTU settings of my router was the issue.The moment i set it to 1452, bingo, everything started working. I am highly obliged, Thank you very much

Fird: I’m glad it helped you as much as it helped me :)


Leave a Reply