![Cisco 2948G - Catalyst Switch Скачать руководство пользователя страница 377](http://html.mh-extra.com/html/cisco/2948g-catalyst-switch/2948g-catalyst-switch_configuration-manual_67462377.webp)
24-9
Catalyst 4500 Series, Catalyst 2948G, Catalyst 2980G Switches Software Configuration Guide
—
Release 8.1
78-15486-01
Chapter 24 Configuring SNMP
Configuring SNMPv1 and SNMPv2c from the CLI
Additional- Access-
Community-String Access-Type Number View
-------------------- -------------- ------- -----------------------------------
public1 read-only
public2 read-only 1
private1 read-write 2 1.3.6
secret1 read-write-all 500 1.3.6.1.4.1.9.9
Trap-Rec-Address Trap-Rec-Community Trap-Rec-Port Trap-Rec-Owner Trap-Rec-Index
---------------- ------------------ ------------- -------------- --------------
Console> (enable)
Clearing SNMP Community Strings
You can clear community strings using the clear snmp community-ext command. When you use this
command to clear a community string, corresponding entries in the vacmAccessTable and
vacmSecurityToGroup tables are also removed.
To clear an SNMP community string from the CLI, perform this task in privileged mode:
This example shows how to clear an SNMP community string:
Console> (enable) clear snmp community-ext public1
Community string public1 has been removed
Console> (enable)
Specifying Access Numbers for Hosts
You can specify a list of access numbers that are associated with one or more hosts to limit which hosts
can use a specific community string to access the system. You can specify more than one IP address that
is associated with an access number by separating each IP address with a space. If the new IP address
uses an existing access number, the switch addes the new IP addresses to the list.
To specify an access number for a host from the CLI, perform this task in privileged mode:
These examples show how to specify an access number for a host:
Console> (enable) set snmp access-list 1 172.20.60.100
Access number 1 has been created with new IP Address 172.20.60.100
Console> (enable) set snmp access-list 2 172.20.60.100 mask 255.0.0.0
Access number 2 has been created with new IP Address 172.20.60.100 mask 255.0.0.0
Task
Command
Step 1
Clear an SNMP community string.
clear snmp community-ext community-string
Step 2
Verify the SNMP configuration.
show snmp
Task
Command
Step 1
Specify an access number for a host.
set snmp access-list access_number IP_address
[ipmask maskaddr]
Step 2
Verify the SNMP configuration.
show snmp access-list