Home  >  Article  >  Operation and Maintenance  >  How to determine whether the network is 100M or Gigabit in Linux

How to determine whether the network is 100M or Gigabit in Linux

WBOY
WBOYOriginal
2022-06-01 11:02:338659browse

In Linux, you can use the ethtool command to determine whether the network is 100M or 1000M. This command is used to query and control network device drivers and hardware settings, that is, to query and set network card parameters. The syntax is "ethtool [Parameter] [Parameter value] Network card name".

How to determine whether the network is 100M or Gigabit in Linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

Linux determines whether the network is 100M or Gigabit

Use the ethtool command.

The ethtool command is used to query and control network device drivers and hardware settings, especially the name of the wired Ethernet device, devname network card. The network card is like a port of the switch. For normal use, we only configure the network card IP address and other information. We do not care about the network card's speed, duplex mode, etc.

Through the ethtool command, we can configure these parameters just like configuring the switch network card. This is the charm of this command.

The syntax is as follows:

ethtool [参数] [参数值] 网卡名称

ethtool is a command used to query and set network card parameters under Linux.

Parameter Description

There are many parameters for ethtool. Here we only list the main and commonly used ones for introduction. More detailed instructions can be obtained through –help. In addition, although the ethtool command supports many functions, some parameter commands require network card support.

How to determine whether the network is 100M or Gigabit in Linux

Examples are as follows:

How to determine whether the network is 100M or Gigabit in Linux

Examples:

[root@hvrhub
~]#
ethtool
eth0
settings
for
eth0:
supported
ports:
[
tp
mii
]
supported
link
modes:
10baset/half
10baset/full
100baset/half
100baset/full
supports
auto-negotiation:
yes
advertised
link
modes:
10baset/half
10baset/full
100baset/half
100baset/full
advertised
auto-negotiation:
yes
speed:
100mb/s
------------------------------------>网卡速度
duplex:
full
port:
mii
phyad:
0
transceiver:
internal
auto-negotiation:
on
supports
wake-on:
pumbg
wake-on:
g
current
message
level:
0x00000033
(51)
link
detected:
yes

Recommended learning: Linux video Tutorial

The above is the detailed content of How to determine whether the network is 100M or Gigabit in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn