miii
来源:互联网 发布:如何打开电脑端口 编辑:程序博客网 时间:2024/05/20 09:48
查看:dmesg| grep eth0
ethtool是linux系统中一个查看及设置网卡参数的工具,我们用它来设置千兆网卡。命令格式请自行查看。 设置千兆网卡: 遇到错误提示:Cannot set new settings:Invalid argument ...后来,精简参数,只输入命令:ethtool -s eth1 speed 1000,仍然不行,还是那个错误! 网上找到了一篇文章: http://forum.nginx.org/read.php?31,128172,128172,说自协商模式必须打开!即 试了一下,果然如此!但是这 带来另一个问题:系统经常自动跳到100M模式!没办法,重启服务器,再试了一次! 出乎我所料,重启机器后,即使关闭自协商模式也可以设置成功!
ethtool ethX //查询ethX网口基本设置
ethtool –h //显示ethtool的命令帮助(help)
ethtool –i ethX //查询ethX网口的相关信息
ethtool –d ethX //查询ethX网口注册性信息
ethtool –r ethX //重置ethX网口到自适应模式
ethtool –S ethX //查询ethX网口收发包统计
ethtool –s ethX [speed 10|100|1000]\ //设置网口速率10/100/1000M
[duplex half|full]\ //设置网口半/全双工
[autoneg on|off]\ //设置网口是否自协商
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来获得。
今天为CentOS 5.5设置千兆网卡,遇到了一个问题,记录一下。
- ethtool -s eth1 speed 1000 duplex full autoneg off
- ethtool -s eth1 speed 1000 duplex full autoneg on
Ethtool是用于查询及设置网卡参数的命令。
概要:ethtool ethX //查询ethX网口基本设置
ethtool –h //显示ethtool的命令帮助(help)
ethtool –i ethX //查询ethX网口的相关信息
ethtool –d ethX //查询ethX网口注册性信息
ethtool –r ethX //重置ethX网口到自适应模式
ethtool –S ethX //查询ethX网口收发包统计
ethtool –s ethX [speed 10|100|1000]\ //设置网口速率10/100/1000M
[duplex half|full]\ //设置网口半/全双工
[autoneg on|off]\ //设置网口是否自协商
- miii
- jgGrid获得的id值是主键的id而不是jqGrid的行号值
- Objective-C编程:在类的外部声明全局变量
- C语言知识点学习之联合体
- 浅析C# 中object sender与EventArgs e
- Oracle Merge Into 的用法详解实例
- miii
- A+B for Input-Output Practice (I)
- php时间戳转正常时间
- the design principles and code analysis of hibernate lazy loading
- SQL中IN和EXISTS用法的区别
- I2C总线深入浅出
- 用户、用户组、角色的区别和联系 笔记
- 第一个mongoDB例子
- eclipse启动时报-Failed to create the Java Virtual Machine 解决方案