SNMP Agent Commands

This chapter describes the command-line interface (CLI) commands that you can use to manage and monitor the SNMP agent on the Prime Cable Provisioning Device Provisioning
Engine (DPE).

The commands described in this chapter are:

 

Command
Description
CLI Mode
Required Privileges
Login
Enable
PRIV_DPE_
READ
PRIV_DPE_UPDATE
PRIV_
DPE_
SECURITY
PRIV_
DEVICE_READ

snmp-server community

Defines the community string.

 

P

P

P

 

 

no snmp-server community

Clears the specified community string.

 

P

P

P

 

 

snmp-server contact

Sets the system contact.

 

P

P

P

 

 

no snmp-server contact

Clears the specified system contact.

 

P

P

P

 

 

snmp-server host

Sets the SNMP notification recipient host.

 

P

P

P

 

 

no snmp-server host

Clears the SNMP notification recipient host.

 

P

P

P

 

 

snmp-server inform

Sets the notification type to inform.

 

P

P

P

 

 

no snmp-server inform

Sets the notification type to trap.

 

P

P

P

 

 

snmp-server location

Sets system location.

 

P

P

P

 

 

no snmp-server location

Clears system location.

 

P

P

P

 

 

snmp-server reload

Restarts the SNMP processes.

 

P

P

P

 

 

snmp-server start | stop

Starts or stops the SNMP processes.

 

P

P

P

 

 

snmp-server udp-port

Sets the UDP port to which the SNMP agent listens.

 

P

P

P

 

 

no snmp-server udp-port

Sets the configured UDP port to which the SNMP agent listens back to the default port.

 

P

P

P

 

 

snmp-server community

Use the snmp-server community command to define the community string that allows external SNMP managers access to the SNMP agent on the DPE.

After you use this command, run the snmp-server reload command so that the changes take effect. See snmp-server reload.

To delete the specified community string, use the no form of this command. See no snmp-server community.

 
Syntax Description

snmp-server community string [ ro | rw ]

  • string —Identifies the SNMP community.
  • ro —Assigns a read-only community string. Only Get requests (queries) can be performed. The network management system and the managed device must reference the same community string.
  • rw —Assigns a read-write community string. SNMP applications require rw access for Set operations. The rw community string enables write access to vendor ID values.

 
Defaults

The default ro and rw community strings are baccread and baccwrite, respectively. We recommend that you change these values before deploying Prime Cable Provisioning.

Examples

This result occurs when you use the default baccread option for the read-only community string.

bac_dpe# snmp-server community baccread ro
% OK ()
Requires SNMP agent restart "> snmp-server reload"

 

This result occurs when you use the default baccwrite option for the read-write community string.

bac_dpe# snmp-server community baccwrite rw
% OK ()
Requires SNMP agent restart "> snmp-server reload"

no snmp-server community

Use the no snmp-server community command to delete the specified community string that allows access for external SNMP managers to the SNMP agent on the DPE.

After you use this command, run the snmp-server reload command to restart the SNMP agent. See snmp-server reload.

To set up the community access string, see snmp-server community.

 
Syntax Description

no snmp-server community string

string —Identifies the SNMP community.

 
Defaults

No default behavior or values.

Examples

bac_dpe# no snmp-server community test_community
% OK ()
Requires SNMP agent restart "> snmp-server reload"

snmp-server contact

Use the snmp-server contact command to enter a string of characters that identify the system contact (sysContact) as defined in the MIB II.

After you use this command, run the snmp-server reload command to restart the SNMP agent. See snmp-server reload.

To remove the system contact, use the no form of this command. See no snmp-server contact.

 
Syntax Description

snmp-server contact text

text —Identifies the name of the contact responsible for the DPE.

 
Defaults

No default behavior or values.

Examples

bac_dpe# snmp-server contact joe
% OK (Requires SNMP server restart "> snmp-server reload")

no snmp-server contact

