Netmonitor is a project mainly written in Ruby, it's free.
monitor is there's internet connection with ping and power cycle the usb line switch if there isnt
main.rb [check interval] [reconnect sleep] [pinghost] [uls path]
check interval sleep time between ping checks
reconnect sleep when two net check is failed in row, a reconnect is tried, the program will sleep for this ammount before checks the net again after a reconnect, set it to the bootup time of the router
pinghost this host will be used in the ping tests
uls path path to the ULS.exe (usb line switch command line util)