Test snmp using a Huawei virtual machine combined with VMware
Recently, we have been studying zabbix monitoring. In actual production, we not only need to monitor linux Hosts, but also need to monitor network equipment firewalls, we can install zabbix-agernt on linux Hosts, but we cannot install zabbix-agernt on vro switching. Therefore, we must use snmp (Simple Network Management Protocol) analyze the relevant data on the mobile phone device. Let's see how to configure the data on the Huawei device! Topology construction 1. drag a route to a cloud, configure the cloud, and add two ports 2. connect. This VMNAT8 is the network interface of the virtual machine. You can set the gateway on the linux host to execute the vro for access later. Configure snmp [R1] snmp-agent community read huawei [R1] snmp-agent community write huawei [R1] snmp-agent sys-info version all to install snmpwalk 1. install the snmp software package, and directly install net-snmp-* yum-y install net-snmp-* 2. configure the IP address of the network connection pointing to the vro as the gateway
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0"BOOTPROTO="static"ONBOOT="yes"TYPE="Ethernet"IPADDR=10.1.100.152PREFIX=24GATEWAY=10.1.100.3DNS1=10.1.100.2DNS2=114.114.114.114
3. use snmpwalk to connect to the host.-v indicates that snmp v2 is used to connect to the host.-c indicates the string snmpwalk-v 2c-c huawei 10.1.100.3 set on the vro. Then you can see a lot of information, for example, interface information and IP address information
SNMPv2-MIB::sysDescr.0 = STRING: Huawei AR3260 Huawei Versatile Routing Platform Software VRP (R) software,Version 5.130 (AR3260 V200R003C00) Copyright (C) 2011-2012 Huawei Technologies Co., LtdSNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.2011.2.224.7DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (57262) 0:09:32.62SNMPv2-MIB::sysContact.0 = STRING: R&D Shenzhen, Huawei Technologies Co., Ltd.SNMPv2-MIB::sysName.0 = STRING: R1SNMPv2-MIB::sysLocation.0 = STRING: Shenzhen ChinaSNMPv2-MIB::sysServices.0 = INTEGER: 78IF-MIB::ifNumber.0 = INTEGER: 5IF-MIB::ifIndex.1 = INTEGER: 1IF-MIB::ifIndex.2 = INTEGER: 2IF-MIB::ifIndex.3 = INTEGER: 3IF-MIB::ifIndex.4 = INTEGER: 4IF-MIB::ifIndex.5 = INTEGER: 5IF-MIB::ifDescr.1 = STRING: InLoopBack0IF-MIB::ifDescr.2 = STRING: NULL0IF-MIB::ifDescr.3 = STRING: GigabitEthernet0/0/0IF-MIB::ifDescr.4 = STRING: GigabitEthernet0/0/1IF-MIB::ifDescr.5 = STRING: GigabitEthernet0/0/2IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)IF-MIB::ifType.2 = INTEGER: other(1)IF-MIB::ifType.3 = INTEGER: ethernetCsmacd(6)IF-MIB::ifType.4 = INTEGER: ethernetCsmacd(6)IF-MIB::ifType.5 = INTEGER: ethernetCsmacd(6)IF-MIB::ifMtu.1 = INTEGER: 1500IF-MIB::ifMtu.2 = INTEGER: 1500IF-MIB::ifMtu.3 = INTEGER: 1500IF-MIB::ifMtu.4 = INTEGER: 1500IF-MIB::ifMtu.5 = INTEGER: 1500IF-MIB::ifSpeed.1 = Gauge32: