Command Manual (For Soliton) – Login
H3C S3100 Series Ethernet Switches
Chapter 2 Commands for User Control
2-3
Examples
# Apply ACL 2000 to filter Web users (assuming that ACL 2000 already exists.)
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip http acl 2000
2.1.4 snmp-agent community
Syntax
snmp-agent community
{
read
|
write
}
community-name
[
acl
acl-number
|
mib-view
view-name
]*
undo snmp
-
agent community
community
-
name
View
System view
Parameters
read
: Specifies that the community has read-only permission in the specified view.
write
: Specifies that the community has read/write permission in the specified view.
community-name
: Community name, a string of 1 to 32 characters.
acl acl-number
: Specifies an ACL number for the community. The
acl-number
argument ranges from 2000 to 2999.
mib-view
view-name
: Sets the name of the MIB view accessible to the community. The
view-name
argument is a string of 1 to 32 characters.
Description
Use the
snmp-agent community
command to set a community name and to enable
users to access the switch through SNMP. You can also optionally use this command to
apply an ACL to perform access control for network management users.
Use the
undo snmp-agent community
command to cancel community-related
configuration for the specified community.
By default, SNMPv1 and SNMPv2c access a switch by community names.
Examples
# Set the community name to
h123
, enable users to access the switch in the name of
the community (with read-only permission). Apply ACL 2000 for network management
users (assuming that ACL 2000 already exists.)
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] snmp-agent community read h123 acl 2000