NAME

SNMP::Info::CiscoConfig - SNMP Interface to Cisco Configuration Files

AUTHOR

Justin Hunter, Eric Miller

SYNOPSIS

    my $ciscoconfig = new SNMP::Info(
                          AutoSpecify => 1,
                          Debug       => 1,
                          DestHost    => 'myswitch',
                          Community   => 'public',
                          Version     => 2
                        )

    or die "Can't connect to DestHost.\n";

    my $class = $ciscoconfig->class();
    print " Using device sub class : $class\n";

DESCRIPTION

SNMP::Info::CiscoConfig is a subclass of SNMP::Info that provides an interface to CISCO-CONFIG-COPY-MIB, CISCO-FLASH-MIB, and OLD-CISCO-SYS-MIB. These MIBs facilitate the writing of configuration files.

Use or create a subclass of SNMP::Info that inherits this one. Do not use directly.

Inherited Classes

    None.

Required MIBs

CISCO-CONFIG-COPY-MIB
CISCO-FLASH-MIB
OLD-CISCO-SYS-MIB

GLOBALS

These are methods that return scalar value from SNMP

$ciscoconfig->old_write_mem()

(writeMem)

$ciscoconfig->old_write_net()

(writeNet)

TABLE METHODS

These are methods that return tables of information in the form of a reference to a hash.

Config Copy Request Table (ccCopyTable)

$ciscoconfig->config_protocol()

(ccCopyProtocol)

$ciscoconfig->config_source_type()

(ccCopySourceFileType)

$ciscoconfig->config_dest_type()

(ccCopyDestFileType)

$ciscoconfig->config_server_addr()

(ccCopyServerAddress)

$ciscoconfig->config_filename()

(ccCopyFileName)

$ciscoconfig->config_username()

(ccCopyUserName)

$ciscoconfig->config_password()

(ccCopyUserPassword)

$ciscoconfig->config_notify_complete()

(ccCopyNotificationOnCompletion)

$ciscoconfig->config_copy_state()

(ccCopyState)

$ciscoconfig->config_copy_start_time()

(ccCopyTimeStarted)

$ciscoconfig->config_copy_complete_time()

(ccCopyTimeCompleted)

$ciscoconfig->config_fail_cause()

(ccCopyFailCause)

$ciscoconfig->config_row_status()

(ccCopyEntryRowStatus)

Flash Copy Table (ciscoFlashCopyTable)

Table of Flash copy operation entries.

$ciscoconfig->flash_copy_cmd()

(ciscoFlashCopyCommand)

$ciscoconfig->flash_copy_protocol()

(ciscoFlashCopyProtocol)

$ciscoconfig->flash_copy_address()

(ciscoFlashCopyServerAddress)

$ciscoconfig->flash_copy_source()

(ciscoFlashCopySourceName)

$ciscoconfig->flash_copy_dest()

(ciscoFlashCopyDestinationName)

$ciscoconfig->flash_copy_row_status()

(ciscoFlashCopyEntryStatus)

SET METHODS

These are methods that provide SNMP set functionality for overridden methods or provide a simpler interface to complex set operations. See "SETTING DATA VIA SNMP" in SNMP::Info for general information on set operations.

$ciscoconfig->copy_run_tftp (tftpserver, tftpfilename )

Store the running configuration on a TFTP server. Equivalent to the CLI commands "copy running-config tftp" or "write net".

This method attempts to use newer "copy running-config tftp" procedure first and then the older "write net" procedure if that fails. The newer procedure is supported Cisco devices with the CISCO-CONFIG-COPY-MIB available, Cisco IOS software release 12.0 or on some devices as early as release 11.2P. The older procedure has been depreciated by Cisco and is utilized only to support devices running older code revisions.

 Example:
 $ciscoconfig->copy_run_tftp('1.2.3.4', 'myconfig')
    or die "Couldn't save config. ",$ciscoconfig->error(1);
$ciscoconfig->copy_run_start()

Copy the running configuration to the start up configuration. Equivalent to the CLI command "copy running-config startup-config" or "write mem".

This method attempts to use newer "copy running-config startup-config" procedure first and then the older "write mem" procedure if that fails. The newer procedure is supported Cisco devices with the CISCO-CONFIG-COPY-MIB available, Cisco IOS software release 12.0 or on some devices as early as release 11.2P. The older procedure has been depreciated by Cisco and is utilized only to support devices running older code revisions.

 Example:
 $ciscoconfig->copy_run_start()
    or die "Couldn't save config. ",$ciscoconfig->error(1);