> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siderolabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Network Configuration

> In this guide we will describe how network can be configured on bare-metal platforms.

export const release_v1_13 = 'v1.13.1';

export const VersionWarningBanner = () => {
  const latestVersion = "v1.13";
  const [latestUrl, setLatestUrl] = useState(null);
  const [currentVersion, setCurrentVersion] = useState(null);
  const [isBeta, setIsBeta] = useState(false);
  const parseVersion = v => v.replace("v", "").split(".").map(Number);
  const isGreaterVersion = (a, b) => {
    const [aMajor, aMinor] = parseVersion(a);
    const [bMajor, bMinor] = parseVersion(b);
    if (aMajor > bMajor) return true;
    if (aMajor === bMajor && aMinor > bMinor) return true;
    return false;
  };
  useEffect(() => {
    if (typeof window === "undefined") return;
    const {pathname, hash, search} = window.location;
    const match = pathname.match(/\/talos\/(v\d+\.\d+)\//);
    if (!match) return;
    const detectedVersion = match[1];
    if (detectedVersion === latestVersion) return;
    setCurrentVersion(detectedVersion);
    if (isGreaterVersion(detectedVersion, latestVersion)) {
      setIsBeta(true);
    }
    const newPath = pathname.replace(`/talos/${detectedVersion}/`, `/talos/${latestVersion}/`);
    setLatestUrl(`${newPath}${search}${hash}`);
  }, []);
  if (!latestUrl || !currentVersion) return null;
  return <div className="not-prose sticky top-6 z-50 my-6">
      <div className="border border-yellow-500/30 bg-yellow-500/10 px-4 py-3 rounded-xl">
        <div className="text-sm">
          {isBeta ? <>
              ⚠️ You are viewing a <strong>beta version</strong> of Talos ({currentVersion}).
              This version may be unstable.
              <a href={latestUrl} className="ml-2 underline text-yellow-400 hover:text-yellow-300 font-medium">
                View latest stable version {latestVersion} →
              </a>
            </> : <>
              ⚠️ You are viewing an older version of Talos ({currentVersion}).
              <a href={latestUrl} className="ml-2 underline text-yellow-400 hover:text-yellow-300 font-medium">
                View the latest version {latestVersion} →
              </a>
            </>}
        </div>
      </div>
    </div>;
};

<VersionWarningBanner />

By default, Talos will run DHCP client on all interfaces which have a link, and that might be enough for most of the cases.
If some advanced network configuration is required, it can be done via the [machine configuration](../../networking/configuration/overview) file.

But sometimes it is required to apply network configuration even before the machine configuration can be fetched from the network.
In this case, the recommended way is to embed the machine configuration into the Talos image itself, as described in the [boot assets guide](../../platform-specific-installations/boot-assets).

If machine configuration embedding is not possible, Talos provides several ways to configure network on bare-metal platforms before the machine configuration is fetched.

## Kernel command line

Talos supports some kernel command line parameters to configure network before the machine configuration is fetched.

> Note: Kernel command line parameters are not persisted after Talos installation, so proper network configuration should be done via the machine configuration.

Address, default gateway and DNS servers can be configured via `ip=` kernel command line parameter:

```text theme={null}
ip=172.20.0.2::172.20.0.1:255.255.255.0::eth0.100:::::
```

Bonding can be configured via `bond=` kernel command line parameter:

```text theme={null}
bond=bond0:eth0,eth1:balance-rr
```

VLANs can be configured via `vlan=` kernel command line parameter:

```text theme={null}
vlan=eth0.100:eth0
```

See [kernel parameters reference](../../reference/kernel) for more details.

## Platform network configuration

Some platforms (e.g. AWS, Google Cloud, etc.) have their own network configuration mechanisms, which can be used to perform the initial network configuration.
There is no such mechanism for bare-metal platforms, so Talos provides a way to use platform network config on the `metal` platform to submit the initial network configuration.

The platform network configuration is a YAML document which contains resource specifications for various network resources.
For the `metal` platform, the [interactive dashboard](../../deploy-and-manage-workloads/interactive-dashboard) can be used to edit the platform network configuration, also the configuration can be
created [manually](./metal-network-configuration).

The current value of the platform network configuration can be retrieved using the `MetaKeys` resource (key `0x0a`):

```bash theme={null}
talosctl get meta 0x0a
```

The platform network configuration can be updated using the `talosctl meta` command for the running node:

```bash theme={null}
talosctl meta write 0x0a '{"externalIPs": ["1.2.3.4"]}'
talosctl meta delete 0x0a
```

The initial platform network configuration for the `metal` platform can be also included into the generated Talos image:

<CodeBlock lang="sh">
  {`
    docker run --rm -i ghcr.io/siderolabs/imager:${release_v1_13} iso --arch amd64 --tar-to-stdout --meta 0x0a='{...}' | tar xz
    docker run --rm -i ghcr.io/siderolabs/imager:${release_v1_13} image --platform metal --arch amd64 --tar-to-stdout --meta 0x0a='{...}' | tar xz
    `}
</CodeBlock>

The platform network configuration gets merged with other sources of network configuration, the details can be found in the [network resources guide](../../learn-more/networking-resources#configuration-merging).

## `nocloud` network configuration

Some bare-metal providers provide a way to configure network via the `nocloud` data source.
Talos Linux can automatically pick up this [configuration](../cloud-platforms/nocloud) when `nocloud` image is used.
