HP 6125G HP 6125G & 6125G/XG Blade Switches Network Management and Mon - Page 87

snmp-agent usm-user { v1 | v2c

Page 87 highlights

Parameters interface-type interface-number: Specifies the interface type and interface number. Description Use snmp-agent trap source to specify the source IP address contained in the traps. Use undo snmp-agent trap source to restore the default. By default, SNMP chooses the IP address of an interface to be the source IP address of the traps. Upon the execution of this command, the system uses the primary IP address of the specified interface as the source IP address of the traps, and the NMS uses this IP address to uniquely identify the agent. Even if the agent sends out traps through different interfaces, the NMS uses this IP address to filter all traps sent from the agent. Before you can configure the IP address of a particular interface as the source IP address of the trap, make sure the interface already exists and that it has a legal IP address. If the configured interface does not exist, the configuration fails. If the specified IP address is illegal, the configuration becomes invalid. When a legal IP address is configured for the interface, the configuration automatically becomes valid. Related commands: snmp-agent target-host and snmp-agent trap enable. Examples # Configure the IP address for the port Vlan-interface1 as the source address for traps. system-view [Sysname] snmp-agent trap source Vlan-interface1 snmp-agent usm-user { v1 | v2c } Syntax snmp-agent usm-user { v1 | v2c } user-name group-name [ acl acl-number | acl ipv6 ipv6-acl-number ] * View undo snmp-agent usm-user { v1 | v2c } user-name group-name System view Default level 3: Manage level Parameters v1: Specifies SNMPv1. v2c: Specifies SNMPv2. user-name: Specifies the username, a case-sensitive string of 1 to 32 characters. group-name: Specifies the group name, a case-sensitive string of 1 to 32 characters. acl acl-number: Specifies a basic ACL to filter NMSs by source IPv4 address. The acl-number argument represents a basic ACL number in the range of 2000 to 2999. Only the NMSs with the IPv4 addresses permitted in the ACL can use the specified username (community name) to access the SNMP agent. acl ipv6 ipv6-acl-number: Specifies a basic ACL to filter NMSs by source IPv6 address. The ipv6-acl-number argument represents a basic ACL number in the range of 2000 to 2999. Only the NMSs 81

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196

81
Parameters
interface-type interface-number
: Specifies the interface type and interface number.
Description
Use
snmp-agent trap source
to specify the source IP address contained in the traps.
Use
undo snmp-agent trap source
to restore the default.
By default, SNMP chooses the IP address of an interface to be the source IP address of the traps.
Upon the execution of this command, the system uses the primary IP address of the specified interface as
the source IP address of the traps, and the NMS uses this IP address to uniquely identify the agent. Even
if the agent sends out traps through different interfaces, the NMS uses this IP address to filter all traps sent
from the agent.
Before you can configure the IP address of a particular interface as the source IP address of the trap,
make sure the interface already exists and that it has a legal IP address. If the configured interface does
not exist, the configuration fails. If the specified IP address is illegal, the configuration becomes invalid.
When a legal IP address is configured for the interface, the configuration automatically becomes valid.
Related commands:
snmp-agent target-host
and
snmp-agent trap enable
.
Examples
# Configure the IP address for the port Vlan-interface1 as the source address for traps.
<Sysname> system-view
[Sysname] snmp-agent trap source Vlan-interface1
snmp-agent usm-user { v1 | v2c }
Syntax
snmp-agent usm-user
{
v1
|
v2c
}
user-name
group-name
[
acl
acl-number
|
acl ipv6
ipv6-acl-number
]
*
undo snmp-agent usm-user
{
v1
|
v2c
}
user-name
group-name
View
System view
Default level
3: Manage level
Parameters
v1
: Specifies SNMPv1.
v2c
: Specifies SNMPv2.
user-name
: Specifies the username, a case-sensitive string of 1 to 32 characters.
group-name
: Specifies the group name, a case-sensitive string of 1 to 32 characters.
acl
acl-number
: Specifies a basic ACL to filter NMSs by source IPv4 address. The
acl-number
argument
represents a basic ACL number in the range of 2000 to 2999. Only the NMSs with the IPv4 addresses
permitted in the ACL can use the specified username (community name) to access the SNMP agent.
acl ipv6
ipv6-acl-number
: Specifies a basic ACL to filter NMSs by source IPv6 address. The
ipv6-acl-number
argument represents a basic ACL number in the range of 2000 to 2999. Only the NMSs