SNMP
文章平均质量分 65
SNMP 学习记录,供大家参考,如有错误,还望指正
逆商
大人不华 君子务实
展开
-
SNMP 添加MIB 节点 (十七) --- SNMP v3 TRAP
1.修改 snmpd.conf ,如下这里验证过并不需要本地生成myuser账户,这个应该只是组成报文时需要的。-------------------------------------------------------------------------------------------------------------------################################################################################原创 2021-11-01 18:27:58 · 722 阅读 · 0 评论 -
SNMP 添加MIB 节点 (十六) --- SNMP v3 TRAP Forward
snmptrapd.conf 添加用户名(引擎ID),认证方式以及认证密码,加密方式以及加密密码以下两行使用一行,区别在于是否使用引擎IDcreateUser -e ENGINEID myuser SHA "my authentication pass" AES "my encryption pass" createUser myuser SHA "my authentication pass" AES "my encryption pass"以下两行使用一行,区别在于加密级别authU.原创 2021-11-01 13:18:19 · 491 阅读 · 0 评论 -
SNMP 添加MIB 节点 (十五) --- SNMP v3 PROXY
1.snmp v3 代理底层使用snmpv2 代理代理段,SNMP的.conf添加rouser read123createUser read123 SHA sha12345 AES admin12345rwuser write123createUser write123 SHA sha12345 AES admin12345#,7,2,192.168.7.52com2sec -Cn remote_switchr7 switch_r7 4.21.1.16 cmty_switch7gro.原创 2021-10-26 15:33:23 · 246 阅读 · 0 评论 -
SNMP 添加MIB 节点 (十四) --- SNMP v3配置用户名密码
1.添加加密方式直接版,直接写入snmpd.confrouser read123createUser read123 SHA sha12345 AES admin12345rwuser write123createUser write123 SHA sha12345 AES admin123452.使用命令2.1添加只读用户ubuntu@ubuntu:/usr/local/net-snmp/bin$ sudo ./net-snmp-create-v3-user -ro -A md5123.原创 2021-10-26 15:31:59 · 1324 阅读 · 1 评论 -
SNMP 添加MIB 节点 (十三) --- snmpd.conf包含其他配置文件
/usr/local/net-snmp/share/snmp/snmpd.conf: line 1: Warning: Ambiguous token 'include' - use 'includeSearch' (or 'includeFile') instead.Turning on AgentX master support.snmpd.conf 包含其他confincludeFile snmpda.confsnmpda.confproxy -v2c -c pu...原创 2021-10-12 13:39:58 · 302 阅读 · 0 评论 -
SNMP 添加MIB 节点 (十二) --- 龙芯2K1000交叉编译
NET-SNMP 5.7.3gcc1.配置交叉编译环境 /etc/enviroment 添加gcc路径PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/loongson/gcc-4.4-64-gnu/bin"/home/ubuntu/loongson/gcc-4.4-64-gnu/bin路径下文...原创 2021-10-11 14:27:25 · 292 阅读 · 0 评论 -
SNMP 添加MIB 节点 (十一) --- snmp配置文件热更新
The Net-SNMP agent can be instructed to re-read the various configuration files,either via an \fBsnmpset\fR assignment of integer(1) to\fCUCD\-SNMP\-MIB::versionUpdateConfig.0\fR (.1.3.6.1.4.1.2021.100.11.0),or by sending a \fBkill \-HUP\fR signal to th原创 2021-10-09 18:31:23 · 498 阅读 · 0 评论 -
SNMP 添加MIB 节点 (十) --- 添加SMUX模块
ubuntu@ubuntu:~/Downloads/net-snmp-5.9.1$ ./configure --prefix=/usr/local/net-snmp--with-mib-modules=smux./configure配置完成后包含smux**************************************************************************************************************--------...原创 2021-07-08 13:49:36 · 527 阅读 · 0 评论 -
SNMP 添加MIB 节点 (九) --- SNMP.CONF PASS添加节点
首先在/home下建个shell脚本passtest---------------------------------------------------------------------------------------------------------------------------------#!/bin/shecho $2 #因为snmpd是用EXEC -g MIBOID来调脚本的,所以MIBOID是第二个参数echo stringecho "hello world"--原创 2021-07-07 18:12:43 · 669 阅读 · 0 评论 -
SNMP 添加MIB 节点 (八) --- NET-SNMP自启动处理
在/home下新建setup.sh---------------------------------------------------------------------------------------------------------------------------------cd /usr/local/net-snmp/sbin./snmptrapd -d -f -Lo -c /usr/local/net-snmp/share/snmp/snmptrapd.conf &s原创 2021-07-07 16:42:27 · 102 阅读 · 0 评论 -
SNMP 添加MIB 节点 (七) ---TRAP处理
当前实现一个记录trp信息到文件的方法先建一个shell文件lognotify,路径在/usr/local/net-snmp/share/snmp---------------------------------------------------------------------------------------------------------------------------------#!/bin/shread hostread ipvars=while ...原创 2021-07-07 16:30:42 · 548 阅读 · 0 评论 -
SNMP 添加MIB 节点 (六) ---TRAP转发
修改snmptrapd.conf---------------------------------------------------------------------------------------------------------------------------------authcommunity log,execute,net public#traphandle .1.3.6.1.4.1.12581.1.1 echo "loongson1 loongson2 loongson.原创 2021-07-06 17:18:11 · 434 阅读 · 0 评论 -
SNMP 添加MIB 节点 (五) ---Proxy代理
主机192.168.186.228 proxy 代理远程主机192.168.186.221 1.3.6.1.4.1,即在228主机使用proxy访问设置221主机1.3.6.1.4.1相关节点。snmpd.conf 添加--------------------------------------------------------------------------------------------------------------------------------# com2sec6 [-原创 2021-07-06 13:18:49 · 479 阅读 · 0 评论 -
SNMP 添加MIB 节点 (四)
单独编译子模块生成.c .h 参考SNMP 添加MIB 节点 (二)将其复制到net-snmp源码目录下,编译命令net-snmp-config --compile-subagent Test Test.c编译出Test执行./mysubagent -f -Lo -x tcp:localhost:705,便可挂在主代理上编译过程可能会有错误:error while loading shared libraries: libnetsnmpagent.so.40: cannot...原创 2021-07-02 16:08:18 · 407 阅读 · 1 评论 -
SNMP 添加MIB 节点 (三) ---AgentX代理
开启分布式SNMP ,使用agentX协议,192.168.186.224为主机IP主机端 snmpd.confmaster agentx # Listen for network connections (from localhost) # rather than the default named ...原创 2021-07-02 15:21:47 · 859 阅读 · 0 评论 -
SNMP 添加MIB 节点 (二)
net-snmp版本是5.9.1,添加test_set时出现"No Such Object available on this agent at this OID",在snmpd.conf的配置文件里配置一下view,添加一行"view systemonly included .1.3.6.1.4.1.1。77587.1",添加之后才能用snmpget获取指定的OID...原创 2021-06-28 14:30:25 · 1111 阅读 · 0 评论 -
SNMP 添加MIB 节点 (一)
这里我们写一个MIB文件,含有两个节点,一个是只读权限的,一个是读写权限的。然后把这个文件命名为myTest.mib然后保存到/usr/local/net-snmp/share/snmp/mibs/目录原创 2021-06-01 14:07:33 · 1683 阅读 · 0 评论