H3C MSR1000[2600][3600] Routers Configuration Examples All-in-One-R9141-6W100

HomeSupportConfigure & DeployConfiguration ExamplesH3C MSR1000[2600][3600] Routers Configuration Examples All-in-One-R9141-6W100
Table of Contents
Related Documents
42-SNMP Configuration Examples
Title Size Download
42-SNMP Configuration Examples 207.50 KB

 

H3C Routers

SNMP Configuration Examples

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2024 New H3C Technologies Co., Ltd. All rights reserved.

No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd.

Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.

The information in this document is subject to change without notice.



Introduction

This document provides SNMP configuration examples.

Prerequisites

The following information applies to Comware 9-based routers. Procedures and information in the examples might be slightly different depending on the software or hardware version of the router.

The configuration examples in this document were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.

The following information is provided based on the assumption that you have basic knowledge of SNMP.

Example: Configuring SNMPv1 or SNMPv2c

Network configuration

As shown in Figure 1, configure SNMPv1/SNMPv2c to meet the following requirements:

·     The server manages the device and backs up the configuration files of the device as an NMS via SNMPv1/SNMPv2c.

·     The device proactively sends an notification to the NMS when a fault occurs.

Figure 1 Network diagram

 

Software version used

This configuration example was created and verified on R9141P16 of the MSR2630E-X1 router.

Restrictions and guidelines

The configuration procedure is the same for SNMPv1 and SNMPv2c. This example uses SNMPv2c.

For the NMS to manage the device, make sure the SNMP settings on the device and the NMS are consistent.

The configuration on the NMS depending on the NMS type. This example uses the IMC PLAT 7.0 (E0202). For detailed configuration on an NMS, see the related manual for the NMS.

Procedures

Configuring the device

# Specify SNMPv2c, and create read-only community readtest and read-write community writetest.

<Agent> system-view

[Agent] snmp-agent sys-info version v2c

[Agent] snmp-agent community read readtest

[Agent] snmp-agent community write writetest

# Configure contact and physical location information for the device.

[Agent] snmp-agent sys-info contact Mr.Wang-Tel:3306

[Agent] snmp-agent sys-info location telephone-closet,3rd-floor

# Enable the device to send SNMP notifications to the NMS by using community name readtest.

[Agent] snmp-agent trap enable

[Agent] snmp-agent target-host trap address udp-domain 192.168.100.4 params securityname readtest v2c

Configuring the NMS

Table 1 Add the device to IMC.

a.     Log in to IMC.

b.     Click the Resource tab.

c.     From the navigation tree, select Resource Management > Add Device.

d.     On the Add Device page, configure the following parameters:

-     Enter 192.168.100.68 in the Host Name/IP field.

-     Use the default values for other parameters.

Figure 2 Adding the device

 

Table 2 Configure SNMP parameters:

a.     Expand the SNMP Settings section.

b.     Click Configure. Configure the following parameters:

-     Select SNMPv2c from the Parameter Type list.

-     Enter readtest in the Read-Only Community String field.

-     Enter writetest in the Read-Write Community String field.

-     Use the default values for other parameters.

-     Click OK.

Figure 3 Configuring SNMP parameters

 

Table 3 Click OK.

The device is successfully added to the IMC, as shown in Table 3Figure 4.

Figure 4 Device added

 

After the device is added to the IMC, you can configure, manage, and maintain the device from IMC.

Verifying the configuration

Table 4 Verify that the device sends notifications to the NMS when the link state of an interface changes.

a.     Execute the shutdown or undo shutdown command for an idle interface on the device to shut down or bring up the interface.

b.     Log in to the NMS. Navigate to the Alarm > Alarm Browse > All Alarms page and verify that the NMS receives notifications about interface changes from the device.

Figure 5 All alarms displayed on the NMS

 

Table 5 Back up the configuration files of the device from the NMS.

# Navigate to the Resource > Device View > Agent page, and then click Backup Configuration File at the right.

Figure 6 Backing up configuration files of the device

 

# Information as follows is displayed if the configuration files are backed up successfully.

Figure 7 Configuration files backed up successfully

 

Configuration files

#

 snmp-agent

 snmp-agent community read readtest

 snmp-agent community write writetest

 snmp-agent sys-info contact Mr.Wang-Tel:3306

 snmp-agent sys-info location telephone-closet,3rd-floor

 snmp-agent sys-info version v2c

 snmp-agent target-host trap address udp-domain 192.168.100.4 params securityname readtest v2c

 snmp-agent trap enable arp

#

Example: Configuring SNMPv3

Network configuration

As shown in Figure 8, configure SNMPv3 to meet the following requirements:

·     The server manages the device and backs up the configuration files of the device as an NMS via SNMPv3.

