SNMP 添加MIB 节点 (十五) --- SNMP v3 PROXY

1.snmp v3 代理 
底层使用snmpv2 代理
代理段,SNMP的.conf添加
rouser read123
createUser read123 SHA sha12345 AES admin12345

rwuser write123
createUser write123 SHA sha12345 AES admin12345

#,7,2,192.168.7.52
com2sec -Cn remote_switchr7 switch_r7 4.21.1.16 cmty_switch7
group  switch_rg7 v2c switch_r7
view   switch_rg7view included .1
access switch_rg7 remote_switchr7 v2c  noauth exact switch_rg7view none none
proxy   -Cn remote_switchr7 -v2c -c public 192.168.7.52 1.3.6

com2sec -Cn remote_switchw7 switch_w7 4.21.1.16 cmty_switch7w
group  switch_wg7 v2c switch_w7
view   switch_wg7view included .1
access switch_wg7 remote_switchw7 v2c  noauth exact none switch_wg7view none
proxy   -Cn remote_switchw7 -v2c -c private 192.168.7.52 1.3.6


NMS获取
ubuntu@ubuntu:/usr/local/net-snmp/bin$ ./snmpwalk  -n remote_switchr7 -v 3  -u read123 -a SHA -A sha12345 -x AES -X admin12345 -lauthpriv    192.168.7.100 1.3.6.1.4.1.54367.1.4.1
SNMPv2-SMI::enterprises.54367.1.4.1.2.0 = STRING: "centecOS-g5610-fast-v5.3.11.64.r.bin"
SNMPv2-SMI::enterprises.54367.1.4.1.2.1 = STRING: "centecOS-g5610-fast-v5.3.11.58.r.bin"
SNMPv2-SMI::enterprises.54367.1.4.1.3.0 = STRING: "2021-10-11 10:23:55"
SNMPv2-SMI::enterprises.54367.1.4.1.3.1 = STRING: "2021-07-22 13:00:56"
SNMPv2-SMI::enterprises.54367.1.4.1.4.0 = STRING: "v5.3.11.64"
SNMPv2-SMI::enterprises.54367.1.4.1.4.1 = STRING: "v5.3.11.58"
SNMPv2-SMI::enterprises.54367.1.4.1.5.0 = STRING: "40.7M"
SNMPv2-SMI::enterprises.54367.1.4.1.5.1 = STRING: "40.7M"
SNMPv2-SMI::enterprises.54367.1.4.1.6.0 = STRING: "flash:/boot"
SNMPv2-SMI::enterprises.54367.1.4.1.6.1 = STRING: "flash:/boot"
SNMPv2-SMI::enterprises.54367.1.4.1.7.0 = INTEGER: 1
SNMPv2-SMI::enterprises.54367.1.4.1.7.1 = INTEGER: 2
ubuntu@ubuntu:/usr/local/net-snmp/bin$ 

2.snmp v3 直接代理,未测试

Setting up the proxy configuration

Now, to set up the proxy:

proxy -Cn ctx_remotehost1 -v 2c -c public remotehost1 .1.3 
proxy -Cn ctx_remotehost2 -v 3 -u MD5DESUser -a MD5 -A "PasswordA"  -x DES -X "PasswordX" -l authPriv remotehost2 .1.3 

Start snmpd (or restart it, if it was already running), and then test your new setup.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值