Everything in Acts 1 through 9 described a and its without answering one foundational question: when you look at the compute fabric section of the wiring diagram, it says " or ." What determines which one you deploy? What is the actual difference, and where does that difference live in the hardware?
The answer is simpler and more surprising than most engineers expect.
The does not care which protocol it runs.
The same silicon, the same cage, the same — can operate as a native InfiniBand (XDR, 800 Gb/s) or as an 800 GbE . This is not a software emulation. ConnectX adapters have supported both transport layers natively for generations; ConnectX-7 on H100 worked the same way at 400 Gb/s. You change the operating mode through a configuration utility (mlxconfig), and after a reboot the card presents a completely different personality to the operating system.
Figure: NVIDIA ConnectX-7, the previous-generation adapter, shown as a card. On B300 the ConnectX-8 SuperNICs are mounted on the GPU baseboard rather than in slots, but the dual-personality principle is identical.
What "mode" actually means at the port level:
In InfiniBand mode, the ConnectX-8 speaks the InfiniBand protocol natively. It uses credit-based flow control — packets are only transmitted when the receiver has confirmed it has space. There is no concept of packet loss at the link layer. The port is addressed by a LID assigned by the Subnet Manager, not by a MAC or IP address.
In Ethernet mode (RoCEv2), the ConnectX-8 presents as an 800 GbE network interface (or two 400 GbE interfaces, depending on how the port is configured). It has a MAC address. It can be assigned an IP address. RDMA still works — through a protocol called RoCEv2 that encapsulates RDMA verbs in UDP/IP packets — but losslessness is no longer built-in. You achieve it through configuration: Priority Flow Control (PFC) and Explicit Congestion Notification (ECN). Misconfigure either and you lose the lossless guarantee.
The mode is set using mlxconfig on the host:
# Check current mode of all ConnectX NICs
mlxconfig -d /dev/mst/mt4129_pciconf0 q | grep LINK_TYPE
# Output for InfiniBand mode:
LINK_TYPE_P1 IB(1)
# Output for Ethernet mode:
LINK_TYPE_P1 ETH(2)
# Change to Ethernet mode (requires reboot)
mlxconfig -d /dev/mst/mt4129_pciconf0 set LINK_TYPE_P1=2
This single configuration parameter — LINK_TYPE — is the fork in the road that determines what your entire external infrastructure looks like.
What a RoCEv2 packet looks like on the wire
When a ConnectX-8 in Ethernet mode sends an RDMA transfer, the resulting packet has a specific layered header structure:
Outer Ethernet header (src MAC, dst MAC)
IP header (src IP, dst IP, DSCP = 26 for RoCEv2 traffic)
UDP header (dst port = 4791, src port = derived from QP number)
InfiniBand BTH (Base Transport Header -- opcode, QP number, PSN)
InfiniBand payload (data or AETH for acknowledgements)
Several fields in this header explain things you will see in diagnostic output:
UDP destination port 4791 — This is the IANA-assigned port for RoCEv2. Every RDMA packet has dst port 4791. When you configure PFC on CoS 3 (DSCP 26 -> CoS 3 via the DSCP trust map), you are protecting all traffic with this destination port. show roce confirming DSCP marking: 26 tells you RDMA packets are being correctly classified.
UDP source port derived from the QP number — Each Queue Pair gets a unique UDP source port. This means each QP is a distinct UDP flow. ECMP hashing (which uses the 5-tuple including src port) treats each QP as a separate flow and can distribute QPs across different paths. This is the mechanism by which a node with hundreds of active QPs can distribute AllReduce traffic across all available switch paths — each QP potentially takes a different ECMP path.
InfiniBand BTH — opcode, QP number, PSN — The Base Transport Header carries:
- The opcode (RDMA Write, RDMA Read, Send, Acknowledge)
- The destination QP number (identifies which queue pair receives this packet)
- The Packet Sequence Number (PSN) — a monotonically increasing counter per QP
The PSN is critical for reliability. The receiver expects PSNs in order. If a packet is dropped and the PSN sequence has a gap, the receiver sends a NACK. The sender retransmits from the missing PSN. If the retransmission fails or the gap is too large, the QP enters error state — which is the root cause of ibstat showing State: Init or State: Error on a rail after a link flap.
DSCP 26 — RoCEv2 traffic is conventionally marked DSCP 26 (binary 011010) by the NIC. DSCP 26 maps to CoS 3 on the switch. CoS 3 is where PFC and ECN are configured. This chain — DSCP 26 -> CoS 3 -> PFC protection — is the mechanism that makes RoCEv2 lossless. A break anywhere in the chain (wrong DSCP marking, wrong DSCP-to-CoS map, PFC on wrong CoS) silently defeats the lossless mechanism. Chapter 5 covers exactly how to verify each link in this chain.
What changes when you choose
The ConnectX-8 mode selection cascades through every layer of the external infrastructure. The node itself — GPUs, NVLink, NVSwitch, CPUs, RAM, storage — is completely unchanged. NVLink does not care what protocol the external NICs are running. CUDA does not care. The training job does not care, as long as NCCL can initialise the communication. What changes is everything outside the chassis:
The switches change entirely. InfiniBand NICs must connect to InfiniBand switches. You cannot plug an IB-mode ConnectX-8 into an Ethernet switch and expect it to work — the cages and optics are the same OSFP family, but the protocol is incompatible. For XDR you need NVIDIA Quantum-X800 switches (Q3400), which run NVOS. The previous Quantum-2 generation (QM9700, NDR 400 Gb/s) runs MLNX-OS. RoCEv2 NICs connect to Ethernet switches. You need SN5600 leaf switches running Cumulus Linux or SONiC, and standard Ethernet spine switches. The switch operating system changes. NVOS or MLNX-OS on InfiniBand switches. Cumulus Linux or SONiC on Ethernet switches. These are different operating systems with different CLI commands, configuration models and diagnostic tools. Chapter 4 covers InfiniBand switch operations. Chapters 3 and 5 cover Cumulus Linux and Spectrum-X. The management philosophy changes. InfiniBand requires a Subnet Manager (UFM) that centrally manages the entire fabric — assigns addresses, computes routing, programs every switch. Chapter 1 and Chapter 4 cover it. You do not configure InfiniBand switches individually. Ethernet is distributed — each switch is configured independently using standard networking principles. PFC and ECN must be configured consistently across every switch and every port that carries RoCEv2 traffic. The losslessness mechanism changes. InfiniBand: credit-based, built into the protocol, cannot be misconfigured away. RoCEv2: requires PFC (pauses the sender before buffers overflow) and ECN (marks packets to signal congestion before pausing is needed). Both must be correctly configured on every switch port. A single misconfigured port can cause packet drops that stall an entire training job. This is what Labs 1 and 2 diagnose and fix. What stays exactly the same:
- The node hardware (GPUs, NVLink, NVLink switch chips, CPUs, storage)
- The host OS — it runs the same regardless of NIC mode
- CUDA and the training framework
- The physical cables (both modes use the same QSFP56/OSFP optical cables)
- The rail-optimised wiring topology — 1 NIC per GPU, each on a different switch
- NVLink intra-node communication
- The storage fabric (always Ethernet, always separate from the compute fabric)
- The management network
ibstat— it works in both modes because it probes the RDMA layer, not the transport That last point is worth dwelling on.ibstatis part of the DOCA-OFED driver stack (formerly MLNX_OFED), installed on every GPU node regardless of mode. It can interrogate a ConnectX adapter in either mode. In Ethernet/RoCEv2 mode,ibstatoutput showsLink layer: Ethernetand the LID-related fields (Base lid,SM lid) will show0— there is no InfiniBand Subnet Manager assigning LIDs, because LIDs do not exist in Ethernet mode. If you see non-zero LID values, the NIC is actually in InfiniBand mode, not Ethernet mode.
The practical decision framework
Neither choice is universally better. The decision depends on what you are building and what you already have. Choose InfiniBand when:
- Absolute maximum training performance is the priority
- You are building a dedicated AI training cluster with no legacy infrastructure
- You need SHARP in-network compute to accelerate AllReduce at scale
- You want losslessness guaranteed by the protocol, not by configuration Choose RoCEv2 when:
- You already have Ethernet infrastructure and want to reuse it
- You need multi-tenancy — Ethernet is easier to segment and isolate for multiple users
- Your operational team knows Ethernet and the additional complexity of InfiniBand is a risk
- You are building a smaller cluster where the performance gap is acceptable
- Cost is a constraint — Ethernet switches are generally cheaper than equivalent InfiniBand switches The honest performance gap: A well-configured Spectrum-X deployment, with adaptive routing and SuperNIC-side reordering, is designed to close most of the gap to InfiniBand on training workloads, and many of the largest clusters now run on it. Where InfiniBand still leads is in operational simplicity of losslessness and in-network reduction. Measure on your own workload: the acceptance tests in Chapter 36 are where the difference shows up, if it does. This is why the industry has genuinely split into two camps rather than one winning. It is not marketing. It is a real tradeoff between protocol simplicity and operational familiarity.