Serial Networking Devices  «Prev  Next»

Lesson 6 Loading multiple network interface-card modules
Objective Load correct NIC modules into the kernel

Loading multiple Network Interface-card Modules

In "Red Hat Enterprise Linux 9.4 (RHEL 9.4)", it is common for the kernel to load multiple network interface card (NIC) modules when multiple NICs are present or supported by the system. The kernel dynamically detects the hardware during boot and loads the corresponding driver modules for each NIC.
This process is managed by the "udev device manager" and the kernel module subsystem.
How It Works:
  • Hardware Detection:
    • During boot, the kernel scans the PCI/PCIe bus (or other relevant buses) for connected devices, including NICs.
  • Module Loading:
    • Based on the detected hardware, the kernel uses module aliases (defined in /lib/modules/$(uname -r)/modules.alias) to identify and load the appropriate driver modules for each NIC.
  • Multiple NIC Modules:
    • If your system has NICs from different manufacturers or models, the kernel may load different modules for each one (e.g., e1000 for Intel NICs, bnx2 for Broadcom NICs, or r8169 for Realtek NICs).
    • If you have multiple NICs of the same model, the same module may be loaded multiple times to manage each NIC.
  • Verification:
    • You can verify which modules are loaded for NICs using the following commands:
      lsmod | grep -i net
      
      Or to see all modules:
      lsmod
      
  • Driver Information:
    • You can identify which driver is managing a specific NIC with:
      ethtool -i <interface_name>
      
      Replace <interface_name> with the interface identifier, like eth0 or enp0s3.
  • Network Configuration:
    • The NICs will typically be assigned unique interface names based on the predictable network interface naming scheme (e.g., enp0s3, enp0s8, etc.).

Considerations:
  • Kernel Modules: Ensure the required kernel modules for your NICs are present in the system. If not, you may need to install them from the appropriate package or compile them.
  • Blacklist Unnecessary Modules: If a module is loaded but not required, you can blacklist it by adding an entry in
    /etc/modprobe.d/blacklist.conf
    
    :
blacklist 

This modular approach allows RHEL to support a wide range of NICs without bloating the kernel with unnecessary drivers.


Load correct NIC modules into the kernel

Load the correct NIC modules into the kernel to enable multiple network interface cards.
To enable multiple network cards, execute the following steps:
  1. First, physically install the cards into the computers
  2. Next, insert the appropriate module into the kernel to make the kernel aware of your new hardware
  3. Finally, configure the card using the Network Configurator

  • Loading ISA networking interface card modules into the kernel
    At boot time, the Linux kernel loads the modules specified in /etc/conf.modules. If your network card is PCI, then the kernel's PCI drivers will detect the card automatically and load the appropriate module for you. However, if your network card is ISA, then you must manually specify its type and load it.
    Let's assume you just installed a new ISA network card. To list the networking modules available for loading into the kernel, use:
    ls /lib/modules/`uname -r`/net
    

    The `uname -r` command returns the currently running kernel's version.

uname Liux
uname Linux

In the /etc/conf.modules file, you alias the card type, which is the module's name without the "o", to a particular network device.
For example, a Linux computer with two 3c509 ISA network cards would include the following in /etc/conf.modules:

Legacy Hardware versus modern hardware

