当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 9 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : ubuntu server 14 双网卡问题
帖子发表于 : 2016-01-26 17:13 

注册: 2016-01-26 16:57
帖子: 11
送出感谢: 1
接收感谢: 0 次
各位,
我在一台双网卡工控机上装了Ubuntu server,断电开机之后,ifconfig -a只能看到一个网口。lshw -class network 发现第二个网口没有logic name。如下:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:03:00.0
logical name: p1p1
version: 06
serial: 00:0b:ab:a8:9e:94
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.100.201 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:89 ioport:d000(size=256) memory:90604000-90604fff memory:90600000-90603fff
*-network UNCLAIMED
description: Ethernet controller
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:04:00.0
version: 06
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd cap_list
configuration: latency=0
resources: ioport:2000(size=256)

热重启之后,双网卡就都能使用了。请问是为什么?
这几天一直在研究这个问题。查看了Ubuntu 的官方文档,说是要修改/etc/udev/rules.d/70-persistent-net.rules文件,但是我发现我的系统里根本没有这个文件。又查出说是/lib/udev/write_net_rules 生成的文件。所以直接运行write_net_rules,又报missing $INTERFACE。

始终搞不懂Ubuntu是怎么设置网络的,请大神答疑解惑。


页首
 用户资料  
 
2 楼 
 文章标题 : Re: ubuntu server 14 双网卡问题
帖子发表于 : 2016-01-26 17:20 

注册: 2016-01-26 16:57
帖子: 11
送出感谢: 1
接收感谢: 0 次
忘了说版本
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty


页首
 用户资料  
 
3 楼 
 文章标题 : Re: ubuntu server 14 双网卡问题
帖子发表于 : 2016-01-26 17:48 

注册: 2009-08-04 16:33
帖子: 16891
送出感谢: 21
接收感谢: 1826
引用:
lshw -class network
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
*-network UNCLAIMED
description: Ethernet controller
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0

引用:
热重启之后,双网卡就都能使用了。请问是为什么?

再次
sudo lshw -class network
看看 能夠使用的情況
兩個網卡的
physical id: 0
physical id: 0
是否還一樣
還是不一樣了


页首
 用户资料  
 
4 楼 
 文章标题 : Re: ubuntu server 14 双网卡问题
帖子发表于 : 2016-01-27 10:12 

注册: 2016-01-26 16:57
帖子: 11
送出感谢: 1
接收感谢: 0 次
poloshiao 写道:
引用:
lshw -class network
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
*-network UNCLAIMED
description: Ethernet controller
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0

引用:
热重启之后,双网卡就都能使用了。请问是为什么?

再次
sudo lshw -class network
看看 能夠使用的情況
兩個網卡的
physical id: 0
physical id: 0
是否還一樣
還是不一樣了


还是一样:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:03:00.0
logical name: p1p1
version: 06
serial: 00:0b:ab:a8:9e:94
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.040.00-NAPI duplex=half ip=192.168.100.201 latency=0 link=no multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:88 ioport:d000(size=256) memory:90704000-90704fff memory:90700000-90703fff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:04:00.0
logical name: p2p1
version: 06
serial: 00:0b:ab:a8:9e:95
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.040.00-NAPI duplex=full ip=192.168.1.132 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
resources: irq:90 ioport:c000(size=256) memory:90604000-90604fff memory:90600000-90603fff


页首
 用户资料  
 
5 楼 
 文章标题 : Re: ubuntu server 14 双网卡问题
帖子发表于 : 2016-01-27 11:04 

注册: 2009-08-04 16:33
帖子: 16891
送出感谢: 21
接收感谢: 1826
引用:
还是一样:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
physical id: 0
serial: 00:0b:ab:a8:9e:94
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
physical id: 0
serial: 00:0b:ab:a8:9e:95

serial: 00:0b:ab:a8:9e:94
serial: 00:0b:ab:a8:9e:95
不一樣

sudo ifconfig -a
看看 是一個 還是兩個 有線網卡


页首
 用户资料  
 
6 楼 
 文章标题 : Re: ubuntu server 14 双网卡问题
帖子发表于 : 2016-01-27 11:24 

注册: 2016-01-26 16:57
帖子: 11
送出感谢: 1
接收感谢: 0 次
2个。重启之后就都正常了。


页首
 用户资料  
 
7 楼 
 文章标题 : Re: ubuntu server 14 双网卡问题
帖子发表于 : 2016-01-27 14:50 

注册: 2016-01-26 16:57
帖子: 11
送出感谢: 1
接收感谢: 0 次
有大神能解答吗??每次重新上电都会这样,只有一个网口,另外一个硬件显示UNCLAIMED。热重启之后就好了。


页首
 用户资料  
 
8 楼 
 文章标题 : Re: ubuntu server 14 双网卡问题
帖子发表于 : 2016-01-27 14:50 

注册: 2016-01-26 16:57
帖子: 11
送出感谢: 1
接收感谢: 0 次
有大神能解答吗??每次重新上电都会这样,只有一个网口,另外一个硬件显示UNCLAIMED。热重启之后就好了。


页首
 用户资料  
 
9 楼 
 文章标题 : Re: ubuntu server 14 双网卡问题
帖子发表于 : 2016-01-27 18:01 

注册: 2009-08-04 16:33
帖子: 16891
送出感谢: 21
接收感谢: 1826
引用:
2个。重启之后就都正常了。

把下面指令 複製 貼進終端機 執行
0. sudo lspci -knn
1. sudo ifconfig -a
2. sudo cat /etc/udev/rules.d/70-persistent-net.rules
請全部複製貼上來


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 9 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译