Article title: modify the Nic working mode in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Method 1:
Run the ethtool command.
View the current working mode
Ethtool eth0
Set to full duplex of megabytes, disable adaptive
Ethtool-s eth0 speed 100 duplex full autoneg off
Method 2:
1. view the Nic working mode and enter the following command:
# 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
IXDBA. NET Community Forum
Basic mode: autonegotiation enabled.
Capabilities :..............
From the above information, we can see that this network card works in 100 M Full Duplex adaptive mode, "basetx-fd" means M Full Duplex.
2. change the Nic working mode and enter the following command:
# Mii-tool-F media [interface]
Media optional modes include 100baseTx-FD, 100baseTx-HD, 10baseT-FD, and 10baseT-HD. Interface indicates the selected Nic, such as eth0 and eth1. the default value is eth0.
For example, to set the NIC to work in 10 m half duplex mode, enter the following command:
# Mii-tool-F 10baseT-HD eth0
3. restore the adaptive working mode of the network adapter. enter the following command:
# Mii-tool-r eth0
You can use mii-tool-h for more detailed usage.
Original address http://www.ixdba.net/hbcms/article/77/278.html