When we configure devices with multiple network interfaces, we will be hard-working, such as eth0, eth1 ,...... Which interface is it?
Today, we will introduce a small tool, ethtool, which can help you solve this problem.
The machine I use is a Fedora Linux system. Open the terminal and enter ethtool -- help to display help information. Next I will briefly introduce the two most commonly used functions.
Function 1
Ethtool DEVNAME
The usage is as follows:
Ethtool eth3
Press enter to display the information shown in.
The eth3 interface type, connection mode, rate, and other information are displayed, so that you can find the corresponding Nic. (If the network cable is Supported ports, it is TP. If the network cable is Fiber, it is displayed as Fiber)
Function 2
Ethtool-p DEVNAME: view the device location corresponding to the device name
The usage is as follows:
Ethtool-p eth0
After you press enter, the indicator next to the NIC interface corresponding to eth0 will flash, so that you can quickly determine the location of eth0. (Press Ctrl + C to stop flashing)