The honest answer is narrower than either camp admits: at 400G per port, RoCEv2 and InfiniBand differ far less in raw protocol capability than they do in congestion behaviour and operating cost. Pick InfiniBand when the fabric exists to serve exactly one job — a single-tenant, GPU-dense training cluster where deterministic end-to-end latency, hardware multicast and drop-free flow control by design are worth a dedicated skill set. Pick RoCEv2 when the same fabric has to carry training, storage, management and tenant traffic at once, and when your team already runs an IP network with its own automation, telemetry and optics supply chain. RoCEv2 is best understood not as InfiniBand wrapped in IP headers, but as a different congestion-control problem — and that is precisely where deployments succeed or quietly fall apart.
What Each Protocol Actually Sends on the Wire
Both are genuine RDMA. The application posts work requests to a queue pair, the NIC reads and writes registered memory directly, and completion entries land in a completion queue. No socket layer, no per-message copy through kernel buffers, no context switch in the data path. From the verbs API down, the two look almost identical, which is why the same MPI stacks and the same NCCL calls work on both.
The difference begins at the network header. An InfiniBand packet opens with a 4-byte local route header carrying the virtual lane and the 16-bit local identifier, gains a 40-byte global route header when it must cross subnets, and then carries the same 12-byte base transport header that RoCEv2 uses. RoCEv2 keeps that transport header and wraps it in Ethernet, IPv4 and UDP, with destination UDP port 4791 as the well-known marker. RoCEv1, by contrast, used EtherType 0x8915 with no IP header at all, which is why it never left a single Layer 2 domain.
Why RoCEv2 Is Routable and RoCEv1 Is Not
Putting RDMA behind UDP/IP was the whole point of the v2 revision. Because the frame is ordinary IP, the fabric routes on Layer 3, uses equal-cost multipathing across a leaf-spine topology, survives a subnet boundary, and can be monitored with the same tooling that watches every other workload. Large GPU clusters built on Ethernet rely on exactly this: a routed, multipath fabric with no spanning-tree constraints.
The price is that every hop now has to agree on how RDMA traffic is classified. DSCP or PCP marking must be consistent, ECN-capable queues must exist on every port, and the queue scheduler must reserve buffer for the lossless class. One uplink left on defaults will drop marked frames silently, and the resulting retransmissions look like a workload problem rather than a network problem.
Flow Control: Credits Versus Pause Frames
InfiniBand flow control is credit based and per virtual lane. The receiver advertises credits in 64-byte units, and a sender may only transmit what its peer has already promised buffer space for. A link therefore cannot be overrun in the first place, so there is no drop-and-recover cycle to tune. The specification provides fifteen data virtual lanes plus a management lane, which lets you separate storage, compute and control traffic without tagging frames.
Ethernet solves the same problem with priority flow control under 802.1Qbb. The receiver issues a pause frame for one priority class, with the pause duration expressed in units of 512 bit times, and the sender stops that class while other classes keep flowing. Two consequences follow. First, the switch needs headroom buffer deep enough to absorb frames already in flight when the pause is generated. Second, pause state can propagate hop by hop, and a loop of pauses across several switches will deadlock a whole class — the classic pause storm that operators defend against with watchdog timers and strict configuration discipline.
Congestion Control: DCQCN Versus InfiniBand CC
RoCEv2's practical performance lives or dies here. DCQCN works by having switches mark the two-bit ECN field once a queue crosses a threshold, having the receiver echo those marks back, and having the sender cut its rate and then recover it gradually. Get the thresholds right for the port speed and link distance and the fabric runs close to line rate with shallow queues. Get them wrong — typically after a speed upgrade, when the same thresholds are reused at four times the bandwidth — and you get either buffer bloat with spiky tail latency, or drops that trigger go-back-N retransmission of an entire window.
InfiniBand carries an optional congestion-control architecture built on forward and backward explicit notifications, and pairs it with adaptive routing that can spread traffic around a hot spine. In practice most InfiniBand fabrics run with far less tuning because the credit mechanism has already removed the loss case. This is the real trade: Ethernet asks you to engineer congestion control, InfiniBand asks you to accept its management model.
Where the Latency Difference Really Comes From
Not from the wire. Both families run the same per-lane signalling generations — 25G NRZ for EDR-class 100G, 50G PAM4 for HDR-class 200G, 100G PAM4 for NDR-class 400G — and both deliver 100G, 200G or 400G per port with the same verbs semantics.
The gap comes from three places. Switch forwarding: an InfiniBand switch resolves a local identifier through a table the subnet manager computed and programmed, with a very short pipeline; an Ethernet switch resolves MAC and IP through larger tables alongside ACLs, telemetry and shared buffering. Congestion behaviour: an idle InfiniBand fabric and an idle Ethernet fabric are close; a loaded pair is not, because the Ethernet side loses frames and retransmits. And software-visible tail latency: RoCEv2 tuning mistakes surface as p99 spikes that no amount of application work will fix.
Packet Overhead and Goodput at 400G
Header overhead is real but modest, and worth quantifying before anyone claims a bandwidth advantage. Take a 4096-byte payload, the practical maximum once an InfiniBand-style MTU is mapped onto Ethernet. Locally routed InfiniBand spends 4 bytes of local route header, 12 of transport header and a handful of check bytes, landing near 99.5 percent efficiency. RoCEv2 spends 14 bytes of Ethernet, 20 of IPv4, 8 of UDP, plus the same transport and check fields, landing near 98.4 percent. That is roughly one percentage point of goodput — measurable, rarely decisive.
Frame size is decisive. At a 1500-byte MTU a 400G port has to process on the order of 33 million packets per second, and every one of those packets is another chance to trip an ECN threshold or a pause condition. This is why the documented recommendation for RoCE on ConnectX adapters is to raise the MTU to 4200 bytes and keep it consistent end to end; a single 1500-byte hop fragments the picture and creates a throughput cliff that looks like adapter failure.
Management, Cabling and Multi-Vendor Reality
An InfiniBand fabric is inert until a subnet manager assigns local identifiers, computes paths, programs forwarding tables and defines partition keys. Losing the last subnet manager takes the fabric down, so production designs run a standby. In exchange you get centralised, deterministic path control — nothing recalculates behind your back.
Ethernet gives you BGP, EVPN, MLAG and the ordinary operational toolkit, and a much wider optics market: standard OSFP and QSFP-DD transceivers, breakouts to 2x200G or 4x100G, and multiple vendors per reach class. InfiniBand optics are generation-specific — NDR DR and FR modules are not interoperable at the MPO level with HDR parts, so a generational upgrade means replacing the trunk plant, not just the endpoints.
The multi-vendor question usually decides itself. Ethernet switches and NICs interoperate across vendors with standard protocols. InfiniBand is effectively a single-vendor end-to-end ecosystem for switches, adapters and fabric management, which simplifies support and narrows your sourcing options at the same time.
Collectives, Multicast and In-Network Aggregation
NCCL runs on both, over the same verbs interface, so the transport choice is mostly a matter of environment variables. You pin the adapter list with the HCA variable, and on Ethernet you must point the GID index at a RoCEv2 GID — index 3 is the conventional IPv4 RoCEv2 entry on ConnectX parts. Leave it at a link-local or RoCEv1 index and NCCL will either refuse the device or quietly fall back to a slower path, which is one of the most common reasons a RoCE cluster underperforms its own hardware.
Collective performance then diverges. InfiniBand switches implement hardware multicast, so one all-reduce frame can fan out to a whole tree without host-side replication, and in-network reduction has been native to the Quantum line. NVIDIA has extended that aggregation capability to Spectrum-4 Ethernet with current-generation adapters, but on Ethernet you should verify the firmware, driver and NCCL combination actually enables it rather than assuming parity.
Failure Modes You Will Actually Operate
InfiniBand fails loudly and centrally: a split subnet manager, a wrong partition key, a link that retrains on a marginal transceiver, or a cable that links at half the expected width. Symptoms are deterministic and visible in fabric logs, and the blast radius is usually the whole island.
RoCEv2 fails quietly and locally. A single port with the wrong priority mapping drops one class of traffic; a pause cycle between two switches stalls a rail; ECN thresholds copied from a 100G design throttle a 400G leaf; an MTU mismatch fragments large messages while small ones pass. Symptoms are workload-dependent and partial, which is why RoCEv2 needs one named owner for end-to-end QoS configuration and a validation pass after every change, including firmware updates on switches that nobody thinks of as network changes.
Decision Table: Which Fabric Fits Which Job
| Dimension | InfiniBand (NDR-class 400G) | RoCEv2 (400G Ethernet) |
|---|---|---|
| Encapsulation | Native link header plus transport header; 4-byte local route header inside a subnet | Transport header inside UDP/IP (port 4791) inside Ethernet |
| Layer 3 routing | Global route header; routed by the subnet manager's paths | Standard IP routing with ECMP at every tier |
| Flow control | Credit based, per virtual lane, no loss by design | Priority flow control (802.1Qbb) plus deep headroom buffers |
| Congestion control | Notification based, optional, plus adaptive routing | ECN marking with DCQCN rate control, needs per-speed tuning |
| Latency under load | Stable; degradation is graceful | Stable only if QoS is correct; otherwise tail spikes from retransmission |
| Collectives | Hardware multicast, native in-network reduction | IP multicast plus newer aggregation support that must be verified |
| Management | Subnet manager required, centralised paths | Standard IP tooling the team already runs |
| Optics and cabling | Generation-specific modules; upgrade replaces the trunk | Broad OSFP and QSFP-DD market, flexible breakouts |
| Multi-vendor | Effectively single-vendor end to end | Interoperable across switch and NIC vendors |
| Failure signature | Loud, centralised, fast to attribute | Silent, partial, slow to attribute |
| Best fit | Single-purpose GPU training islands, latency-critical HPC | Converged fabrics: training, storage, management, multi-tenant |
Sizing Checklist Before You Commit
- Map the collective mix first. All-reduce-heavy training rewards multicast and in-network aggregation; storage and inference traffic rewards routability and reuse.
- Work out oversubscription per tier against expected east-west fan-in, not against port count.
- Decide whether storage rides the compute fabric. If it does, RoCEv2 has a strong operational argument; if not, the InfiniBand case gets simpler.
- Count optics, not just switch ports. At 400G the transceiver and trunk plant often dominate the physical build.
- Test whether the exact adapter and switch combination you plan to buy actually negotiates at the target speed with your cable lengths before committing to a design.
- Be honest about skills. A well-tuned RoCEv2 fabric beats a poorly managed InfiniBand one, and the reverse is equally true.
- Keep spare ports and spare optics of the same generation; mixing generations is the most common cause of a link that will not come up.
For reference points on both sides, the 400G NDR InfiniBand switches such as the QM9700-NS2F 64-port NDR system and the 800G-capable Spectrum-4 SN5600 Ethernet switch are the two ends of the same decision; a 200G Ethernet leaf such as the SN4600 VS2RC or a 100G fabric built on the SN3800 CS2RO covers the tiers below them. Host-side, the ConnectX-6 HDR100 dual-port adapter covers both HDR100 InfiniBand and 100G Ethernet roles with the same PCIe 4.0 x16 slot.
Frequently Asked Questions
Is RoCEv2 faster than InfiniBand?
Not in raw bandwidth, and not in latency on an unloaded fabric. Both deliver the same per-port rates and the same RDMA semantics. RoCEv2 can match InfiniBand on a well-tuned fabric, but its performance is a function of ECN thresholds, pause configuration and MTU consistency, so the outcome depends on the operator more than on the protocol. InfiniBand's advantage appears under congestion, where credit-based flow control avoids the loss and retransmission cycle entirely.
Does RoCEv2 require lossless Ethernet and priority flow control?
In practice yes. RoCEv2 has no mechanism to recover cheaply from dropped frames, so production fabrics configure priority flow control for the RDMA class and add ECN marking with DCQCN on top. PFC alone protects against buffer overflow; ECN is what stops the fabric from sitting permanently paused. Both must be configured identically on every switch port, NIC and uplink in the path.
Can InfiniBand and Ethernet share the same switch?
No. They are separate forwarding planes with different headers, different addressing and different management models. A Quantum InfiniBand switch forwards on local identifiers assigned by a subnet manager; a Spectrum Ethernet switch forwards on MAC and IP. You can run both fabrics side by side, and many clusters do — InfiniBand for the training island, Ethernet for storage, management and ingress — but they are distinct networks with distinct ports.
How do I confirm NCCL is actually using RoCEv2?
Check the GID index the job is using and confirm it maps to a RoCEv2 entry, conventionally index 3 for IPv4 on ConnectX adapters, then verify with the fabric counters that RDMA traffic is egressing the intended interfaces. If the index points at a link-local or RoCEv1 GID, NCCL will reject the device or fall back, and the job will still run — just slower, which is why this check belongs in the deployment script rather than in troubleshooting.
Which fabric is cheaper to operate at 400G?
It depends on which cost dominates in your environment. Ethernet usually wins on optics choice and multi-vendor leverage, and it lets one fabric serve compute, storage and management. InfiniBand usually wins on engineering hours, because the fabric needs less continuous tuning and its failures are easier to attribute. The deciding factor is normally whether you already have a network team that owns QoS end to end — if you do not, the RoCEv2 saving is an illusion.
Zhongxin Data supplies Mellanox and NVIDIA InfiniBand and Spectrum Ethernet switches, ConnectX adapters and the optics that go with them, matched to the port count and generation you are actually building. Send the model list, port count and target speed to WhatsApp +86 13068616914 or check current availability and part numbers on zhongxindata.hk — we will confirm specifications per part number before you commit to a topology.
Published by Zhongxin Data | November 2026


