Ubuntu11.10与r8168网卡不兼容导致网络时断时续的问题

安装了ubuntu11.10之后,感觉上网啥的很不稳定,ssh连接内网机器也是一条命令卡半天,检查了各方面的原因,网络没有什么问题,最后才发现是网卡驱动的问题,网上搜了一下是由于linux(ubuntu11.10)与r8168网卡不兼容导致网络时断时续的问题,那就直接更新网卡驱动吧,下面是网上搜到的解决办法,贴出来,给同样问题的同志门,搞定之后那个心情是一个爽啊,哈哈……

 

first:make user to root.(切换到root用户)
$su -root

1) Check to see if the r8169 module is loaded(检查r8169模块是否加载)

-> lsmod | grep r816
r8168 41104 0
-> lspci -v
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
Subsystem: ASRock Incorporation Device 8168
Kernel driver in use: r8169
Kernel modules: r8169

2) Download the official Realtek driver (下载驱动包)

网卡驱动下载网址:http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=3&PNid=5&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8111B/RTL8168B/RTL8111/RTL8168
Realtek RTL8111/RTL8168

3) Remove the r8169 module(删除r8169模块)
-> rmmod r8169
-> mv /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko ~/r8169.ko.backup
( the ` is a backtick, it is not an apostrophe or single quote )

4) Build the new r8168 module for the kernel(重建r8168模块到内核)
-> bzip2 -d r8168-8.009.00.tar.bz2 (这儿的包名称有点儿变化,需要改动)
-> tar -xf r8168-8.009.00.tar
-> cd r8168-8.009.00
-> make clean modules
-> make install

5) Rebuild the kernel module dependencies (重建内核模块依赖项)
-> depmod -a
-> insmod ./src/r8168.ko

6) Remove the r8169 module from initrd (从initrd中去除r8169模块)
-> mv /initrd.img ~/initrd.img.backup
-> mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`

7) Add r8168 module to /etc/modules
-> echo "r8168" >> /etc/modules

Reboot, You are done!

9) Examine that ONLY the r8168 module is loaded for the interface
-> lspci -v
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
Subsystem: ASRock Incorporation Device 8168
Kernel driver in use: r8168
Kernel modules: r8168

posted @ 2015-04-11 18:04  陌上归人的博客  阅读(1004)  评论(0编辑  收藏  举报