Panduan Langkah-demi-Langkah (Ubuntu)

Konfigurasi
Netplan Ubuntu

Referensi Kelas IP Address

KelasRentang IPDefault Subnet
Kelas A1.0.0.0 – 126.255.255.255255.0.0.0 (/8)
Kelas B128.0.0.0 – 191.255.255.255255.255.0.0 (/16)
Kelas C192.0.0.0 – 223.255.255.255255.255.255.0 (/24)

Langkah Pelaksanaan

1

Pengaturan Adapter VirtualBox

  • Buka Pengaturan (Settings) → Jaringan (Network)
  • Adapter 1: Atur ke NAT
  • Adapter 2: Host-Only → Advance → Mode Promiscuous: Izinkan Semua
2

Konfigurasi Netplan (YAML)

1. Masuk ke direktori Netplan dan cek nama file konfigurasi yang tersedia:

Masuk ke Folder
cd /etc/netplan
Lihat Daftar File
ls

2. Edit file yang ditemukan (contoh: 01-netcfg.yaml):

Edit File
sudo nano 01-netcfg.yaml
Penting: Netplan sangat sensitif terhadap spasi. Jangan gunakan TAB, gunakan spasi untuk indentasi.
Isi Konfigurasi YAML
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: true
    enp0s8:
      addresses:
        - 192.168.10.28/24
3

Terapkan & Verifikasi Jaringan

1. Jalankan perintah berikut untuk menerapkan perubahan konfigurasi:

Terapkan Netplan
sudo netplan apply

2. Verifikasi apakah IP Address sudah terpasang pada interface (cek pada enp0s8):

Cek Status IP
ip a
4

Konfigurasi Host Windows

1. Buka Network & Sharing Center di Control Panel

2. Pilih Change adapter settings

3. Klik kanan pada VirtualBox Host-Only Network → Properties

4. Pilih IPv4 → Klik Properties

IP Address: 192.168.10.2
Subnet Mask: 255.255.255.0
Gateway: 192.168.10.28
DNS Server: 192.168.10.28