No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S2700, S3700, S5700, S6700, S7700, and S9700 Series Switches Typical Configuration Examples

This document provides examples for configuring features in typical usage scenarios.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring a Device to Communicate with the NMS Using SNMPv3

Example for Configuring a Device to Communicate with the NMS Using SNMPv3

SNMP Overview

The Simple Network Management Protocol (SNMP) is a standard network management protocol widely used on TCP/IP networks. SNMP manages network elements by using a central computer (a network management station) running network management software.

SNMP has the following advantages:

  • Automatic configuration management:

    A network administrator can use SNMP to quickly query information, modify data, locate faults, and so forth on any SNMP agent. SNMP greatly improves work efficiency of network administrators.

  • Multi-vendor management:

    SNMP shields the physical differences between devices of different vendors. SNMP provides only a basic function set, so the managed tasks are separated from the managed physical features and lower-layer interoperation technologies. Therefore, SNMP can uniformly manage devices of multiple vendors simultaneously.

SNMP is available in three versions. SNMPv1 is the initial version of SNMP. It provides authentication based on community names. SNMPv1 has low security, and can return only a few error codes. SNMPv2c issued by IETF is the second release of SNMP. SNMPv2c has enhancements to standard error codes, data types (Counter 64 and Counter 32), and operations including GetBulk and Inform. SNMPv2c does not improve the security, so IETF issued SNMPv3 that provides User-based Security Model (USM)-based authentication and encryption and View-based Access Control Model (VACM)-based access control.

SNMPv3 is applicable to networks of various scales, especially networks that have strict security requirements and can be managed only by authorized network administrators. For example, SNMPv3 can be used if data between the NMS and managed device needs to be transmitted over a public network.

Configuration Notes

This configuration example applies to all switches running all versions.

In this example, eSight running V300R007C00 is used as the NMS.

Networking Requirements

As shown in Figure 17-3, the NMS server manages all devices on the network. The network is large and is prone to attack. Therefore, devices on the network use SNMPv3 to communicate with the NMS server. A new switch is added to the network. The network administrator wants to use the existing network resources to manage the new switch and quickly locate and rectify network faults.

Figure 17-3  Configuring a device to communicate with the NMS using SNMPv3

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure SNMPv3 on the switch so that the NMS running SNMPv3 can manage the switch.

  2. Configure access control so that only the NMS with the specified IP address can perform read/write operations on the specified MIB objects of the switch.

  3. Configure a user group and user based on which the switch permits access of the NMS.

  4. Configure a trap host and enable the switch to automatically send traps to the NMS.

  5. Add the switch to the NMS. The user group and user configured on the switch must be the same as those used by the NMS; otherwise, the NMS cannot manage the switch.

Procedure

  1. Configure SNMPv3 on the switch so that the NMS running SNMPv3 can manage the switch.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] snmp-agent sys-info version v3 //By default, SNMPv3 is supported. If SNMPv3 is not disabled, skip this command.

  2. Configure access control so that only the NMS with the specified IP address can perform read/write operations on the specified MIB objects of the switch.

    # Configure an ACL to permit only the NMS 10.1.1.1 to access the switch.

    [Switch] acl 2001
    [Switch-acl-basic-2001] rule permit source 10.1.1.1 0
    [Switch-acl-basic-2001] rule deny
    [Switch-acl-basic-2001] quit

    # Configure the MIB view to specify the MIB objects that can be accessed by the NMS.

    [Switch] snmp-agent mib-view included isoview iso   //Configure the MIB view isoview to access the iso subtree.

  3. Configure a user group and user based on which the switch permits access of the NMS.

    # Configure the user group group001, set the security level to privacy, and configure access control to restrict the access of NMS to the switch.

    [Switch] snmp-agent group v3 group001 privacy write-view isoview acl 2001 //Configure a user group and apply an ACL to make the access control function take effect.
    

    # Configure the user user001.

    [Switch] snmp-agent usm-user v3 user001 group group001 //Configure a user name and add the user name to the specified user group.

    # Set the authentication password to Authe@1234.

    [Switch] snmp-agent usm-user v3 user001 authentication-mode sha //Set an authentication mode to improve security of the managed switch running SNMPv3.
    Please configure the authentication password (8-64)                             
    Enter Password:                  //Enter the authentication password. It is Authe@1234 in this example.
    Confirm Password:                //Confirm the password. It is Authe@1234 in this example.

    # Set the encryption password to Priva@1234.

    [Switch] snmp-agent usm-user v3 user001 privacy-mode aes128 //Set an encryption mode to improve security of the managed switch running SNMPv3.
    Please configure the privacy password (8-64)                                    
    Enter Password:                  //Enter the encryption password. It is Priva@1234 in this example.
    Confirm Password:                //Confirm the password. It is Priva@1234 in this example.
    NOTE:

    In versions earlier than V200R003C00, the user name is configured using snmp-agent usm-user v3 user001 group001 authentication-mode sha Authe@1234 privacy-mode des56 Priva@1234.

  4. Configure a trap host and enable the switch to automatically send traps to the NMS.

    [Switch] snmp-agent trap enable
    Warning: All switches of SNMP trap/notification will be open. Continue? [Y/N]:y //Enable all trap functions on the switch. By default, only some trap functions are enabled. You can run the display snmp-agent trap all command to check trap status.
    [Switch] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname user001 v3 privacy //Configure a trap host. By default, traps are sent by UDP port 162. The security name must be the same as the user name; otherwise, the NMS cannot manage the device.

  5. Add the switch to the NMS.

    # Log in to eSight and choose Resource > Add Resource > Add Resource. Set SNMP parameters based on Table 17-3 and click OK. A switch is added to and can be managed by eSight. The switch will proactively send trap messages to eSight.

    Table 17-3  SNMP parameters
    Parameter Setting
    Select discovery protocol SNMP
    IP address 10.1.1.2
    SNMP Edit SNMP parameters
    Version V3
    Security name user001
    Port 161
    Authentication protocol HMAC_SHA
    Authentication password Authe@1234
    Privacy protocol AES_128
    Encryption password Priva@1234
    NOTE:

    The parameter settings on the NMS and switch must be the same; otherwise, the switch cannot be added to the NMS.

    If authentication is required for remote logins to the switch, Telnet parameters need to be set so that the NMS can manage the switch. In this example, administrators can remotely log in to the switch using Telnet, password authentication is used, and the password is huawei2012.

Configuration Files

Configuration file of the switch

#
sysname Switch
#
acl number 2001
 rule 5 permit source 10.1.1.1 0
 rule 10 deny
#
snmp-agent
snmp-agent local-engineid 800007DB03360102101100
snmp-agent sys-info version v3
snmp-agent group v3 group001 privacy write-view isoview acl 2001 
snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname user001 v3 privacy
snmp-agent mib-view included isoview iso 
snmp-agent usm-user v3 user001
snmp-agent usm-user v3 user001 group group001
snmp-agent usm-user v3 user001 authentication-mode sha cipher %^%#*2C%=4LZn1L>ni9xaybHdbXFW&[c_Wv0m!0MpTj!%^%#
snmp-agent usm-user v3 user001 privacy-mode aes128 cipher %^%#i\Fv-cC(u)+x26S2'rEX<.;V+e~nP)*.J$Ulr($/%^%#
snmp-agent trap enable
#
return
Download
Updated: 2019-04-20

Document ID: EDOC1000069520

Views: 696412

Downloads: 30199

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next