我对 ubuntu 还很陌生。就在今天,当我尝试插入我的局域网电缆时,它什么也没显示。结果sudo lshw -C network
显示以太网控制器在*-network unclaimed
。在设置 > 网络中没有显示有线连接。请帮忙
suravi@suravi-Vostro-2520:~$ lspci -nn |grep 0200
09:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 07)
答案1
问题解决了。感谢这个帖子:
Ubuntu 11.04 - Natty Narwhal
几周前,我的板载 Realtek PCI Express 坏了。我以为是板载芯片烧坏了,所以我又安装了一块以太网卡 ENLGA-1320,一切都很顺利,直到今天中午 12 点左右,它就坏了,也没有互联网连接。所以我开始上网,5 小时后终于让它工作了。
以下是不起作用的方法,但您可以尝试使它启动并运行...因为它似乎对某些人有用,但对我来说却不起作用。
冷启动,其信息是从该线程收集的。 http://www.uluga.ubuntuforums.org/showthread.php?t=1436667
通过链接给予该论坛信任,我将提供以下信息:
冷启动说明:
- 关闭机器
- 拔掉塔上的所有电缆(尤其是电源线)
- 按住电源按钮 30 秒然后松开
- 按下按钮一次或两次以获得良好的效果,等待 3 分钟。
- 重新插入所有电缆并按下电源按钮
- 互联网现在可能活跃,也可能不活跃。
这对我来说不起作用,如果对你来说也不起作用,那就继续吧。这是上面链接的帖子中的另一篇文章,我再总结一下。打开终端并执行以下操作。
检查以太网控制器的型号:
:~$ lspci | grep Realtek 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Check the driver your kernel is loading: :~$ lsmod | grep r816* r8169 36489 0 mii 4425 1 r8169 Download the 8168 Linux drivers from http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=5&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8111B/RTL8168B/RTL8111/RTL8168%3Cbr%3ERTL8111C/RTL8111CP/RTL8111D%28L%29%3Cbr%3ERTL8168C/RTL8111DP/RTL8111E%3Cbr%3ERTL8105E
cd 到您下载 realtek 驱动程序的目录:
:~$ cd Downloads extract the files: :~$ tar -xvf r8168-8.020.00.tar.bz2 cd to the newly extracted folder: :~$ cd r8168-8.020.00 Auto compile the driver: :~$ sudo ./autorun.sh I highly doubt this is needed, because at this point my machine restarted its network connection on its own.
不过我仍然会包含可选命令来测试驱动程序。
:~$ sudo rmmod r8169 :~$ sudo modprobe r8168 :~$sudo /etc/init.d/networking restart At this point your network should be up and running, if not do not take the following next two steps. Blacklist r8169: :~$ sudo gedit /etc/modprobe.d/blacklist.conf Append the following lines: #Blacklist Realtek RTL8111/8169 gigabit driver blacklist r8169 Save and quit Update driver cache: :~$ update-initramfs -u Reboot, and see if correct driver has loaded: $ lsmod | grep r816* r8168 91629 0
好吧,如果这对你有用,那就太好了,然而对我来说,我又一次感到沮丧,不得不寻找另一种解决方案。这一次,我很绝望,这是我的开发箱,但也有点生气,只想尽一切努力让它运行起来,
http://www.webupd8.org/2009/06/how-to-manually-set-up-your-wired.html
下面的大多数/部分说明均出自上述链接,如需引用,必须注明来源。
Remove any drivers/modules installed i had both r8169 and r8168 installed so in terminal write :~$ sudo rmmod r8169 sudo rmmod r8168 So now I have no eth0 at this point. Remove network manager: sudo apt-get remove network-manager-gnome network-manager now in terminal type: :~$ ifconfig all I saw was lo listed and not eth0, again I was lost but I thought what the hey might as well continue on with the instructions
上述链接提供了这些。手动设置
/etc/network/interfaces
终端类型:gksu gedit /etc/network/interfaces 我设置了一个静态 IP,尽管文件中的所有内容都是auto lo iface lo inet loopback I still appended the following to that file: auto eth0 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.0.1 Change eth0, address, and gateway to your own network values. Save the file and close it. For the static IP It
需要查找域名服务器 (DNS)。这是文件的功能
/etc/resolv.conf
,因此您需要编辑它。如果文件不存在,请创建它。在终端中:gksu gedit /etc/resolv.conf In that file place the following: nameserver 208.67.222.222 nameserver 208.67.220.220 Replace these values with your own DNS values. I just used googles DNS nameserver 8.8.8.8 nameserver 8.8.4.4 Save and close the file. Download the 8168 Linux drivers from RealTek:
cd 到您下载 realtek 驱动程序的目录:
:~$ cd Downloads extract the files: :~$ tar -xvf r8168-8.020.00.tar.bz2 cd to the newly extracted folder: :~$ cd r8168-8.020.00 Auto compile the driver: :~$ sudo ./autorun.sh Now restart the network in terminal : :~$ sudo /etc/init.d/networking restart
好的,此时我的电脑在重置网络后完全黑屏,它已打开但家里没人。所以我按住电源按钮手动关闭它,然后将其重新打开,eth0 现在工作正常,这是主板上首先坏掉的内置网卡。