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

# VLAN

> Learn how to configure VLANs (virtual LANs).

A VLAN (Virtual Local Area Network) is a logical subdivision of a physical network that allows for the segmentation of network traffic.
VLANs are commonly used to improve network performance and security by isolating different types of traffic within the same physical network infrastructure.

A VLAN can be configured on top of a physical network interface or another logical interface (like a bond).

## Configuration

To configure a VLAN in Talos Linux, create a [VLANConfig](https://docs.siderolabs.com/talos/v1.15/reference/configuration/network/vlanconfig.md) document like:

```yaml theme={null}
apiVersion: v1alpha1
kind: VLANConfig
name: enp0s3.2
vlanID: 2
vlanMode: 802.1q
parent: enp0s3
up: true
addresses:
    - address: 192.168.1.100/32
```

In this example, a VLAN with ID `2` is created on top of the physical interface `enp0s3`, and the VLAN interface is named `enp0s3.2`.
The name of the VLAN interface can be customized as needed.

The `vlanMode` field specifies the VLAN tagging protocol to use, with `802.1q` being the most common.
The `parent` field specifies the underlying physical or logical interface on which the VLAN is created.

Addresses and routes can be configured in the same document as shown in [static link configuration](https://docs.siderolabs.com/talos/v1.15/networking/configuration/static.md).
DHCP can be enabled on the VLAN interface as shown in [dynamic link configuration](https://docs.siderolabs.com/talos/v1.15/networking/configuration/dynamic.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.