我需要在启动后在eth1接口上设置静态IP地址。但是,在启动时,设备的IP地址始终与/ etc / network / interfaces中配置的IP地址不同。这是beagle bone上的linux操作系统。
myIndex = [indexPath.section][indexPath.row]
ifconfig输出如下
##connman: WiFi
#
#connmanctl
#connmanctl> tether wifi off
#connmanctl> enable wifi
#connmanctl> scan wifi
#connmanctl> services
#connmanctl> agent on
#connmanctl> connect wifi_*_managed_psk
#connmanctl> quit
auto eth1
iface eth1 inet static
address 192.169.5.10
netmask 255.255.255.0
# Ethernet/RNDIS gadget (g_ether)
# Used by: /opt/scripts/boot/autoconfigure_usb0.sh
iface usb0 inet static
address 192.168.7.2
netmask 255.255.0.0
network 192.168.7.0
gateway 192.168.7.1
答案 0 :(得分:1)
我认为您还需要添加网络地址,网关和DNS设置,请查看here。然后使用以下命令重新启动服务器。
sudo service networking restart
或
sudo ifconfig eth1 down
sudo ifconfig eth1 up