一个以电子商务为主的信息资讯门户网站——aq365.com
网站首页 | 信息资讯 | 网上商城 | 企业黄页 | 人才市场 | 供求信息 | 房产交易 | 二手市场
消费e店 | 时尚生活 | 在线影院 | flash动漫 | 笑话频道 | 真情交友 | 电子相册 | 博客日志
您所在的位置:安庆热线 > 浏览正文
linux realtek RTL8111B/RTL8168B/RTL8111/RTL8168/RTL8111C 网卡驱动
aq365.com  发布:2007-12-25 21:03:14  来自:安庆热线  浏览:
前在装fc6的时候曾在RTL8168B上捣弄了半天,后来就转用了ubuntu,现在又装上了suse 10
问题又出现了,呵呵,是10.1的问题吧,好像现在fc7已经支持了RTL8111B/RTL8168B

解决办法:
1、到realtek官网下载对应驱动
//查看linux内核版本:uname -r

2、解压安装

   0)注:r8168-8.aaa.bb为你所下载的驱动对应的名字
   1)cd到网卡驱动所在文件夹,解压 :
        # tar vjxf r8168-8.aaa.bb.tar.bz2
    //关于解压命令查看《Linux下软件包的解压方式大全
    2)进入文件夹:
        # cd r8168-8.aaa.bb
    3)安装(需安装kernel-source,否则会失败) :
        # make clean modules      (as root or with sudo)
        # make install
        # depmod -a
        # insmod ./src/r8168.ko   (or r8168.o in linux kernel 2.4.x)
    4)通过以下指令查看驱动是否已经启动.
        # lsmod | grep r8168
        # ifconfig -a
        如果能看到类似“ethX”的结果输出, 说明已成功驱动网卡.
    5)配置并激活 ethX.
        # ifconfig ethX up
        ,where X=0,1,2,...

3、附realtek RTL8168B驱动readme文档:
<Linux device driver for Realtek Ethernet controllers>

    This is the Linux device driver released for RealTek RTL8168B/8111B
    and RTL8168C/8111C, Gigabit Ethernet controllers with PCI-Express
    interface.

<Requirements>

    - Kernel source tree (supported Linux kernel 2.6.x and 2.4.x)
    - For linux kernel 2.4.x, this driver supports 2.4.20 and latter.
    - Compiler/binutils for kernel compilation

<Quick install with proper kernel settings>

    Unpack the tarball :
        # tar vjxf r8168-8.aaa.bb.tar.bz2

    Change to the directory:
        # cd r8168-8.aaa.bb

    If you are running the target kernel, then you should be able to do :

        # make clean modules    (as root or with sudo)
        # make install
        # depmod -a
        # insmod ./src/r8168.ko (or r8168.o in linux kernel 2.4.x)

    You can check whether the driver is loaded by using following commands.

        # lsmod | grep r8168
        # ifconfig -a

    If there is a device name, ethX, shown on the monitor, the linux
    driver is loaded. Then, you can use the following command to activate
    the ethX.

        # ifconfig ethX up

        ,where X=0,1,2,...

<Set the network related information>
    1. Set manually
        a. Set the IP address of your machine.

            # ifconfig ethX "the IP address of your machine"

        b. Set the IP address of DNS.

           Insert the following configuration in /etc/resolv.conf.
       
            nameserver "the IP address of DNS"

        c. Set the IP address of gateway.

            # route add default gw "the IP address of gateway"

    2. Set by doing configurations in /etc/sysconfig/network-scripts
       /ifcfg-ethX for Redhat and Fedora, or /etc/sysconfig/network
       /ifcfg-ethX for SuSE. There are two examples to set network
       configurations.

        a. Fix IP address:
            DEVICE=eth0
            BOOTPROTO=static
            ONBOOT=yes
            TYPE=ethernet
            NETMASK=255.255.255.0
            IPADDR=192.168.1.1
            GATEWAY=192.168.1.254
            BROADCAST=192.168.1.255

        b. DHCP:
            DEVICE=eth0
            BOOTPROTO=dhcp
            ONBOOT=yes   

<Modify the MAC address>
    There are two ways to modify the MAC address of the NIC.
    1. Use ifconfig:

        # ifconfig ethX hw ether YY:YY:YY:YY:YY:YY

       ,where X is the device number assigned by Linux kernel, and
        YY:YY:YY:YY:YY:YY is the MAC address assigned by the user.

    2. Use ip:

        # ip link set ethX address YY:YY:YY:YY:YY:YY

       ,where X is the device number assigned by Linux kernel, and
        YY:YY:YY:YY:YY:YY is the MAC address assigned by the user.

<Force Link Status>

    1. Force the link status when insert the driver.

       If the user is in the path ~/r8168, the link status can be forced
       to one of the 5 modes as following command.

        # insmod ./src/r8168.ko speed=SPEED_MODE duplex=DUPLEX_MODE autoneg=NWAY_OPTION

        ,where
            SPEED_MODE    = 1000    for 1000Mbps
                    = 100    for 100Mbps
                    = 10    for 10Mbps
            DUPLEX_MODE    = 0    for half-duplex
                    = 1    for full-duplex
            NWAY_OPTION    = 0    for auto-negotiation off (true force)
                    = 1    for auto-negotiation on (nway force)
        For example:

            # insmod ./src/r8168.ko speed=100 duplex=0 autoneg=1

        will force PHY to operate in 100Mpbs Half-duplex(nway force).

    2. Force the link status by using ethtool.
        a. Insert the driver first.
        b. Make sure that ethtool exists in /sbin.
        c. Force the link status as the following command.

            # ethtool -s ethX speed SPEED_MODE duplex DUPLEX_MODE autoneg NWAY_OPTION

            ,where
                SPEED_MODE    = 1000    for 1000Mbps
                        = 100    for 100Mbps
                        = 10    for 10Mbps
                DUPLEX_MODE    = half    for half-duplex
                        = full    for full-duplex
                NWAY_OPTION    = off    for auto-negotiation off (true force)
                        = on    for auto-negotiation on (nway force)

        For example:
       
            # ethtool -s eth0 speed 100 duplex full autoneg on

        will force PHY to operate in 100Mpbs Full-duplex(nway force).
(编辑:不详) 留言评论】【在线投稿】【打印网页】【关闭窗口】【↑顶部
  + 相关信息咨讯
 ·LINUX (内部资料)主要是安装驱动
 ·linux双网卡绑定一个IP教程
 ·LINUX下8110SC&8169网卡驱动分享
 ·通过U盘给Linux系统安装网卡驱动的方法
 ·RHEL4 下为asus p5ld2 se主板的板载8111B千兆网卡
版权与免责声明:
1.凡本网注明来源为“安庆热线”的所有作品,包括文字与图片,未经本网授权不得转载。违反上述声明者,本网将依法追究法律责任。
2. 凡注明"来源:xxx(非本站)"的作品,均转载自其它媒体,本网转载的目的在于传播更多信息,此类稿件并不代表本网观点,本网不承担此类稿件侵权行为的直接责任及连带责任。
3. 如因作品内容、版权等需要同本网联系的,请在作品在本网发表之日起30日内联,否则视为放弃相关权利