> 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/v1.4.0/cli/commandreference/network.md).

# Network Configuration

| Developer | Last modified |
| --------- | ------------- |
| AIDC Team | 2026/02/12    |

## 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>

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.

```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 %}

***

### 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 |
| **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 |

{% 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 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
```
