This article provides an example to describe how to configure Huawei S2700 series switch to communicate with an NM station by using SNMPv1 and how to specify the MIB objects that can be managed by the NM station.
Networking Plan
As shown in picture, two NM stations (NMS1 and NMS2) and the switch are connected across a public network. According to the network planning, NMS2 can manage every MIB object except HGMP on the switch, and NMS1 does not manage the switch.
On Huawei S2700 switch, only the modules that are enabled by default are allowed to send alarms to NMS2. This prevents an excess of unwanted alarms from being sent to NMS2. Excessive alarms can make faults location difficult.
Equipment administrator’s contact information needs to be configured on the switch. This allows the NMS administrator to contact the equipment administrator quickly if a fault occurs.
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable the SNMP agent.
2. Configurethe S2700 switch to run SNMPv1.
3. Configure an ACL to allow NMS2 to manage every MIB object except HGMP on the switch.
4. Configure the trap function to allow the switch to send alarms to NMS2.
5. Configure the equipment administrator’s contact information on the switch.
6. Configure NMS2.
Data Preparation
To complete the configuration, you need the following data:
-
SNMP version
-
Community name
-
ACL number
-
IP address of the NM station
-
Equipment administrator’s contact information
Procedure
1. Configure available routes between the switch and the NM stations. Details for the configuration procedure are not provided here.
2. Enable the SNMP agent.
<Huawei-SW> system-view [Huawei-SW] snmp-agent
2. Configure the switch to run SNMPv1.
[Huawei-SW] snmp-agent sys-info version v1
# Check the configured SNMP version.
[Huawei-SW] display snmp-agent sys-info version SNMP version running in the system: SNMPv1 SNMPv3
4. Configure the NM stations’ access rights.
# Configure an ACL to allow NMS2 to manage and disallow NMS1 from managing the switch.
[Huawei-SW] acl 2001 [Huawei-SW-acl-basic-2001] rule 5 permit source 100.100.100.2 0.0.0.0 [Huawei-SW-acl-basic-2001] rule 6 deny source 100.100.100.1 0.0.0.0 [Huawei-SW-acl-basic-2001] quit
# Configure a MIB view and allow NMS2 to manage every MIB object except HGMP on the switch.
[Huawei-SW] snmp-agent mib-view included allexthgmp iso [Huawei-SW] snmp-agent mib-view excluded allexthgmp 1.3.6.1.4.1.2016.3.7
# Configure a community name to allow NMS2 to manage the objects in the MIB view.
[Huawei-SW] snmp-agent community write adminnms2 mib-view allexthgmp acl 2001
5. Configure the trap function.
6.[Huawei-SW] snmp-agent target-host trap address udp-domain 100.100.100.2 params securityname 100.100.3.1 7.[Huawei-SW] snmp-agent trap source Loopback0 8.[Huawei-SW] snmp-agent trap queue-size 200 [Huawei-SW] snmp-agent trap life 60
6. Configure the equipment administrator’s contact information.
[Huawei-SW] snmp-agent sys-info contact call Operator at 028-88888888
7. Configure NMS2.
For details on how to configure NMS2, see the relevant NMS configuration guide.
8. Verify the configuration.
After the configurations are complete, run the following commands to verify that the configurations have taken effect.
# Check information about the SNMP community name.
<Huawei-SW> display snmp-agent community Community name:adminnms2 Group name:adminnms2 Acl:2001 Storage-type: nonVolatile
# Check the configured ACL.
<Huawei-SW> display acl 2001 Basic ACL 2001, 2 rules Acl's step is 5 rule 5 permit source 100.100.100.2 0 rule 6 deny source 100.100.100.1 0
# Check the MIB view.
<Huawei-SW> display snmp-agent mib-view viewname allexthgmp View name:allexthgmp MIB Subtree:hwCluster Subtree mask: Storage-type: nonVolatile View Type:excluded View status:active
# Check the target host.
<Huawei-SW> display snmp-agent target-host Target-host NO. 1 ----------------------------------------------------------- IP-address : 100.100.100.2 Source interface : - VPN instance : - Security name : 100.100.3.1 Port : 162 Type : trap Version : v1 Level : No authentication and privacy NMS type : NMS -----------------------------------------------------------
# When an alarm is generated, run the display trapbuffer command to view the details.
<Huawei-SW> display trapbuffer Trapping buffer configuration and contents : enabled Allowed max buffer size : 1024 Actual buffer size : 256 Channel number : 3 , Channel name : trapbuffer Dropped messages : 0 Overwritten messages : 0 Current messages : 98 #Apr 9 2016 18:57:59 RouterA DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2016 .5.25.191.3.1 configurations have been changed. The current change number is 95, the change loop count is 0, and the maximum number of records is 4095.
# Check the equipment administrator’s contact information.
<Huawei-SW> display snmp-agent sys-info contact The contact person for this managed node: call Operator at 028-88888888
Configuration Files
Configuration file of the switch
# vlan batch 100 # acl number 2001 rule 5 permit source 100.100.100.2 0 rule 6 deny source 100.100.100.1 0 # interface Vlanif100 ip address 100.100.200.1 255.255.255.0 # interface GigabitEthernet0/0/1 port hybrid pvid vlan 100 port hybrid untagged vlan 100 # interface LoopBack0 ip address 100.100.3.1 255.255.255.255 # ospf 1 area 0.0.0.0 network 100.100.200.0 0.0.0.255 network 100.100.3.1 0.0.0.0 # snmp-agent snmp-agent local-engineid 000007DB7FFFFFFF00001AA7 snmp-agent community write adminnms2 mib-view allexthgmp acl 2001 snmp-agent sys-info contact call Operator at 028-88888888 snmp-agent sys-info version v1 v3 snmp-agent target-host trap address udp-domain 100.100.100.2 params securityname 100.100.3.1 snmp-agent mib-view included allexthgmp iso snmp-agent mib-view excluded allexthgmp hwCluster snmp-agent trap source LoopBack0 snmp-agent trap queue-size 200 snmp-agent trap life 60 # return
After finishing above procedures, S2700 series switch can communicate with an NM station by using SNMPv1. For other series S3700 S5700 S5720 S6720 switch, or even Huawei router like AR500, AR510, AR531, AR550 and AR1500, you can also follow these procedures to configure.