这里有一件很奇怪的事。如果我手动配置无线网络,它工作正常,但当我尝试在 /etc/network/interfaces 中配置它时,它却失败了。我想我已经找到了原因,ifup
它无法识别为实际设备。以下是相关信息:
root@cubieboard:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
iface default inet static
address 10.0.0.20
netmask 255.255.255.0
root@cubieboard:~# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 80:1f:02:9a:9c:c6
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:187 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@cubieboard:~# ifup wlan0
Ignoring unknown interface wlan0=wlan0.
答案1
你确定接口文件支持使用关键字default
吗?我没有看到任何提及man interfaces
- 尝试替换
iface default inet static
和
iface wlan0 inet static