Snmp trap is as famous as SNMP proxy. TRAP is also a very important part of SNMP protocol applications. So let's take a look at this part. We know that TRAP is the self-trapping feature of SNMP. How can we RUN this feature in the system?
Cisco snmp Configuration
In the Enable status of IOS, enter config terminal to enter the global configuration status.
Enable Cdp run
Snmp-server community gsunion ro: configure the read-only string of this vro as gsunion
Snmp-server community gsunion rw: configure the read/write string of the vro as gsunion.
Snmp-server enable traps allow routers to send all types of SNMP traps
Snmp-server host IP-address-server traps trapcomm specifies that the receiver of the SNMP Trap on the router is 10.238.18.17. trapcomm is used as the string to send the Trap.
Snmp-server trap-source loopback0 uses the IP address of the loopback interface as the sending source Address of the SNMP Trap.
Show running
Copy running start or write terminal display and check the configuration
Save Configuration
Configure the SNMP proxy for a Cisco device
To configure the SNMP agent on a Cisco device, follow these steps:
Enable SNMP:
Configure terminal
Snmp-server community rw/ro (example: snmp-server community public ro)
End
Copy running-configstartup-config
Enable SNMP Trap:
Configure terminal
Snmp-server enable traps snmp authentication
End
Copy running-configstartup-config
Configure snmp
# Conf t
# Snmp-server community cisco ro read-only); configure the read-only communication string
# Snmp-server community secret rw read/write); configure the read/write communication string
# Snmp-server enable traps; configure the gateway SNMP TRAP
# Snmp-server host 10.254.190.1 rw; configure the gateway workstation address