Use the no snmp-server contact command to remove the system contact that is responsible for the DPE.

After you use this command, run the snmp-server reload command to restart the SNMP agent. See snmp-server reload.

To enter a string of characters that identify the system contact, use the snmp-server contact command. See snmp-server contact.

 
Syntax Description

No keywords or arguments.

 
Defaults

No default behavior or values.

Examples

bac_dpe# no snmp-server contact
% OK (Requires SNMP server restart "> snmp-server reload")

snmp-server host

Use the snmp-server host command to specify the recipient of all SNMP notifications and to configure the SNMP agent to send traps or informs to multiple hosts.

note.gif

Noteblank.gif You can use multiple instances of this command to specify more than one notification recipient.


After you use this command, run the snmp-server reload command so that the changes take effect. See snmp-server reload.

To remove the specified notification recipient, use the no form of this command. See no snmp-server host.

 
Syntax Description

snmp-server host host-addr notification community community [ udp-port port ]

  • host-addr —Specifies the IP address of the host to which notifications are sent.
  • community —Specifies the community string to use while sending SNMP notifications.
  • port —Identifies the UDP port used to send SNMP notifications. The default port number is 162.

 
Defaults

No default behavior or values.

Examples

bac_dpe# snmp-server host 10.10.10.5 notification community public udp-port 162
% OK ()
Requires SNMP agent restart "> snmp-server reload"

no snmp-server host

Use the no snmp-server host command to remove the specified notification recipient.

After you use this command, run the snmp-server reload command so that the changes take effect. See snmp-server reload.

To specify the recipient of all SNMP notifications, see snmp-server host.

 
Syntax Description

no snmp-server host host-add notification

host-add —Identifies the IP address of the host.

 
Defaults

No default behavior or values.

Examples

bac_dpe# no snmp-server host 10.10.10.5 notification
% OK ()
Requires SNMP agent restart "> snmp-server reload"

snmp-server inform

Use the snmp-server inform command to specify the type of SNMP notification sent from the SNMP agent to the SNMP manager. Use it to send SNMP informs rather than traps, although traps are sent
by default.

After you use this command, run the snmp-server reload command to restart the SNMP agent. See snmp-server reload.

To switch the SNMP notifications back to the default setting of traps, use the no form of this command. See no snmp-server inform.

 
Syntax Description

snmp-server inform [ retries count timeout time ]

  • count —Identifies the number of times an inform can be sent from the SNMP agent to the manager. If the timeout period expires before the configured number of retries is reached, the SNMP server stops sending informs.
  • time —Identifies the length of time (in milliseconds) that the SNMP server continues to send informs. If the maximum number of retries is reached before the timeout expires, the SNMP server stops sending informs.
note.gif

Noteblank.gif Specifying the retry count and the timeout while configuring SNMP informs is optional. If you do not specify any values, the default values are used.


 
Defaults

SNMP notification via informs is by default disabled. If you configure SNMP notification as informs, the default number of retries is 1 and the default timeout is 5000 milliseconds.

Examples

In this example, an SNMP inform will be sent up to a maximum of five times before the retries stop. If the timeout of 500 milliseconds expires before the five retries take place, the inform is not sent again.

bac_dpe# snmp-server inform retries 5 timeout 500
% OK ()
Requires SNMP agent restart "> snmp-server reload"

no snmp-server inform

Use the no snmp-server inform command to switch the SNMP notifications that are sent to the SNMP manager back to the default setting of traps.

After you use this command, run the snmp-server reload command to restart the SNMP agent. See snmp-server reload.

To specify the type of SNMP notification sent, see snmp-server inform.

 
Syntax Description

No keywords or arguments.

 
Defaults

SNMP notification is by default set to traps (not informs).

Examples

bac_dpe# no snmp-server inform
% OK ()
Requires SNMP agent restart "> snmp-server reload"

snmp-server location

Use the snmp-server location command to enter a string of characters that identify the system location (sysLocation) as defined in the MIB II.

