Manual IP Address Ubuntu 22.04
Setting static ip addess atau manual ip address di Linux Ubuntu 22.04 Cek Interface
sudo ip a
Edit network configurasi setting
sudo vim /etc/netplan/00-installer-config.yaml
Tambahkan script berikut
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 192.168.1.212/24
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
routes:
- to: default
via: 192.168.1.2
eth0 – ini merupakan interface yang ada di mesin Ubuntu 22.04
addresses – ip address untuk mesinnya
nameservers – DNS domain name server
routes – default gateway
atau bisa setting seperti berikut
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses: [192.168.1.212/24]
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
gateway4: 192.168.1.1
Apply perubahan
sudo netplan apply
Sekian