rhel5.8 and rhel6.3 Enable SNMP

Source: Internet
Author: User
Tags snmp snmp port snmpwalk

I. Environmental description

Operating system: rhel5.9_x86_64

Machine on the side: A2 (10.0.0.13)

Remote machine: A3 (10.0.0.14)


II. deployment Process

[[email protected] ~]# yum -y install net-snmp[[email protected] ~]#  CD /ETC/SNMP[[EMAIL PROTECTED] SNMP]# LSSNMPD.CONF[[EMAIL PROTECTED] SNMP] # lssnmpd.conf[[email protected] snmp]# cp snmpd.conf snmpd.conf.bak[[email  PROTECTED] SNMP]# VIM SNMPD.CONFA, changing the community name (to give public the actual needs) #        sec.name  source           COMMUNITYCOM2SEC NOTCONFIGUSER  DEFAULT       PUBLICB, changing permission settings #       group           Context sec.model sec.level prefix read   write  notifaccess   notConfigGroup  ""       any        noauth    exacT  systemview none none change "SystemView" to "all" C, logout statement #view all     included  .1                                80view  all    included  .1                                 80

Third, test SNMP enabled condition

A. Turn on SNMP Service [[email protected] snmp]# /etc/init.d/snmpd restart[[email protected]  snmp]# chkconfig snmpd on[[email protected] snmp]# chkconfig --list  snmpdsnmpd           0:off   1:off    2:on    3:on    4:on    5:on  &NBSP;&NBSP;&NBSP;6:OFFB, check that the SNMP port is open [[email protected] snmp]# netstat -tunlp |  grep 161udp        0      0  0.0.0.0:161                  0.0.0.0:*                                3731/ Snmpd c, local test SNMP data [[Email protected] ~]# snmpwalk -v 2c -c public localhost  The system test results are as follows: Snmpv2-mib::sysdescr.0 = string: linux a2.example.com 2.6.18-348.el5   #1  smp wed nov 28 21:22:00 est 2012 x86_64snmpv2-mib:: sysobjectid.0 = oid: net-snmp-mib::netsnmpagentoids.10disman-event-mib::sysuptimeinstance  = timeticks:  (161952)  0:26:59.52SNMPv2-MIB::sysContact.0 = STRING: Root  <[email protected]>  (configure /etc/snmp/snmp.local.conf) snmpv2-mib::sysname.0 =  STRING: a2.example.comSNMPv2-MIB::sysLocation.0 = STRING: Unknown  (edit / etc/snmp/snmpd.conf) snmpv2-mib::sysorlastchange.0 = timeticks:  (0)  0:00:00.00SNMPv2-MIB:: Sysorid.1 = oid: snmpv2-mib::snmpmibsnmpv2-mib::sysorid.2 = oid: tcp-mib:: Tcpmibsnmpv2-mib::sysorid.3 = oid: ip-mib::ipsnmpv2-mib::sysorid.4 = oid: udp-mib::udpmibsnmpv2-mib::sysorid.5 = oid:  Snmp-view-based-acm-mib::vacmbasicgroupsnmpv2-mib::sysorid.6 = oid: snmp-framework-mib:: Snmpframeworkmibcompliancesnmpv2-mib::sysorid.7 = oid: snmp-mpd-mib:: Snmpmpdcompliancesnmpv2-mib::sysorid.8 = oid: snmp-user-based-sm-mib:: usmmibcompliancesnmpv2-mib::sysordescr.1 = string: the mib module for  snmpv2 entitiessnmpv2-mib::sysordescr.2 = string: the mib module for  managing tcp implementationssnmpv2-mib::sysordescr.3 = string: the mib  module for managing ip and icmp implementationssnmpv2-mib::sysordescr.4 =  string: the mib module for managing udp implementationssnmpv2-mib:: Sysordescr.5 = string: view-based access control model for snmp. Snmpv2-mib::sysordescr.6 = string: the snmp management architecture mib. Snmpv2-mib::sysordescr.7 = string: the mib for message processing and  Dispatching.SNMPv2-MIB::sysORDescr.8 = STRING: The management information  Definitions for the snmp user-based security model.snmpv2-mib::sysoruptime.1  = Timeticks:  (0)  0:00:00.00SNMPv2-MIB::sysORUpTime.2 = Timeticks:  (0)  0:00:00.00SNMPv2-MIB::sysORUpTime.3 = Timeticks:  (0)  0:00:00.00snmpv2-mib:: sysoruptime.4 = timeticks:  (0)  0:00:00.00snmpv2-mib::sysoruptime.5 = timeticks:   (0)  0:00:00.00SNMPv2-MIB::sysORUpTime.6 = Timeticks:  (0)  0:00:00.00snmpv2-mib:: sysoruptime.7 = timeticks:  (0)  0:00:00.00snmpv2-mib::sysoruptime.8 = timeticks:   (0)   0:00:00.00d, distal test snmp[[email protected] ~]# snmpwalk -v 2c -c public  10.0.0.13 systemsnmpv2-mib::sysdescr.0 = string: linux a2.example.com  2.6.18-348.el5  #1  smp wed nov 28 21:22:00 est 2012 x86_ 64snmpv2-mib::sysobjectid.0 = oid: net-snmp-mib::netsnmpagentoids.10disman-event-mib:: sysuptimeinstance = timeticks:  (45700)  0:07:37.00SNMPv2-MIB::sysContact.0 =  string: root <[email protected]>  (configure /etc/snmp/snmp.local.conf) Snmpv2-mib::sysname.0 = string: a2.example.comsnmpv2-mib::syslocation.0 = string:  Unknown  (edit /etc/snmp/snmpd.conf) snmpv2-mib::sysorlastchange.0 = timeticks:  ( 0)  0:00:00.00snmpv2-mib::sysorid.1 = oid: snmpv2-mib::snmpmibsnmpv2-mib::sysorid.2 =  OID: TCP-MIB::tcpMIBSNMPv2-MIB::sysORID.3 = oid: ip-mib::ipsnmpv2-mib::sysorid.4 = oid: udp-mib::udpmibsnmpv2-mib::sysorid.5  = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroupSNMPv2-MIB::sysORID.6 = OID:  Snmp-framework-mib::snmpframeworkmibcompliancesnmpv2-mib::sysorid.7 = oid: snmp-mpd-mib:: Snmpmpdcompliancesnmpv2-mib::sysorid.8 = oid: snmp-user-based-sm-mib:: usmmibcompliancesnmpv2-mib::sysordescr.1 = string: the mib module for  snmpv2 entitiessnmpv2-mib::sysordescr.2 = string: the mib module for  managing tcp implementationssnmpv2-mib::sysordescr.3 = string: the mib  module for managing ip and icmp implementationssnmpv2-mib::sysordescr.4 =  string: the mib module for managing udp implementationssnmpv2-mib:: Sysordescr.5 = string: view-based access&nBsp Control model for snmp. Snmpv2-mib::sysordescr.6 = string: the snmp management architecture mib. Snmpv2-mib::sysordescr.7 = string: the mib for message processing and  Dispatching.SNMPv2-MIB::sysORDescr.8 = STRING: The management information  Definitions for the snmp user-based security model.snmpv2-mib::sysoruptime.1  = Timeticks:  (0)  0:00:00.00SNMPv2-MIB::sysORUpTime.2 = Timeticks:  (0)  0:00:00.00SNMPv2-MIB::sysORUpTime.3 = Timeticks:  (0)  0:00:00.00snmpv2-mib:: sysoruptime.4 = timeticks:  (0)  0:00:00.00snmpv2-mib::sysoruptime.5 = timeticks:   (0)  0:00:00.00SNMPv2-MIB::sysORUpTime.6 = Timeticks:  (0)  0:00:00.00snmpv2-mib:: sysoruptime.7 = timeticks:  (0)  0:00:00.00snmpv2-mib::sysoruptime.8 = timeticks:  (0)  0:00:00.00 

Iv. Matters of note


A, shut down the firewall and selinux (avoid some unnecessary tossing, the suggestion situation iptables)


b, if it is necessary to open, we recommend opening 161 port, otherwise the test will not pass

Iptables-a rh-firewall-1-input-p udp-m State--state new-m UDP--dport 161-j accep


C, after the configuration is complete, restart the next iptables


This article is from the "Frozen vs watermelon" blog, so be sure to keep this source http://molewan.blog.51cto.com/287340/1891386

rhel5.8 and rhel6.3 Enable SNMP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.