aerospacemango Posted April 17, 2012 Posted April 17, 2012 Does anyone have a script for rebooting a router? My problem is that our router keeps dropping out, and it'll do it at the most inopportune moments! What I'm looking for is a way to schedule a script to ping an outside site or two, every few hours, and if they can't be reached, to reboot the router. However, my knowledge of scripting doesn't extend that far, so I was wondering if anyone has something similar that I could adapt, or point me in the direction of something useful. Many thanks! Mango
SYNACK Posted April 17, 2012 Posted April 17, 2012 What kind of config interfaces does it have, telnet, ssh, http?
SYNACK Posted April 17, 2012 Posted April 17, 2012 Telnet Bat file - MSFN Forum VBS for telnet Set cloner = CreateObject("WScript.Shell") cloner.run"cmd" WScript.Sleep 500 cloner.SendKeys"telnet 0.0.0.0" cloner.SendKeys("{Enter}") WScript.Sleep 500 cloner.SendKeys"username here" cloner.SendKeys("{Enter}") WScript.Sleep 500 cloner.SendKeys"password here" cloner.SendKeys("{Enter}") WScript.Sleep 500 cloner.SendKeys"exit" cloner.SendKeys("{Enter}") WScript.Sleep 300 cloner.SendKeys"exit" cloner.SendKeys("{Enter}")
aerospacemango Posted April 17, 2012 Author Posted April 17, 2012 What kind of config interfaces does it have, telnet, ssh, http? It's a DrayTek Vigor2800 with telnet and http. I've managed to find a script for re-booting > Draytek Vigor 2800 reboot script « Duncan Smart's Weblog But don't know how to implement that into a script to test ping a couple of sites, before forcing a reboot of the router, if there's no response.
SYNACK Posted April 17, 2012 Posted April 17, 2012 (edited) VBScript - ping computer before vbscript execution http://customerfx.com/pages/crmdeveloper/2008/05/19/ping-a-remote-server-using-vbscript.aspx Its in vbs but its quite simmilar. Edited April 17, 2012 by SYNACK 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now