- Table of Contents
-
- H3C MSR1000[2600][3600] Routers Configuration Examples All-in-One-R9141-6W100
- 00-Preface
- 01-Local 802.1X Authentication Configuration Examples
- 02-RADIUS-Based 802.1X Authentication Configuration Examples
- 03-AAA Configuration Examples
- 04-ACL Configuration Examples
- 05-MPLS over ADVPN Configuration Examples
- 06-ARP Attack Protection Configuration Examples
- 07-BFD Configuration Examples
- 08-Basic BGP Configuration Examples
- 09-BGP Route Attribute-Based Route Selection Configuration Examples
- 10-EAA Monitor Policy Configuration Examples
- 11-GRE with OSPF Configuration Examples
- 12-HoVPN Configuration Examples
- 13-IGMP Snooping Configuration Examples
- 14-IGMP Configuration Examples
- 15-IPsec Configuration Examples
- 16-IPsec Digital Certificate Authentication Configuration Examples
- 17-IPv6 IS-IS Configuration Examples
- 18-IPv6 over IPv4 GRE Tunnel Configuration Examples
- 19-IPv6 over IPv4 Manual Tunnel with OSPFv3 Configuration Examples
- 20-IS-IS Configuration Examples
- 21-Combined ISATAP Tunnel and 6to4 Tunnel Configuration Examples
- 22-L2TP over IPsec Configuration Examples
- 23-Multi-Instance L2TP Configuration Examples
- 24-L2TP Multidomain Access Configuration Examples
- 25-MPLS L3VPN Configuration Examples
- 26-MPLS OAM Configuration Examples
- 27-MPLS TE Configuration Examples
- 28-Basic MPLS Configuration Examples
- 29-NAT DNS Mapping Configuration Examples
- 30-NetStream Configuration Examples
- 31-NQA Configuration Examples
- 32-NTP Configuration Examples
- 33-OSPFv3 Configuration Examples
- 34-OSPF Configuration Examples
- 35-OSPF Multi-Process Configuration Examples
- 36-OSPF Multi-Instance Configuration Examples
- 37-Portal Configuration Examples
- 38-PPP Configuration Examples
- 39-RBAC Configuration Examples
- 40-RMON Configuration Examples
- 41-IPv4 NetStream Sampling Configuration Examples
- 42-SNMP Configuration Examples
- 43-SRv6 Configuration Examples
- 44-SSH Configuration Examples
- 45-Tcl Commands Configuration Examples
- 46-VLAN Configuration Examples
- 47-VRRP Configuration Examples
- 48-VXLAN over IPsec Configuration Examples
- 49-WLAN AC Configuration Examples
- 50-Small and Medium-Sized Store Configuration Examples
- 51-Cloudnet VPN Configuration Examples
- 52-Ethernet Link Aggregation Configuration Examples
- 53-Ethernet OAM Configuration Examples
- 54-Outbound Bidirectional NAT Configuration Examples
- 55-NAT Hairpin in C-S Mode Configuration Examples
- 56-Load Sharing NAT Server Configuration Examples
- 57-BIDIR-PIM Configuration Examples
- 58-Control Plane-Based QoS Policy Configuration Examples
- 59-Scheduling a Task Configuration Examples
- 60-Client-Initiated L2TP Tunnel Configuration Examples
- 61-LAC-Auto-Initiated L2TP Tunnel Configuration Examples
- 62-Authorized ARP Configuration Examples
- 63-GTS Configuration Examples
- 64-Traffic Policing Configuration Examples
- 65-Traffic Accounting Configuration Examples
- 66-Mobile Communication Modem Management Configuration Examples
- 67-Port Isolation Configuration Examples
- 68-PBR Configuration Examples
- 69-TFTP Client Software Upgrade Configuration Examples
- 70-FTP Client Software Upgrade Configuration Examples
- 71-FTP Server Software Upgrade Configuration Examples
- 72-Routing Policy Configuration Examples
- 73-Software Upgrade from the BootWare Menu Configuration Examples
- 74-Mirroring Configuration Examples
- Related Documents
-
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.
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.
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.
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.
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.
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.
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)