There is a bug somewhere, but I'm not sure where. If I
try to do a 'show version' from a perl 5.8 solaris 8
system on a catalyst 4006 switch (version 6.4) the
command hangs and NEVER times out. However, if I do a
'tcpdump -s 1024 -X -n -i hme0 host xxx', I can see the
data coming from the switch, and everything looks
correct. I can run any other command on the switch
without any problems, just not 'show version'.
An example is given below. NOTE: if I run 'show
version\n\n' instead, everything works, however 'show
version\n' does not work.
#!/export/home/xxx/bin/perl -w
use Net::Telnet::Cisco;
$username="xxx";
$password="xxx";
$switch="xxx";
$session = Net::Telnet::Cisco->new(Host => $switch);
$session->login($username, $password);
@cmdOutput = $session->cmd("show version");
printdata(@cmdOutput);
sub printdata {
foreach $line (@_) {
print $line;
}
}