在beagleboneblack 的开发板中进行UDP网络调试:客户端出现 NO such device , 服务器端出现 network is unreachable
解决办法: 1. 设置网卡的IP, 或初始化网卡
手动修改: chenfan# ifconfig eth0 192.168.7.12
2. 查看路由表, 是否设置 192.168.7.1
chenfan# route
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.7.0 * 255.255.255.252 U 0 0 0 usb0
3. 添加路由器(网关)地址
chenfan# route add default gw 192.168.7.1 (又出现Gateway 是主机名或IP 就正确)
Destination Gateway Genmask Flags Metric Ref Use Iface
default PC-20140729MNBE 0.0.0.0 UG 0 0 0 usb0
192.168.7.0 * 255.255.255.252 U 0 0 0 usb0
然后在运行程序就不会出现错误了。