tags:

views:

464

answers:

4

I have the need to be able to cycle my linksys router via a program, the reason I want to do this is complex, so let's just assume there is no better option.

Is there anyway to do this? I think there is because when I install a firmware update to the router via the admin console, it cycles the router.

+5  A: 

If you can find the function to do that on the router's web interface, you can achieve the same via a suitable HTTP request. Also, you can often telnet to the router and reboot it through its command-line interface. Programmatically you can achieve the same, by using a tool like expect.

Diomidis Spinellis
+1  A: 

If you have access to the local web interface of the router you might be able to access the "reset" function of the router. You can try to call this via a http request, e.g. via wget. But this depends very much on the router. Some routers also support SNMP or a telnet interface.

Another possibility is to plug the router into an ethernet-connected power strip which can be remotely controlled. These power strips usually have a simple http server build in, so you can individually switch on and off the devices that are connected.

akr
+1  A: 

If it's a Linksys WRT54G, I highly recommend DD-WRT. It's an open source firmware replacement, and it has this feature built in for timed restarts. A programmatic restart with an HTTP request should be quite easy as well, as the restart function is available through the admin GUI.

Nerdfest
A: 

Could you please or someone show us how to login via http first without prompting the user in Internet explorer so that we can do the web http parsing and command sending? Thanks

Erx_VB.NExT.Coder