How to reboot Netgear GS110TP with “hidden” telnet CLI

Introduction

Sometimes you want to reboot a switch that you do not have physical access to. Perhaps you want to automate it. Furthermore, most probably you want to avoid using Netgear's infamous GUIs while still enjoying their very fine hardware. So, with a Netgear GS110TP, how can this be done?

The “hidden” CLI interface on Netgear GS110TP

I found the very nice web page “Hidden” CLI interface on Netgear GS110TP that describes the very useful CLI interface available in the Netgear GS110TP. So, with that at hand, what remains is to figure out what commands are used to trigger a reboot.

Solution

Logged into the CLI, you need to enable the advanced functionality with the command enable. With the factory settings, you will be prompted for password and here you just press enter. Now you can reboot the switch with the reload command. If there are unsaved changes, the switch will prompt you if these should be saved (press n) and then the switch will ask you if you really want to reset the system (of course you do, that was the whole point with typing the reload command); press y. Now the switch reboots.

telnet 192.168.0.14 60000
Trying 192.168.0.14...
Connected to 192.168.0.14.
Escape character is '^]'.

(Broadcom FASTPATH Switching) 
Applying Interface configuration, please wait ...admin
Password:********
(Broadcom FASTPATH Switching) >enable
Password:

(Broadcom FASTPATH Switching) #reload

The system has unsaved changes.
Would you like to save them now? (y/n) n

Configuration Not Saved!
Are you sure you would like to reset the system? (y/n) y


System will now restart!

Automation

In order to automatically do this, you could use the tool Expect. By using the script autoexpect from the Expect toolbox in order to record the telnet session and let autoexpect generate an except script out of it, you do not have to think or read the expect manual too much. That is good. A slightly modified, for increased readability and proper exit, version of that output is available here.