ethtool speed HowTo : Change Speed and Duplex of Ethernet card in Linux
To change Speed and Duplex of an ethernet card, we can use ethtool - a Linux utility for Displaying or Changing ethernet card settings.
1. Install ethtool
You can install ethtool by typing one of the following commands, depending upon your Linux distribution.
Install ethtool in Fedora, CentOS, RHEL etc. :
# yum install ethtool
Install ethtool in Ubuntu, Debian etc. :
# sudo apt-get install ethtool
2. Get the Speed, Duplex and other information for the interface eth0
To get speed, duplex and other information for the network interface eth0, type the following command as root.
# ethtool eth0
Sample output :
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Half
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes
3. Change the Speed and Duplex settings
The following changes are temporary and they'll stop working after reboot. Read the next section, to make settings permanent.
The next command enables Auto-Negotiate feature :
# ethtool -s eth0 autoneg on
The next command disables Auto-Negotiation, enables Half Duplex and sets up Speed to 10 Mb/s :
# ethtool -s eth0 speed 10 duplex half autoneg off
The next command disables Auto-Negotiation, enables Full Duplex and sets up Speed to 100 Mb/s :
# ethtool -s eth0 speed 100 duplex full autoneg off
4. Change the Speed and Duplex settings Permanently on CentOS/RHEL
To make settings permanent, you need to edit /etc/sysconfig/network-scripts/ifcfg-eth0 file for eth0 interface. This file is used by RHEL, CentOS, Fedora etc.
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Append the line as follows to disable Auto-Negotiation, enable Full Duplex and set up Speed to 100 Mb/s :
ETHTOOL_OPTS="speed 100 duplex full autoneg off"
Restart the interface to apply changes :
# ifdown eth0 && ifup eth0
zhuan: http://www.shellhacks.com/en/HowTo-Change-Speed-and-Duplex-of-Ethernet-card-in-Linux
ethtool speed HowTo : Change Speed and Duplex of Ethernet card in Linux的更多相关文章
- How to change system keyboard keymap layout on CentOS 7 Linux
The easiest way to swap between keymaps and thus temporarily set keys to different language by use o ...
- Howto: Connect MySQL server using C program API under Linux or UNIX
From my mailbag: How do I write a C program to connect MySQL database server? MySQL database does su ...
- Changing Ethernet Media Speed for AIX
ITS UNIX Systems Changing Ethernet Media Speed for AIX First you need to find out the device name of ...
- hdu FatMouse's Speed 动态规划DP
动态规划的解决方法是找到动态转移方程. 题目地址:http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=3§ionid ...
- HD1160FatMouse's Speed(最长单调递增子序列)
FatMouse's Speed Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- HDU 1160 FatMouse's Speed(要记录路径的二维LIS)
FatMouse's Speed Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- hdu 1160 FatMouse's Speed 解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1160 题目意思:给出一堆老鼠,假设有 n 只(输入n条信息后Ctrl+Z).每只老鼠有对应的weigh ...
- HDU 1160 FatMouse's Speed
半个下午,总算A过去了 毕竟水题 好歹是自己独立思考,debug,然后2A过的 我为人人的dp算法 题意: 为了支持你的观点,你需要从给的数据中找出尽量多的数据,说明老鼠越重速度越慢这一论点 本着“指 ...
- HDU 1160 FatMouse's Speed (DP)
FatMouse's Speed Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Su ...
随机推荐
- 防止HTML出现滚动条时页面的抖动
<html> <style> * { padding: 0; margin: 0; } body { font: 40px fantasy; } .container { wi ...
- sql server 数据库还原后sa连接不上原因
手动创建了一个同名数据库,然后还原以前或者别人的备份,还原虽然成功了,但是在VS中连接不上,原因可能是: 数据库的所有者中没有添加sa,方法即在数据库名上右击,然后选择文件,在所有者中添加上sa,应该 ...
- 【洛谷5309】[Ynoi2012] D1T1(分块)
点此看题面 大致题意: 两种操作,区间求和,将形如\(ax+y\)的位置的元素值加\(z\). 分块 这种题目显然就是按照\(x\)与\(\sqrt n\)的大小关系来分块. 对于\(x>\sq ...
- pocsuite 实现一个verify检测功能
今天在测试中发现一个命令执行漏洞,尝试用创宇的pocsuite框架实现.说实话,这玩意儿确实没有自己写POC顺手,非得就着他的标准来,就很难受,以至于耽误了很多时间在规范上.. 影响参数后直接用||连 ...
- HDU 1083 Courses 【二分图完备匹配】
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1083 Courses Time Limit: 20000/10000 MS (Java/Others) ...
- Codeforces Round #361 (Div. 2) E. Mike and Geometry Problem 【逆元求组合数 && 离散化】
任意门:http://codeforces.com/contest/689/problem/E E. Mike and Geometry Problem time limit per test 3 s ...
- 【洛谷P3811】[模板]乘法逆元
乘法逆元 题目链接 求逆元的三种方式: 1.扩欧 i*x≡1 (mod p) 可以化为:x*i+y*p=1 exgcd求x即可 inline void exgcd(int a,int b,int &a ...
- 【luogu P1231 教辅的组成】 题解
题目链接:https://www.luogu.org/problemnew/show/P1231 对于每本书只能用一次,所以拆点再建边 #include <queue> #include ...
- LeetCode15.三数之和 JavaScript
给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?找出所有满足条件且不重复的三元组. 注意:答案中不可以包含重复的三元组. ...
- 针对 npm ERR! cb() never called! 问题
在开发项目安装依赖时(npm install) 往往会报 npm ERR! cb()never called!的错误 如图: 解决方法: 一.首先要以管理员模式打开cmd清除你的npm缓存 : np ...