H3C S6300 Configuration Examples-6W100

HomeSupportSwitchesS6300 SeriesConfigure & DeployConfiguration ExamplesH3C S6300 Configuration Examples-6W100
33-SNMP Configuration Examples
Title Size Download
33-SNMP Configuration Examples 324.02 KB

 

H3C S6300 Switch Series

SNMP Configuration Examples

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2020 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

This document is not restricted to specific software or hardware versions.

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.

This document assumes that you have basic knowledge of SNMP.

Example: Configuring SNMPv1 or SNMPv2c

Network requirements

As shown in Figure 1, the NMS uses SNMPv2c to manage the SNMP agent, and the agent automatically sends notifications to report events to the NMS.

Figure 1 Network diagram

 

Software version used

This configuration example was created and verified on S6300-CMW710-R2310.

Configuration restrictions and guidelines

When you configure SNMPv1 or SNMPv2c, follow these restrictions and guidelines:

·     The SNMPv2c configuration procedure is the same as the SNMPv1 configuration procedure. This example uses SNMPv2c.

·     For the NMS to manage the SNMP agent, the SNMP settings on the agent and the NMS must match.

·     The NMS software configuration varies by vendor. This example uses IMC PLAT 7.0 (E0202). For information about configuring the NMS, see the NMS manual.

Configuration procedures

Configuring the SNMP agent

# Specify SNMPv2c, and create the read-only community readtest and the read and 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 agent.

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

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

# Enable SNMP notifications, specify the NMS at 192.168.100.4 as an SNMP trap destination, and use traptest as the community name.

[Agent] snmp-agent trap enable

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

Configuring the NMS

1.     Add the device (SNMP agent) 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 2 Adding a device

 

2.     Configure SNMP parameters:

a.     Expand the SNMP Settings area.

b.     Click Configure.

c.     On the page that appears, 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 Editing SNMP parameters

 

3.     On the Add Device page, click OK.

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

Figure 4 Device added

 

Verifying the configuration

1.     Verify that the agent sends notifications to the NMS when the link state of an interface changes:

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

b.     Click the Alarm tab.

c.     From the navigation tree, select Alarm Browse > All Alarms.

 

2.     Back up the agent configuration file on the NMS:

a.     Click the Resource tab.

b.     From the navigation tree, select Device View.

c.     On the page that appears, click the device label link Agent(192.168.100.68).

d.     On the Configuration Center menu, select Backup Configuration File.

Configuration files

#

 snmp-agent  

 snmp-agent community write writetest

 snmp-agent community read readtest

 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 trap enable arp

 snmp-agent target-host trap address udp-domain 192.168.100.4 params securityn

ame traptest

#

Example: Configuring SNMPv3

Network requirements

As shown in Figure 5, the NMS uses SNMPv3 to manage the SNMP agent, and the agent automatically sends notifications to report events to the NMS. The NMS and the agent use the authentication with privacy security model.

Figure 5 Network diagram

 

Software version used

This configuration example was created and verified on S6300-CMW710-R2310.

Configuration restrictions and guidelines

When you configure SNMPv3, follow these restrictions and guidelines:

·     For the NMS to manage the SNMP agent, the SNMP settings on the agent and the NMS must match.

·     The NMS software configuration varies by vendor. This example uses IMC PLAT 7.0 (E0202). For information about configuring the NMS, see the NMS manual.

·     For the NMS to receive notifications from the agent, make sure the following configurations are the same on the NMS and the SNMP agent:

¡     SNMPv3 username.

¡     SNMP protocol version.

¡     Authentication algorithm.

¡     Privacy algorithm.

¡     Authentication and privacy keys.

Configuration procedures

Configuring the SNMP agent

# Enable SNMPv3.

<Agent> system-view

[Agent] snmp-agent sys-info version v3

# Include the mib-2 (OID 1.3.6.1) subtree in the mibtest view.

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

# Create SNMPv3 group managev3group, and assign the authentication with privacy security model to the group. Specify the read-only, read and write, and notify MIB views as mibtest.

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

# Add the user managev3user to the SNMPv3 group managev3group, and set the following details:

·     Authentication algorithm to sha.

·     Authentication key to 123456TESTauth&!.

·     Encryption algorithm to aes128.

·     Privacy key to 123456TESTencr&!.

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

# Enable SNMP notifications.

[Agent] snmp-agent trap enable

# Specify the NMS at 192.168.100.4 as a trap destination, and set the username to managev3user for the traps.

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

Configuring the NMS

1.     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 6 Adding an SNMP template

 

2.     Add the device (SNMP agent) 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 7 Adding a device

 

3.     Configure SNMP parameters:

a.     Expand the SNMP Settings area.

b.     Click Configure.

c.     Select the Select an Existing Template option.

d.     Select template name SNMPv3.

e.     Click OK.

Figure 8 Selecting an existing template

 

4.     On the Add Device page, click OK.

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

Figure 9 Device added

 

Verifying the configuration

1.     Verify that the agent sends notifications to the NMS when the link state of an interface changes:

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

b.     Click the Alarm tab.

c.     From the navigation tree, select Alarm Browse > All Alarms.

2.     Back up the agent configuration file on the NMS:

a.     Click the Resource tab.

b.     From the navigation tree, select Device View.

c.     On the page that appears, click the device label link Agent(192.168.100.68).

d.     On the Configuration Center menu, select Backup Configuration File.

Configuration files

#

 snmp-agent sys-info version v3

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

notify-view mibtest

 snmp-agent mib-view included mibtest internet

 snmp-agent trap enable arp

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

 snmp-agent usm-user v3 managev3user managev3group cipher authentication-mode sha $c$3$5JaJZ6gNXlyNRq2FR2ELDT3QQH1exwJRWdYYq7eLfcBewuM5ncM= privacy-mode aes128 $c$3$+bbXZS4+PnsLDyr16OogzBckaLzR6XMDwZQuLBU8RM+dpw==

#

Related documentation

·     H3C S6300 Switch Series Network Management and Monitoring Configuration Guide-Release 23xx

·     H3C S6300 Switch Series Network Management and Monitoring Command Reference-Release 23xx

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