Installation and configuration of the Ethernet Card in Linux

Source: Internet
Author: User
Article Title: installation and configuration of the Ethernet Card in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

The Linux operating system is favored by more and more people of insight with its unique openness, stability, and efficiency. As IT giants announce their support for Linux, Linux is rapidly expanding its application market, especially the server market. As a standard, Linux is compatible with POSIX1003.1, but it has a more reasonable kernel structure than a UNIX system. Due to its openness, various widely used network protocols have been implemented in this system. Currently, the Linux system is generally a release version consisting of the Linux core, SHELL, and peripheral application software. Linux releases are the result of Linux core, Shell, Installation tool, and application software effectively bundled by different companies or organizations. However, in general, these releases support as many NICs as possible. This article only discusses the selection, installation, and configuration of NICs in a specific release version of RedHat. It is intended to be useful for other releases.

Like UNIX, Linux supports Ethernet NICs. For example 3COM, ACCTON, AT&T, IBM, CRYSTAL, D-LINK and many other brands of Ethernet Card as long as the installation and configuration is correct, you can get the expected results.

 I. How NICs work in Linux

To clarify this problem, we may first briefly analyze how Linux enables NICs to work. In general, the Linux core has implemented the network layer and upper layer of the OSI reference model. The implementation of the network layer depends on the effective work of the data link layer. The driver of the NIC is the interface between the data link layer and the physical layer. By calling the sending routine of the driver to send data to the physical port, the receiving routine of the driver is called to receive data from the physical port.

1. NIC Driver

Simply put, the only thing you need to do to take advantage of the network card in your hand is to get the driver of this network card. The driver provides the core interface for the operating system and the interface for the physical layer.

The operating system interface of the driver is a routine used to discover the NIC, detect Nic parameters, and send and receive data. When the driver starts to operate, the operating system first calls the detection routine to find the NIC installed in the system. If this Nic supports out-of-the-box use, the detection routine should be able to automatically detect the NIC parameters; otherwise, you must set the NIC parameters for the driver before the driver runs. When the core needs to send data, it calls the sending routine of the driver. The sending routine writes data to the correct space and then activates the physical sending process.

The physical layer interface of the driver is the interrupt processing routine. When the network adapter receives data, ends the sending process, or finds an error, the network adapter experiences an interruption, and then the core calls the interrupt processing routine. The Interrupt Processing Routine determines the cause of the interruption and processes the response. For example, when the NIC receives data and interrupts, the interrupt processing routine calls the receiving routine to receive the data.

 2. Driver Operating Parameters

The operating parameters of the driver vary depending on the nature of the NIC, including the I/O port number, interrupt number, DMA channel, and shared storage zone. The input/output port number is also called the input/output base address. It is used when the NIC works in Port input/output mode. The input/output mode requires full CPU intervention, but requires low hardware and storage space. The CPU exchanges data with the NIC through the space specified by the port number. The interrupt number is the interrupt Number of the network card, as long as it does not conflict with other devices. When the network adapter uses the DMA mode, it needs to use the DMA channel to transmit data in batches without CPU intervention.

For a specific network card, if the network card supports automatic detection, you do not need to specify a parameter. The driver's detection routine will automatically set the required parameter. Generally, you need to manually set some of these parameters. If your Nic uses port input/output mode, you must set the port number and interrupt number. If your Nic uses the DMA mode, you need to set the DMA channel and interrupt number. If your network adapter uses the shared storage area mode, you have to set the address range of the shared storage area.

 3. How to Use the driver

With the NIC Driver, you can choose to add the driver to the Linux core or process the driver into an independent module. A fascinating advantage of Linux systems is the core of customized systems. Adding features that require frequent calls to the core of the system can greatly improve the system efficiency. In this case, when the system starts, the system core automatically loads the NIC Driver. The driver parameters can be specified through the LILO command parameters. After the system starts, the driver permanently stays at the core and cannot be detached in a conventional way. As for the custom system core, it is obtained through re-compilation; how to compile the core will be described later.

If you compile the driver into a load-able module, you can use the commands provided by the system to load it at any time after the system starts. The advantage of loading at any time is reduced memory overhead and ease of management, but it also sacrifices the efficiency of network transmission. The driver parameters are directly input in the command line or specified through the configuration file.

2. preparation before Nic Installation

Before installing the NIC, check whether the following conditions are met:

1. Hardware

● Ethernet Card

● Network connection line and connection head, such as 10base-T is generally 8-core twisted pair wire with RJ-45 Interface

[1] [2] [3] [4] [5] Next page

Related Article

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.