2015-03-10

Setup Raspberry’s wireless network and assign a static IP address in Raspbian

參考文件:
1. paulv's comment in /etc/network/interfaces changed,weird 2 LAN IPs instead of 1
2. Setting a static IP on Raspberry Pi on Raspbian 20150505

----------------------------------------------------------------------------------------
Setup wireless network:
NEVER modify /etc/network/interfaces again.

add theses codes to /etc/wpa_supplicant/wpa_supplicant.conf
network={
    ssid="SSID"
    psk="Your_wifi_password"
}


Set static IP address for an interface:
NEVER modify /etc/network/interfaces again.

Add these to /etc/dhcpcd.conf

interface eth0
static ip_address=192.168.0.200/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

Replace eth0 and the addresses as what you want.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.