AI lab, part 7: Networking
The networks of a GPU cluster, and what the lab emulates for each: NVLink, InfiniBand, the front end and out-of-band management. Part 5 covered NVLink, the fabric inside an NVLink domain. A real GPU cluster has several more networks, and this is the part of the lab that is emulated most thinly. This post goes through which networks a GB200-class system has, what the lab gives you for each, and what it doesn’t model at all, so you know where its answers stop being meaningful. Outputs were captured in Kubernetes mode; the network side is the same in Slurm mode, minus the pod network. GPU-to-GPU traffic uses two networks. The scale-up network joins GPUs into one larger domain, so they work like a single big machine: on GB200 that’s NVLink. The scale-out network connects those domains to each other: InfiniBand or Ethernet. Together with the networks for everything else, a GB200-class cluster has four: These are physically separate networks, each with its own cards and cables. The lab can’t emulate that: everything that isn’t NVLink runs over one Linux bridge. Every container has one interface on The rendezvous is a handful of small messages. The training traffic itself, the gradients exchanged in every all-reduce, never touches the Ethernet side ( NCCL, the library that runs the all-reduce, picks the fastest path between each pair of GPUs. GPUs in the same NVLink partition reach each other over NVLink, so NCCL never uses the network for them. Here both trays are in one NVLink domain, and all eight GPUs are in its one partition, so a real cluster would also keep the whole all-reduce on NVLink. The compute fabric only gets GPU traffic when GPUs can’t reach each other over NVLink: between NVLink domains, or between partitions of one domain. InfiniBand is the classic choice for the network between NVLink domains, and the one NVIDIA’s reference designs use; Ethernet (RoCE, Spectrum-X) is now at least as common. InfiniBand was built for HPC and offers very low latency and RDMA, which lets one machine write straight into another’s memory without involving the remote CPU. Each host connects through an HCA (host channel adapter), InfiniBand’s name for a network card. The switches are usually wired in two layers, leaf and spine: Traffic between two hosts on the same leaf stays on that leaf. Traffic between hosts on different leaves goes leaf, spine, leaf, so any two hosts are at most three switches apart. That’s why schedulers care which leaf a node is on: a job whose nodes share a leaf has the shortest paths, and doesn’t compete with other jobs for the spine links. The lab emulates two parts of InfiniBand: the switch topology that cluster software reads, and the traffic NCCL sends between NVLink partitions. Start with the topology. Each tray has an emulated The fabric has a leaf switch and a spine switch above it. Each tray connects to the leaf with four HCAs, from Kueue uses these labels as levels, from the largest to the smallest: spine, leaf, NVLink domain, node. A job can ask to stay within any of them; the lab’s examples ask for one NVLink domain. In Slurm mode, topograph writes the same information to In the lab both trays sit under the same leaf and spine, so only the NVLink level can ever separate them. The emulator can’t build a fabric with more leaves. What the lab doesn’t model: Part 8: GPU handover covers what happens to a GPU between tenants: the reset that clears it and applies a new NVLink partition, and how Slurm runs it after every job.All parts
Table of contents
Overview
The networks of a GPU cluster
The front end: one bridge for everything
incusbr0. Here’s a tray in Kubernetes mode:$ bin/ssh sched-worker1 ip -br addr
lo UNKNOWN 127.0.0.1/8 ::1/128
flannel.1 UNKNOWN 10.42.3.0/32 fe80::187f:3dff:fe7d:ff1c/64
cni0 UP 10.42.3.1/24 fe80::e85f:deff:feb9:d143/64
veth18e97112@if2 UP fe80::a85d:a8ff:feeb:a10d/64
vethef2a26b5@if2 UP fe80::384c:14ff:fe51:c925/64
eth0@if101 UP 10.107.111.21/24 metric 100 fd42:7625:9911:a275:216:3eff:fea5:2b24/64 fe80::216:3eff:fea5:2b24/64eth0 carries everything: SSH, the scheduler’s control traffic, LDAP, S3 and JuiceFS, Prometheus scrapes, and the BMCs’ Redfish. In Kubernetes mode flannel.1 adds the pod network (a 10.42.x.0/24 per node) as VXLAN over the same eth0. That’s where the DDP job’s rendezvous happens: torchrun in pod 1 connects to pod 0 through the JobSet’s DNS name (Part 3).eth0 and the pod network on top of it). With the 8-GPU DDP job running (Part 3), Prometheus showed:# Ethernet traffic from each tray
rate(node_network_transmit_bytes_total{device="eth0", instance=~"sched-worker.*"}[1m])
5-10 KB/s per tray
# NVLink traffic from each tray
sum by (host) (rate(nvlink_gpu_tx_bytes_total[1m]))
~1.8 TB/s per trayThe compute fabric: InfiniBand
ibnetdiscover, which prints the fabric described in /etc/fakeib.json:$ bin/ssh sched-worker1 sudo ibnetdiscover
…
Switch 65 "S-2c5eab0306555424" # "MF0;LAB-IBSPINE-01:MQM9701/U1" enhanced port 0 lid 1 lmc 0
[1] "S-2c5eab036832a42e"[9] # "MF0;LAB-IBLEAF-01:MQM9701/U1" lid 2 4xNDR
…
Switch 65 "S-2c5eab036832a42e" # "MF0;LAB-IBLEAF-01:MQM9701/U1" enhanced port 0 lid 2 lmc 0
[1] "H-e09d7303b4f1abf5"[1](e09d7303b4f1abf5) # "sched-worker1 mlx5_0" lid 100 4xNDR
[2] "H-e09d7303e640df18"[1](e09d7303e640df18) # "sched-worker1 mlx5_1" lid 101 4xNDR
…
[8] "H-e09d730383c7a290"[1](e09d730383c7a290) # "sched-worker2 mlx5_3" lid 107 4xNDR
[9] "S-2c5eab0306555424"[1] # "MF0;LAB-IBSPINE-01:MQM9701/U1" lid 1 4xNDR
…mlx5_0 to mlx5_3, so every GPU has its own 400 Gb/s link (4×NDR). The leaf connects to the spine over four uplinks.ibnetdiscover prints all this in its real format, so real tools can read it. The tool that matters here is NVIDIA’s topograph. Every minute it runs ibnetdiscover on the trays, combines the switch tree with the NVLink cliques from NVML, and passes the result to the scheduler. In Kubernetes mode the result becomes node labels:$ bin/kubectl get nodes -l nvidia.com/gpu.present=true \
-L accelerator.topograph.run/domain,fabric.topograph.run/tier-0,fabric.topograph.run/tier-1
NAME STATUS ROLES AGE VERSION DOMAIN TIER-0 TIER-1
sched-worker1 Ready <none> 30m v1.36.5+k3s1 7f3c2a10-5b4e-4d6a-9c1e-2b8f0e6d4a91.1 S-2c5eab036832a42e S-2c5eab0306555424
sched-worker2 Ready <none> 30m v1.36.5+k3s1 7f3c2a10-5b4e-4d6a-9c1e-2b8f0e6d4a91.1 S-2c5eab036832a42e S-2c5eab0306555424topology.conf instead (Part 5).What isn’t there
/sys/class/infiniband, ibstat or perfquery. Only ibnetdiscover works, and it prints the emulated topology.NCCL_IB_HCA, have nothing to act on. The emulated NCCL only counts the bytes it would send between NVLink partitions.ibdiagnet, and no link state or error counters. Part 6 can show InfiniBand traffic, but not faults. There are no partition keys either, so you can’t test fabric isolation between tenants.tc.What you can still do with it
ibnetdiscover output, topograph, Slurm’s topology.conf and Kueue’s labels are all real, so you can test how the scheduler places jobs. Change the NVLink partitions (Part 5) and watch its view change.ibnetdiscover output, against a fabric that doesn’t change under you./sys/class/infiniband or ibstat, they fail right away in the lab. That’s your reminder to test that part on real hardware.Next in the series