> For the complete documentation index, see [llms.txt](https://asus-isg-aidc.gitbook.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asus-isg-aidc.gitbook.io/guide/latest/cli/commandreference/network.md).

# Network Configuration

| Developer | Last modified |
| --------- | ------------- |
| AIDC Team | 2026/07/06    |

## Table of Contents

* [1. Overview](#overview)
* [2. Subcommands](#subcommands)
* [3. Configuration vs Application](#configuration-vs-application)
* [4. Usage Examples](#usage-examples)

***

## 1. Overview <a href="#overview" id="overview"></a>

{% hint style="warning" %}
**⚠️ Prerequisite: `aidc-cli init` required first**

This command depends on settings saved by [`aidc-cli init`](/guide/latest/cli/commandreference/init.md). Before running it, make sure you have completed:

* [`aidc-cli init inventory`](/guide/latest/cli/commandreference/init.md#inventory) — render the node inventory from `aidc.csv`
* SSH access to the nodes — [`aidc-cli deploy install`](/guide/latest/cli/commandreference/deploy.md) sets this up during OS deployment; for nodes that already have an OS, run [`aidc-cli deploy access-key`](/guide/latest/cli/commandreference/deploy.md) or fill the `password` column in `aidc.csv`
* [`aidc-cli init eth-set` / `bond-set` / `ib-set` / `link-type-set`](/guide/latest/cli/commandreference/init.md#network-configuration) — save the network profiles to apply

For the full setup sequence, see the [Getting Started](/guide/latest/cli/gettingstarted.md) guide.
{% endhint %}

The `network` command applies network configurations to target nodes, including Ethernet interface setup, bonding, InfiniBand configuration, NVOS switch configuration, NIC link type changes, and DPU mode switching.

```bash
aidc-cli network <subcommand> [flags]
```

***

## 2. Subcommands <a href="#subcommands" id="subcommands"></a>

### 2.1 `eth-cfg` — Configure Ethernet

Applies Ethernet interface configuration as defined by `init eth-set`.

```bash
aidc-cli network eth-cfg
```

{% hint style="info" %}
You must run `aidc-cli init eth-set` to define Ethernet parameters before applying with this command.
{% endhint %}

***

### 2.2 `eth-bond` — Configure Ethernet Bonding

Sets up Ethernet bonding (Link Aggregation) as defined by `init bond-set`.

```bash
aidc-cli network eth-bond
```

***

### 2.3 `ib-cfg` — Configure InfiniBand

Applies InfiniBand configuration as defined by `init ib-set`.

```bash
aidc-cli network ib-cfg
```

{% hint style="info" %}
You must run `aidc-cli init ib-set` to define InfiniBand parameters before applying with this command.
{% endhint %}

***

### 2.4 `nvos-cfg` — Configure NVOS Ethernet

Applies NVOS (NVIDIA Onyx/Cumulus OS) switch Ethernet configuration.

```bash
aidc-cli network nvos-cfg
```

***

### 2.5 `link-type` — Configure NIC Link Type

Changes the NIC link type (Ethernet ↔ InfiniBand) based on `init link-type-set` settings.

This is a two-step workflow:

1. Save the interface/type preset locally with `aidc-cli init link-type-set -f <interface> -t <eth|ib>`
2. Apply that preset to the target nodes with `aidc-cli network link-type [--limit-hosts <targets>]`

In `init link-type-set`, `-f` is the interface name such as `ib0`, not the hostname.

```bash
aidc-cli network link-type
```

{% hint style="warning" %}
Changing link type requires the OFED or DOCA driver to be installed first. A firmware reset or reboot may also be required to take effect.
{% endhint %}

{% hint style="info" %}
Do **not** use `aidc-cli network ib-cfg` for link-type switching. `ib-cfg` applies InfiniBand network parameters from `init ib-set`; it does not change the NIC link type.
{% endhint %}

***

### 2.6 `dpu-mode` — Switch DPU Mode

Queries or switches NVIDIA DPU operated mode between NIC mode and DPU mode.

```bash
# Query current DPU mode
aidc-cli network dpu-mode

# Switch to a specific mode
aidc-cli network dpu-mode -m <mode>
```

| Flag     | Short | Required | Description                                              |
| -------- | :---: | :------: | -------------------------------------------------------- |
| `--mode` |  `-m` |     ❌    | Target mode: `nic` or `dpu` (omit to query current mode) |

{% hint style="info" %}
The OFED or DOCA driver must be installed before switching DPU mode.
{% endhint %}

***

## 3. Configuration vs Application <a href="#configuration-vs-application" id="configuration-vs-application"></a>

| Phase     | Command                       | Purpose                          |
| --------- | ----------------------------- | -------------------------------- |
| Configure | `aidc-cli init eth-set`       | Set Ethernet parameters          |
| Configure | `aidc-cli init bond-set`      | Set bonding parameters           |
| Configure | `aidc-cli init ib-set`        | Set InfiniBand parameters        |
| Configure | `aidc-cli init nvos-set`      | Set NVOS parameters              |
| Configure | `aidc-cli init link-type-set` | Store NIC link-type presets      |
| **Apply** | `aidc-cli network eth-cfg`    | Apply Ethernet to nodes          |
| **Apply** | `aidc-cli network eth-bond`   | Apply bonding to nodes           |
| **Apply** | `aidc-cli network ib-cfg`     | Apply InfiniBand to nodes        |
| **Apply** | `aidc-cli network nvos-cfg`   | Apply NVOS configuration         |
| **Apply** | `aidc-cli network link-type`  | Apply link-type presets to nodes |

{% hint style="info" %}
Always configure parameters with `init *-set` first, then apply with `network *-cfg`.
{% endhint %}

***

## 4. Usage Examples <a href="#usage-examples" id="usage-examples"></a>

```bash
# Configure and apply Ethernet
aidc-cli init eth-set
aidc-cli network eth-cfg

# Configure and apply a NIC link-type change
aidc-cli init link-type-set -f ib0 -t eth
aidc-cli network link-type --limit-hosts weka221

# Configure bonding on specific nodes
aidc-cli network eth-bond -l node01,node02

# Switch DPU to NIC mode
aidc-cli network dpu-mode -m nic

# Switch DPU to DPU mode
aidc-cli network dpu-mode -m dpu
```
