Author image Chris Josephes


Router::LG::Cisco - LG Driver for Cisco Routers


 use Router::LG;
        -hostname => "core.router.isp.node",
        -class => "Cisco",
        -args => {
                -luser => "local_user",
                -ruser => "remote_user",


The Router::LG::Cisco class is a driver class for specific to Cisco Routers. Implementors of should not need to call methods on this class directly, as the module is the primary interface.

This document only serves as an overview of the class. For more information on router drivers, check the Router::LG::Driver documentation.


Router::LG::Cisco uses the RSH protocol to access the remote router. The RSH protocol requires that a connecting client pass a local username, and a remote username, followed by the command to send. The server will then return the output from the execution of the passed command.

The local username is not authenticated in any way, but it needs to be one that the Cisco router is configured to accept. The final program does not need to run as this particular username, nor does it even need to exist on the host running the program.

This module uses IO::Socket to make the connection to the router. No "rsh" command is required on the local host.

Technically, the RSH protocol requires that clients connect from a port in the < 1024 range; however, Cisco equipment does not seem to care.


The following is a recommended setup for a Cisco router to allow RSH access:

 ip rcmd rsh-enable
 ip rcmd remote-host client_user a.b.c.d server_user

Please check your Cisco documentation for more information.


The following commands are defined by default:

     acl*           sh access-list 115
     pre*           sh ip prefix-list UPSTREAM
     bgp*           sh ip bgp %ia
     bgpdp          sh ip bgp dampened-paths
     bgpfs          sh ip bgp flap-statistics
     bgps*          sh ip bgp summary
     env*           sh enviro all
     mrs            sh ip mroute summary
     ping           ping !ih
     traceroute     traceroute !ih
     bgpnar         sh ip bgp neighbors !i advertised-routes

Commands with an asterick are cached whenever possible.

See the Router::LG::Driver documentation for information on the command data format.


Router::LG::Cisco supports only one method of remote access: rsh. It is the default choice if the -method parameter of a router definition is undefined.

The arguements needed for rsh access include a local username and a remote username.


Read the "Routers.txt" file from the Router::LG distribution bundle for more information on the structure of the command variable.