| 用途 | 过滤 SNMP 查询与 Trap |
|---|---|
| 语法 | udp and (port 161 or port 162) [and host ...] |
常用示例
常用示例
tcpdump -i eth0 -nn 'udp and (port 161 or port 162)' -c 20
tcpdump -i eth0 -nn 'udp port 162' -A -c 5SNMPv3 支持加密认证(authPriv),抓包里看不到明文 OID;v2c 社区字符串在抓包中可读,注意保密。
抓 UDP 161(查询)与 162(Trap)报文:网管轮询失败、Trap 未上报时,先确认方向上有没有请求与响应。
| 用途 | 过滤 SNMP 查询与 Trap |
|---|---|
| 语法 | udp and (port 161 or port 162) [and host ...] |
tcpdump -i eth0 -nn 'udp and (port 161 or port 162)' -c 20
tcpdump -i eth0 -nn 'udp port 162' -A -c 5