Netplan DHCP explanation
DHCP (Dynamic Host Configuration Protocol) is used in Netplan configurations on Ubuntu when you want the network interface to automatically receive its IP address, subnet mask, default gateway, and DNS servers from a DHCP server. This is common in environments where network settings are centrally managed and can change dynamically.
Configuration
Configuration file is located under the folder: /etc/netplan
# List files in the folder
ls /etc/netplan
# Edit the file
sudo nano 00-installer-config.yaml
network: version: 2 renderer: networkd ethernets: enp0s3: dhcp4: yes
Test and Apply configuration
# Try the configuration before applying netplan try -timeout 120 # Apply network configuration netplan apply