Use ethtool to determine the network port location of multiple NICs Linux servers

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.