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.