Learning Center

Blogs

Inside a Switch: Why Your Optical Module Won’t Link Up

When an optical module won’t link up, or links and then flaps, the first hour of debugging belongs to the switch’s slow management side, not the fast data path.

  • Infraeo
  • December 3, 2026
  • 6 min read
  • Yiwen Geng

A data-center switch is two computers and an ASIC. The ASIC moves packets. An x86 module runs the network OS that configures it. A BMC keeps the box alive: power, fans, sensors, console. The fast side — the ASIC and its SerDes lanes — gets most of the attention. But when a module is plugged in and the link doesn't come up, or comes up and flaps, the first hour goes to the slow side: the I2C buses, GPIO expanders, CPLD and daemons that have to agree before the first bit crosses the fiber.

This post maps that side. The worked example is Facebook's Wedge 100, a 32 × 100G switch whose hardware specification is public through OCP; SONiC and FBOSS supply the software side.

Part 1 of a four-post series on the switch management plane. Three follow: a map of every slow bus in the box, the I2C mux tree behind the ports, and the CMIS state machine that takes a module from plug-in to link-up.

1. What's in the box

PartWhat it doesTalks over
Switch ASICMoves packets; its SerDes lanes end at the module cagesPCIe to the host CPU
Host CPURuns the NOS, including the ASIC driver and the transceiver daemonPCIe to the ASIC; USB to an I2C bridge
BMCPower, cooling, sensors, console and firmware for the box, on standby powerI2C to the board; UART; management Ethernet
System CPLDPower-on hand-off, host resets, the reset line of every cage; on standby powerI2C registers, reachable from both computers
I2C bridge, muxes and expandersTurn a single USB port on the CPU into 32 module channels and 96 control pinsUSB in, I2C out
32 module cagesEach module sits at I2C address 0x50 on its own mux channel and has four control pins: ModPrsL, ResetL, LPMode and IntLI2C (up to 400 kHz) and discrete wires
PowerPSUs, a hot-swap controller, a sequencer, regulators for the ASIC core and for the 3.3 V rail the modules run onPMBus and I2C to the BMC
Cooling and sensorsFan trays behind a fan CPLD; board temperature sensorsI2C and PWM from the BMC
Management networkOne front-panel RJ45 and an onboard L2 switch that fans out to the BMC and the host CPUEthernet

Two rows decide the rest of the series: the cages hang off the host CPU's I2C, not the BMC's, and the reset lines belong to the CPLD, not to either computer.

2. How the slow buses connect

Figure 1. In a switch, the management plane has two owners

The management plane has two owners. On the left, the BMC handles system power, the host's serial console, the power sequencer and regulators, the fans (through a fan CPLD), the PSUs (through a mux) and the inventory EEPROM. On the right, the host CPU reaches 32 cages through a USB-to-I2C bridge and four 8-way I2C muxes; each cage sits at address 0x50 on its own channel. The NOS's transceiver daemon (xcvrd in SONiC, qsfp_service in FBOSS) is the only software that reads or writes a module. The BMC's only link into that tree is the dashed line, which it uses to reset the muxes and unstick the bridge. The thick gray lines are the data plane: four 25G lanes per cage into the ASIC. No slow bus touches them.

3. From plug-in to link-up: who touches the module

Figure 2. From plug-in to link-up: who touches the module

Insert. The module pulls ModPrsL low. On Wedge 100, the pin lands on a GPIO expander behind the fifth mux, which the transceiver daemon polls over I2C.

Reset, then wait. ResetL is a CPLD output. Once it is released, the module runs its own initialization (t_init), and every status bit is meaningless until the module says it is done: IntL goes low and Data_Not_Ready clears. Read too early, and the garbage looks like a bad module.

Low power first. Every QSFP module powers up in Power Class 1 (1.5 W), "to avoid exceeding the host system power capacity and thermal management" (SFF-8679). It stays there until the host enables its advertised class, up to 5 W for classes 5 to 7, through the LPMode pin or the power bits in byte 93. A module left in low power is not required to work at all.

Read the EEPROM. The daemon selects the mux channel and reads page 00h: identifier, vendor, part number, power class and compliance codes. SONiC writes the result to its state database; FBOSS moves the port from PRESENT to DISCOVERED.

ASIC first, module second. From the module type, the NOS picks the ASIC-side settings — port speed, FEC and the SerDes equalization for that cable or optic (SONiC keeps them in media_settings.json) — writes them over PCIe, and turns the ASIC's transmitter on. Only then is the module's data path initialized. SONiC's bring-up design says why: data path initialization "should happen only when the Tx signals from the ASIC/MAC towards the optics is valid and good for the selected application".

