The legacy
machine.network field is deprecated. Use the multi-document configuration types instead: NetworkDeviceConfig, ResolverConfig, StaticHostConfig, and KubeSpanConfig.Network Device Configuration
Network devices are configured using separateNetworkDeviceConfig documents:
Device Selection
Devices can be selected by interface name or by device selector:The interface name (e.g.,
eth0, enp0s3).Select device by hardware attributes instead of interface name.
IP Addresses
Static IP addresses to assign to the interface in CIDR notation.
DHCP Configuration
Enable DHCP for IPv4 address assignment.
DHCP client options.
DHCP Options
Metric for DHCP routes.
Enable DHCPv4.
Enable DHCPv6.
DHCPv6 unique identifier.
Routes
Static routes for this interface.
Route Options
Destination network in CIDR notation.
Gateway IP address.
Source IP address for the route.
Route metric/priority.
VLANs
VLAN sub-interfaces.
Bonding
Create bonded interfaces:Bond Options
Bonding mode:
balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb.List of interfaces to bond.
LACP rate:
slow or fast.Transmit hash policy for load balancing.
Bridge
Create bridge interfaces:List of interfaces to add to the bridge.
Enable Spanning Tree Protocol.
Wireguard
Configure WireGuard VPN:DNS Resolution
Configure DNS resolvers using theResolverConfig document:
List of DNS server IP addresses.
DNS search domains.
Static Host Entries
Define static hostname to IP mappings:List of hostname to IP address mappings.
Hostname Configuration
Set the machine hostname:The hostname for the machine.
Time Sync Configuration
Configure NTP servers:NTP server addresses. Can also specify PTP devices like
/dev/ptp0.Timeout for time sync during boot. Set to
infinity to wait forever.KubeSpan
KubeSpan provides encrypted peer-to-peer mesh network:Enable KubeSpan.
Advertise Kubernetes pod/service networks over KubeSpan.
Filter endpoints by CIDR.
Complete Example: Dual Stack with Bonding
Network Configuration Tips
Interface Naming
Interface names in Linux can change between boots. Use
deviceSelector for stable configuration based on hardware attributes like MAC address or PCI bus path.MTU Settings
Maximum transmission unit for the interface. Common values:
1500 (default), 9000 (jumbo frames).Ignoring Interfaces
Ignore this interface completely. Useful for preventing Talos from managing certain interfaces.