67
Commands for SNMP configuration
1. access
Syntax:
access [read | write] <community> [<IP addr>]
access delete <community> [<IP addr>]
access flush
access list
Description:
The “
read
” and “
write
” options configure a community name that can be used for read-only or
read-write access, respectively. If an IP address is specified, then the community name is valid only
for SNMP requests issued from that IP address. (It should be noted that this can be rather weak
security, since it is possible for the source address of IP packets to be forged.) The same community
name can be configured several times with different IP addresses, to allow access with the same
community name from a number of different machines. The number of access records (community
names paired with optional IP addresses) that can be configured is limited only by available
memory.
The “
delete
” option deletes an access record. The IP address must match exactly; if it is not
specified, only a matching access record that has no IP address will be deleted. The “
flush
”
option deletes all access records. The “
list
” option lists the access records.
Configuration saving saves the access records.
By default, if there are no access records in the
snmpinit
file, no SNMP management is allowed.
Example:
DSL>
snmp access list
access read public
access write password
DSL>
snmp access write xyzzy 192.168.4.73
DSL>
snmp access delete password
DSL>
snmp access list
access read public
access write xyzzy 192.168.4.73
2. config
Syntax:
config [save]
Description:
Displays the configuration (as from “
access list
” and “
trap list
” together), or saves it to
flash memory.
Example:
DSL>
snmp config
access read public
access write xyzzy 192.168.4.73
trap add public 192.168.4.73 162
3. trap
Syntax:
trap add <community> <IP addr> [<port>]
trap delete <community> <IP addr> [<port>]
trap flush
trap list
Description:
Manipulates the list of destinations to which SNMP traps will be sent. The default UDP port to
send traps to is 162, but it may be overridden by specifying
<port>
.
Configuration saving saves the list of trap destinations.
Example:
DSL>
snmp trap flush
DSL>
snmp trap add public 192.168.4.73
DSL>
snmp trap add public 192.168.4.74 999
DSL>
snmp trap list
trap add public 192.168.4.73 162
trap add public 192.168.4.74 999