红联linux Linux通用技术 - Linux发行版技术 - 企业应用 - 实验室  Linux论坛

您的位置: 红联linux >> Linux发行版技术 >>

Fedora和Redhat

>> 查看内容 -学Linux必读Linux学习教程推荐下载发新话题 (游客可发贴)

TP-LINK TG-3269C网卡在Fedora中安装

osjulyge发布于 2008-4-02 | 次阅读   字号:     (网友评论 1 条) 我要评论


TP-LINK的网卡使用的是Realtek的芯片,因此Realtek的网卡驱动适用于TP-Link的网卡。在此以TP-LINK的TG-3269C为例,该网卡使用的是REALTEK 8169系列芯片,同理可以用此方法安装所有使用REALTEK系列芯片的网卡。

先在此页找到RTL8169在UNIX下的驱动。下载后解压到本地磁盘, 先查看是否已经加载了RTL8169的驱动模块:

# lsmod | grep r8169

如果已经加载则先卸载
# rmmod r8169

然后在驱动程序的目录处执行如下命令:
make clean modules
make install
depmod -a
insmod ./src/r8169.ko

这时用lsmod | grep r8169可以检测到系统已经加载了驱动模块8169,这时网卡已经可以正常工作了,如果网卡仍然不能正常工作,一般表现为速度指示LED很快的闪烁,此时应该关毕网关的自动检测,指定传输速率,先用命令rmmod r8169卸载掉已加载的模块,然后用命令 insmod ./src/r8169.ko speed=100 duplex=0 autoneg=0 予以强制指定工作模式,设定传输速率为100M,如测试仍不能,请尝试设定其他数值(分别可设为10,100,1000)。这里需要说明的是,本人根据经验得出,在speed=10 的条件下可以在大多数机器上确保网卡工作正常,在speed=100及1000的情况下,某些时候不能正常工作。这个方法同样可以解决使用realtek系列芯片的网卡不能正常工作的问题。

 相关评论
作者: osjulyge 发布日期: 2008-4-02
下面附上RTL8169的UNIX下驱动安装的官方说明:

This is the Linux device driver released for RealTek RTL8169S/8110S, RTL8169SB/8110SB, and RTL8110SC.


- kernel source tree (supported Linux kernel 2.6.x/2.4.20 and latter)
- compiler/binutils for kernel compilation


Check whether the built-in driver, r8169.ko(or r8169.o for linux kernel 2.4.x), is installed.
# lsmod | grep r8169

If it is installed, please remove it.
# rmmod r8169
note: If the built-in driver cannot removed by rmmod, please edit /etc/modprobe.conf and comment ‘alias eth0 r8169′. Then, remove it again or reboot your computer.

Unpack the tarball :
# tar vjxf r8169-6.aaa.bb.tar.bz2

Change to the directory:
# cd r8169-6.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/r8169.ko (or r8169.o for linux kernel 2.4.x)

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

# lsmod | grep r8169
# 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,…


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


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.


1. Force the link status when insert the driver.

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

# insmod ./src/r8169.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/r8169.ko speed=100 duplex=0 autoneg=0

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).
共有评论数 1/每页显示数 10

 我要评论
发表评论,与各位同人交流。回复请点击下方的我要评论按钮(游客可回复),要发表贴子请点击 发新话题 (游客可发贴)
 热点主题
·菜鸟F头和Fedora 8的十五天
·想问下关于yum源和其默认安
·kernel panic-not syncing
·Kernel panic - not synci
·笔记本安装linux时在runni
·linux无法进入图形界面解决
·Fedora8默认安装的JDK在哪里
·让Fedora能够打开RAR文件
·用chcon 后说参数错误
·请教xp和红旗linux双系统启
 最新主题
·Fedora 7 编译内核并且引导
·linux无法进入图形界面解决
·求教:关于Firefox
·设置好地址后,在内网找不
·无法boot the kernel和内存
·fedora 9体验
·Fedora 9今天进入开发的最
·帮我找显卡驱动
·想问下关于yum源和其默认安
·大侠们快来帮下忙哈!!!
 关注热点

Linux教程下载?
Linux学习教程推荐下载”(请点击),Linux教程免费下载。

求助Linux问题?
论坛有39版块,覆盖所有Linux技术层面。前往“红联Linux论坛

 

Linux系统教程 | Linux入门 | Linux管理 | Linux技巧 | Linux命令 | Ubuntu系统 | Linux服务器 | Linux数据库 | Linux开发

合作 | 关于我们 | 联系我们 | 导航 | 会员注册

©2017 红联 Powered by SupSite