NICのプロパティや状態を確認する・ethtoolコマンド (Linux)
提供: すだちWiki
ethtoolコマンドでNICを指定するとNICのプロパティや状態を確認することができます。
CentOS 7 で確認しました。
NICの名前を調べる
ifconfigコマンドでNICの名前を調べる。
[root@host2 ~]# ifconfig
enp14s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2001:a453:61e1:9000:7ae7:d1ff:feda:833c prefixlen 64 scopeid 0x0<global>
inet6 fe80::7ae7:d1ff:feda:833c prefixlen 64 scopeid 0x20<link>
ether 78:e7:d1:da:83:3c txqueuelen 1000 (Ethernet)
RX packets 6311 bytes 3475948 (3.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5555 bytes 428393 (418.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 6 bytes 560 (560.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 560 (560.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ethoolを使ってみる
[root@host2 ~]# ethtool enp14s0
Settings for enp14s0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: on
Supports Wake-on: g
Wake-on: g
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: yes
