Raspbian: Setup Network: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
No edit summary
Onnowpurbo (talk | contribs)
No edit summary
Line 3: Line 3:
  vi /etc/network/interfaces
  vi /etc/network/interfaces


Isi dengan, misalnya,
Isi dengan


iface eth0 inet static
address 192.168.1.10
broadcast 192.168.1.255
netmask 255.255.255.0
# gateway 192.168.1.1


  iface wlan0 inet static
  # Please note that this file is written to be used with dhcpcd
  address 192.168.4.10
  # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
  broadcast 192.168.4.255
  netmask 255.255.255.0
# Include files from /etc/network/interfaces.d:
  # gateway 192.168.4.1
  source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
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


atau jika IP address dynamic
vi /etc/dhcpcd.conf
 
isi dengan
 
# Custom static IP address for eth0.
interface eth0
static ip_address=192.168.11.10/24
static routers=192.168.11.10
static domain_name_servers=192.168.11.10
# 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
 
wpa_supplicant.conf
 
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="homenetwork"
    psk="h0mepassw0rd"
}


iface eth0 inet dhcp
iface wlan0 inet dhcp





Revision as of 11:34, 18 October 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

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 routers=192.168.11.10
static domain_name_servers=192.168.11.10

# 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

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

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


Pranala Menarik