Reading DDM with tools: CLI, ethtool, SNMP, OpenConfig
The same A2h bytes reach you through many doors: a switch CLI, a Linux NIC, an SNMP poller, a streaming-telemetry pipeline, or a raw hex dump from a programmer. This page is the cookbook — the commands, the OIDs and paths, and how to decode a raw dump by hand when the tool in front of you does not.
Switch and router CLI
| Platform | DDM command | Notes |
|---|---|---|
| Cisco IOS / IOS-XE | show interfaces transceiver detail | thresholds shown alongside values; show idprom interface for identity |
| Cisco NX-OS | show interface ethernet1/1 transceiver details | per-lane for QSFP |
| Cisco IOS-XR | show controllers optics 0/0/0/0 | includes alarms and lane table |
| Juniper Junos | show interfaces diagnostics optics xe-0/0/0 | thresholds and alarm state included |
| Arista EOS | show interfaces ethernet 1 transceiver dom | … transceiver detail adds thresholds |
| Huawei VRP | display transceiver interface XGigabitEthernet0/0/1 verbose | — |
| MikroTik RouterOS | /interface ethernet monitor sfp1 | sfp-temperature, sfp-tx-power, sfp-rx-power, sfp-tx-bias-current |
| Dell OS10 | show interface ethernet 1/1/1 transceiver | — |
| NVIDIA Cumulus / Onyx | l1-show swp1 / show interfaces ethernet 1/1 transceiver | mlxlink -d <dev> -p <port> -m for module details |
| SONiC | show interfaces transceiver eeprom -d Ethernet0 | sfputil show eeprom -d; … presence, … lpmode |
Identity-oriented equivalents and what to look for: Verifying optics on switches.
Linux: ethtool
ethtool -m eth0 # decoded identity + DDM (when the driver supports module EEPROM)
ethtool -m eth0 raw on hex on # raw dump: A0h at 0x0000–0x00ff, A2h at 0x0100–0x01ff (SFP)
ethtool -m eth0 hex on offset 256 length 128 # A2h lower page only
ethtool --show-fec eth0 # FEC mode
ethtool -S eth0 | grep -i fec # fec_corrected_blocks / fec_uncorrectable_blocks
For QSFP/CMIS modules the dump follows the paged layout the driver exposes (lower page, upper 00h, then pages 01h/02h/03h/10h/11h where supported). ethtool decodes SFF-8472 and SFF-8636 fully and CMIS partially depending on kernel version.
Decoding a raw A2h dump by hand
The lower page of A2h at offset 0x0100 in an ethtool -m … raw on hex on dump. Live monitors start at A2h byte 96 → dump offset 0x0160:
0x0160: 1a 80 80 e8 1b 58 0f a0 03 e8 ...
└─┬─┘ └─┬─┘ └─┬─┘ └─┬─┘ └─┬─┘
temp Vcc bias Tx Rx
| Bytes | Raw | Conversion | Value |
|---|---|---|---|
| 96–97 temperature | 1A 80 = 6784 (signed) | ÷ 256 | 26.5 °C |
| 98–99 Vcc | 80 E8 = 33000 | × 100 µV | 3.300 V |
| 100–101 Tx bias | 1B 58 = 7000 | × 2 µA | 14.0 mA |
| 102–103 Tx power | 0F A0 = 4000 | × 0.1 µW = 400 µW; 10·log10(0.400) | −3.98 dBm |
| 104–105 Rx power | 03 E8 = 1000 | × 0.1 µW = 100 µW | −10.0 dBm |
These conversions assume internal calibration (A0h byte 92 bit 5); with external calibration apply the constants from A2h 56–91 first (Calibration). Thresholds sit at A2h 0–39 in the same formats; status/control and flags at 110–117 (Thresholds & alarms). QSFP: module monitors at bytes 22–27, lane monitors at 34–57 of the lower page; CMIS: lower page 14–25 and page 11h 154–201 (Per-lane diagnostics).
SNMP
Standard: ENTITY-SENSOR-MIB (RFC 3433)
Most platforms expose every DDM value as a physical sensor:
| Object | OID | Meaning |
|---|---|---|
| entPhySensorType | 1.3.6.1.2.1.99.1.1.1.1 | 4 voltsDC, 5 amperes, 8 celsius, 14 dBm |
| entPhySensorScale | 1.3.6.1.2.1.99.1.1.1.2 | 8 = units, 7 = milli, 6 = micro… |
| entPhySensorPrecision | 1.3.6.1.2.1.99.1.1.1.3 | decimal places in the value |
| entPhySensorValue | 1.3.6.1.2.1.99.1.1.1.4 | the reading |
| entPhySensorOperStatus | 1.3.6.1.2.1.99.1.1.1.5 | 1 ok, 2 unavailable, 3 nonoperational |
The sensor's index maps to a port through ENTITY-MIB (entPhysicalDescr, entPhysicalContainedIn). A value of type 14 (dBm), scale 8, precision 2 and value −1234 means −12.34 dBm.
Vendor MIBs
| Vendor | MIB / example object |
|---|---|
| Cisco | CISCO-ENTITY-SENSOR-MIB entSensorValue (1.3.6.1.4.1.9.9.91.1.1.1.1.4), thresholds in entSensorThresholdTable |
| Juniper | JUNIPER-DOM-MIB: jnxDomCurrentRxLaserPower (…2636.3.60.1.1.1.1.5, 0.01 dBm), jnxDomCurrentTxLaserBiasCurrent (.6), jnxDomCurrentTxLaserOutputPower (.7), jnxDomCurrentModuleTemperature (.8) |
| Arista, Dell, many others | ENTITY-SENSOR-MIB only |
| Huawei | HUAWEI-ENTITY-EXTENT-MIB optical objects (Rx/Tx power, bias, temperature) |
| MikroTik | MIKROTIK-MIB mtxrOpticalTable (Rx/Tx power, temperature, voltage, bias) |
Open-source NMS (LibreNMS, Zabbix templates, Observium) discover these automatically and graph them; Prometheus uses snmp_exporter with the same OIDs.
Streaming telemetry (gNMI / OpenConfig)
openconfig-platform-transceiver models a module as a component with physical channels:
/components/component[name=Ethernet1/1]/transceiver/state/… vendor, part, serial, form-factor
/components/component[name=…]/transceiver/physical-channels/channel[index=0]/state/input-power/instant
/components/component[name=…]/transceiver/physical-channels/channel[index=0]/state/output-power/instant
/components/component[name=…]/transceiver/physical-channels/channel[index=0]/state/laser-bias-current/instant
/components/component[name=…]/state/temperature/instant
Each leaf carries instant, avg, min, max over the sampling interval. Subscribe in SAMPLE mode at 10–60 s; gnmic → Prometheus/InfluxDB → Grafana is the common pipeline. Vendor-native models (Cisco, Juniper, Arista) expose the same data under their own paths and usually add FEC counters and alarm state.
Windows and other hosts
There is no native DDM tool on Windows; NIC vendor utilities (server adapters) sometimes show module data. FreeBSD shows SFP identity and DDM with ifconfig <if> -v on supported drivers. On a host that cannot read the module, the bench is the fallback.
Poll rates and etiquette
- Module monitors refresh a few times per second; polling every 1–5 minutes is enough for trending and gentle on the two-wire bus.
- Some platforms serialise all module reads through one management CPU — aggressive SNMP walks of hundreds of ports can slow or time out.
- Never run a second master (programmer clip, in-band tool) on a bus the host is polling (Two-wire interface).
Comparing sources
The CLI, SNMP and telemetry all read the same bytes; differences of a few tenths of a dB between them are timing, not error. A difference between the host's reading and the bench reading of the same module is worth understanding: temperature, Vcc and calibration handling change the numbers (Accuracy & limits).
In CodingBox
CodingBox is the bench door: DDM shows the decoded monitors and flags with the raw bytes one click away in the EEPROM editor, and the CSV export feeds the same dashboards that consume SNMP or telemetry — so a module has one history from incoming inspection to decommissioning (Monitoring).