---
title: "Connect Multiple DGX Sparks for Distributed Workloads — Cable the Devices"
canonical: "https://build.nvidia.com/spark/connect-multiple-sparks/cable-devices.md"
---

# Creating a cluster requires physical cables 

You can connect the devices directly with the QSFP cables, or you can use a switch and connect each device to the switch with one QSFP cable per device.

In either case, you will plug QSFP cables into the appropriate ports on the devices.

If you are using a switch, **do not** connect some devices directly and others through a switch.

# Step 1. Pick a cluster layout

The procedure changes based on the number of devices and whether you use a switch.

| Devices | Layout | Cables |
| --- | --- | --- |
| Two | Direct | One cable between the devices |
| Three | Direct ring | Three cables; each device links to the other two |
| Two or more | Switch | One cable and one 200 Gbit/s link from each device to the switch |

NVIDIA Sync and the provided helper support up to four devices through a switch. Larger switch clusters need manual configuration or your own automation.

# Step 2. Set up the devices and cables

1. Turn on each DGX Spark.
2. Make sure each device is on the same LAN ([see here](https://docs.nvidia.com/dgx/dgx-spark/first-boot.html)).
3. Then use the [DGX Dashboard](https://docs.nvidia.com/dgx/dgx-spark/os-and-component-update.html#using-dgx-dashboard-for-updates) to update each device to the current DGX Spark system software.
4. Use a supported QSFP112 DAC cable in Ethernet mode. See [QSFP ports and cables](https://docs.nvidia.com/dgx/dgx-spark/spark-clustering.html#the-qsfp-ports-and-cables) for the approved cable list.
5. Place the devices within reach of the cables.

# Step 3. Connect your layout

See [Plugging in a QSFP Cable](https://docs.nvidia.com/dgx/dgx-spark/spark-clustering.html#plugging-in-a-qsfp-cable) for an image.

Viewed from the back of a Spark, **port 0** is closest to the ordinary Ethernet port and **port 1** is farther away. Use the wiring table for your layout below.

**Use the following steps each time you plug in a QSFP cable.**

1. Turn each DGX Spark so that the back faces you.
2. Select the QSFP port specified by your layout's wiring table.
3. Hold the cable with its pull tab facing up.
4. Push the cable into the port until it is fully seated.

> [!WARNING]
> Do not force a cable into a port. If it does not slide in, stop and check the pull tab and port alignment.

## Two-device direct link

Connect one device to the other with a **single** QSFP cable.
Using two cables will **not** increase performance.

Choose **one** of the port correspondence options below to meet the NVIDIA provided helper's interface requirements used in the Configure Manually tab.

| Port Correspondence | Spark 1 | Spark 2 |
| --- | --- | --- |
| Port 0 on both | Port 0 | Port 0 |
| OR Port 1 on both | Port 1 | Port 1 |

## Three-device direct ring

Use three QSFP cables to make a ring. 
Each Spark will have **two** QSFP cables plugged into it.

Use the following cabling pattern to meet the NVIDIA provided helper's interface requirements used in the Configure Manually tab.

| Cable | From | To |
| --- | --- | --- |
| 1 | Spark 1, port 0 | Spark 2, port 1 |
| 2 | Spark 2, port 0 | Spark 3, port 1 |
| 3 | Spark 3, port 0 | Spark 1, port 1 |

## Switch-connected devices

Set up the switch before you configure the cluster:

1. Check that the switch, ports, and cables support 200 Gbit/s Ethernet links.
2. Set each Spark-facing port for 200 Gbit/s. A 400 Gbit/s port may need to be split into two 200 Gbit/s ports.
3. Put all Spark-facing ports on the same Layer 2 network. Depending on the switch, this may be a bridge or VLAN.
4. If the switch reports hardware-offload status, confirm that the Spark-facing ports use the switch chip instead of the switch CPU.
5. Keep the default MTU for switch connections.
6. Apply or save the switch configuration.

> [!NOTE]
> Changing how a high-speed port is split may restart other links that use the same port group. Set the port mode before you rely on those links.

Connect one cable from each Spark to a separate 200 Gbit/s switch connection. Choose port 0 on every Spark or port 1 on every Spark. The table uses port 1; replace it with port 0 in every row if you choose port 0.

| Device | Spark QSFP port | Switch connection |
| --- | --- | --- |
| Spark 1 | Port 1 | First Spark-facing connection |
| Spark 2 | Port 1 | Second Spark-facing connection |
| Spark 3, if present | Port 1 | Third Spark-facing connection |
| Spark 4, if present | Port 1 | Fourth Spark-facing connection |
| Each additional Spark | Port 1 | Another available 200 Gbit/s connection |

The switch connection names are examples; use the actual port or breakout connection names shown by your switch.

Check the connected devices:

1. Check the switch interface for each Spark.
2. Confirm that each link is up at 200 Gbit/s.
3. If a link is down or runs at the wrong speed, check the cable type, port mode, auto-negotiation, and FEC.

Switch settings and port names differ by maker and model. Follow the switch maker's guide for the exact steps. Do not use commands written for a different switch model.

For MikroTik CRS804 and CRS812 switches, see [MikroTik wired interface compatibility](https://help.mikrotik.com/docs/spaces/ROS/pages/220233794/MikroTik%2Bwired%2Binterface%2Bcompatibility) and [MikroTik bridge configuration](https://help.mikrotik.com/docs/spaces/ROS/pages/328068/Bridging%2Band%2BSwitching).

# Step 4. Move on to configure the network

Continue with tab Configure with NVIDIA Sync for a click-through, managed clustering process. 

Or, go under the hood with the Configure Manually tab to use NVIDIA provided helper scripts to set things up.