# file /etc/network/interfaces
auto lo
iface lo inet loopback
#auto eth0
#allow-hotplug eth0
#iface eth0 inet manual
auto wlan0
allow-hotplug wlan0
# 動態自動分配IP
#iface wlan0 inet dhcp
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
# 靜態IP地址
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet static
address 192.168.1.151
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.1
# file /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="ChinaNet-***"
key_mgmt=WPA-PSK
psk="password"
}
~