This document describes the Simple Network Management Protocol (SNMP) protocol and the SNMP commands. It includes the following sections:
SNMP Overview
Displaying the SNMP Prompts
SNMP Commands
SNMP Overview
SNMP is a protocol for monitoring router operating characteristics. Use SNMP with software running on a remote host.
SNMP enables network hosts to read and modify some of the settings of the router's operating characteristics. It allows software running on a remote host to contact the router over a network and get up-to-date information about the router on request. Since SNMP software can access most of the configuration data, you do not have to enter commands at a remote terminal.
SNMP's basic functions include the following:
Collecting information and modifying router operating characteristics on behalf of remote SNMP users.
Sending and receiving SNMP packets via the IP protocol.
Figure 1 Protocol Layers of the SNMP Environment

SNMP Packet Types
SNMP's packet types reflect SNMP's basic functions and types include the following:
GET REQUEST packet. Travels user-to-router. Contains requests by user software for information. Retrieves the exact variable requested.
GET NEXT REQUEST packet. Travels user-to-router. Contains information requests by user software. Retrieves the next alphabetically higher variable.
SET REQUEST packet. Travels user-to-router. Contains requests by user software to modify router operating characteristics.
GET RESPONSE packet. Travels router-to-user. Contains the target router's response to a GET NEXT REQUEST or SET REQUEST packet, sent by the user software.
TRAP MESSAGE packet. Travels router-to-user. Contains unsolicited information from the router and numerically encoded messages, such as An interface on the router went up/down or The router reloaded its software.
At the + prompt enter protocol snmp to display the SNMP> prompt.Config>protocol snmp
SNMP user configuration
SNMP Config>
+protocol snmp
SNMP>
Add [C]
Adds a community name to the list of SNMP communities, adds an address to a community, or assigns a portion of the MIB (subtree) to a community.
Syntax: add
add address
Community name []? public
IP Address [0.0.0.0]? 190.246.12.1
IP Mask [255.255.255.255]?
add community
Community Name []? public
|
Community Name
| Specifies the name of community (up to 32 characters). Characters such as spaces, tabs, or <esc> key sequences are not accepted. |
sub_tree view name MIB Object ID
Adds a portion of the MIB to a view or to create a new view. The default is the entire MIB. Use add sub_tree to manage MIB views. You can add more than one subtree to a view that you define. To create a new MIB view, enter the add sub_tree command with the new view name.
You must assign a view to one or more communities using the set community view command to have it take effect.
Example: add sub_tree
View Name [system-only]?
MIB OID name [1.3.6.1.2.1.1]?
Delete [C]
Use the delete command to delete
a specific address
a community and all of its addresses
a subtree from a view
delete address
Community name []? public
IP Address [0.0.0.0]? 190.246.12.1
delete community
Community name []? public
delete sub_tree
View name []?
disable snmp
disable trap all public
Enable [C]
Enables the SNMP protocol or specified traps on the router.
Syntax: enable
enable snmp
enable trap cold_start community
Exit [C] [M]
Returns to the previous prompt.
Syntax: exit
exit
list all
SNMP is enabled
Trap UDP port: 162
Community Name Access
public Read Only
oxnard Read, Trap
Community Name IP Address IP Mask
public All N/A
oxnard All N/A
Community Name Enabled Traps
public Link Down
oxnard Link Up
Community Name View
public All
oxnard All
list community access
Community Name Access
public Read Only
oxnard Read, Trap
list community address
Community Name IP Address IP Mask
public All N/A
oxnard All N/A
list community traps
Community Name Traps
public Link Down
oxnard Link Up
list community view
Community Name View
public All
oxnard system-only
list views
View Name Sub-Tree
system-only 1.3.6.1.2.1.1
set community access options comm_name
|
read_trap
| Sets read access and trap generation to the named community. |
|
write_read_trap
| Sets write and read trap access to the community specified. |
|
trap_only
| Sets the trap port to the named community. |
community view community name option
Assigns a MIB view to a community.
Example: set community view comm_name options
|
all
| Assigns all supported MIB views to the named community. All is the default. |
|
view
| Assigns a specified MIB view to the named community. |
trap_port UDP port number
Specifies a User Datagram Protocol (UDP_ port number to send traps to the trap port. The default is the standard port number 162.
Example: set trap_port udpport# Statistics [M]
Displays the statistics about the number of defined variables and the size of the MIB. The statistics can change only when the load or hardware configuration changes.
Syntax: statistics
statistics
Number of defined variables = 231
Size of MIB = 14320 bytes