Article Title: how to solve Linux network faults. 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.
Linux network troubleshooting should follow the hardware-first and software-based approach. If the hardware is physically damaged, setting the network cannot solve the fault. The solution can be found from the NIC of the Linux computer and then to the server, hub, router, and other hardware. If the hardware is correct, consider the software settings.
1. check the network adapter's working status
(1) use cat/proc/modules to check whether the module of the NIC has been loaded. The driver hardware is the most basic function of the operating system. the operating system controls the hardware through various drivers, different from Windows systems, Linux kernels currently adopt a Loadable modular design (LKMs Loadable Kernel Modules), which is to compile the most basic core code in the Kernel, our common drivers are dynamically loaded as kernel modules, such as Nic drivers. In Windows, we usually view the hardware list in the "device manager" of the "control panel". In Linux, you can enter: cat/proc/modules: displays all hardware devices detected in Linux. Running cat/proc/modules requires the permissions of the Super User. you can use the su command.
[root@www cao]# cat /proc/modules parport_pc 25096 1 (autoclean) lp 8096 0 (autoclean) parport 34176 1 (autoclean) [parport_pc lp] sg 34636 0 (autoclean) (unused) st 29488 0 (autoclean) (unused) sr_mod 16920 0 (autoclean) (unused) sd_mod 13100 0 (autoclean) (unused) scsi_mod 103284 4 (autoclean) [sg st sr_mod sd_mod] ide-cd 33856 0 (autoclean) nfsd 74256 8 (autoclean) af_packet 14952 0 (autoclean) floppy 55132 0 8139too 17160 1 (autoclean) mii 3832 0 (autoclean) [8139too] tulip 44032 1 (autoclean) ne2k-pci 6720 1 [ne2k-pci] nls_gb2312 964 5 (autoclean) nls_cp936 124956 6 (autoclean) vfat 11820 5 (autoclean) fat 37944 0 (autoclean) [vfat] supermount 15296 2 (autoclean) usbmouse 2936 0 (unused) |
The above bold characters show that the two Nic modules in Linux are loaded: NE2000 and 8139. If no hardware is detected, use the hardware detection program Kuduz to detect the NIC, which is similar to adding new hardware to Windows. The kudzu program recognizes various hardware devices by viewing files in the/usr/share/hwdata/directory. If the core supports the hardware and the driver is available, it can be automatically loaded. The first note is that in Linux, Nic support is usually only for chips. Therefore, for some NICs that are not very famous, you often need to know the chip model to configure Linux. for example, my Top link Nic does not have a Linux driver, but because it is NE2000 compatible, it can be used in Linux as NE2000. 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. this model is usually printed on the largest fast chip on the network card. just copy it. For the NE2000 card of the ISA interface, the first thing to do is to set the NIC to Jumpless mode. many NICs use the PnP mode by default, which can reduce a lot of trouble in Windows, but not in Linux. Therefore, the Jumpless mode must be used in Linux. generally, all network cards have drive disks and a setting program that can be executed under DOS. use this program to set the network card to Jumpless. For PCI NICs, run the following command: less/proc/pci. Find "Ethernet Controller" in the displayed list and write down the vendor and model. Then use modprobe to load the correct module, such as modprobe 3c509. If an error occurs, the module does not exist. At this time, you should find the correct module and recompile it. If it is displayed that the device does not exist, it is also because there is no correct module. Find the correct module and compile it. the problem can be solved in general.
[1] [2] [3] [4] Next page