In the year 2000, "3Com 3c509" ISA network cards were popular for their time, typically supporting 10 Mbps Ethernet speeds and using the ISA (Industry Standard Architecture) bus interface. In modern systems, the hardware has evolved significantly, and here’s an overview of the kind of networking hardware commonly used today:
Modern Networking Hardware (2024)
  1. Network Interface Cards (NICs):
    • Modern systems now use PCI Express (PCIe) NICs instead of ISA or PCI.
    • Commonly used NICs:
      • Intel Ethernet Adapters (e.g., Intel I210, X710 for 10/25/40 Gbps).
      • Broadcom NetXtreme and NetXtreme II.
      • Realtek RTL8125 for 2.5 Gbps Ethernet.
      • Mellanox/ConnectX for high-performance 25/40/100 Gbps networking.
    • Speeds range from 1 Gbps, 2.5 Gbps, 10 Gbps, and up to 100 Gbps for data centers and enterprise systems.
  2. Integrated NICs:
    • Most modern motherboards have built-in NICs with support for Gigabit Ethernet (1 Gbps) or 2.5 Gbps Ethernet.
    • Some high-end motherboards offer integrated 10 Gbps Ethernet ports.
  3. Wireless Networking:
    • Many computers, especially laptops, use Wi-Fi 6 (802.11ax) or Wi-Fi 6E, with speeds up to 9.6 Gbps.
    • USB Wi-Fi adapters or PCIe Wi-Fi cards (e.g., Intel AX210, Broadcom BCM43xx) are also common.
  4. Optical Network Cards:
    • For data centers or high-performance environments, fiber optic NICs using SFP+ or QSFP modules are widely used. These support 10/25/40/100 Gbps and beyond.
  5. USB Network Adapters:
    • USB-to-Ethernet adapters are used for laptops or systems without built-in NICs, typically supporting up to 10 Gbps over USB 3.x.
  6. Network Switches:
    • Systems are often connected to modern managed switches that support VLANs, QoS, and other advanced features, with Gigabit or 10 Gbps ports.
  7. Networking Standards:
    • Modern hardware uses standards like Ethernet over PCIe, RDMA (Remote Direct Memory Access) for low-latency networking, and advanced offloading features like TCP/UDP checksum offloading.

Comparison with 3c509 ISA NICs
| Feature               | 3c509 (2000)             | Modern NICs (2024)                 |
|-----------------------|--------------------------|------------------------------------|
| **Interface**         | ISA                      | PCIe (x1, x4, x8, x16)             |
| **Speed**             | 10 Mbps                  | 1 Gbps to 100 Gbps                 |
| **Connector**         | RJ45                     | RJ45, SFP+, QSFP                   |
| **Duplex**            | Half-duplex              | Full-duplex                        |
| **Offloading**        | None                     | Advanced (checksum, TSO, LRO)      |
| **Energy Efficiency** | N/A                      | Energy-efficient Ethernet (EEE)    |

Why the Shift?
  • Performance: Modern workloads require significantly higher bandwidth, low latency, and advanced features like offloading.
  • Compatibility: ISA is long obsolete; PCIe is now the standard for almost all hardware.
  • Integration: Built-in NICs and advanced chipsets reduce the need for add-on cards in many cases.
  • Scalability: Modern NICs support features like virtualization, jumbo frames, and SR-IOV for high scalability.

A modern replacement for a computer using two 3c509 cards in 2000 would likely have at least a dual-port Gigabit PCIe NIC or onboard Ethernet ports, depending on the specific requirements.

Loading multiple Network interface-card Modules

uname
Linux : the kernel running is Linux 
linux.com : hostname of the machine
2.6.18-194.el5: Kernel Version
SMP: Symmetric multi-processing (many CPUs)
The date: The date when the kernel was compiled
i686: The architecture that the kernel was compiled for
i386: the current system architecture
GNU/Linux: the operating system that is running (GNU tools with a Linux kernel)

The module names such as 3c509.0, ne.o, or smc-ultra.o correspond to keywords used in the NIC name itself.
The module names such as 3c509.0, ne.o, or smc-ultra.o correspond to keywords used in the NIC name itself. For example, a NE2000 NIC would use the ne.o module.

Linux Alias
Console:
alias eth0 3c509
alias eth1 3c509
options 3c509 io=0x240,0x300

"You will likely need to set card options manually. The "options" keyword allows you to specify per driver configuration options. In this case, the options instruct the kernel to assign address "0x240" to the first instance of the "3c509" driver, and to assign address "0x300" to the second instance."

With the configuration file in order, use modprobe eth0 to load the module for the first Ethernet card. Repeat the modprobe command for every Ethernet card, replacing eth0 with the appropriate device name.
More information about loading Network Interface Cards, especially regarding older card drivers that may require a separate module load for each card, is included in the LDP's Ethernet-HOWTO, available from the Resources page.
  • Testing the installation of Network Interface Cards:
    If the module loaded successfully, a message will be printed into the kernel's internal log. To verify the module loaded correctly, use dmesg | grep eth, which prints all lines relating to Ethernet devices.
    Use dmesg whenever you need to look at recent, important kernel activity.

The next lesson discusses how to use the Network Configurator tool to enable multiple network interface cards.

SEMrush Software 6 SEMrush Banner 6