1

I'm using an ISP called Fibertel in Argentina, and I recently upgraded my connection to 30 down/3 up. With this change came a new modem+router: the Motorola SBG 6580.

Before I had something like 1 down/300k up on a cable modem (don't recall brand) and a separate NetGear router.

My speeds are now very fast but now I'm getting a significant amount of data corruption.

Certain apps are fine, like uTorrent, but whenever I download a file via a browser, or do a pull in git or hg, I regularly get checksum errors and have to re-run the task several times before I can download it without corruption. I also get missing images on webpages, etc.

I've read that I should get the ISP to do a line quality test. Unfortunately, for various reasons, that's not possible.

What I was wondering was why all of the sudden I'm getting data corruption? Why can uTorrent download files without corruption while my browser can't? Shouldn't TCP compensate for this?

7
  • 1
    To the downvoter: could you explain? Is this the wrong place to ask this question?
    – cdmckay
    Commented Jul 16, 2013 at 20:02
  • 1
    TBH, by the time the file appears to have been completely downloaded, TCP has already been satisfied that it has all the packets, and has done simple parity checks on them. when the upper layers decode the message, they should inform you if there is an issue, but they may not. I know this seems offtopic, but have you tried a memory scan with MemTest? bad ram would account for what you are seeing. Commented Jul 16, 2013 at 20:29
  • 1
    @FrankThomas: But I don't have any system instability. The only time I have any issues are when I download stuff. Also, it happens on my smartphone too when I update my apps... some of the packages download corrupted and have to be re-downloaded.
    – cdmckay
    Commented Jul 17, 2013 at 1:39
  • 1
    I wasn't the downvoter, but this question is an example of an "X-Y problem". Your problem is with X (corrupted downloads), but you thought Y (OS level error checking for packet loss) might be the solution, so you asked about Y instead of X, and we can't figure out why you're asking us to help you with this Y silliness, when you really should have just asked about X. perlmonks.org/index.pl?node_id=542341
    – Spiff
    Commented Jul 17, 2013 at 2:44
  • 1
    @Spiff: I've updated the question and hopefully removed any of the X-Y-ness.
    – cdmckay
    Commented Jul 17, 2013 at 7:01

2 Answers 2

2

Some network middle-box must be corrupting the application data in the TCP segments yet putting good TCP checksums on them. This is most likely to happen in a NAT gateway or a proxy (like a web proxy or SOCKS proxy), because other classes of boxes (routers, switches, broadband modems, Wi-Fi APs) have no business modifying TCP checksums.

If you have any proxy settings set on your client machine that you don't need, disable them.

Make sure you have up to date firmware on your NAT gateway. Or try plugging your client machine directly into your broadband modem (if your broadband modem isn't also your NAT gateway). If your broadband modem is your NAT, see if you can turn off its NAT feature as a test. You need some way to prove whether or not it's your NAT box that's doing this.

Even if you haven't recently changed your NAT box, it may be that it's buggy, but the bugs don't show under your old broadband speeds; maybe it only screws up under 30mbps load.

5
  • I'm using this modem+router combo: motorola.com/us/consumers/…. If I turn off NAT, will all my machines still be able to access the 'net? Also, do you think I'd have better luck if I got an external router and put the modem on bridge mode?
    – cdmckay
    Commented Jul 17, 2013 at 6:54
  • Also, previously I had a separate modem and router... what do you think is more likely: an issue with the line, or an issue with the new modem?
    – cdmckay
    Commented Jul 17, 2013 at 6:55
  • @cdmckay I suggested turning off NAT as a temporary troubleshooting step. You're right that while you're doing this test, only one machine will be able to get a public IP address and be able to get on the Internet. As I said before, I think the problem is most likely due to a box doing NAT or acting as a proxy. If your modem is also your NAT, then I think it's most likely the NAT feature of your modem.
    – Spiff
    Commented Jul 18, 2013 at 17:39
  • @cdmckay As for whether you'd have better luck with a separate box doing NAT, and making the modem just a bridge: Well, that's yet another way to test if the NAT you've recently been using is the source of the corruption.
    – Spiff
    Commented Jul 18, 2013 at 17:47
  • Ok, so I set my modem to bridged mode and hooked up my old router. The data corruption is still happening, although it (subjectively) seems less frequent.
    – cdmckay
    Commented Jul 20, 2013 at 23:16
1

Your browser should not be giving you checksum errors. Typically with intermittent but not total packet loss, TCP based connects will be slow, or they may timeout. Timeouts will cause your browser or other applications to think that the other side has dropped the connection, or doesn't exist, or can't be found, or similar.

uTorrent is not for "real time" use and is designed to split a file into sections, have multiple transmissions in flight, and be easily stopped and restarted. So while you may not notice any complaints from uTorrent, certainly the speed there isn't as fast as it could be.

TCP should, but you may be hitting the upper limits on your timeouts if your connection is really, really bad. Also, if your link quality is causing your network adapter to believe it is not connected to any media, then that event may be telling other programs to abort what they are doing due to a loss of network interface. Typically this would only be an issue for a wireless connection, though.

You may look into adjusting TCP timeout values, in order to tell your system to wait longer before assuming the other end is dead.

You also want to increase the time your DNS replies take to timeout, as a DNS timeout could be shorter than the TCP timeout and cause websites to fail to load.

If things are really horrible and you absolutely powerless, consider researching and setting up a Linux box in front of your connection, and run squid and a good caching DNS proxy. squid, when properly configured, will cache files you've already downloaded, relieving demand on your Internet connection. Also consider using Firefox with the NoScript add on - not loading Javascript and Flash except where you want it tends to make web browsing a lot less network-demanding.

Finally, you also may want to throttle your uTorrent down so it is not straining your connection as much.

3
  • I think the problem is my connection badness fluctuates... it's fine for like 5 minutes than has 30 seconds of crapness, then fine for 10 minutes, then 30 seconds, etc. I'll try using an alternative DNS to see if that helps, and see if I can increase the timeouts.
    – cdmckay
    Commented Jul 17, 2013 at 1:42
  • 1
    Packet loss and TCP connection timeouts doesn't explain file corruption. What he's seeing would require something to corrupt the packets, yet put good TCP checksums on them.
    – Spiff
    Commented Jul 17, 2013 at 2:38
  • Ahh ... I see that ... Well ... Perhaps you are behind an HTTP proxy that is timing out transfers earlier than you like, or isn't passing through the Content-Length headers properly, leading to the ends of your downloads getting cut off. This may be true especially if anything HTTPS works fine.
    – LawrenceC
    Commented Jul 17, 2013 at 11:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .