sub tftp_to_router { #connect a telnet session to the router my $cisco_session=Net::Telnet::Cisco->new(Host=>$router); #Login $cisco_session->login($username,$password); #Enable $cisco_session->enable($password); #ok we are in. Let's do our copy #tftp the file over #NONE OF THESE COMMANDS WORK BECAUSE AT THIS POINT, I AM #CONNECTED TO THE ROUTER, BUT NOT IN ENABLE MODE $cisco_session->cmd('copy tftp slot0'); $cisco_session->cmd('xxx.xxx.xxx.xxx'); $cisco_session->cmd('Source filename'); $cisco_session->cmd('Destination filename'); #Go to the directory on the router containing the startup-config file $cisco_session->cmd('cd slot0:'); #Erase it $cisco_session->cmd('erase startup-config'); #Copy the file we just tftp'd over to the startup-config $cisco_session->cmd('copy source startup-config'); #Copy that file to the slaveslot0: too $cisco_session->cmd('copy source slaveslot0:'); #### $cisco_session->cmd('login\nusername\npassword');