- Table of Contents
-
- H3C S12500R Ethernet Switch Router Series Config Examples-Release 36xx-6W100
- 01-Login Management Configuration Examples
- 02-RBAC Configuration Examples
- 03-Software Upgrade Examples
- 04-Ethernet Link Aggregation Configuration Examples
- 05-Port Isolation Configuration Examples
- 06-Spanning Tree Configuration Examples
- 07-VLAN Configuration Examples
- 08-VLAN Tagging Configuration Examples
- 09-DHCP Snooping Configuration Examples
- 10-Cross-Subnet Dynamic IP Address Allocation Configuration Examples
- 11-IPv6 over IPv4 Tunneling with OSPFv3 Configuration Examples
- 12-GRE Tunnel Configuration Examples
- 13-GRE with OSPF Configuration Examples
- 14-OSPF Configuration Examples
- 15-IS-IS Configuration Examples
- 16-BGP Configuration Examples
- 17-Policy-Based Routing Configuration Examples
- 18-OSPFv3 Configuration Examples
- 19-IPv6 IS-IS Configuration Examples
- 20-Routing Policy Configuration Examples
- 21-IGMP Snooping Configuration Examples
- 22-IGMP Configuration Examples
- 23-MLD Snooping Configuration Examples
- 24-Basic MPLS Configuration Examples
- 25-MPLS L3VPN Configuration Examples
- 26-ACL Configuration Examples
- 27-Control Plane-Based QoS Policy Configuration Examples
- 28-Traffic Policing Configuration Examples
- 29-GTS and Rate Limiting Configuration Examples
- 30-Priority Mapping and Queue Scheduling Configuration Examples
- 31-Traffic Filtering Configuration Examples
- 32-AAA Configuration Examples
- 33-SSH Configuration Examples
- 34-IP Source Guard Configuration Examples
- 35-Ethernet OAM Configuration Examples
- 36-CFD Configuration Examples
- 37-DLDP Configuration Examples
- 38-VRRP Configuration Examples
- 39-BFD Configuration Examples
- 40-NTP Configuration Examples
- 41-SNMP Configuration Examples
- 42-NQA Configuration Examples
- 43-Mirroring Configuration Examples
- 44-sFlow Configuration Examples
- 45-OpenFlow Configuration Examples
- 46-MAC Address Table Configuration Examples
- 47-Static Multicast MAC Address Entry Configuration Examples
- 48-IP Unnumbered Configuration Examples
- 49-Congestion Avoidance and Queue Scheduling Configuration Examples
- 50-Attack Protection Configuration Examples
- 51-Smart Link Configuration Examples
- 52-RRPP Configuration Examples
- 53-BGP Route Selection Configuration Examples
- 54-IS-IS Route Summarization Configuration Examples
- 55-MPLS OAM Configuration Examples
- 56-MPLS TE Configuration Examples
- 57-VXLAN Configuration Examples
- 58-NetStream Configuration Examples
- 59-EVPN-DCI over an MPLS L3VPN Network Configuration Examples
- 60-PTP Configuration Examples
- 61-S-MLAG Configuration Examples
- 62-MPLS SR Configuration Examples
- 63-Puppet Configuration Examples
- Related Documents
-
Title | Size | Download |
---|---|---|
41-SNMP Configuration Examples | 131.25 KB |
|
H3C S12500R Switch Router Series |
SNMP Configuration Examples |
|
Copyright © 2021 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.
Contents
Example: Configuring SNMPv1 or SNMPv2c
Configuring the SNMP agent in RBAC mode
Configuring the SNMP agent in VACM mode
SNMPv3 configuration in RBAC mode
SNMPv3 configuration in VACM mode
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 configuration
As shown in Figure 1, an IMC server acts as the NMS and the device acts as the agent. The NMS uses SNMPv1/SNMPv2c to manage the SNMP agent, and the agent automatically sends notifications to report events to the NMS.
Software version used
This configuration example was created and verified on R3606.
Restrictions and guidelines
When you configure SNMPv1 or SNMPv2c, follow these restrictions and guidelines:
· The configuration procedure is the same for SNMPv1 and SNMPv2c. 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 the IMC PLAT 7.0 (E0202). For information about configuring the NMS, see the NMS manual.
Procedures
Configuring the SNMP agent
# Specify SNMPv2c, and create read-only community readtest and 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
[Agent] snmp-agent trap enable
[Agent] snmp-agent target-host trap address udp-domain 192.168.100.4 params securityname readtest
Configuring the NMS
1. Add the device (SNMP agent) to the IMC:
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.
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 Configuring SNMP parameters
3. On the Add Device page, click OK.
The device is successfully added to the IMC, as shown in Figure 4.
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.
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 trap enable syslog
snmp-agent target-host trap address udp-domain 192.168.100.4 params securityn
ame readtest
#
Example: Configuring SNMPv3
Network configuration
As shown in Figure 5, an IMC server acts as the NMS and the device acts as the agent. The NMS uses SNMPv3 to manage the SNMP agent, and the agent automatically sends notifications to report events to the NMS.
Software version used
This configuration example was created and verified on R3606.
Restrictions and guidelines
When you configure SNMPv3, follow these restrictions and guidelines:
· SNMPv3 supports VACM and RBAC access control modes. This example provides SNMPv3 configuration procedures in both modes. See "Configuring the SNMP agent in RBAC mode" and "Configuring the SNMP agent in VACM mode"..
· 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 the 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.
Procedures
Configuring the SNMP agent in RBAC mode
# Enable SNMPv3.
<Agent> system-view
[Agent] snmp-agent sys-info version v3
# Create user role test, and assign test read and write access to the objects under the internet subtree (OID: 1.3.6.1).
[Agent] role name test
[Agent-role-test] rule 1 permit read write oid 1.3.6.1
[Agent-role-test] quit
# Create SNMPv3 user managev3user. Assign user role test to managev3user. Set the authentication algorithm to sha, authentication key to 123456TESTauth&!, encryption algorithm to aes128, and encyption key to 123456TESTencr&!.
[Agent] snmp-agent usm-user v3 managev3user user-role test 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 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 SNMP agent in VACM mode
# 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 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 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.
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.
Configuration files
SNMPv3 configuration in RBAC mode
#
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 trap enable arp
snmp-agent trap enable syslog
snmp-agent target-host trap address udp-domain 192.168.100.4 params securityname managev3user v3 privacy
snmp-agent usm-user v3 managev3user user-role test cipher authentication-mode sha $c$3$5JaJZ6gNXlyNRq2FR2ELDT3QQH1exwJRWdYYq7eLfcBewuM5ncM= privacy-mode aes128 $c$3$+bbXZS4+PnsLDyr16OogzBckaLzR6XMDwZQuLBU8RM+dpw==
#
role name test
rule 1 permit read oid 1.3.6.1
#
SNMPv3 configuration in VACM mode
#
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 mib-view included mibtest internet
snmp-agent trap enable arp
snmp-agent trap enable syslog
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 S12500R Switch Router Series Network Management and Monitoring Configuration Guide-R3606
· H3C S12500R Switch Router Series Network Management and Monitoring Command Reference-R3606