rtl在linux下的运行,RTL8101E网卡Linux下安装详解

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 ~/r8101, the link status can be forced

to one of the 4 modes as following command.

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

,where

SPEED_MODE = 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/r8101.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 = 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).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值