Setting IP STatic Ubuntu Server 22.04
Pertama saya ingin mengkonfigurasi network yang saya akan gunakan. dalam kasus ini saya ingin buat ip static pada ubuntu server. mana sebelum nya berbeda dengan versi ubuntu sebelum-sebelumnya.
maka kita buka terminal dengan ketikkan :
sudo nano /etc/netplan/50-cloud-init.yaml
ketiikan
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: no
dhcp6: no
addresses:
- 10.10.2.4/24
routes:
- to: deafult
via: 192.168.122.1
nameservers:
addresses:
- 192.168.122.1
- 8.8.8.8
lalu lanjut
sudo netplan generate
sudo netplan apply
Komentar
Posting Komentar