🛸 Hitchhiker's Guide — Phase 03: Management Protocols
Read this if: you need to talk to a BMC/PDU/CDU and "Redfish, IPMI, SNMP" is an alphabet soup. This is the compressed field guide — the tree, the commands, the gotchas.
0. The 30-second mental model
Three ways to talk to hardware out-of-band, three eras:
- Redfish = the hardware as a REST/JSON tree (modern, secure, the one to master).
- IPMI = the hardware as a binary command set (legacy, deprecated, still everywhere).
- SNMP = the hardware as a tree of numbered variables you poll (PDUs/switches).
Senior move: Redfish-first with IPMI/SNMP as fallback drivers behind one interface.
If you remember one rule: follow @odata.id links, never hardcode Redfish paths.
1. The Redfish tree (tattoo this)
/redfish/v1 ServiceRoot (GET, no auth)
├─ /Systems/{id} the HOST → PowerState, boot, CPUs; Actions: Reset
├─ /Chassis/{id} the BOX → /Power (PSUs, draw, cap), /Thermal (temps, fans)
├─ /Managers/{id} the BMC → its firmware, network, VirtualMedia, SerialConsole
├─ /UpdateService firmware → returns a TASK
├─ /EventService push/SSE events
├─ /TaskService long ops
└─ /SessionService login → X-Auth-Token
Which resource owns what (the #1 confusion): System = host power/boot, Chassis = temps/PSUs, Manager = the BMC itself. One node = a System + a Chassis + a Manager.
2. Redfish verbs
| Want | Do |
|---|---|
| read | GET (follow @odata.id); $expand to inline a collection |
| power on/off/cycle | POST .../Actions/ComputerSystem.Reset { "ResetType": "..." } |
| change config | PATCH the resource |
| log in | POST /SessionService/Sessions → use X-Auth-Token → DELETE to log out |
| firmware update | POST to UpdateService → 202 + Task → poll Task |
Read …@Redfish.AllowableValues for what a field/action accepts — don't guess.
3. IPMI in five commands (ipmitool -I lanplus -H ip -U u -P p ...)
chassis power status|on|off|cycle|reset
sdr list # sensors + readings + thresholds
sensor list # detailed sensors
sel list # the System Event Log (hardware events)
chassis bootdev pxe # boot-once override (Phase 05)
sol activate # Serial-over-LAN console
Sensor reading = value + thresholds: lnr lc lnc | reading | unc uc unr. Health is
"which threshold did it cross." Always lanplus (RMCP+); never plain lan/cipher-0.
4. SNMP in one breath
- Value = OID (
1.3.6.1.2.1.1.3.0= sysUpTime). MIB = the name↔OID schema. Vendor stuff under1.3.6.1.4.1.<enterprise>. GETone ·GETNEXTthe next-in-lexicographic-order ·WALKa subtree ·GETBULKmany ·SETwrite · trap = device → you (UDP 162).snmpwalk -v3 -l authPriv -u user -a SHA -A authpw -x AES -X privpw host OID- v1/v2c = cleartext community string (mgmt-net only); v3 = auth+priv (use this).
5. Events: poll vs push vs SSE
| latency | steady load | needs | use when | |
|---|---|---|---|---|
| poll | high | high at scale | nothing | metrics, no-event resources |
| push subscription | low | low | your endpoint reachable by BMCs | fleet fault alerts |
| SSE | low | low | 1 long conn/BMC | when inbound endpoints are hard |
Real telemetry (Phase 07): poll for metrics + subscribe for state changes/faults.
6. Security non-negotiables
- Redfish: HTTPS + validate the cert (disabling TLS verify is the classic bug), session tokens, least-privilege roles, never log the token.
- IPMI:
lanplusonly, disable cipher-0, strong creds, last resort. - SNMP: v3 where it matters; v2c read-only + ACL otherwise.
- All three live ONLY on the isolated management VLAN (Phase 09). Exposed BMCs are a Shodan staple and a fleet-wide compromise.
7. The driver abstraction (the senior pattern)
DeviceDriver(power_state, set_power, read_sensors)
├─ RedfishDriver (preferred)
├─ IpmiDriver (fallback)
└─ SnmpDriver (PDUs/switches)
+ unified Reading model so callers don't care where a temp came from
This is the Phase 13 capstone and Phase 07 exporter in one diagram.
8. Vendor variance survival kit
- Follow links (IDs differ:
1vsSystem.Embedded.1vs UUID). .get()with defaults; tolerateOemblocks and missing optional fields.- Retries/backoff/timeouts (BMCs are flaky); idempotent actions.
- A per-vendor conformance suite in CI (Phase 11); pin BMC firmware (Phase 08).
9. The "done this before" tells
"Which resource owns that — System, Chassis, or Manager?" · "Are you following the link or hardcoding the path?" · "Is that a Task? Poll it." · "v2c or v3?" · "lanplus, right?" · "Is TLS verification on?" · "Event or poll — and what's the backstop?"
10. How this phase pays off later
- The driver + unified Reading is the foundation of the Phase 07 exporter and Phase 13 capstone.
- Tasks are how Phase 08 firmware updates are monitored.
- EventService/traps feed Phase 07 alerting and Phase 10 RCA.
- Protocol security is enforced by the Phase 09 management-network isolation.