Connecting Two DGX Sparks over ConnectX-7
By the end of this lesson you will be able to identify which of a DGX Spark’s four QSFP-derived interfaces the cable actually brought up, give those interfaces addresses that survive a reboot, establish the passwordless SSH the playbooks assume, name the RoCE device that corresponds to each Ethernet interface, and set the environment variables that decide which wire your tensors travel on. You will also be able to say what NVIDIA claims a connected pair can run, and read the qualification NVIDIA attaches to that claim.
This is a procedure lesson. It is short on argument and long on names, because the names are what go wrong.
The ports, the cable, and what “two ports” means
Section titled “The ports, the cable, and what “two ports” means”Part 5 recorded the hardware. NVIDIA’s ConnectX-7 networking page states that “each DGX Spark has two QSFP ports (sometimes called ‘ConnectX-7 ports’) on the back of the device” and that “each port provides up to 200 Gigabits per second (Gb/s)”. It tells you which is which from behind the machine: “when seen from the back of the device, the left port is the QSFP port closest to the ethernet port.”
The cable is not a free choice. The same page names approved part numbers from Amphenol and Luxshare rather than describing a category, and the switch playbook points at NVIDIA’s own marketplace listing for a 0.4 m QSFP cable. Buy from that list. A QSFP cable that negotiates at a lower rate, or does not negotiate at all, is a fault you will spend an evening attributing to software.
| Figure | What NVIDIA states | Where |
|---|---|---|
| QSFP ports per machine | Two | ConnectX-7 Networking |
| Rate per port | Up to 200 Gb/s | ConnectX-7 Networking |
| Linux interfaces per port | Two independent Ethernet interfaces | ConnectX-7 Networking |
| RDMA path | One RoCE device per Ethernet interface | ConnectX-7 Networking |
| Direct cabling limit | Up to three systems | ConnectX-7 Networking |
| Through a switch | Up to four systems | ConnectX-7 Networking |
| Largest model claimed | Up to 700 billion parameters across four systems | DGX Spark product page |
NVIDIA DGX Spark (GB10), two systems, DGX OS 7.x · no engine; NVIDIA documentation retrieved 2026-09-09 · no model loaded, not applicable · 0 tokens of context · 2026-09-09
Every figure here is published by NVIDIA on the pages in this page's sources. None of it was measured by this course. Part 18's lab measures the link you actually have, in both directions, and that number is the one to trust when an engine disappoints you.
The sentence that surprises people is the third row. Each physical QSFP port appears to Linux as two independent Ethernet interfaces, so one machine with two ports shows four. The playbook prints an example of exactly that, and pairs each Ethernet name with its RDMA counterpart:
Output — what you should see
rocep1s0f0 port 1 ==> enp1s0f0np0 (Up)rocep1s0f1 port 1 ==> enp1s0f1np1 (Up)roceP2p1s0f0 port 1 ==> enP2p1s0f0np0 (Up)roceP2p1s0f1 port 1 ==> enP2p1s0f1np1 (Up)Read that as four pairs. The name beginning en is an ordinary Ethernet interface: it is what you
give an address to, and what NCCL_SOCKET_IFNAME selects. The name beginning roce is the RDMA
device for the same hardware: it is what an RDMA benchmark opens and what NCCL_IB_HCA filters on.
They are two views of one port, and confusing them is the most common way to end up with a cluster
that works and is slow.
Addressing the link
Section titled “Addressing the link”The command that tells you what the cable did is ibdev2netdev, run on both machines. Whichever
interfaces report (Up) are the ones the cable brought up, and the playbook’s own example uses
enp1s0f1np1 and enP2p1s0f1np1. Yours may differ, because it depends on which port you used.
The playbook then offers two ways to give them addresses, and says the two are mutually exclusive.
Option 1 writes a netplan file, sets its permissions to 600, and applies it, which survives a
reboot. Option 2 assigns addresses with ip addr add and brings the interfaces up by hand,
with the explicit warning that “using this option, the IPs assigned to the interfaces will change
if you reboot the system.” Use netplan for anything you intend to run more than once.
Two details in the addressing are worth understanding rather than copying.
One subnet per cable, not one for the pair. The playbook puts the first interface on one private class-C subnet and the second on another, so that each cable is its own point-to-point network with no routing decision to make. Both machines take the same host position in each subnet, differing only in the final octet.
One cable is enough for full rate. The playbook states it twice: “full bandwidth can be achieved with just one QSFP cable”, and adds that “when two QSFP cables are connected, all four interfaces must be assigned IP addresses to obtain full bandwidth.” A second cable half-configured is worse than no second cable, because the engine may pick the unaddressed pair.
Same user, no password
Section titled “Same user, no password”The playbooks assume two things about accounts that are easy to skip and expensive to skip.
The first is that both machines have the same username, and the playbook’s step 1 is to check
with whoami and create a matching user if they differ. Open MPI launches remote ranks over SSH as
the local user; a mismatch fails at the point where a distributed run starts, not at the point
where you configured it.
The second is passwordless SSH in both directions. NVIDIA ships a discovery script,
discover-sparks, that finds the nodes on the link and exchanges keys, printing a summary that
ends “SSH setup complete! Both local and remote nodes can now SSH to each other without passwords.”
If it fails, the documented fallback is manual: read each node’s address with ip addr show on the
chosen interface, then run ssh-copy-id from each node to the other.
Which wire, exactly: the variables that decide
Section titled “Which wire, exactly: the variables that decide”A DGX Spark pair has at least two networks between it: the direct QSFP link and whatever the house switch or Wi-Fi provides. Every distributed framework has to be told which one to use, and each of them has its own variable for it. Getting this wrong does not produce an error. It produces a cluster that runs at the speed of the slow network.
Four consumers of an interface name, and what each one wants
- Ray and vLLM bootstrapVLLM_HOST_IP, set per node to that node's own address on the chosen interface. vLLM's documentation says to set it to "an address on a private network segment".
- NCCL, for the collectivesNCCL_SOCKET_IFNAME selects the Ethernet interface; NCCL_IB_HCA filters the RDMA devices. NCCL_SOCKET_IFNAME "will bypass the automatic interface selection algorithm".
- Gloo and the PyTorch storeGLOO_SOCKET_IFNAME and TP_SOCKET_IFNAME, which the NVIDIA playbook sets to the same interface as NCCL.
- Open MPI and UCXOMPI_MCA_btl_tcp_if_include and UCX_NET_DEVICES. TensorRT-LLM's multi-node path launches with mpirun, so these are the ones that matter there.
The NCCL documentation is worth reading for two sentences rather than for its full length. On
interface selection it says that NCCL_SOCKET_IFNAME takes “a list of prefixes to filter interfaces
to be used by NCCL”, that a leading = means an exact name and a leading ^ means exclude, and
that setting it “will bypass the automatic interface selection algorithm”. On the RDMA side,
NCCL_IB_HCA “specifies which Host Channel Adapter (RDMA) interfaces to use for communication”,
again as a prefix list with the same = and ^ conventions. NCCL_IB_GID_INDEX “defines the
Global ID index used in RoCE mode”, and its default is -1, meaning NCCL selects one; leave it
alone until something tells you not to.
Two more are for diagnosis rather than configuration. NCCL_DEBUG accepts VERSION, WARN,
INFO and TRACE, and NCCL_IB_DISABLE set to 1 “prevents the IB/RoCE transport from being
used by NCCL. Instead, NCCL will fall back to using IP sockets.” That second one is a measurement
tool: run the same job with and without it and the difference is what RDMA is worth on your pair.
The official pair, and what NVIDIA says it runs
Section titled “The official pair, and what NVIDIA says it runs”The connect-two-Sparks playbook is a short document with a stated budget: “duration: 1 hour including validation”, “risk level: medium — involves network reconfiguration”, and a rollback that is simply removing the netplan file or deleting the addresses. That is the honest shape of this work. It is an hour of careful naming, and it is reversible.
The pair this part builds
- workerDGX Spark A128 GB unified memory; Ray head; the served endpoint
- workerDGX Spark B128 GB unified memory; Ray worker
- routerHouse networkSSH, model downloads, clients
- DGX Spark A connected to DGX Spark Bdirect QSFP cable: RoCE, no switch, its own subnet
- DGX Spark A connected to House networkmanagement interface
- DGX Spark B connected to House networkmanagement interface
What does the pair buy? NVIDIA’s product page frames it from the model’s side: ConnectX networking “enables the connection of up to four NVIDIA DGX Spark systems to work with AI models of up to 700 billion parameters.” For two machines, the arithmetic is the one Part 4 taught: 256 GB of unified memory holds a four-bit checkpoint of a few hundred billion parameters, and whatever survives two operating systems, two containers and two engines is the key-value cache. On a large enough model that remainder is very small, which is the whole story of the next callout.
The playbooks are concrete about which models. The TensorRT-LLM playbook’s support matrix marks
nvidia/Qwen3-235B-A22B-FP4 as “two Sparks only”, which is the vendor naming a 235B-class
mixture-of-experts model as a pair-sized workload. That handle redirected to a repository named
nvidia/Qwen3-235B-A22B-NVFP4 when the Hub was checked on 2026-09-09, which is the ordinary way a
vendor repository gets renamed; follow the redirect and check the card. Qwen3-235B-A22B is
Apache-2.0 licensed according to the model reference. The vLLM multi-node
playbook’s main worked example is a 70B dense model, with a 405B model in an optional final step.
That is not a reason to skip the exercise. Loading a 400B-class model on hardware you own and watching it answer is worth doing once, and this part’s lab has you do it, then measure it, then compare it against a 120B-class mixture-of-experts model on one machine that will very probably be more useful. Both numbers go in the notebook. The comparison is the lesson.
Three Sparks, four Sparks, and a switch
Section titled “Three Sparks, four Sparks, and a switch”The documented topology limits from Part 5 hold here. NVIDIA’s ConnectX-7 page states support for “up to three DGX Spark systems connected directly through cables, and up to four systems when using a switch”, and there is a playbook for each: connect two, connect three in a ring, and connect multiple through a switch.
The switch path is a different quantity of work. Its playbook budgets “2 hours including validation” against the pair’s one, and its prerequisites include knowing how to configure the switch itself: how to enable and disable QSFP ports, how to create a bridge, and “how to configure the link speed manually on the port and disable auto-negotiation if needed”. It asks for “a QSFP switch with at least 4 QSFP56-DD ports (at least 200Gbps each)”.
Part 18 explained why the switch is the harder case in a way that has nothing to do with convenience. RoCE needs flow control to work reliably, and NVIDIA’s networking documentation says the normal way to provide it is priority flow control enabled on every endpoint and every switch in the path. A direct cable has no switch in the path. That is why this course validates the pair and describes the switch.
Verifying, before an engine is involved
Section titled “Verifying, before an engine is involved”The order matters. Every check below is cheap, and each one rules out a class of fault that is expensive to diagnose once a model is loading.
ibdev2netdevon both nodes. The expected result is at least one interface(Up)on each, with the same name on both if you used the same physical port. This is a cable and firmware check.ip addr showon the chosen interface, both nodes. The address you configured is present and the interface isUP. This is a netplan check.- A ping across the link. Reachability, and a first sense of latency.
- SSH in both directions, by address, without a password. The playbook’s own verification is
ssh <address> hostnamefrom each node. This is what Open MPI and Ray will do. - A collective. NVIDIA’s NCCL playbook builds NCCL and
nccl-testsfrom source on both nodes and runsall_gather_perfundermpirun, with a larger buffer size to “use more of your 200Gbps bandwidth”. This is the first thing that proves the GPUs can talk, and it takes about half an hour of building.
The troubleshooting table NVIDIA publishes for the pair has exactly three rows, and they map onto the checks above: “network unreachable” means the interfaces are not configured, so verify the netplan file and apply it; SSH authentication failures mean the keys were not distributed, so re-run the discovery script; and a node not visible in the cluster means a connectivity problem, so check the cable and the addresses.
Establish a two-node acceptance ladder
Section titled “Establish a two-node acceptance ladder”Check the pair in increasing order of cost: device and interface visibility, addressing and route, SSH using the intended account, bulk transfer, collective or RDMA test, then model serving. Save outputs from both nodes at every stage. A later failure is easier to localise when the lower layers already have evidence.
Keep the management connection distinct from the high-speed data link. Record which interface each runtime uses and confirm traffic with counters during a test. Hostname resolution can select a different address than the one you intended, so capture resolved endpoints as well as names.
Before loading a large checkpoint, compare software and image identities and verify the model files needed by each rank. Use a small distributed test first. If a worker fails, retain its first error; the coordinator’s timeout is often only the downstream symptom. A completed network setup is an input to the serving lab. It does not yet establish that a particular model, quantisation or parallelism configuration can run on the pair.
Two DGX Sparks are joined by one approved QSFP cable between the same physical port on each
machine. Each port presents two Ethernet interfaces to Linux and each Ethernet interface has a
matching RoCE device, so ibdev2netdev is the command that tells you what you actually have.
Addresses go on the interfaces that came up, one private subnet per cable, written into netplan if
you want them after a reboot; NVIDIA states that one cable reaches full rate and that a second
cable must have all four interfaces addressed to help.
Both machines need the same username and passwordless SSH in both directions, which the
discover-sparks script arranges and which fails on a machine that has never had a ~/.ssh
directory. From there the work is naming: VLLM_HOST_IP for the bootstrap, NCCL_SOCKET_IFNAME
and NCCL_IB_HCA for the collectives, GLOO_SOCKET_IFNAME and TP_SOCKET_IFNAME for PyTorch’s
store, and OMPI_MCA_btl_tcp_if_include with UCX_NET_DEVICES for the MPI path, all pointed at
one interface held in one shell variable.
NVIDIA documents up to three Sparks cabled directly and up to four through a switch, and claims up to 700 billion parameters across four systems. For two, the vendor’s own 405B example carries a warning that there is insufficient memory headroom for production use, which is the honest state of the art on this hardware and the reason the lab measures a 120B-class model on one machine alongside it.
Check your understanding
Sources for this lesson
10 verified · checked 2026-09-09
- 01NVIDIA DGX Spark User Guide — ConnectX-7 Networkingdocs.nvidia.com/dgx/dgx-spark/spark-clustering.html2026-09-09
- 02NVIDIA DGX Spark product page§ Specificationsnvidia.com/en-us/products/workstations/dgx-spark2026-09-09
- 03DGX Spark playbook — Connect Two Sparksbuild.nvidia.com/spark/connect-two-sparks2026-09-09
- 04DGX Spark playbook — Connect Two Sparks, Run on Two Sparksbuild.nvidia.com/spark/connect-two-sparks/stacked-sparks2026-09-09
- 05DGX Spark playbook — Connect Two Sparks, Troubleshootingbuild.nvidia.com/spark/connect-two-sparks/troubleshooting2026-09-09
- 06DGX Spark playbook — NCCL for Multiple Sparksbuild.nvidia.com/spark/nccl2026-09-09
- 07DGX Spark playbook — NCCL for Multiple Sparks, Run on two Sparksbuild.nvidia.com/spark/nccl/stacked-sparks2026-09-09
- 08DGX Spark playbook — Connect Multiple DGX Spark through a Switchbuild.nvidia.com/spark/multi-sparks-through-switch2026-09-09
- 09NCCL documentation — Environment Variables§ NCCL_SOCKET_IFNAME; NCCL_IB_HCA; NCCL_IB_GID_INDEX; NCCL_IB_DISABLE; NCCL_DEBUGdocs.nvidia.com/deeplearning/nccl/user-guide/docs/env.html2026-09-09
- 10DGX Spark playbook — Serve LLMs with vLLM, Multi-node servingbuild.nvidia.com/spark/vllm/multi-node2026-09-09
Every technical claim on this page was checked against the official documentation of the tool, vendor or model publisher on the date shown, at the version pinned for the course. Where the course disagrees with folklore, the source is how you can tell which one to trust.