I had been using WiFi connections all over the US and northern Mexico for the previous six weeks, and was looking forward to getting an almost-permanent residence so I would be able to get a reliable connection with DSL or a cable modem.
The house I now live in has a DSL connection, but as any geek knows, things don't always work as expected.
When I connected my laptop running Kubuntu 12.04 to a Telmex DSL connection, things looked OK for the first few minutes. I soon discovered several nasty problems:
- While some web pages displayed OK, some did not, two examples being crooksandliars.com and progressivebloggers.ca. (Interestingly, these sites still displayed with Rekonq.)
- I was unable to upload pictures to the photo gallery on this site.
- I was unable to add or change articles on Wordpress and Joomla sites.
- Incoming email worked fine, but most outgoing email didn't work. And when they didn't work, it was impossible to save them to the IMAP draft folder.
So, how do I fix this? Some Googling indicated that Telmex, Mexico's largest ISP, caps upload traffic. So, I phoned them. Fortunately, they have English-language support.
The support guy debunked the idea of a cap. We went through the settings on the 2wire 4011G modem, and they were all good. He also suggested that I try uploading a picture to a more mainstream site than broughton.ca, such as Google+. I did this, and it worked fine. That was the end of this support call.
There's a Windoze computer on the premises here. It tried using it with the same connection, and everything worked fine. My Linux laptop still worked OK if I connected by tethering to my Android phone, which connects to Movistar. (The way that I got an Android phone that was purchased in Vancouver to work in Mexico will be the subject of a future article.)
Further Googling revealed that Telmex uses the PPPoE protocol, and this protocol uses a Maximum Transmission Unit (MTU) of 1492. So, I changed the MTU to this value, and it had no effect. I also read a suggestion that I connect with a static IP; this didn't have any effect, either.
I made two more calls to Telmex support. We did a complete reset of the DSL modem, among other things, but it basically came down to "we don't support Linux."
So, now I had to resort to tcpdump to actually view that traffic back and forth over the DSL connection. It took a half-hour or so, but I noticed that the largest packets being transmitted were 1440 bytes, and these packets were causing the trouble.
So, I dropped the MTU to 1300, et voila, all the problems went away. I did some trial and error; 1470 was too high, but 1450 worked.
Now, if you're experiencing the same problem that I did, you would probably like to know exactly how to change this MTU value. Here's a quick and dirty explanation:
- Click on your "connection" icon. Depending on how your user interface is set up, this will be near the top right or bottom right of the screen. A window will pop up, and in the lower right corner, there's a thing you can click on that says "manage connections."
- Click it, and another window will pop up. This window should have five tabs. We're interested in the first two, "Wired" and "Wireless". The first line in the "Wired" tab probably says something like "Wired connection 1". Select it, and click "Edit" on the right.
- This will open up yet another window. It will have four tabs. Select the third one, "Ethernet".
- Now you can see the MTU value, and it's probably "Automatic". Change it to 1450 bytes, and click "OK".
- Now you'll probably see the "Configure" window again. Select the "Wireless" tab.
- Find your Telmex connection; it's probably "INFINITUM" followed by four or more hexadecimal digits. Select it, and click "Edit".
- This time, the MTU value will be on the first tab displayed, "Wireless". Change it, click "OK", and you're done.
There's one more thing: if you're living or travelling in Mexico, there's a good chance that you're using a proxy server, a.k.a. Virtual Private Network (VPN). Or, if you're not using one, you want to use one, in order to take advantage of useful sites like Hulu and Pandora. I use Personal VPN, but there are several other quality products out there.
Using a proxy server presents the same problem with packet sizes. To fix it, the proxy server interface probably has a parameter called "mssfix", and you should change it to 1280. If you're using the openvpn package to access the proxy server, you do this by editing the file /etc/openvpn/openvpn.conf.