< Previous | Contents | Next >
1.2.3. Static IP Address Assignment
To configure your system to use static address assignment, create a netplan configuration in the file /etc/ netplan/99_config.yaml. The example below assumes you are configuring your first Ethernet interface identified as eth0. Change the addresses, gateway4, and nameservers values to meet the requirements of your network.
network: version: 2
renderer: networkd
ethernets: eth0:
addresses:
- 10.10.10.2/24
gateway4: 10.10.10.1 nameservers:
search: [mydomain, otherdomain] addresses: [10.10.10.1, 1.1.1.1]
The configuration can then be applied using the netplan command.
sudo netplan apply