After you use this command, run the snmp-server reload command to restart the SNMP agent. See snmp-server reload.

To remove a system location, use the no form of this command. See no snmp-server location.

 
Syntax Description

snmp-server location text

text —Identifies the physical location of the DPE.

 
Defaults

No default behavior or values.

Examples

bac_dpe# snmp-server location st_louis
% OK (Requires SNMP agent restart "> snmp-server reload")

no snmp-server location

Use the no snmp-server location command to remove a system location.

After you use this command, run the snmp-server reload command to restart the SNMP agent. See snmp-server reload.

To enter a string of characters that identify the system location, see snmp-server location.

 
Syntax Description

No keywords or arguments.

 
Defaults

No default behavior or values.

Examples

bac_dpe# no snmp-server location
% OK (Requires SNMP server restart "> snmp-server reload")

snmp-server reload

Use the snmp-server reload command to reload the SNMP agent process on the DPE.

note.gif

Noteblank.gif When the SNMP process is started on the RDU and DPE, a trap containing the system uptime is sent. Prime Cable Provisioning trap notifications, however, are disabled by default. You can enable trap notifications only by setting the corresponding MIB object via SNMP. You cannot enable trap notifications via the CLI or the Admin UI.

This Prime Cable Provisioning release supports only the trap notifications defined in the CISCO-BACC-SERVER-MIB and CISCO-BACC-RDU-MIB files. For more information, see the MIB files in the BPR_HOME/rdu/mibs directory.


 
Syntax Description

No keywords or arguments.

 
Defaults

No default behavior or values.

Examples

bac_dpe# snmp-server reload
Process [snmpAgent] has been restarted.
 
bac_dpe#

snmp-server start | stop

Use the snmp start | stop command to start or stop the SNMP agent process on the DPE.

 
Syntax Description

snmp-server start | stop

  • start —Starts the SNMP agent process on the DPE.
  • stop —Stops the SNMP agent process on the DPE.

 
Defaults

No default behavior or values.

Examples

This result occurs when the SNMP agent process is started.

bac_dpe# snmp-server start
Process [snmpAgent] has been started.
 
bac_dpe#

 

This result occurs when the SNMP agent process is already running.

bac_dpe# snmp-server start
Process [snmpAgent] is already running

 

This result occurs when the SNMP agent process is stopped.

bac_dpe# snmp-server stop
Process [snmpAgent] has been stopped.
 
bac_dpe#

snmp-server udp-port

Use the snmp-server udp-port command to identify the UDP port number on which the SNMP
agent listens.

The DPE requires this command to prevent potential sharing violations between ports that other applications use. The changing of port numbers is used to resolve potential port conflict.

To change the port to which the SNMP agent listens back to the default UDP port number, use the no form of this command. See no snmp-server udp-port.

 
Syntax Description

snmp-server udp-port port

port —Identifies the UDP port to which the SNMP agent listens.

 
Defaults

The default port number of the SNMP agent is 8001.

note.gif

Noteblank.gif To eliminate potential port conflicts with other SNMP agents on the computer, the default port number is different from the standard well-known SMNP agent port.
We recommend that you change the SNMP agent port to the well-known port number 161.


Examples

bac_dpe# snmp-server udp-port 161
% OK ()
Requires SNMP agent restart "> snmp-server reload"

no snmp-server udp-port

Use the no snmp-server udp-port command to change the UDP port to which the SNMP agent listens to the default port (8001).

note.gif

Noteblank.gif Using a port number other than the standard well-known SNMP agent port number of 161 increases the likelihood of potential port conflicts with other SNMP agents running on the same computer.


To specify the UDP port number to which the SNMP agent listens, see snmp-server udp-port.

 
Syntax Description

No keywords or arguments.

 
Defaults

The default port number of the SNMP agent is 8001.

Examples

bac_dpe# no snmp-server udp-port
% OK ()
Requires SNMP agent restart "> snmp-server reload"