Linkd: Motorola SB4100 Link Daemon
Description
Linkd is a small daemon which will cause the SB4100 to restart when it stops working. Linkd monitors the network rate on a specified interface and when it drops below a given threshold linkd will attempt to ping a given address. If the ping fails, an HTTP POST packet is sent to the SB4100 which is equivalent to pressing the "Restart Cable Modem" button in its web-interface. This will cause the modem to restart and (for me) is sufficient to get traffic flowing over the link again.
For the less pedantic and more practical, contacting your cable company and replacing your cable modem are probably better solutions. My efforts in this respect were somewhat less useful and rather than spending the money out of my own pocket to buy a new cable modem, I wrote this program.
Supported Systems
- Linux 2.4/2.6
Development Status
Works for me. I am planning to add a few more command-switches to ease use of the program and add a startup script to the package. If this program finds an audience, more features could be added...
License
Installing
- Download it
- Change any definitions appropriately in linkd.c using a text editor
- Compile it (e.x.
cc -o linkd linkd.c
) - Run it
- Optionally add it to startup scripts with the -d command line option to continually monitor your network link
Configuration
Almost all of the linkd configuration is done by changing defined macros in the C source file to appropriate values. The purpose of each definition is commented in the source file. Definitions of particular interest are MODEM_IP, PING_ARGS, and possibly NET_RATE_THRESH. At a very minimum, please change the IP in PING_ARGS so that all users of this program won't be pinging the same address to check connectivity. Note that the network rate threshold is non-zero because (at least for my setup) there is a significant number of ARP packets which are delivered when the modem is down.