You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <m.z...@t-...> - 2006-01-31 17:27:08
|
Hello,
thanks for help.
Everything is ok.
I have a no name router and i write with the vi in the IOS.pm term len =20=
0 and it works not only for cisco.
Thanks all
Bye Markus
Am 31.01.2006 um 16:41 schrieb Conaway, Aaron:
> DonKiShoot is right.
>
> The pagination problems ( the "--- More ---" showing up ) is solved by =
=20
> the module itself. When you log into the device, the first thing the =20=
> module does is send a "terminal length 0". This solves a lot of =20
> problems in converting pages of output to arrays in Perl.
>
> The method "getConfig()" actually does a "show running-config" and =20
> stores the output in the return variable. The sample script then =20
> takes the output and writes it to a file using the Perl file handling =20=
> functions. It actually doesn't do an FTP or TFTP at all.
>
> Does that answer your question, Markus?
>
> ---------
> Aaron Conaway | Network Architect | Morris DigitalWorks
>
> -----Original Message-----
> From: ntc...@li... =20
> [mailto:ntc...@li...] On Behalf Of =20
> DonKiShoot
> Sent: Tuesday, January 31, 2006 6:15 AM
> To: Markus Zielonka
> Cc: ntc...@li...
> Subject: Re: [Ntci-users] Question Script save config from a Cisco =20
> router
>
> For your "more" problem, when you logged on cisco first use "terminal
> length 0" but i think that it is automatically does in the perl module
> fonctions.
> Next question, i think you want to know if $conn->getConfig(); copy
> running-config or start-up config in the local file $host."-confg" =
????
> I don't know but you can look in the source code of the perl module =20=
> file
> : cisco....ios.pm for knowing if it is the running or startup that is =20=
> get.
> If you want to put on a tftp server, find a function that do it or put =
=20
> a
> command like "copy running-config tftp" on cli.
> If you want to put on a ftp server, use the script below and after put
> your config file on a ftp server with a ftp module fonction.
>
> Hope i help you
> Sorry for my poor englishfrenchamerican language ;)
>
> Markus Zielonka a =E9crit :
>> Hello NG,
>>
>> i have a one question.
>> How is the script to save the config?
>> Normel ist sh run but the problem ist the "more" or copy run or =20
>> start-up
>> config with TFTP or FTP.
>> How it works in the script?
>>
>> 1 use Net::Telnet::Cisco::IOS; # import NTCI
>> 2 $username =3D "username"; # the username to use when =
logging =20
>> in
>> 3 $password =3D "password"; # the matching password
>> 4 @hosts =3D qw( switch1 # an array of hosts to log into
>> router1
>> switch2
>> router2
>> );
>> 5 foreach $host ( @hosts ) { # go through the array one element =
=20
>> at a time
>> 6 my $conn =3D Net::Telnet::Cisco::IOS->new(HOST =3D> $host); =
# =20
>> connect to the host
>> 7 $conn->login( Name =3D> $username, # Log into the =
=20
>> device
>> Password =3D> $password);
>> 8 @output =3D $conn->getConfig(); # Put the config in an =
array
>> 9 $outfile =3D ">" . $host . "-confg"; # create a filename =20=
>> called ">host-confg"
>> 10 open ( OUTFILE, $outfile ); # open a file for =20
>> writing
>> 11 print "Writing $host to file\n"; # write a status =
message
>> 12 print ( OUTFILE @output ); # print the config to =20=
>> file
>> 13 close OUTFILE; # close the file
>> 14 $conn->close; # close the connection =20=
>> to the device
>> 15 }
>>
>> Bye Markus
>>
>>
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc. Do you grep through =20=
>> log files
>> for problems? Stop! Download the new AJAX search engine that makes
>> searching your log files as easy as surfing the web. DOWNLOAD =20
>> SPLUNK!
>> http://sel.as-us.falkag.net/sel?=20
>> cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D121642
>> _______________________________________________
>> Ntci-users mailing list
>> Ntc...@li...
>> https://lists.sourceforge.net/lists/listinfo/ntci-users
>>
>>
>>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log =
=20
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD =
SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=103432&bid#0486&dat=121642
> _______________________________________________
> Ntci-users mailing list
> Ntc...@li...
> https://lists.sourceforge.net/lists/listinfo/ntci-users
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log =
=20
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD =
SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=103432&bid#0486&dat=121642=
> _______________________________________________
> Ntci-users mailing list
> Ntc...@li...
> https://lists.sourceforge.net/lists/listinfo/ntci-users
>
|
|
From: Conaway, A. <aar...@mo...> - 2006-01-31 15:43:45
|
DonKiShoot is right. =20
The pagination problems ( the "--- More ---" showing up ) is solved by =
the module itself. When you log into the device, the first thing the =
module does is send a "terminal length 0". This solves a lot of =
problems in converting pages of output to arrays in Perl.
The method "getConfig()" actually does a "show running-config" and =
stores the output in the return variable. The sample script then takes =
the output and writes it to a file using the Perl file handling =
functions. It actually doesn't do an FTP or TFTP at all.
Does that answer your question, Markus?
---------
Aaron Conaway | Network Architect | Morris DigitalWorks
-----Original Message-----
From: ntc...@li... =
[mailto:ntc...@li...] On Behalf Of DonKiShoot
Sent: Tuesday, January 31, 2006 6:15 AM
To: Markus Zielonka
Cc: ntc...@li...
Subject: Re: [Ntci-users] Question Script save config from a Cisco =
router
For your "more" problem, when you logged on cisco first use "terminal=20
length 0" but i think that it is automatically does in the perl module=20
fonctions.
Next question, i think you want to know if $conn->getConfig(); copy=20
running-config or start-up config in the local file $host."-confg" ????
I don't know but you can look in the source code of the perl module file =
: cisco....ios.pm for knowing if it is the running or startup that is =
get.
If you want to put on a tftp server, find a function that do it or put a =
command like "copy running-config tftp" on cli.
If you want to put on a ftp server, use the script below and after put=20
your config file on a ftp server with a ftp module fonction.
Hope i help you
Sorry for my poor englishfrenchamerican language ;)
Markus Zielonka a =E9crit :
> Hello NG,
>
> i have a one question.
> How is the script to save the config?
> Normel ist sh run but the problem ist the "more" or copy run or =
start-up
> config with TFTP or FTP.
> How it works in the script?
>
> 1 use Net::Telnet::Cisco::IOS; # import NTCI
> 2 $username =3D "username"; # the username to use when =
logging in
> 3 $password =3D "password"; # the matching password
> 4 @hosts =3D qw( switch1 # an array of hosts to log into
> router1
> switch2
> router2
> );
> 5 foreach $host ( @hosts ) { # go through the array one element =
at a time
> 6 my $conn =3D Net::Telnet::Cisco::IOS->new(HOST =3D> $host); =
# connect to the host
> 7 $conn->login( Name =3D> $username, # Log into the =
device
> Password =3D> $password);
> 8 @output =3D $conn->getConfig(); # Put the config in an =
array
> 9 $outfile =3D ">" . $host . "-confg"; # create a filename =
called ">host-confg"
> 10 open ( OUTFILE, $outfile ); # open a file for =
writing
> 11 print "Writing $host to file\n"; # write a status message
> 12 print ( OUTFILE @output ); # print the config to =
file
> 13 close OUTFILE; # close the file
> 14 $conn->close; # close the connection =
to the device
> 15 }
>
> Bye Markus
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log =
files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD =
SPLUNK!
> =
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D=
121642
> _______________________________________________
> Ntci-users mailing list
> Ntc...@li...
> https://lists.sourceforge.net/lists/listinfo/ntci-users
>
>
> =20
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log =
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=103432&bid#0486&dat=121642
_______________________________________________
Ntci-users mailing list
Ntc...@li...
https://lists.sourceforge.net/lists/listinfo/ntci-users
|
|
From: DonKiShoot <don...@wa...> - 2006-01-31 11:14:38
|
For your "more" problem, when you logged on cisco first use "terminal=20
length 0" but i think that it is automatically does in the perl module=20
fonctions.
Next question, i think you want to know if $conn->getConfig(); copy=20
running-config or start-up config in the local file $host."-confg" ????
I don't know but you can look in the source code of the perl module file=20
: cisco....ios.pm for knowing if it is the running or startup that is get.
If you want to put on a tftp server, find a function that do it or put a=20
command like "copy running-config tftp" on cli.
If you want to put on a ftp server, use the script below and after put=20
your config file on a ftp server with a ftp module fonction.
Hope i help you
Sorry for my poor englishfrenchamerican language ;)
Markus Zielonka a =E9crit :
> Hello NG,
>
> i have a one question.
> How is the script to save the config?
> Normel ist sh run but the problem ist the "more" or copy run or start-u=
p
> config with TFTP or FTP.
> How it works in the script?
>
> 1 use Net::Telnet::Cisco::IOS; # import NTCI
> 2 $username =3D "username"; # the username to use when logging=
in
> 3 $password =3D "password"; # the matching password
> 4 @hosts =3D qw( switch1 # an array of hosts to log into
> router1
> switch2
> router2
> );
> 5 foreach $host ( @hosts ) { # go through the array one element a=
t a time
> 6 my $conn =3D Net::Telnet::Cisco::IOS->new(HOST =3D> $host); =
# connect to the host
> 7 $conn->login( Name =3D> $username, # Log into the d=
evice
> Password =3D> $password);
> 8 @output =3D $conn->getConfig(); # Put the config in an array
> 9 $outfile =3D ">" . $host . "-confg"; # create a filename cal=
led ">host-confg"
> 10 open ( OUTFILE, $outfile ); # open a file for writing
> 11 print "Writing $host to file\n"; # write a status message
> 12 print ( OUTFILE @output ); # print the config to fil=
e
> 13 close OUTFILE; # close the file
> 14 $conn->close; # close the connection to=
the device
> 15 }
>
> Bye Markus
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log =
files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=
=3D121642
> _______________________________________________
> Ntci-users mailing list
> Ntc...@li...
> https://lists.sourceforge.net/lists/listinfo/ntci-users
>
>
> =20
|
|
From: Markus Z. <mar...@ya...> - 2006-01-31 09:57:53
|
Hello NG,
i have a one question.
How is the script to save the config?
Normel ist sh run but the problem ist the "more" or copy run or start-up
config with TFTP or FTP.
How it works in the script?
1 use Net::Telnet::Cisco::IOS; # import NTCI
2 $username = "username"; # the username to use when logging in
3 $password = "password"; # the matching password
4 @hosts = qw( switch1 # an array of hosts to log into
router1
switch2
router2
);
5 foreach $host ( @hosts ) { # go through the array one element at a time
6 my $conn = Net::Telnet::Cisco::IOS->new(HOST => $host); # connect to the host
7 $conn->login( Name => $username, # Log into the device
Password => $password);
8 @output = $conn->getConfig(); # Put the config in an array
9 $outfile = ">" . $host . "-confg"; # create a filename called ">host-confg"
10 open ( OUTFILE, $outfile ); # open a file for writing
11 print "Writing $host to file\n"; # write a status message
12 print ( OUTFILE @output ); # print the config to file
13 close OUTFILE; # close the file
14 $conn->close; # close the connection to the device
15 }
Bye Markus
|
|
From: Conaway, A. <aar...@mo...> - 2006-01-18 18:19:23
|
Yes. It supports any username/password authentication pairing. The
routers I use it on devices authenticating with Radius.
my $conn =3D Net::Telnet::Cisco::IOS->( Host =3D> $hostname );
$conn->login( Name =3D> $username, Password =3D> $password );
And yes, it supports the "cmd" method from Net::Telnet::Cisco.
my $result =3D $conn->cmd("show privilege");
or
my @result =3D $conn->cmd("show ip int brief");
---------
Aaron Conaway | Network Architect | Morris DigitalWorks
-----Original Message-----
From: ntc...@li...
[mailto:ntc...@li...] On Behalf Of DonKiShoot
Sent: Wednesday, January 18, 2006 12:32 PM
To: ntc...@li...
Subject: [Ntci-users] (pas de sujet)
Does ntci support tacacs authentification like this : ?
User Access Verification (4.4rc2-2)
Username: toto
Password: toto
Because Net-Telnet-Cisco-1.10 does not :(
And does it permit send command and get result ?
Thanks
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D=
121642
_______________________________________________
Ntci-users mailing list
Ntc...@li...
https://lists.sourceforge.net/lists/listinfo/ntci-users
|
|
From: DonKiShoot <don...@wa...> - 2006-01-18 17:31:47
|
Does ntci support tacacs authentification like this : ? User Access Verification (4.4rc2-2) Username: toto Password: toto Because Net-Telnet-Cisco-1.10 does not :( And does it permit send command and get result ? Thanks |