Generally, the number of network card chipsets supported by the new Linux preset version is already quite complete, and many network card chips have been supported, such as rlt 8139 chip (RealTek 8139) so users can easily set their network cards. However, if unfortunately the core does not support this network card, you can recompile the core or compile the network card driver module (modules) and load the module. This is a coincidence today, a d-link DFE-530TX, no way, only manually install the network card driver. you can run the following command:
# Dmesg | grep ETH
To view the system startup information. The eth0 or eth1 information is displayed. If eth1 does not find the correct information, it means that the hardware cannot be found in Linux. eth0 is 8139 and is displayed normally, for example:
[Root @ kindgeorge root] # dmesg | grep ETH
Eth0: RealTek rtl8139 Fast Ethernet at 0xf0160000, 00: 0a: A6: 30: 0d: 0e, IRQ 11
Eth0: identified 8139 chip type 'rtl-8139c'
Eth0: Setting 10 Mbit/s full-duplex Based on Auto-negotiated partner ability 4061.
1. view the kernel version of your system.
[Root @ kindgeorge root] # uname-R
2.4.18-3
Here I am from redhat7.3, kernel 2.4.18-3. In general, modules of this kernel driver will be placed in/lib/modules/2.4.18-3/kernel/Drivers/Net
2. Check whether the system has been installed
1. Because the source code package of the kernel and the GCC program are required for compilation, if not, install the package first. View:
[Root @ kindgeorge root] # rpm-Qa | grep Kernel
Kernel-2.4.18-3
Kernel-source-2.4.18-3
[Root @ kindgeorge root] # rpm-Qa | grep GCC (for GCC compilation)
Gcc-2.96-110
Gcc-g77-2.96-110
Gcc-C ++-2.96-110
General installed the kernel source package, will appear in the/usr/src/linux-2.4, there will be linux-2.4.18-3 file directory in the same path.
2. If there is no, install it with the file on the original installation disk, will download the same kernel source package install rpm-IVH kernel-source-2.4.18-3.i386.rpm
3. Get the driver and compile
1. You can copy the dlkfet-4.24.tar.gz file on the optical disk from the factory.
2. Download the network card driver from the Internet. Generally, the website of the manufacturer provides the download program.
For example, there is a download on the http://www.d-link.com.cn.
[Root @ kindgeorge root] # cp dlkfet-4.24.tar.gz/usr/src
[Root @ kindgeorge root] # cd/usr/src/
[Root @ kindgeorge SRC] # tar-zxvf dlkfet-4.24.tar.gz
Dlkfet-4.24/
Dlkfet-4.24/rhine_main.c.
Dlkfet-4.24/makefile
Dlkfet-4.24/vmns_drv.h
Dlkfet-4.24/Rhine. h.
Dlkfet-4.24/. depend. Mak
Dlkfet-4.24/rhine_vmns.c.
Dlkfet-4.24/rhine_proc.h.
Dlkfet-4.24/rhine_proc.c.
1) dlkfet-4.24/rhine_vmns.h
Dlkfet-4.24/kcompat. h
Dlkfet-4.24/rhine_cfg.h
Dlkfet-4.24/. depend
Dlkfet-4.24/rhine_wol.c.
Dlkfet-4.24/rhine_wol.h.
Dlkfet-4.24/linux.txt
3. Please note that there is no. o file at the beginning. Before compilation, you can see the .txt file in the directory, which contains the installation instructions. after entering the directory, execute make to compile.
[Root @ kindgeorge SRC] # cd dlkfet-4.24
[Root @ kindgeorge dlkfet-4.24] # Make
[Root @ kindgeorge dlkfet-4.24] # LL (check it after compilation)
Total 320
-RW-r -- 1 Root 7473 Jan 15 2003 kcompat. h
-RW-r -- 1 Root 11491 Jan 20 2003 linux.txt
-RW-r -- 1 Root 5219 Dec 10 2002 makefile
-RW-r -- 1 Root 1818 Jan 16 2003 rhine_cfg.h
-RW-r -- 1 Root 48715 May 24 rhinefet. o
-RW-r -- 1 Root 42044 Jan 15 2003 Rhine. h
-RW-r -- 1 Root 78996 Jan 16 2003 rhine_main.c
-RW-r -- 1 Root 32760 May 24 rhine_main.o
-RW-r -- 1 Root 14980 Jan 15 2003 rhine_proc.c
-RW-r -- 1 Root 1672 Jan 15 2003 rhine_proc.h
-RW-r -- 1 Root 12336 May 24 rhine_proc.o
-RW-r -- 1 Root 9172 Jan 15 2003 rhine_vmns.c
-RW-r -- 1 Root 1106 Jan 15 2003 rhine_vmns.h
-RW-r -- 1 Root 3792 May 24 rhine_vmns.o
-RW-r -- 1 Root 7536 Jan 15 2003 rhine_wol.c
-RW-r -- 1 Root 1529 Jan 15 2003 rhine_wol.h
-RW-r -- 1 Root 3488 May 24 rhine_wol.o
-RW-r -- 1 Root 6824 Jan 15 2003 vmns_drv.h
4. After compilation, A rhinefet. o file will be compiled. This is the driver module and we will copy it to the corresponding place:
[Root @ kindgeorge dlkfet-4.24] # cp rhinefet. O/lib/modules/2.4.18-3/kernel/Drivers/Net
[Root @ kindgeorge dlkfet-4.24] # depmod-
5. Test
(1) You can run the modprobe rhinefet or insmod rhinefet. O command to load the file. If no error occurs, it indicates OK.
(2) run the lsmod command to check whether it has been loaded.
[Root @ kindgeorge dlkfet-4.24] # lsmod
Module size used by not tainted
Rhinefet 38752 1
8139too 16448 1
MII 2408 0 [8139too]
In this way, we can see that the rhinefet module has been loaded. Basically, this proves that it has been compiled successfully.
6. Load it when it is started
[Root @ kindgeorge dlkfet-4.24] # vi/etc/modules. conf
Add the following line: alias eth1 rhinefet
7. Configure the network
[Root @ kindgeorge dlkfet-4.24] # vi/etc/sysconfig/network-scripts/ifcfg-eth1
Device = eth1
Bootproto = static
Ipaddr = 192.168.4.202
Netmask = 255.255.255.0
Network = 192.168.4.0
Gateway = 192.168.4.250
Broadcast = 192.168.4.255
Onboot = Yes
8. Start the nic and use ifconfig to view the NIC,
IFUP eth1
[Root @ kindgeorge dlkfet-4.24] # ifconfig
Eth0 link encap: Ethernet hwaddr 00: 0a: E6: 30: 0d: 0e
Inet ADDR: 211.239.218.153 bcast: 211.239.218.255 mask: 255.255.255.0
Up broadcast running Multicast MTU: 1500 Metric: 1
RX packets: 3780479 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 3833860 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 100
RX Bytes: 1118112324 (1066.3 MB) TX Bytes: 1111887387 (1060.3 MB)
Interrupt: 11
Eth1 link encap: Ethernet hwaddr 00: 0f: 3D: 82: EC: 1d
Inet ADDR: 192.168.4.202 bcast: 192.168.4.255 mask: 255.255.255.0
Up broadcast running Multicast MTU: 1500 Metric: 1
RX packets: 749312 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 976174 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 100
RX Bytes: 43695059 (41.6 MB) TX Bytes: 1472142037 (1403.9 MB)
Interrupt: 5 base address: 0xe000
9. Restart the machine to automatically load and use it.
5. automatically compile and install the SDK according to the installation instructions.
In "3.3", we use make to compile and manually copy the. keystore file. The installation instructions in linux.txt mentioned in "make install". Let's take a look at what the system has done.
[Root @ firewall1 dlkfet-4.24] # make install
Gcc-wall-dlinux-d1_kernel _-dmodule-dexport_symtab-d1_no_version _-O2-pipe-I/lib/modules/2.4.18-3/build/include-I. -wstrict-prototypes-fomit-frame-pointer-dmodversions-include/lib/modules/2.4.18-3/build/include/Linux/modversions. h-dvmns-c-o rhine_main.o rhine_main.c
Gcc-wall-dlinux-d1_kernel _-dmodule-dexport_symtab-d1_no_version _-O2-pipe-I/lib/modules/2.4.18-3/build/include-I. -wstrict-prototypes-fomit-frame-pointer-dmodversions-include/lib/modules/2.4.18-3/build/include/Linux/modversions. h-dvmns-c-o rhine_proc.o rhine_proc.c
Gcc-wall-dlinux-d1_kernel _-dmodule-dexport_symtab-d1_no_version _-O2-pipe-I/lib/modules/2.4.18-3/build/include-I. -wstrict-prototypes-fomit-frame-pointer-dmodversions-include/lib/modules/2.4.18-3/build/include/Linux/modversions. h-dvmns-c-o rhine_wol.o rhine_wol.c
Gcc-wall-dlinux-d1_kernel _-dmodule-dexport_symtab-d1_no_version _-O2-pipe-I/lib/modules/2.4.18-3/build/include-I. -wstrict-prototypes-fomit-frame-pointer-dmodversions-include/lib/modules/2.4.18-3/build/include/Linux/modversions. h-dvmns-c-o rhine_vmns.o rhine_vmns.c
**************************************** **********
Build options:
Version 2.4.18-3
SMP disabled
Vmns Enabled
**************************************** ***********
Mkdir-P/lib/modules/2.4.18-3/kernel/Drivers/Net
Install-M 644-O root rhinefet. O/lib/modules/2.4.18-3/kernel/Drivers/Net
* *** Move official driver via-rhine.o to via-rhine.o.backup
MV/lib/modules/2.4.18-3/kernel/Drivers/NET/via-rhine.o/lib/modules/2.4.18-3/kernel/Drivers/NET/via-rhine.o.backup
/Sbin/depmod-A | true
The above result shows a process like this:
(1) The system compiles. C and other files into corresponding. O files.
(2) check whether the system supports SMP and vmns, and copy the corresponding. O Module file to the place where the system should be.
(3) and the same chip program outdated via-rhine.o to backup files, so that the system with the new rhinefet. o
(4) Finally execute/sbin/depmod-a to update the module library configuration. It seems that this is also an intelligent installation method.
6. use other methods to drive.
Because there are a lot of boards on the market, there are brand names with miscellaneous cards, and there are a lot of cards. When we get a card, but suddenly we don't find the source program provided by it, we can't compile it. What should we do? So when you have a network card that cannot be used, you must find out what Chip the network card uses and who is compatible with before looking for a Linux driver, such as 3c509, ne2000, and etherexpress. such models are usually printed on the largest fast chip on the NIC. if the chip model is the same, some of them are generic. we can try whether the driver installed on the system is feasible. enter the driver directory/lib/modules/(kernel version)/kernel/Drivers/net to find that many modules already exist. Run the insmod command to find the corresponding Chip Module name. If it fails, an error is reported, if the information is correct, the error message is not displayed. 5-9 steps to test. if not, find the source program.