EPC SNMP: Unterschied zwischen den Versionen
Lh (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „=General Information= *SNMP can be used on the '''EPC''' ** to retrieve status information and, if applicable, sensor data via UDP (port 161) ** to switch the…“) |
Lh (Diskussion | Beiträge) |
||
| (6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 18: | Zeile 18: | ||
=SNMP Communities= | =SNMP Communities= | ||
SNMP authenticates network requests using so-called communities. The SNMP request must include the '''public''' community for queries (read access) and the '''private''' community for status changes (write access). | SNMP authenticates network requests using so-called communities. The SNMP request must include the '''public''' community for queries (read access) and the '''private''' community for status changes (write access). | ||
| − | SNMP communities are, so to speak, '''read and write passwords'''. In SNMP versions v1 and v2c, the communities are '''transmitted unencrypted over the network''' and can therefore be easily intercepted within this collision domain using IP sniffers. We therefore strongly recommend using a [ | + | SNMP communities are, so to speak, '''read and write passwords'''. In SNMP versions v1 and v2c, the communities are '''transmitted unencrypted over the network''' and can therefore be easily intercepted within this collision domain using IP sniffers. We therefore strongly recommend using a [https://en.wikipedia.org/wiki/Demilitarized_zone DMZ] or [[Access Control via IP ACL|Access Control via IP ACL]] for access protection when using SNMP! |
=MIBs= | =MIBs= | ||
| Zeile 186: | Zeile 186: | ||
[http://net-snmp.sourceforge.net/ NET-SNMP] provides a widely used collection of SNMP command-line tools (snmpget, snmpset, snmpwalk, etc.) | [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, among other platforms. | NET-SNMP is available for Linux and Windows, among other platforms. | ||
| − | After installing NET-SNMP, you should place the [http://www.gudeads.com/files/software/GUDEADS-EPC-MIB.txt device-specific MIB for the EPC] in NET-SNMP's | + | After installing NET-SNMP, you should place the [http://www.gudeads.com/files/software/GUDEADS-EPC-MIB.txt device-specific MIB for the EPC] in NET-SNMP's '''share''' directory, for example at |
c:\usr\share\snmp\mibs | c:\usr\share\snmp\mibs | ||
or | or | ||
| Zeile 298: | Zeile 298: | ||
=Glossary= | =Glossary= | ||
| − | *[ | + | *[https://en.wikipedia.org/wiki/Simple_Network_Management_Protocol SNMP, MIBs] |
| − | *[ | + | *[https://en.wikipedia.org/wiki/Object_identifier OID] |
Aktuelle Version vom 5. Mai 2026, 09:00 Uhr
General Information
- SNMP can be used on the EPC
- to retrieve status information and, if applicable, sensor data via UDP (port 161)
- to switch the power ports.
For a complete list of SNMP queries and control actions available on your device, open the EPC Web Interface in your browser, go to the Configuration - SNMP menu, and click the Download SNMP MIB link.
The following applies to all devices in the Expert Power Control NET series:
- Supported versions: SNMPv1 and SNMPv2c
- Supported SNMP commands:
- SNMPGET : Retrieve status and sensor information
- SNMPGETNEXT : Retrieve next status information
- SNMPSET : Request EPC state change
- To query the EPC via SNMP, you need a NetworkManagementSystem, such as www2.hp.com/ HP OpenView, OpenNMS, Nagios, etc... or, for example, the simple command-line tools of NET-SNMP, which are also used in the examples below.
SNMP Communities
SNMP authenticates network requests using so-called communities. The SNMP request must include the public community for queries (read access) and the private community for status changes (write access). SNMP communities are, so to speak, read and write passwords. In SNMP versions v1 and v2c, the communities are transmitted unencrypted over the network and can therefore be easily intercepted within this collision domain using IP sniffers. We therefore strongly recommend using a DMZ or Access Control via IP ACL for access protection when using SNMP!
MIBs
The values that can be read or modified by the EPC—known as “managed objects”—are described in Management Information Bases (MIBs). Three different MIBs can be queried from the EPC:
- system
- interface
- powerports
system and interface are standardized MIBs (MIB-II), while powerports is defined in a MIB (GUDEADS-EPC-MIB::gadsEPC) specifically designed for the EPC. These three substructures are organized into so-called OIDs (Object Identifiers). An OID represents the location of a value within the MIB structure. Each OID can alternatively be referred to by its symbolic name (subtree name).
The following example tables apply to the Expert Power Control NET 8x Rev. 2 and 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 ocurred 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, among other platforms. After installing NET-SNMP, you should place the device-specific MIB for the EPC in NET-SNMP's share directory, for example at
c:\usr\share\snmp\mibs
or
/usr/share/snmp/mibs
This allows you to use the ‘subtree names’ instead of the OIDs later on:
- 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 Settings
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
Checking the Powerport 1 status
snmpget -v2c -mALL -c private 192.168.1.232 epc8powerPortState.1
GUDEADS-EPC-MIB::epc8powerPortState.1 = INTEGER: on(1)
Turn on Powerport 1
snmpset -v2c -mALL -c private 192.168.1.232 epc8powerPortState.1 integer 1
downloads
All MIB tables can be downloaded directly from the device. Go to
http://[enter the device's IP address]/config_snmp.html
and click the “Download SNMP MIB” link. The device-specific table will then be displayed.
Example MIBs: