Difference between revisions of "Raspbian: Setup Network"

From OnnoWiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
Isi dengan
 
Isi dengan
 
  
 
  # Please note that this file is written to be used with dhcpcd
 
  # Please note that this file is written to be used with dhcpcd
Line 14: Line 13:
 
  auto lo
 
  auto lo
 
  iface lo inet loopback
 
  iface lo inet loopback
   
+
 
 +
  auto eth0
 
  iface eth0 inet manual
 
  iface eth0 inet manual
 
   
 
   
Line 34: Line 34:
 
  interface eth0
 
  interface eth0
 
  static ip_address=192.168.11.10/24
 
  static ip_address=192.168.11.10/24
 +
# static ip6_address=fd51:42f8:caae:d92e::ff/64
 
  static routers=192.168.11.10
 
  static routers=192.168.11.10
  static domain_name_servers=192.168.11.10
+
  static domain_name_servers=192.168.0.223 8.8.8.8 fd51:42f8:caae:d92e::1
 
   
 
   
 
  # Custom static IP address for wlan0.
 
  # Custom static IP address for wlan0.
Line 46: Line 47:
 
Jika di perlukan edit
 
Jika di perlukan edit
  
  wpa_supplicant.conf
+
  vi wpa_supplicant/wpa_supplicant.conf  
 +
 
 +
Isi dengan, misalnya,
  
 
  ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 
  ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Latest revision as of 09:40, 10 December 2018

Edit

vi /etc/network/interfaces

Isi dengan

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Edit

vi /etc/dhcpcd.conf

isi dengan

# Custom static IP address for eth0.
interface eth0
static ip_address=192.168.11.10/24
# static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.11.10
static domain_name_servers=192.168.0.223 8.8.8.8 fd51:42f8:caae:d92e::1

# Custom static IP address for wlan0.
interface wlan0
static ip_address=192.168.4.10/24
static routers=192.168.4.10
static domain_name_servers=192.168.4.10


Jika di perlukan edit

vi wpa_supplicant/wpa_supplicant.conf 

Isi dengan, misalnya,

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="homenetwork"
    psk="h0mepassw0rd"
}


Pranala Menarik