This script runs on the switch and listens for incoming telnet requests on a port ..... when you telnet to it it gives
a menu of simple commands to run to get data off of the switch. This lets people that you don't want logging into the switch cli the ability to pull certain data from commands that you predefine out of the switch
A good example of this would be sysadmins that need to know what port a host is on and if the port is up or down without giving them a real login to the switch.
The script has the following commands
getdate getmacs, getarp getroutes getinterface
which do the following
getdate-current time as the switch sees it
getmacs-the mac address table on the switch
getroutes-the routing table on the switch
getinterface-the output of show int brief
as well as help to get a list of commands and quit to leave.
user@host:~$ telnet switchip 50000
Connected to 192.168.35.246.
Escape character is '^]'.
Welcome to cmd-server.pl
type help to get a list of commands.
Commands: quit getdate getmacs getarp getroutes
VlanId Mac Address Type Interface State
35 00:0f:23:01:d8:85 Dynamic Gi 0/1 Active
35 00:1f:f3:c8:c5:7a Dynamic Gi 0/1 Active
35 00:1f:f3:cd:74:d8 Dynamic Gi 0/1 Active
35 00:23:32:07:1d:c8 Dynamic Gi 0/1 Active
35 00:23:6c:88:ab:c8 Dynamic Gi 0/1 Active
35 00:26:2d:00:56:0e Dynamic Gi 0/1 Active
35 00:26:c6:82:9e:da Dynamic Gi 0/1 Active
35 00:30:18:a0:9e:e7 Dynamic Gi 0/1 Active
35 00:90:a9:73:61:f9 Dynamic Gi 0/1 Active
35 5c:59:48:30:f8:fa Dynamic Gi 0/1 Active
35 7c:6d:62:d0:89:be Dynamic Gi 0/1 Active
35 f8:1e:df:76:50:b7 Dynamic Gi 0/1 Active