Install the NIC Driver in Linux

Source: Internet
Author: User
From: http://hi.baidu.com/ucat/blog/item/d33d44f4fe14026cddc4748e.html

Extract:
1. display and use the device command:
Lspci or
Lspci-V

2. Check whether the job is running:
Lsmod

3. NIC driver is the file ending with. Ko

4. NIC Driver Module storage directory [release version number view command: uname-R]:
/Lib/modules/release/kernerl/Drivers/Net

5. In Linux, Nic does not work by real name, but by alias. the location where the alias and real-name NIC are stored is
Driver loaded by the NIC module, module configuration file
/Etc/modprode. conf [this file will be used when an unknown NIC driver is installed later]

6. Nic IP Address Configuration File
/Etc/sysconfig/network-scripts/

7. DNS customer configuration file

/Etc/resolv. conf

 

If the NIC driver is installed, if the NIC has no driver, download and install it from the official website.

For example, if I have a 3com Nic, I will install the driver now.

Download DRIVER:

# Wget http://www.3com.com.cn/download/xxxx.tar

Decompress:

# Tar-zxvf xxx.tar

# Make

# Modprode xxx

# Cp XXX. O/lib/modules/release/kernel/Drivers/NET/

# Depmod-

Write the alias to the modprode. conf configuration file.

# Echo "alias eth2 XXX">/etc/modprode. conf

After this is done, we can repeat the above steps to check whether the operation is normal.

Before configuration, you must be familiar with the main configuration files in Linux.

/Etc/sysconfig/network:

This file is mainly used to set the Host Name (hostname), whether to start the network (start/stop Network), the Network Segment Gateway (GATEWAY) in some Linux versions, modify this file to make the settings take effect, restart the computer (reboot Linux ).

/Etc/sysconfig/network-scripts/ifcfg-ethn:

This file mainly sets the device name (devicename), whether to activate the network (onboot) at startup, the IP address acquisition method (bootproto DHCP/static), and the NIC address (ipaddr ), nic mask (netmask), the first address (network) of the network segment, the broadcast address (broadcast) of the network segment, and other information. This file is the most important setting.

/Etc/resolv. conf:

Familiar with the configuration file, which mainly determines the correspondence between DNS and IP address. If this file is not set, only the IP address is entered when others access your Linux server, if you set this item, it will be totally different. If you enter a simple domain name, you will be OK.

/Etc/hosts:

This file is interesting. In a LAN built in Windows, it is not uncommon for someone to directly enter the specified computer name to access the PC resources of the same name in the same group. For example: as you know, ARP is resolved to the corresponding IP Address by sitename, and ARPA is resolved to the corresponding sitename by IP address reverse resolution. This file is used to decrypt the pcname into the corresponding IP address, and in turn, resolve the IP address to the pcname.

 

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.