查看: 1681|回复: 0
收起左侧

usb转网口的静态IP不稳定问题

2014-11-27 18:03:10 | 显示全部楼层 |阅读模式
本帖最后由 topspeed 于 2014-11-27 18:06 编辑

请教各位一个问题,我用树老大推荐的usb hub,及usb转网口,在hub上挂了2个usb转的网口,为eth1和eth2,树莓派自带的为eth0。
在dhcp动态配置IP情况下,都可以上网。但我现在需要设置静态IP,设置方法如下:
通过/etc/network/interfaces配置静态IPiface eth0inet dhcp中的dhcp换成static代码如下:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.20
netmask 255.255.255.0

auto eth1
iface eth1 inet static
address 192.168.1.21
netmask 255.255.255.0

auto eth2
iface eth0 inet static
address 192.168.1.22
netmask 255.255.255.0

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp


现在遇到的问题是:有时候开机能分配IP,有时候eth0,或eth1就没有分配IP,尤其是在这个网口有网线连接到其他设备时。我用lsusb 查看,ifconfig查看,都是能看到所有的网口的,说明是发现了物理网口的,但为什么有时候静态IP却无法分配呢?

多谢!



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

热点推荐

关注我们,了解更多

官方微信

服务时间:10:00-16:00

13714503811

公司地址:深圳市龙岗区南湾街道东门头路8号

Copyright © 2012-2020 Powered by 树莓派论坛 2019.4  粤ICP备15075382号-1
快速回复 返回列表 返回顶部