10-11
Note that:
To enable an interface to generate linkUp/linkDown traps when its state changes, you need to enable
the linkUp/linkDown trap function on the interface and globally. Use the
enable snmp trap updown
command to enable this function on an interface, and use the
snmp-agent trap enable
[
standard
[
linkdown
|
linkup
] * ] command to enable this function globally.
Related commands:
snmp-agent target-host
,
snmp-agent trap enable
.
Examples
# Enable the sending of linkUp/linkDown SNMP traps on port GigabitEthernet 1/0/1 and use the
community name
public
.
<Sysname> system-view
[Sysname] snmp-agent trap enable
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] enable snmp trap updown
snmp-agent
Syntax
snmp-agent
undo snmp-agent
View
System view
Default Level
3: Manage level
Parameters
None
Description
Use the
snmp-agent
command to enable SNMP agent.
Use the
undo snmp-agent
command to disable SNMP agent.
By default, SNMP agent is disabled.
You can enable SNMP agent through any commands that begin with
snmp-agent
.
Examples
# Enable SNMP agent on the device.
<Sysname> system-view
[Sysname] snmp-agent
Summary of Contents for E4510-48G
Page 109: ...2 18 Sysname interface bridge aggregation 1 Sysname Bridge Aggregation1 shutdown ...
Page 309: ...6 4 Sysname interface vlan interface 1 Sysname Vlan interface1 ip address dhcp alloc ...
Page 324: ...8 3 Sysname interface vlan interface 1 Sysname Vlan interface1 ip address bootp alloc ...
Page 530: ...2 5 Sysname mvlan 100 subvlan 10 to 15 ...
Page 739: ...8 15 Sysname system view Sysname port security trap addresslearned ...
Page 819: ...13 11 Sysname system view Sysname public key peer key2 import sshkey key pub ...
Page 914: ...5 17 Sysname reset oam ...
Page 1064: ...5 30 Slot 2 Set next configuration file successfully ...
Page 1325: ...21 13 Examples Redirect to member 2 Sysname irf switch to 2 Sysname Slave 2 ...