- Home >
- Programing , Teknologi Informasi >
- Konfigurasi Interface di komputer
Posted by : Unknown
Saturday, May 7, 2016
Teknik Mengkonfigurasi IP address
Edit file /etc/network/interfaces
# vi /etc/network/interfaces
Contoh isi
IP Dynamic
iface eth0 inet dhcp
IP Static
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
IPv6
### Start IPV6 static configuration iface eth0 inet6 static pre-up modprobe ipv6 address 2607:f0d0:2001:000a:0000:0000:0000:0010 netmask 64 gateway 2607:f0d0:2001:000a:0000:0000:0000:0001 ### END IPV6 configuration
Setup IP Address Statik
Menggunakan Menu
System -> Preferences -> Network Connections. Pastikan di situ Add konfigurasi IP address
Menggunakan Shell
sudo ifconfig eth0 192.168.x.x netmask 255.255.255.0
Mengkonfigurasi Interface di Ubuntu Shell
Mengkonfigurasi Interface di Shell dapat melalui dua cara
- Melalui Command Line
- Mengedit file /etc/network/interfaces
Melalui Command Line
Menggunakan perintah
ifconfig eth0 192.168.0.3 netmask 255.255.255.0
Untuk Wireless
iwconfig wlan0 essid namahotspot iwconfig wlan0 mode managed
Untuk Scanning Wireless
iwlist scanning
Melalui /etc/network/interfaces
Edit file
vi /etc/network/interfaces
Untuk LAN
auto eth0 iface eth0 inet dhcp
Untuk LAN Statik
auto eth0 iface eth0 inet static address 192.168.0.3 broadcast 192.168.0.255 netmask 255.255.255.0 gateway 192.168.0.222
Untuk WLAN
auto eth1 allow-hot plug eth1 iface eth1 inet dhcp wireless-mode managed wireless-essid NAMAHOTSPOT
Untuk WLAN menggunakan MESH
auto eth1 allow-hot plug eth1 iface eth1 inet static address 172.16.1.2 broadcast 172.16.255.255 netmask 255.255.0.0 wireless-mode ad-hoc wireless-channel 1 wireless-essid MESH wireless-bssid 02:ca:ff:ee:ba:be
Teknik Mengkonfigurasi DNS resolv.conf
Edit
sudo vi /etc/resolv.conf
Isi misalnya:
# Generated by NetworkManager domain sekolah.sch.id search sekolah.sch.id nameserver 203.130.192.74 nameserver 202.134.0.61
Biasanya daftar nameserver sekitar 3 maksimum.
Sumber : cyberlearning.web.id