Mange the IP address on Ubuntu server
Change to static IP address
- update
/etc/netplan/50-cloud-init.yaml
network:
ethernets:
enp0s3:
dhcp4: false
addresses: [192.168.1.202/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4,192.168.1.1]
version: 2
- apply the changes
sudo netplan apply
- review the ip address
$ ip a
Change to DHCP
update above config option dhcp4: true