Port 162 is the SNMP trap receiver port where management stations listen for unsolicited notifications from devices. Traps are asynchronous – devices push alerts for link-down events, threshold breaches, and hardware failures without being polled. SNMPv2c traps are unacknowledged; use INFORM for guaranteed delivery.
Port Number
162
Protocol
UDP
Service
SNMP Trap Receiver
Range
IANA Well-Known (0–1023)
Run trap receiver in foreground to debug incoming traps
snmptrapd -f -Lo -c /etc/snmp/snmptrapd.confSend a test trap to verify receiver is working
snmptrap -v 2c -c public localhost '' 1.3.6.1.4.1.8072.2.3.0.1Check which process is bound to trap port 162
ss -ulnp | grep 162Watch incoming traps in real-time (verify expected sources)
tail -f /var/log/snmptrapd.logsnmptrapd -Lo -f
snmptrap -v 2c -c public manager '' 1.3.6.1.4.1.8072.2.3.0.1
tcpdump -i eth0 udp port 162SNMP Traps were part of the original SNMPv1 specification (RFC 1157, 1990). Unlike polling (port 161, NMS→device), traps are pushed from device→NMS on port 162. SNMPv2c added 'inform' (acknowledged trap – device retransmits until NMS confirms). SNMPv3 added authentication and encryption to traps/informs. Despite alternatives (syslog, streaming telemetry), SNMP traps remain the universal alerting mechanism for network equipment.
SNMP Trap vs Inform – which should I use?
Traps (v1/v2c): fire-and-forget UDP, no delivery guarantee, device doesn't know if NMS received it. Informs (v2c/v3): acknowledged – device retransmits until NMS confirms receipt, guaranteeing delivery. Use informs for critical alerts (link-down, fan-failure) where losing the alert has consequences. Traps are fine for high-volume informational events where occasional loss is acceptable.
How do I secure SNMP trap reception?
1. Use SNMPv3 informs (authenticated + encrypted): snmptrapd.conf: createUser -e ENGINE_ID trapuser SHA authpass AES privpass, authUser execute trapuser. 2. Restrict source IPs at firewall. 3. Run snmptrapd with -a to reject unauthenticated traps. 4. Log all traps with timestamps for audit. 5. Rate-limit trap processing to prevent DoS.