CodingBox Documentation

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

PlatformDDM commandNotes
Cisco IOS / IOS-XEshow interfaces transceiver detailthresholds shown alongside values; show idprom interface for identity
Cisco NX-OSshow interface ethernet1/1 transceiver detailsper-lane for QSFP
Cisco IOS-XRshow controllers optics 0/0/0/0includes alarms and lane table
Juniper Junosshow interfaces diagnostics optics xe-0/0/0thresholds and alarm state included
Arista EOSshow interfaces ethernet 1 transceiver dom… transceiver detail adds thresholds
Huawei VRPdisplay transceiver interface XGigabitEthernet0/0/1 verbose
MikroTik RouterOS/interface ethernet monitor sfp1sfp-temperature, sfp-tx-power, sfp-rx-power, sfp-tx-bias-current
Dell OS10show interface ethernet 1/1/1 transceiver
NVIDIA Cumulus / Onyxl1-show swp1 / show interfaces ethernet 1/1 transceivermlxlink -d <dev> -p <port> -m for module details
SONiCshow interfaces transceiver eeprom -d Ethernet0sfputil 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
BytesRawConversionValue
96–97 temperature1A 80 = 6784 (signed)÷ 25626.5 °C
98–99 Vcc80 E8 = 33000× 100 µV3.300 V
100–101 Tx bias1B 58 = 7000× 2 µA14.0 mA
102–103 Tx power0F A0 = 4000× 0.1 µW = 400 µW; 10·log10(0.400)−3.98 dBm
104–105 Rx power03 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:

ObjectOIDMeaning
entPhySensorType1.3.6.1.2.1.99.1.1.1.14 voltsDC, 5 amperes, 8 celsius, 14 dBm
entPhySensorScale1.3.6.1.2.1.99.1.1.1.28 = units, 7 = milli, 6 = micro…
entPhySensorPrecision1.3.6.1.2.1.99.1.1.1.3decimal places in the value
entPhySensorValue1.3.6.1.2.1.99.1.1.1.4the reading
entPhySensorOperStatus1.3.6.1.2.1.99.1.1.1.51 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

VendorMIB / example object
CiscoCISCO-ENTITY-SENSOR-MIB entSensorValue (1.3.6.1.4.1.9.9.91.1.1.1.1.4), thresholds in entSensorThresholdTable
JuniperJUNIPER-DOM-MIB: jnxDomCurrentRxLaserPower (…2636.3.60.1.1.1.1.5, 0.01 dBm), jnxDomCurrentTxLaserBiasCurrent (.6), jnxDomCurrentTxLaserOutputPower (.7), jnxDomCurrentModuleTemperature (.8)
Arista, Dell, many othersENTITY-SENSOR-MIB only
HuaweiHUAWEI-ENTITY-EXTENT-MIB optical objects (Rx/Tx power, bias, temperature)
MikroTikMIKROTIK-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).