10.
SNMP Server Configuration
MN700004 Rev 01
83
By default, the engine ID is 00 00 02 DB 03 [
MAC-ADDR
] 00 00, where [
MAC-ADDR
]
represents the switch’s MAC address.
Command Syntax
device-name
(config)#
snmp-server engineID
ENGINE-ID
device-name
(config)#
no snmp-server engineID
Argument Description
ENGINE-ID
A string of 10 to 64 characters (represented internally by 5 to 32 bytes) that
represents the agent’s Engine ID as a hexadecimal number. Use an even number of
characters in the range <0 – 9> and <a – f> (case-insensitive).
Example
The following example shows how to set the agent local
engineID
to 1234567890ABCD:
device-name
(config)#
snmp-server engineID 1234567890ABCD
Enabling the SNMP Server
The
snmp-server enable
command, in Global Configuration mode, enables the SNMP
server. If the UDP port number is specified in the command, the agent will listen for incoming
SNMP messages on this port. Otherwise, it will use the standard SNMP port 161. The
no
form of this command disables the SNMP server.
By default, the SNMP server is disabled.
NOTE
If the SNMP server is disabled it can still be configured from the Command Line Interface,
but it cannot respond to SNMP PDUs and cannot send traps.
Command Syntax
device-name
(config)
#
snmp-server enable
[<
udp-port
>]
device-name
(config)
#
no
snmp-server enable
Argument Description
udp-port
The number of the UDP port on which the SNMP server listens for messages. If the UDP
port is not specified, the SNMP server listens for incoming messages on its default UDP
port – 161. The range is <1-65535>.
Example
The following example shows how to enable the SNMP server on port 1021:
device-name
(config)#
snmp-server enable 1021
Defining SNMP Views
The
snmp-server view
command, in Global Configuration mode, defines the subset of all
MIB objects accessible to the given view. This command includes or excludes a branch of the
MIB tree in a view. The
no
form of the command removes the defined view.