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 ...
随机推荐
- POJ 2365【YY水题】
题目链接:POJ 2365 Rope Rope Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7488 Accepted ...
- 【luogu P2146 [NOI2015]软件包管理器】 题解
题目链接:https://www.luogu.org/problemnew/show/P2146 变量名真毒瘤 我真的再也不把l,left,r,right弄反了 反向思维更好做一些 #include ...
- Python程序的执行原理(转)
1. 过程概述 Python先把代码(.py文件)编译成字节码,交给字节码虚拟机,然后虚拟机一条一条执行字节码指令,从而完成程序的执行. 2. 字节码 字节码在Python虚拟机程序里对应的是PyCo ...
- tomcate8配置多个二级域名问题解决根目录空白2017年12月9日
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDepl ...
- Unity3d Gis 坐标转换
最近在做unity3d与Gis结合的项目,最基本的就是坐标的转换问题,比如把经纬度为(166.23.9.27 , 39.55.15.74) 转换到unity里面成相应的位置点,废话不多说 上代码: u ...
- Python 学习笔记(七)Python字符串(一)
字符串 字符串或串(String)是由数字.字母.下划线组成的一串字符,用双引号或单引号包裹的为字符串 1 >>> "hello world" 2 'hello ...
- Flask—05-理解掌握flask数据模型(01)
数据模型 数据库回顾 分类: 关系型数据库:MySQL.sqlite.… 非关系型数据库:Redis.MongoDB.… 操作: 执行原生SQL语句,每次都需要拼接SQL语句,非常繁琐而且特别容易出错 ...
- JS中常见算法问题
JS中常见算法问题 1. 阐述JS中的变量提升(声明提前) 答:将所有的变量提升当当前作用域的顶部,赋值留在原地.意味着我们可以在某个变量声明前就使用该变量. 虽然JS会进行变量提升,但并不会执行真正 ...
- PC QQ客服代码
一. <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=QQ号&site=qq&am ...
- django+xadmin在线教育平台(十六)
7-7 modelform 提交我要学习咨询1 对应表userask form会对字段先做验证,然后保存到数据库中. 可以看到我们的forms和我们的model中有很多内容是一样的.我们如何让代码重复 ...