net-snmp send spoof-trap
NuDesignVisualMIBrowserProtoviewmids.
注意参数需要加.index
1)snmptrap-v2c-cpublic127.0.0.1""trap_oidvarible.indexvarible_typevarible_value
2)snmptrap-v2c-cpublic127.0.0.1""IF-MIB::linkDownifAdminStatus.22i2
3)snmptrap-v2c-cpublic127.0.0.1""1.3.6.1.6.3.1.1.5.31.3.6.1.6.3.1.1.5.3.22i2
监听trap::snmptrapd-f-Lo
net-snmpmib文件存放地点
/usr/share/snmp/mibs
配置文件存放地点
/etc/snmp/snmpd.conf
/etc/init.d/snmpdrestart
---------------------------------------------------
•Conffilelocatesat:/etc/snmp/snmpd.conf
•Mibsfilelocatesat:/usr/share/snmp/mibs
•Restartitbycommand
•:/etc/init.d/snmpdrestart
•snmpget-v2c-cpublic127.0.0.1sysName.0
•snmpgetnext-v2c-cpublic127.0.0.1sysName.0
•snmpwalk-v2c-cpublicip1.3.6.1.2.1.2.2.1.1
•snmptable-v2c-cpublicip1.3.6.1.2.1.2.2
traplistenerinport162(default)
•snmptrapd-f-Lo
sendtraps
•snmptrap-v2c-cpublic127.0.0.1''IF-MIB::linkDownifAdminStatus.2i2
•snmptrap-v2c-cpublic127.0.0.1""1.3.6.1.6.3.1.1.5.31.3.6.1.6.3.1.1.5.3.22i2
Previously,snmptrapdwouldacceptallincomingnotifications,andlogthemauto...
Previously,snmptrapdwouldacceptallincomingnotifications,andlogthemautomatically(evenifnoexplicitconfigurationwasprovided).Startingwithrelease5.3,accesscontrolcheckswillbeappliedtoincomingnotifications.Ifsnmptrapdisrunwithoutasuitableconfigurationfile(orequivalentaccesscontrolsettings),thensuchtrapsWILLNOTbeprocessed.SeethesectionACCESSCONTROLformoredetails.
Theoptionyouareprobablyinterestedincanbefoundatthebootomofthe"ACCESSCONTROL"section.Itsays:
disableAuthorizationyes
willdisabletheaboveaccesscontrolchecks,andreverttothepreviousbehaviourofacceptingallincomingnotifications.
Ifyouadd
disableAuthorizationyes
to/etc/snmp/snmptrapd.confyoushouldbehappy.Ifthisfiledoesnotexist,createit,thenrestartsnmptrapd.Itdoesappearthatsnmptrapd.confmayalternatelybefoundin/usr/share/snmp,butIhavenotputitthereinanyofmyconfigurations.