启动开发板
编辑/etc/network/interfaces文件。
打开终端输入:
vi /etc/network/interfaces
//可以看到如下内容
# Wireless interfaces
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
iface atml0 inet dhcp
# Wired or wireless interfaces
auto eth0
iface eth0 inet dhcp
iface eth0 inet static
iface eth1 inet dhcp
# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1
接着注释掉eth0
在后面添加如下
iface eth0 inet static //静态IP
address 192.168.5.9 //开发板IP
netmask 255.255.255.0 //子网掩码
完整如下
# The loopback interface
auto lo
iface lo inet loopback
# Wireless interfaces
iface wlan0 inet dhcp
wireles

本文详细描述了如何在Linux开发板上修改网络接口文件,将无线接口wlan0保持DHCP,同时为eth0接口设置静态IP(192.168.5.9)并使其开机自启动,以便于管理和远程访问。
2790

被折叠的 条评论
为什么被折叠?