Data path up. For a QSFP28 under SFF-8636, that is a few register writes: high power on, Tx_Disable off. For QSFP-DD and OSFP under CMIS, it is a state machine that the daemon walks, waiting on the module at each step: DP_DEINIT → AP_CONFIGURED → DP_INIT → DP_TXON → DP_ACTIVATION → READY, with three retries before FAILED.

Link, then watch. The SerDes lock, the PCS and FEC align, the port comes up, and the daemon's state becomes ACTIVE in FBOSS or READY in SONiC. From then on, the daemon polls the module's monitors on a timer (temperature, supply voltage, Rx and Tx power, bias), and IntL fires for alarms.

Meanwhile, the BMC has not touched the module. It runs the fan loop from the board's temperature sensors, reads the regulators and PSUs, and logs events. On Wedge 100, it also holds the recovery scripts for the host's bus (reset the muxes, reset the bridge) for the day a module hangs it.

The same eight steps, read as a fault map. Each row is one arrow of the figure: who owns the step, which bus it rides, and what fails there when a module won't link or keeps flapping. Two rows point to the posts that go deeper: the mux tree and the CMIS state machine.

Read down the Owner column, and the failures fall to three owners: the NOS daemon on the host's I2C, the ASIC on PCIe and the SerDes lanes, and the BMC on its own I2C. The evidence splits the same way: each owner logs only its own steps.

Step in the figureOwnerBusWhat goes wrong here
1 · PresenceNOS daemon, GPIO expanderI2CA stuck expander or a worn cage contact makes a module "flap" before any link exists.
2 · Reset and t_initCPLD line; the NOS waitsA wire, then I2CReading before Data_Not_Ready clears: garbage that looks like a bad module.
3 · EEPROMNOS daemon through the muxI2CWrong mux channel; a module holding SDA low takes all eight ports on that mux with it.
4 · ASIC SerDesNOS driverPCIeEqualization settings for the wrong module type: a link that comes up and flaps.
5 · Power modeLPMode pin, byte 93GPIO expander, I2CLeft in low power: no link. Allowed more power than the 3.3 V rail can supply: resets under load.
6 · Data path initNOS daemonI2CHost mode and module application don't match: "the link will be down".
7 · LinkASIC and moduleSerDes lanesComes up, then flaps: check rows 4 and 6 first, then the last row.
8 · MonitorsNOS daemonI2CA module temperature or power alarm on IntL is the earliest warning.
Meanwhile · the BMCBMCI2C, PWMA hot module, a dead fan tray, a drooping rail. Only the BMC's logs show what the box was doing at that moment.

4. Where to look when a link fails

• Module registers, monitors, state machine: on the host, in the transceiver daemon's logs and its database, not on the BMC. Rows 4 and 6 of the table are the first two things to check.

• Temperature, voltage and fans at the time of the flap: on the BMC. It has the only record.

• A whole group of ports dark at once: suspect the mux or the bridge above them; the BMC's reset scripts are the way back.

The slow buses decide whether the fast ones ever get to run.

References

1. Facebook. "Wedge-100 32x100GE Top of Rack Switch." Open Compute Project specification, v1.0, Sep. 14, 2016. https://www.opencompute.org/documents/wedge100-ocp-spec-v1-0-pdf

2. SNIA SFF TWG. "SFF-8679: QSFP+ 4X Hardware and Electrical Specification," Rev 1.9, 2025, and "SFF-8636: Management Interface for 4-lane Modules and Cables," Rev 2.12, 2026. https://www.snia.org/sff/specifications

3. OIF. "Common Management Interface Specification (CMIS)," Rev 5. https://www.oiforum.com/technical-work/hot-topics/management/

4. SONiC. Interface link bring-up sequence and CMIS initialization, high-level designs, with the transceiver daemon source (sonic-xcvrd). https://github.com/sonic-net/SONiC/tree/master/doc/sfp-cmis

About the author

Ada Geng works as an Embedded Systems Engineer on 200G–1.6T DSP/PHY silicon at Infraeo in Round Rock, Texas. She writes about the hardware underneath AI data-center networking, from the management plane inside a switch to high-speed SerDes, optical interconnect and PCIe, working from public specifications and open-source code.

Comments

No comments yet. Be the first to share your thoughts.

Leave a comment