I am used to restart my servers on a scheduled basis. Now I want the same for my ADSL router.
This is my reason: When a random failure occurs, I am used to normally try to reboot the servers , interfaces and related equipments (if possible) as the first step before any other troubleshooting (e.g: changing configurations, etc). In fact there are times that this corrects the problem (The service starts working as expected). This may be because when a system is long time up (sometimes, depending on the software and services), it may become unresponsive or faulty. May be the software fails to release some memory, unlock some resources , etc
Now for some services which scheduled down time is acceptable during non-work hours, I schedule the automatic restart. This way, such type of problems appear less frequently. And now if a problem occurs during work-hours, I don't need to restart the whole service, instead I will resume troubleshooting like after I had restarted them.
What we have
This is a Billion 5000 Series router and supports TELNET, HTTP and SNMP for management.
Telnet method (Updated)
This is possible to reboot the router via telnet command:
C:\>telnet 192.168.1.1 Password:******** router>set reboot
So near, just need a script that automatically telnets, pushes password characters and issues the 'set reboot' command. [The approach of using expect suggested by SvenW]
Good to mention that I utilize a software application for monitoring my ADSL connection speed and noise margin via HTTP interface (the software itself, instead of a browser application, connects, logs in unattendedly and reads the values from HTTP interface and display them in a graph!).
I wonder if it is possible to achieve the SysRestart with similar approach (A script that automatically logs in and clicks the SysRestart button!)
The restart page:
The router also has support for SNMP v2 read and write communities. I thought it might be possible to perform it this way.
In fact, by some search I found that some people use SNMP to restart their devices (But I can't find an OID for my router to pass for performing a reset)
For example it appear that those who have one of these devices can reboot them using these OIDs:
'.188.8.131.52.184.108.40.206.220.127.116.11.0', # Allied Telesyn restart '.18.104.22.168.22.214.171.124.126.96.36.199.1.0', # Hewlett-Packard hpicfReset '.188.8.131.52.184.108.40.206.220.127.116.11', # Cisco CatOS sysReset '.18.104.22.168.22.214.171.124.9.9.0', # Cisco IOS tsMsgSend '.126.96.36.199.4.1.5188.8.131.52.0' # Ascend sysReset
Using SNMP walk I could get a list of more than five hundred OIDs such as:
.184.108.40.206.4.1.169220.127.116.11.0 .18.104.22.168.4.1.16922.214.171.124 ...etc (568 more)...
But I have currently no idea how can I pick one among them (specially afraid to test snmp-write on them!).
Some more info
Some other (walked) OID and values that might help:
.126.96.36.199.4.1.169188.8.131.52; Trendchip TC3162 T14F7_3.0 .184.108.40.206.4.1.169220.127.116.11.0; www.huawei.com .18.104.22.168.4.1.16922.214.171.124; Ras Ver:126.96.36.199(UE0.C2C)188.8.131.52 DMT Ver:184.108.40.206
How can you help ?
- Suggesting a way to script a restart via SNMP (Requires finding the OID first!?)
- Suggesting a way to script a restart via HTTP
- Suggesting a way to script a restart via telnet
- Suggesting a way to script a restart (any other ways!)
-  hxxp://vwlowen.co.uk/internet/files.htm
-  hxxp://www.skendric.com/nmgmt/device/Generic/reset-device