This is how you can connect four @NVIDIAAI DGX Sparks without a switch!
tldr; it's a closed-ring, but not the kind you think of 👇 https://x.com/i/article/2117303230543659008
Connecting Four DGX Sparks Without A Switch
I got a fourth DGX Spark a few weeks ago. The other three were already connected with a ring topology, done easily via the Nvidia Sync, but with every QSFP port full, NVIDIA's documented answer at four nodes is a switch.
I didn't buy one, I might get it in the future but not for now. So I thought I'd just pull one cable out of the triangle, drop the fourth Spark into the gap, and close it back into a ring.
It was definitely not as simple as that. I knew things were going to break but I didn't expect them to break so badly.
A four-node ring is four cables. The obvious way is a straight line:
1 → 2 → 3 → 4 → 1
The closing cable runs the full height of the stack, and if you have a short cable that last jump usually can't make it comfortably, especially if you keep your sparks a bit separate from each other.
What I did instead
In order not to stretch the last cable so much, I connected them like this:
1 → 2 → 4 → 3 → 1
The graph is pretty much the same, every cable goes to the next spark or the one past it, so nothing spans more than two units.
Since NVIDIA supports direct cabling for up to three Sparks, how did I do it?
This ring I built is the unsupported path, but it works.
The cabling is four cables. To get this right, look at the Spark from the back. The left QSFP is the one next to the Ethernet jack. That's port 0. The right one is port 1.
Spark1 port0 → Spark3 port1
Spark1 port1 → Spark2 port0
Spark2 port1 → Spark4 port0
Spark3 port0 → Spark4 port1
If you are coming from the triangle, there are two of the cables stay the same.
You will need to remake the NFS mounts and SSH keys
I asked DeepSeek to remake my NFS connections between the sparks so weights could be read across them via CX7.
I also asked it to add the missing SSH keys so the fourth Spark could talk to the other ones without a password.
If you are like me and connected the other Sparks using Nvidia Sync before, your machines would have a passwordless ssh key called ~/.ssh/id_ed25519_cluster. Ask one your agents to fix the same on the 4th Spark.
To be honest AI is so good nowadays you can just ask it to fix everything for you.
I'll leave you a bash script I used to get this sorted out, it should help you or your agent 👇
It was a long script and couldn't fit it on the X article.
Hope this helps, if you encounter any issues, lmk! ✌️
P.S. The switch is still the right answer if you want more than four nodes, or if you want to add and remove machines without touching a cable. This is the four-node answer for people who already own four cables and no switch.
