华为交换机之SNMP管理
Posted jks212454
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为交换机之SNMP管理相关的知识,希望对你有一定的参考价值。
华为交换机之SNMP管理
一、网络环境
1.网络拓扑
2.全网互通链接
二、SW2的SNMP配置
[SW2]snmp-agent
[SW2]snmp-agent community read huawei
[SW2]snmp-agent community write huawei
[SW2]snmp-agent sys-info contact network 123456789
[SW2]snmp-agent sys-info location wuhan
[SW2]snmp-agent sys-info version all
[SW2]snmp-agent trap enable
Warning: All switches of SNMP trap/notification will be open. Continue? [Y/N]:y
[SW2]snmp-agent target-host trap address udp-domain 192.168.200.146 udp-port 161
params securityname huawei
[SW2]snmp-agent target-host trap address udp-domain 192.168.200.129 params secur
ityname huawei
[SW2]
三、检查配置
[SW2]dis current-configuration
#
sysname SW2
#
undo info-center enable
#
vlan batch 10 20 30 40 50 100 200 300
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.10.3
vrrp vrid 1 priority 120
vrrp vrid 1 preempt-mode timer delay 20
#
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.20.3
vrrp vrid 2 priority 120
vrrp vrid 2 preempt-mode timer delay 20
#
interface Vlanif30
ip address 192.168.30.1 255.255.255.0
vrrp vrid 3 virtual-ip 192.168.30.3
vrrp vrid 3 priority 120
vrrp vrid 3 preempt-mode timer delay 20
#
interface Vlanif40
ip address 192.168.40.1 255.255.255.0
vrrp vrid 4 virtual-ip 192.168.40.3
vrrp vrid 4 priority 120
vrrp vrid 4 preempt-mode timer delay 20
#
interface Vlanif50
ip address 172.16.10.1 255.255.255.0
vrrp vrid 5 virtual-ip 172.16.10.3
vrrp vrid 5 priority 120
vrrp vrid 5 preempt-mode timer delay 20
#
interface Vlanif100
ip address 172.16.1.1 255.255.255.0
#
interface Vlanif200
ip address 192.168.100.254 255.255.255.0
vrrp vrid 200 virtual-ip 192.168.100.200
vrrp vrid 200 priority 120
vrrp vrid 200 preempt-mode timer delay 20
#
interface Vlanif300
ip address 172.16.3.1 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 300
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 10 20 200
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 30 200
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 40 200
#
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 50 200
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/13
#
interface GigabitEthernet0/0/14
#
interface GigabitEthernet0/0/15
#
interface GigabitEthernet0/0/16
#
interface GigabitEthernet0/0/17
#
interface GigabitEthernet0/0/18
#
interface GigabitEthernet0/0/19
#
interface GigabitEthernet0/0/20
#
interface GigabitEthernet0/0/21
#
interface GigabitEthernet0/0/22
#
interface GigabitEthernet0/0/23
#
interface GigabitEthernet0/0/24
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 172.16.1.2
ip route-static 0.0.0.0 0.0.0.0 172.16.3.2 preference 70
ip route-static 192.168.200.0 255.255.255.0 172.16.1.2
#
snmp-agent
snmp-agent local-engineid 800007DB034C1FCC2A59D0
snmp-agent community write huawei
snmp-agent sys-info contact network 123456789
snmp-agent sys-info location wuhan
snmp-agent sys-info version all
snmp-agent target-host trap address udp-domain 192.168.200.129 params securityna
me huawei
snmp-agent target-host trap address udp-domain 192.168.200.146 udp-port 161 para
ms securityname huawei
snmp-agent trap enable
#
user-interface con 0
user-interface vty 0 4
#
return
以上是关于华为交换机之SNMP管理的主要内容,如果未能解决你的问题,请参考以下文章