3.4. Identifying Which NIC Is Which
Problem
You have successfully installed two NICs in your new soon-to-be Linux firewall, but you realize that you don't know how to tell which physical card is eth0 and which one is eth1.
Solution
The most reliable way is to connect one at a time to another PC and ping them from the second PC. Once you know which one is which, label them. Using two different interface cards with different drivers also helps to keep them sorted out, though it's not required.
Discussion
If your needs grow to where you need three or four Ethernet adapters, consider purchasing two-or four-port Ethernet adapters. They are configured and managed in exactly the same way as single-port cards, with the advantages of using fewer PCI slots, and requiring fewer interrupts. They're more expensive because they are designed for server duties, so they are more robust, and come with more features.
Soekris single-board computers can have up to eight 10/100 Ethernet ports.
There is no instant method for identifying which NIC is eth0 or eth1 when you install them for the first time, or afterward. It takes just a couple of minutes to do the ping test and label them, and it will save many hassles down the road.
USB Ethernet adapters are worth considering if you shop carefully and purchase only models with native Linux drivers. Don't use ndiswrapper, which is a Linux wrapper that lets you use the device's binary Windows drivers on Linux. It is difficult to install, difficult to upgrade, and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access