·     The device proactively sends alarm information to the NMS when a fault occurs.

Figure 8 Network diagram

 

Software version used

This configuration example was created and verified on R9141P16 of the MSR2630E-X1 router.

Restrictions and guidelines

For the NMS to manage the device, make sure the SNMP settings on the device and the NMS are consistent.

The configuration on the NMS depending on the NMS type. This example uses the IMC PLAT 7.0 (E0202). For detailed configuration on an NMS, see the related manual for the NMS.

For SNMPv3 notifications to be received on the NMS, the security parameter must be an existing SNMPv3 user and the security model on the device and NMS must be consistent.

Procedures

Configuring the device

# Enable SNMPv3.

<Agent> system-view

[Agent] snmp-agent sys-info version v3

# Create MIB view mibtest, including all objects in the mib-2 (OID 1.3.6.1) subtree.

[Agent] snmp-agent mib-view included mibtest 1.3.6.1

# Create SNMPv3 group managev3group, and specify the authentication with privacy security model for the group. Assign the group read, write, and notification accesses to the mibtest view.

[Agent] snmp-agent group v3 managev3group privacy read-view mibtest write-view mibtest notify-view mibtest

# Add user managev3user to SNMPv3 group managev3group, and set the authentication algorithm to sha, authentication key to 123456TESTauth&!, encryption algorithm to aes128, and encryption key to 123456TESTencr&!.

[Agent] snmp-agent usm-user v3 managev3user managev3group simple authentication-mode sha 123456TESTauth&! privacy-mode aes128 123456TESTencr&!

# Configure contact and physical location information for the agent.

[Agent] snmp-agent sys-info contact Mr.Wang-Tel:3306

[Agent] snmp-agent sys-info location telephone-closet,3rd-floor

# Enable SNMP notifications.

[Agent] snmp-agent trap enable

# Specify the NMS at 192.168.100.4 as the trap destination, and set the security authentication parameter to managev3user.

[Agent] snmp-agent target-host trap address udp-domain 192.168.100.4 params securityname managev3user v3 privacy

Configuring the NMS

Table 1 Log in to IMC

Table 2 Add an SNMP template.

a.     Click the System tab.

b.     From the navigation tree, select Resource Management > SNMP Template.

c.     On the SNMP Template page, click Add.

d.     On the Add SNMP Template page, configure the following parameters:

-     Enter SNMPv3 in the Name field.

-     Select SNMPv3 Priv-Aes128 Auth-Sha from the Parameter Type list.

-     Enter managev3user in the Username field.

-     Enter 123456TESTauth&! in the Authentication Password field.

-     Enter 123456TESTencr&! in the Encryption Password field.

-     Use the default values for other parameters.

-     Click OK.

Figure 9 Adding an SNMP template

 

Table 3 Add the device to IMC:

a.     Click the Resource tab.

b.     From the navigation tree, select Resource Management > Add Device.

c.     On the Add Device page, configure the following parameters:

-     Enter 192.168.100.68 in the Host Name/IP field.

-     Use the default values for other parameters.

Figure 10 Adding the device

 

Table 4 Configure SNMP parameters:

a.     Expand the SNMP Settings section.

b.     Click Configure.

c.     Select the Select an Existing Template option.

d.     Select template name SNMPv3.

e.     Click OK.

Figure 11 Selecting an existing template

 

Table 5 On the Add Device page, click OK.

The device is successfully added to IMC, as shown in Figure 12.

Figure 12 Device added

 

After the device is added to the IMC, you can configure, manage, and maintain the device from IMC.

Configuration files

#

 snmp-agent

 snmp-agent sys-info contact Mr.Wang-Tel:3306

 snmp-agent sys-info location telephone-closet,3rd-floor

 snmp-agent sys-info version v3

 snmp-agent group v3 managev3group privacy read-view mibtest write-view mibtest notify-view mibtest

 snmp-agent target-host trap address udp-domain 192.168.100.4 params securityname managev3user v3 privacy

 snmp-agent mib-view included mibtest internet

 snmp-agent usm-user v3 managev3user managev3group cipher authentication-mode sha $c$3$4CcVHVR5z0PUt42S65Q7t5CinLsNC0qt45linidSxj6AdbAipck= privacy-mode aes128 $c$3$u3MpkHY9/mUEWZpDydimSpuDZP6HCeW2p3GmEqHT5Eys5A==

 snmp-agent trap enable arp

 snmp-agent trap enable radius

#

Related documentation

·     Network Management and Monitoring Configuration Guide in H3C MSR1000[2600][3600] Routers Configuration Guides(V9)

·     Network Management and Monitoring Command Reference in H3C MSR1000[2600][3600] Routers Command References(V9)

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网