FAQ EPC SNMP Engl: Unterschied zwischen den Versionen
Mb (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „=General= *SNMP can be used on an '''EPC''' ** to get UDP (Port 161) Status and Sensor informations ** to switch Powerports For a complete list of possible S…“) |
Mb (Diskussion | Beiträge) |
||
Zeile 185: | Zeile 185: | ||
=NET-SNMP= | =NET-SNMP= | ||
− | [http://net-snmp.sourceforge.net/ NET-SNMP] provides a widely used collection of SNMP command line tools (snmpget, snmpset, | + | [http://net-snmp.sourceforge.net/ NET-SNMP] provides a widely used collection of SNMP command line tools (snmpget, snmpset, snmpwalk, etc.). |
NET-SNMP is available for Linux and Windows. | NET-SNMP is available for Linux and Windows. | ||
Aktuelle Version vom 21. Juni 2013, 12:57 Uhr
General
- SNMP can be used on an EPC
- to get UDP (Port 161) Status and Sensor informations
- to switch Powerports
For a complete list of possible SNMP requests and actions go ito the Webinterface of the EPC and enter the Configuration - SNMP menu. There you find the link Download SNMP MIB.
For all devices of the Expert Power Control NET series applies:
- supported SNMP Versions: SNMPv1 und SNMPv2c
- supported SNMP Commands:
- SNMPGET : request Status- and Sensor informations
- SNMPGETNEXT : request next Status information
- SNMPSET : request EPC state change
- To query the EPC via SNMP, you need a NetworkManagmentSystem, like e.g. HP-OpenView, OpenNMS, Nagios, etc... or simple command line tools like e.g. NET-SNMP that are used in the following examples.
SNMP Communities
SNMP authenticates the network requests by so-called communities. Every SNMP get request (read access) has to be accompanied with a public community, and every condition change request (write access) needs a private community send along. The SNMP communities are, so to speak, read and write passwords. In SNMP versions v1 and v2c the communities are sent unencrypted across the network and can therefore easily be intercepted with IP sniffers. We recommend to use SNMP in a DMZ demilitarized zone or use the IP ACL for access control!
MIBs
The values that can be read or written, the so-called 'Managed Objects', are arranged in Management Information Bases (short MIBs). Three different types of Objects can be queried:
- system
- interface
- powerports
system und interface are standardized MIB's (MIB-II), the powerports structure is in the enterprise part of the MIB (GUDEADS-EPC-MIB::gadsEPC) that was constructed especially for the EPC. Subordinated to these three structures are the OIDs (Object Identifiers). An OID represents the location of a value inside the MIB. Each OID may alternatively be referred to with its symbol name (subtree name).
The following example tables apply for the Expert Power Control NET 8x Rev. 2 or the Expert Power Control NET 8x 8010
system
subtree name | OID |
system | 1.3.6.1.2.1.1 |
sysDescr | 1.3.6.1.2.1.1.1 |
sysObjectID | 1.3.6.1.2.1.1.2 |
sysUpTime | 1.3.6.1.2.1.1.3 |
sysContact | 1.3.6.1.2.1.1.4 |
sysName | 1.3.6.1.2.1.1.5 |
sysLocation | 1.3.6.1.2.1.1.6 |
sysServices | 1.3.6.1.2.1.1.7 |
interface
subtree name | OID |
ifIndex | 1.3.6.1.2.1.2.2.1.1 |
ifDescr | 1.3.6.1.2.1.2.2.1.2 |
ifType | 1.3.6.1.2.1.2.2.1.3 |
ifMtu | 1.3.6.1.2.1.2.2.1.4 |
ifSpeed | 1.3.6.1.2.1.2.2.1.4 |
ifPhysAddress | 1.3.6.1.2.1.2.2.1.6 |
ifAdminStatus | 1.3.6.1.2.1.2.2.1.7 |
ifOperStatus | 1.3.6.1.2.1.2.2.1.8 |
ifLastChange | 1.3.6.1.2.1.2.2.1.9 |
ifInOctets | 1.3.6.1.2.1.2.2.1.10 |
ifInUcastPkt | 1.3.6.1.2.1.2.2.1.11 |
ifInNUcastPkts | 1.3.6.1.2.1.2.2.1.12 |
ifInDiscards | 1.3.6.1.2.1.2.2.1.13 |
ifInErrors | 1.3.6.1.2.1.2.2.1.14 |
ifInUnknownProtos | 1.3.6.1.2.1.2.2.1.15 |
ifOutOctets | 1.3.6.1.2.1.2.2.1.16 |
ifOutUcastPkts | 1.3.6.1.2.1.2.2.1.17 |
ifOutNUcastPkts | 1.3.6.1.2.1.2.2.1.18 |
ifOutDiscards | 1.3.6.1.2.1.2.2.1.19 |
ifOutErrors | 1.3.6.1.2.1.2.2.1.20 |
ifOutQLen | 1.3.6.1.2.1.2.2.1.21 |
ifSpecific | 1.3.6.1.2.1.2.2.1.22 |
powerports
subtree name | OID | description | r / w |
GUDEADS-EPC-MIB | 1.3.6.1.4.1.28507 | Gude Analog- und Digitsysteme GmbH MIB (Private Enterprise) | r |
GUDEADS-EPC-MIB::gadsEPC8 | 1.3.6.1.4.1.28507.1 | Expert Power Control MIB | r |
epc8powerports | 1.3.6.1.4.1.28507.1.1.2 | Expert Power Control's Powerports | r |
epc8portNumber | 1.3.6.1.4.1.28507.1.1.2.1 | total number of powerports | r |
epc8portTable | 1.3.6.1.4.1.28507.1.1.2.2 | Expert Power Control's Powerports SMI-Table | r |
epc8powerPortName | 1.3.6.1.4.1.28507.1.1.2.2.1.2 | A textual string containing name of a PowerPort. | r |
epc8powerPortState | 1.3.6.1.4.1.28507.1.1.2.2.1.3 | current state a PowerPort (0=off, 1=on) | rw |
epc8powerPortSwitchCount | 1.3.6.1.4.1.28507.1.1.2.2.1.4 | total number of switch actions occurred on a powerPort. | r |
NET-SNMP
NET-SNMP provides a widely used collection of SNMP command line tools (snmpget, snmpset, snmpwalk, etc.). NET-SNMP is available for Linux and Windows.
After the installation of NET-SNMP you should put the device specific MIB of the EPC in net-snmp's share directory, e.g. in
c:\usr\share\snmp\mibs
or
/usr/share/snmp/mibs
So you can later use the 'subtree names' instead of the OID's:
- subtree names
snmpwalk -v2c -mALL -c public 192.168.1.232 epc8powerports
- OID
snmpwalk -v2c -mALL -c public 192.168.1.232 1.3.6.1.4.1.28507
EPC Setup
http://www.gudeads.com/wiki/images/epc_v2.2_config_snmp.jpg
Examples
walk system oids
snmpwalk -v2c -mALL -c public 192.168.1.232 system
SNMPv2-MIB::sysDescr.0 = STRING: ExpertPowerControl NET 8x SNMPv2-MIB::sysObjectID.0 = OID: GUDEADS-EPC-MIB::gadsEPC DISMAN-EXPRESSION-MIB::sysUpTimeInstance = Timeticks: (293200) 0:48:52.00 SNMPv2-MIB::sysContact.0 = STRING: http://www.gudeads.com/ SNMPv2-MIB::sysName.0 = STRING: ExpPowerControl SNMPv2-MIB::sysLocation.0 = STRING: SNMPv2-MIB::sysServices.0 = INTEGER: 0
walk interface oids
snmpwalk -v2c -mALL -c public 192.168.1.232 interfaces
RFC1213-MIB::interfaces.0.0 = INTEGER: 1 RFC1213-MIB::ifIndex.1 = INTEGER: 1 RFC1213-MIB::ifDescr.1 = STRING: "eth_cf52235" RFC1213-MIB::ifType.1 = INTEGER: ethernet-csmacd(6) RFC1213-MIB::ifMtu.1 = INTEGER: 1500 RFC1213-MIB::ifSpeed.1 = Gauge32: 10000 RFC1213-MIB::ifPhysAddress.1 = Hex-STRING: 00 19 32 00 00 07 RFC1213-MIB::ifAdminStatus.1 = INTEGER: up(1) RFC1213-MIB::ifOperStatus.1 = INTEGER: up(1) RFC1213-MIB::ifLastChange.1 = Wrong Type (should be Timeticks): INTEGER: 0 RFC1213-MIB::ifInOctets.1 = Counter32: 450378 RFC1213-MIB::ifInUcastPkts.1 = Counter32: 661 RFC1213-MIB::ifInNUcastPkts.1 = Counter32: 3254 RFC1213-MIB::ifInDiscards.1 = Counter32: 0 RFC1213-MIB::ifInErrors.1 = Counter32: 0 RFC1213-MIB::ifInUnknownProtos.1 = Counter32: 0 RFC1213-MIB::ifOutOctets.1 = Counter32: 255309 RFC1213-MIB::ifOutUcastPkts.1 = Counter32: 591 RFC1213-MIB::ifOutNUcastPkts.1 = Counter32: 6 RFC1213-MIB::ifOutDiscards.1 = Counter32: 0 RFC1213-MIB::ifOutErrors.1 = Counter32: 594 RFC1213-MIB::ifOutQLen.1 = Gauge32: 0 RFC1213-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero.0
walk powerports
snmpwalk -v2c -mALL -c public 192.168.1.232 epc8powerports
GUDEADS-EPC-MIB::epc8portNumber = INTEGER: 8 GUDEADS-EPC-MIB::epc8powerPortName.1 = STRING: "SwitchPort 1" GUDEADS-EPC-MIB::epc8powerPortName.2 = STRING: "SwitchPort 2" GUDEADS-EPC-MIB::epc8powerPortName.3 = STRING: "SwitchPort 3" GUDEADS-EPC-MIB::epc8powerPortName.4 = STRING: "SwitchPort 4" GUDEADS-EPC-MIB::epc8powerPortName.5 = STRING: "SwitchPort 5" GUDEADS-EPC-MIB::epc8powerPortName.6 = STRING: "SwitchPort 6" GUDEADS-EPC-MIB::epc8powerPortName.7 = STRING: "SwitchPort 7" GUDEADS-EPC-MIB::epc8powerPortName.8 = STRING: "SwitchPort 8" GUDEADS-EPC-MIB::epc8powerPortState.1 = INTEGER: on(1) GUDEADS-EPC-MIB::epc8powerPortState.2 = INTEGER: on(1) GUDEADS-EPC-MIB::epc8powerPortState.3 = INTEGER: off(0) GUDEADS-EPC-MIB::epc8powerPortState.4 = INTEGER: off(0) GUDEADS-EPC-MIB::epc8powerPortState.5 = INTEGER: off(0) GUDEADS-EPC-MIB::epc8powerPortState.6 = INTEGER: off(0) GUDEADS-EPC-MIB::epc8powerPortState.7 = INTEGER: off(0) GUDEADS-EPC-MIB::epc8powerPortState.8 = INTEGER: off(0) GUDEADS-EPC-MIB::epc8powerPortSwitchCount.1 = Counter32: 5 GUDEADS-EPC-MIB::epc8powerPortSwitchCount.2 = Counter32: 1 GUDEADS-EPC-MIB::epc8powerPortSwitchCount.3 = Counter32: 0 GUDEADS-EPC-MIB::epc8powerPortSwitchCount.4 = Counter32: 0 GUDEADS-EPC-MIB::epc8powerPortSwitchCount.5 = Counter32: 0 GUDEADS-EPC-MIB::epc8powerPortSwitchCount.6 = Counter32: 0 GUDEADS-EPC-MIB::epc8powerPortSwitchCount.7 = Counter32: 0 GUDEADS-EPC-MIB::epc8powerPortSwitchCount.8 = Counter32: 0
Query the Powerport 1 state
snmpget -v2c -mALL -c private 192.168.1.232 epc8powerPortState.1
GUDEADS-EPC-MIB::epc8powerPortState.1 = INTEGER: on(1)
Turn Powerport 1 on
snmpset -v2c -mALL -c private 192.168.1.232 epc8powerPortState.1 integer 1
downloads
All MIB-Tables can be accessed directly from the device. Under
http://[device IP]/config_snmp.html
click on the Link "Download SNMP MIB". The device specific MIB will be shown.
Example-MIBs: