FreeBSD 8.0 “Watchdog Timeout” drops ethernet connection

freebsdifconfigwatchdog

Recently my FreeBSD 8.0 (GENERIC) box was hit with a large amount of requests from an IP in Taiwan, trying to guess passwords and all of that stuff. Anyway, long story short, I noticed at a certain point I couldn't ssh into the box. After logging in directly, I noticed a huge number of password guesses, and the message msk0: watchdog timeout. msk0 referring to my wired ethernet connection.

I brought the interface back up with ifconfig msk0 up, and was successfully able to ping the address of that interface. However, when trying to ping my main router, which the box is directly connected to, it hung. Attempting to ping my external IP address returned a whole bunch of sendto: no buffer space available.

The problem was resolved with a reboot, but obviously this isn't the ideal way to go about it. In the case of something like this happening again, what steps should I take to restore connectivity? I've read that sometimes it can be prevented with watchdog -t 0, but I'm not sure I want to go down that avenue.

When it comes to prophylaxis, is there a way to refuse connections from IPs that have a certain number of failed logins for a certain period of time? For example, 15 failed logons would result in refused connections for the next twelve hours?

Best Answer

I don't know about chips that msk0 supports; but I've seen similar problems on a lot of other cards/chips/drivers. 99.9% of the time it's a buggy firmware implementation (usually due cheap manufacturing) not handling the watchdog timer(s) correctly.

Additionally, that's a Marvel chip, and Marvel has not been open source friendly; it could be a problem with the driver itself. Either way the best place to start is the bottom of the Handbook page on Troubleshooting NICs.

I've had my fair share of these sorts of problem; I've found the easiest solution is to switch to more expensive NICs (though you can find older ones on eBay for next to nothing; my first choice for home equipment).

If the troubleshooting doesn't resolve the issue, there's more troubleshooting experts on the FreeBSD forums too.

Related Topic