在Linux下调整网卡的工作模式

由 Snoopy 在 07-22-2004 02:02 发表:

在Linux下调整网卡的工作模式

转自 www.fengnet.com,希望对兄弟们有帮助

在Linux下调整网卡的工作模式

现在的网卡一般都是10/100M自适应工作模式,在配置网卡参数时我们很少考虑它的工作模式,但是在路由器、交换机、代理服务器等通信量比较大的关键设备上,我们应该为它指定正确的工作模式,这样可以提高通信效率。在Linux环境下,我们可以使用系统自带的工具mii-tool(这是专门设置网卡工作模式的命令)来配置网卡工作模式。下面我们具体来谈一下它的使用方法。

1. 查看网卡的工作模式,输入命令:

#mii-tool -v

eth0: negotiated 100baseTx-FD,link ok

product info:Vendor 00:05:be,model 8 rev 0

basic status: autonegotiation complete,link ok

basic mode:autonegotiation enabled.

Capabilities: ..............

从以上信息中可以看出,这块网卡工作在100M全双工自适应模式下,“100BaseTx-FD”意为100M Full Duplex。

2. 更改网卡的工作模式,输入命令:

#mii-tool -F media [interface]

media可选的模式有100baseTx-FD、100baseTx-HD、10baseT-FD、10baseT-HD等。 Interface代表所选择的网卡,如eth0、eth1等,默认为eth0。

例如,设置网卡工作在10M半双工模式下,输入命令:

#mii-tool -F 10baseT-HD eth0

3. 恢复网卡的自适应工作模式,输入命令:

#mii-tool -r eth0

更详细的使用方法可以用mii-tool -h来获得。


And then in the evening light, when the bars of freedom fall

I watch the two of you in the shadows on the wall

How in the darkness steals some of the choices from my hand

Then will I begin to under


由 babale007 在 07-25-2004 09:03 发表:


SIOCGMIIPHY on 'eth0' failed: Operation not supported

no MII interfaces found

这个显示信息说明什么意思??


学习LINUX,热爱LINUX

读书苦,读书累,读书还要交学费


由 黑色光芒 在 07-25-2004 14:35 发表:


为什么我的Linux没有上面的一些命令啊?晕~~~~~~

#mii-tool -v

#mii-tool -F media [interface]

都没有啊?我的是Linux Red Hat 9


虽然我是菜鸟 但是我想飞

-----------------

我的配置:CPU AMD 1700+ 硬盘80G 内存PMI 256 DDR 333 技嘉KT400

FC2+Windows XP 以后希望是Just Linux


由 pupie 在 07-25-2004 17:19 发表:


GOOGLE搜一下,我昨天还在网上下了一个


由 Snoopy 在 07-25-2004 18:55 发表:


MII-TOOL(8) MII-TOOL(8)

NAME

mii-tool - view, manipulate media-independent interface status

SYNOPSIS

mii-tool [-v, --verbose] [-V, --version] [-R, --reset] [-r, --restart]

[-w, --watch] [-l, --log] [-A, --advertise=media,...] [-F,

--force=media] [interface ...]

DESCRIPTION

This utility checks or sets the status of a network interface's Media

Independent Interface (MII) unit. Most fast ethernet adapters use an

MII to autonegotiate link speed and duplex setting.

Most intelligent network devices use an autonegotiation protocol to

communicate what media technologies they support, and then select the

fastest mutually supported media technology. The -A or --advertise

options can be used to tell the MII to only advertise a subset of its

capabilities. Some passive devices, such as single-speed hubs, are

unable to autonegotiate. To handle such devices, the MII protocol also

allows for establishing a link by simply detecting either a 10baseT or

100baseT link beat. The -F or --force options can be used to force the

MII to operate in one mode, instead of autonegotiating. The -A and -F

options are mutually exclusive.

The default short output reports the negotiated link speed and link

status for each interface. If an interface or interfaces are not spec-

ified on the command line, then mii-tool will check any available

interfaces from eth0 through eth7.

OPTIONS

-v, --verbose

Display more detailed MII status information. If used twice,

also display raw MII register contents.

-V, --version

Display program version information.

-R, --reset

Reset the MII to its default configuration.

-r, --restart

Restart autonegotiation.

-w, --watch

Watch interface(s) an

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus