diff options
| author | lijia <[email protected]> | 2020-03-13 15:17:51 +0800 |
|---|---|---|
| committer | lijia <[email protected]> | 2020-03-13 15:17:51 +0800 |
| commit | 5a5a5d8ec1d7319ced221178c13eb43349fa4000 (patch) | |
| tree | d87bf3a33795248c2fe8a4bc376cb65900a69c3b /snmptrapdV3.txt | |
| parent | bfad9623a015b21be824f0acda5738f85c5f5310 (diff) | |
Diffstat (limited to 'snmptrapdV3.txt')
| -rw-r--r-- | snmptrapdV3.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/snmptrapdV3.txt b/snmptrapdV3.txt new file mode 100644 index 0000000..e88be21 --- /dev/null +++ b/snmptrapdV3.txt @@ -0,0 +1,16 @@ +1.修改snmptrapd.conf,增加用户tsgadmin,并设置密码为:cli202001,不能少于8位 +vi /etc/snmp/snmptrapd.conf + +增加: +createUser -e 0x8000000001020304 tsgadmin SHA cli202001 AES cli202001 +authuser log tsgadmin + +2.启动snmptrapd +snmptrapd -f -C -c /etc/snmp/snmptrapd.conf -Le + +3.另外启动一个xshell连接,向本机162端口发送trap,用户名tsgadmin,密码cli202001 +snmptrap -v 3 -n "" -a SHA -A cli202001 -x AES -X cli202001 -l authPriv -u tsgadmin -e 0x8000000001020304 localhost:162 0 .1.1.1.2.2.3.3.3 .1.1.1.2.2.3.3.3.9 s '1234567890' + +4.在第2步中的xshell连接会显示如下信息: +2020-01-31 17:43:38 localhost [UDP: [127.0.0.1]:40139->[127.0.0.1]:162]: +DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (0) 0:00:00.00 SNMPv2-MIB::snmpTrapOID.0 = OID: iso.1.1.2.2.3.3.3 iso.1.1.2.2.3.3.3.9 = STRING: "1234567890"
\ No newline at end of file |
