2-645
Catalyst 6500 Series Switch Command Reference—Release8.4
OL-6244-01
Chapter2 Catalyst 6500 Series Switch and ROM Monitor Commands set snmp access-list
set snmp access-list
To specify an access list number for a host or group of hosts, use the set snmp access-list command.
set snmp access-list access_number IP_address [ipmask maskaddr]
Syntax Description
Defaults This command has no default settings.
Command Types Switch command.
Command Modes Privileged.
Usage Guidelines If you want to associate multiple IP addresses to the same access list, you must enter one IP address at
a time in the CLI.
If you use an access list number that is already in use, the new IP addresses are appended to the access
list. You can clear one or more IP addresses associated with an access list by entering the clear snmp
access-list command.
The maskaddr variable is in the format xxx.xxx.xxx.xxx.
Examples This example shows how to associate the IP address of a host to access list number 1:
Console> (enable) set snmp access-list 1 172.20.60.100
Host 172.20.60.100 is associated with access number 1.
Console> (enable)
This example shows how to associate multiple IP addresses to access list number 1:
Console> (enable) set snmp access-list 1 10.1.1.1
Console> (enable) set snmp access-list 1 10.1.1.2
Console> (enable) set snmp access-list 1 10.1.1.3
Console> (enable)
This example shows how to associate the IP address and subnet mask of a host to access list number 2:
Console> (enable) set snmp access-list 2 172.20.60.100 ipmask 255.0.0.0
Access nmber 2 has been created with new IP Address 172.20.60.100 mask 255.0.0.0
Console> (enable)
access_number Number that specifies a list of hosts that are pemitted to use a specific
community string; valid values are 1 to 65535.
IP_address IP address that is associated with the access list. See the “Usage Guidelines ”
section for more information.
ipmask maskaddr (Optional) Sets a mask for the IP address. See the “Usage Guidelines”
section for more in information.