A Linux adventure in Mexico

Print

Tux the Linux penguinI 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:

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:

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.