NAME

Cisco::SNMP::Config - Configuration Interface for Cisco Management

SYNOPSIS

use Cisco::SNMP::Config;

DESCRIPTION

The following methods are for configuration file management. These methods implement the CISCO-CONFIG-COPY-MIB for configuration file management. If these operations fail, the older method in OLD-CISCO-SYS-MIB is tried. All Catalyst OS operations are performed against the CISCO-STACK-MIB.

METHODS

new() - create a new Cisco::SNMP::Config object

my $cm = Cisco::SNMP::Config->new([OPTIONS]);

Create a new Cisco::SNMP::Config object with OPTIONS as optional parameters. See Cisco::SNMP for options.

config_copy() - configuration file management

my $cc = $cm->config_copy([OPTIONS]);

Manage configuration files. Options allow for TFTP upload or download of running-config or startup-config and a copy running-config to startup-config or vice versa. Valid options are:

Option     Description                            Default
------     -----------                            -------
-catos     Catalyst OS boolean flag.  Enable if   0
           device runs Catalyst OS.
-dest      'startup-config', 'running-config'     'startup-config'
           or filename for TFTP server
-family    Address family IPv4/IPv6               [Inherit from new()]
             Valid values for IPv4:
               4, v4, ip4, ipv4, AF_INET (constant)
             Valid values for IPv6:
               6, v6, ip6, ipv6, AF_INET6 (constant)
-password  Password for 'ftp', 'scp', 'sftp'      'cisco'
-protocol  'ftp', 'rcp', 'scp', 'sftp', 'tftp'    'tftp'
-source    'startup-config', 'running-config'     'running-config'
           or filename on TFTP server
-server    Copy server address                    localhost
-timeout   Seconds until timeout for completion   10
           check
-username  Username for 'ftp', 'rcp', 'scp',      'cisco'
           'sftp'

The default behavior with no options is copy running-config startup-config.

NOTE: Use care when performing TFTP upload to startup-config. This MUST be a FULL configuration file as the config file is NOT merged, but instead OVERWRITES the startup-config.

A hostname value for tftp will be resolved to IPv4/v6 based on family. Family is inherited from the value set in new() but can be overriden. Providing a numeric address will also self-determine the IPv4/v6 address.

Allows the following accessors to be called.

ccStartTime() - return config copy start time

$cc->ccStartTime();

Return the start time of the configuration copy operation relative to system uptime.

ccEndTime() - return config copy end time

$cc->ccEndTime();

Return the end time of the configuration copy operation relative to system uptime.

INHERITED METHODS

The following are inherited methods. See Cisco::SNMP for more information.

close
error
session

EXPORT

None by default.

EXAMPLES

This distribution comes with several scripts (installed to the default bin install directory) that not only demonstrate example uses but also provide functional execution.

LICENSE

This software is released under the same terms as Perl itself. If you don't know what that means visit http://perl.com/.

AUTHOR

Copyright (C) Michael Vincent 2015

http://www.VinsWorld.com

All rights reserved