Ubuntu:Teknik Mengkonfigurasi IP address: Difference between revisions
Created page with "==Ubuntu 20.04== Edit vi /etc/netplan/00-installer-config.yaml Contoh isi: # This is the network config written by 'subiquity' network: ethernets: enp0s3: dhcp4: true version: 2 Untuk IP Static network: version: 2 ethernets: enp0s3: addresses: [192.168.20.160/24] gateway4: 192.168.20.2 nameservers: addresses: [192.168.20.2, 8.8.8.8] Kemudian lakukan sudo netplan apply sudo reboot ==Ubuntu <18.04==..." |
|||
| Line 1: | Line 1: | ||
==Ubuntu 20.04== | ==Ubuntu 20.04== | ||
Edit | Edit | ||
vi /etc/netplan/00-installer-config.yaml | vi /etc/netplan/00-installer-config.yaml | ||
Contoh isi: | Contoh isi: | ||
# This is the network config written by 'subiquity' | # This is the network config written by 'subiquity' | ||
network: | network: | ||
| Line 12: | Line 9: | ||
dhcp4: true | dhcp4: true | ||
version: 2 | version: 2 | ||
Untuk IP Static | Untuk IP Static | ||
network: | network: | ||
version: 2 | version: 2 | ||
| Line 23: | Line 18: | ||
nameservers: | nameservers: | ||
addresses: [192.168.20.2, 8.8.8.8] | addresses: [192.168.20.2, 8.8.8.8] | ||
Kemudian lakukan | Kemudian lakukan | ||
sudo netplan apply | sudo netplan apply | ||
sudo reboot | sudo reboot | ||
==Ubuntu <18.04== | ==Ubuntu <18.04== | ||
Edit file /etc/network/interfaces | Edit file /etc/network/interfaces | ||
# vi /etc/network/interfaces | # vi /etc/network/interfaces | ||
Contoh isi | Contoh isi | ||
'''IP Dynamic''' | '''IP Dynamic''' | ||
iface eth0 inet dhcp | iface eth0 inet dhcp | ||
'''IP Static''' | '''IP Static''' | ||
iface eth0 inet static | iface eth0 inet static | ||
| Line 46: | Line 33: | ||
netmask 255.255.255.0 | netmask 255.255.255.0 | ||
gateway 192.168.0.1 | gateway 192.168.0.1 | ||
==IPv6== | ==IPv6== | ||
### Start IPV6 static configuration | ### Start IPV6 static configuration | ||
iface eth0 inet6 static | iface eth0 inet6 static | ||
| Line 57: | Line 41: | ||
gateway 2607:f0d0:2001:000a:0000:0000:0000:0001 | gateway 2607:f0d0:2001:000a:0000:0000:0000:0001 | ||
### END IPV6 configuration | ### END IPV6 configuration | ||
== Source == | |||
* [https://lms.onnocenter.or.id/wiki/index.php/Teknik_Mengkonfigurasi_IP_address onnocenter.or.id] | |||
[[Category: Linux]] | [[Category: Linux]] | ||
[[Category:Jaringan Komputer]] | |||
[[Category:Jaringan]] | |||
[[Category:Ubuntu]] | |||