使用情境:
- eth0固定網卡 / wlan0無線網卡 各一
- 配置固定IP (eth0: 192.168.1.XX / wlan0: 192.168.1.YY)
- private network : 192.168.1.XXX
- gateway : 192.168.1.1
/etc/network/interfaces 設定檔內容:
auto lo iface lo inet loopback iface eth0 inet static address 192.168.1.XX netmask 255.255.255.0 gateway 192.168.1.1 allow-hotplug wlan0 iface wlan0 inet static wpa 2 wpa-ssid <YOUR_SSID> wpa-psk <YOUR_PASSWORD> address 192.168.1.YY netmask 255.255.255.0 gateway 192.168.1.1
*以上也適用 Raspberry Pi / Wheezy 環境
#