FAQs about Nic settings in Linux

Source: Internet
Author: User
Tags ftp site
Article title: FAQs about Nic settings 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.
1 Alpha driver -- get and use
2. one machine uses multiple Ethernet cards
3. this Ethernet device does not work. Why?
4 NE1000/NE2000 Nic (and its series) problems
5 SMC Ultra/EtherEZ and WD80 * 3 Nic problems
6 3Com Nic problems
7. non-specific Nic FAQs
  
Here are some common problems related to using Linux for Ethernet connection. Certain specific issues are categorized by the manufacturer. Maybe the question you want to ask has been answered by someone else !), So even if you don't find your answer here, you may find what you want in News files such as Dejanews.
  
   1 Alpha driver -- get and use 
I heard that my Nic has an updated or preliminary/alpha driver. Where can I get it?
  
The latest "new" driver can be found at the FTP site of Donald: cesdis.gsfc.nasa.gov/pub/linux. As things change frequently, you may need to look around. Or use the WWW browser:
  
Linux Homepage of Don
  
It is easier to find the driver you want. (Note that the WWW browser will quietly replace the TABs in the source code with spaces .)
  
If the driver is indeed alpha or pre-alpha, treat it as appropriate. In other words, don't complain, because you cannot figure out what you can do with it. Similarly, if it causes your machine to go down, don't complain. On the contrary, you should send us a piece of material to organize a good Bug report. if it is a pudding, it would be better!
  
Note that some "available" experimental/alpha drivers are included in the standard kernel source code tree. The first question you need to answer when running make config is "Prompt for development and/or incomplete code/drivers ". Here you want to answer "Y" to include any alpha/experimental driver.
  
   2. one machine uses multiple Ethernet cards 
What can I do to enable Linux to run two Ethernet cards?
  
The answer to this question depends on whether the driver is used as a load-able module or directly compiled into the kernel. Most Linux releases now use modular drivers. In this way, you do not need to issue many kernels. each kernel has a different built-in driver. Use a single basic kernel. if a specific user system needs it, once the system is started, it will be sufficient to file from the driver module (usually stored in/lib/modules /).
  
Use the driver as a module: for PCI drivers, the module usually automatically detects all installed NICs of this brand type. However, for an ISA Nic, it is insecure to find a Nic. Therefore, you need to provide the I/O address of the NIC so that the module can know where to find it. This information is stored in the file/etc/conf. modules.
  
For example, if a user has two ISA NE2000 NICs, one of which is 0x300 and the other is 0x240, they are displayed in the/etc/conf. modules file as follows:
  
Alias eth0 ne
Alias eth1 ne
Options ne io = 0x300, 0 x
  
The meaning of these lines: If the administrator (or kernel) performs modprobe eth0 or modprobe eth1, load the ne. o driver for eth0 or eth1. In addition, when loading the ne. o module, use the options io = 0x300, 0 x so that the driver knows where to find the NIC. Note that 0x is very important-the commonly used H in DOS is not used here. Changing the order of 0x240 and 0x300 will change the physical network card ending with eth0 and eth1.
  
Like in this example, most ISA module drivers can accept multiple comma-separated I/O values to process multiple NICs. However, some (old ?) Driver, such as 3c501. o module, currently, only one Nic can be loaded into one module. In this way, to detect two NICs, you must load the module twice. The/etc/conf. modules file is as follows:
  
Alias eth0 3c501
Alias eth1 3c501
Options eth0-o 3c501-0 io = 0x280 irq = 5
Options eth1-o 3c501-1 io = 0x300 irq = 7
  
In this example, option-o is used to give each module instance a unique name, because two modules cannot be loaded with the same name. The option irq = is also the hardware IRQ used to specify the Nic settings. (This method can also be used to accept multiple modules with comma-separated I/O values, but this will make the module unnecessary to load twice, reducing efficiency .)
  
In the last example, assume that you have a 3c503 Nic at 0x350 and a smc Elite16 (wd8013) Nic at 0x280. It should be like this:
  
Alias eth0 wd
Alias eth1 3c503
Options wd io = 0x280
Options 3c503 io = 0x350
  
For PCI NICs, you only need to use the alias statement to connect the ethN interface with the corresponding driver name, because the I/O address of the PCI Nic can be safely detected.
  
Available modules are generally stored in/lib/modules/'uname-r'/net. here, the uname-r command can get the kernel version (for example, 2.0.34 ). Here you can see which driver is suitable for your Nic. Once you have correctly set the conf. modules file, you can use the following method to check it:
  
Modprobe ethN
Dmesg | tail
  
Here "N" is the interface number of the Ethernet card you want to detect.
  
Use the driver compiled into the kernel: if the driver you need is compiled into the kernel, the interface for processing multiple Ethernet cards already exists. However, by default, only one Ethernet card is detected automatically. This avoids the trouble of detecting sensitive NICs during startup.
  
(Note: in the kernel after 2.1.x, start detection is divided into two categories: secure and insecure. all security detection (such as for PCI and EISA NICs) you can automatically find all related NICs. Perform the following operations in a multi-Nic system with at least one ISA Nic .)
  
There are two ways to enable automatic detection of the second (or third) Nic. The simplest method is to pass the startup parameter to the kernel, which is completed by LILO. You can use simple startup parameters such as ether = and eth1 to detect the second Nic. At this time, eth0 and eth1 are allocated according to the NIC sequence found at startup. If you want to set the NIC at 0x300 to eth0 and the NIC at 0x280 to eth1, you can use
  
LILO: linux ether = 5, 0x300, eth0 ether = 15, 0x280, eth1
The ether = acceptable parameter is not limited to the IRQ + I/O + name shown above. See transfer Ethernet parameters... for all syntaxes, network card-specific parameters, and LILO usage tips.
  
These startup parameters can be fixed, so you do not have to repeat them each time. See the configuration option "append" for LILO in the LILO manual ".
  
The second method (not recommended) is to edit the Space. c file and replace 0xffe0 entry in the I/O address with zero. 0xffe0 is used to tell the kernel not to detect the device-replace it with zero to enable automatic detection of the device.
  
Note: If you want to use Linux as a route between two networks, you need to start IP forwarding and re-compile the kernel. Generally, running "kbridge" software on an old-fashioned AT/286 is quite good.
  
If you are surfing the Internet and reading this document, you 'd better read the mini-howto on Donald's WWW site. Take a look at multiple Ethernet cards.
  
   3. this Ethernet device does not work. Why?
As mentioned above, the command ether = only works for the driver compiled into the kernel. Currently, most Release versions use the driver as a module, so the ether = command is rarely used. (Some early documents need to be updated to reflect this change .) If you want to use the modular Ethernet driver option, you must modify the/etc/conf. modules file.
  
If you are using a compiled driver and have added ether = to the LILO configuration file, you need to re-run lilo to make the updated configuration file take effect.
  
   4 NE1000/NE2000 Nic (and its compatible card) problems 
Problem: No PCI NE2000 compatible Nic is detected when v2.0.x is enabled.
  
Cause: The ne. c driver before v2.0.30 only knows the pci id number of the compatible Nic based on RealTek 8029. After that, the PCI NE2000 compatible network card with other PCI idnumbers is displayed, so the driver cannot detect these network cards.
  
Solution: upgrade the Linux kernel to v2.0.31 or later. It identifies IDs of five different NE2000-PCI chips that are automatically detected when the module is started or loaded. If you upgrade to version 2.0.34 or later, there will be a PCI dedicated NE2000 driver that is a little smaller but more efficient than the original ISA/PCI driver.
  
Problem: The PCI NE2000 compatible Nic is reported as ne1000 (8-bit Nic!) at startup !) Or loading the ne. o module under v2.0.x does not work.
  
Cause: Some PCI-compatible NICs do not support byte access (therefore, they are not compatible with NE2000 ). This leads to the mistaken detection of the NE1000 Nic.
  
Solution: Upgrade to v2.0.31 or later. The current driver detects this hardware Bug.
  
Problem: the performance of the PCI NE2000 Nic is poor, even if the window size is reduced according to the performance tips section.
  
Cause: a read operation is required before each write operation to obtain the highest reliability, as mentioned in the technical data Manual for the initial 8390-chip design and sale more than a decade ago. The driver can do this easily, but this operation is canceled by default from the v1.2 kernel era. One user reported that reusing this "incorrect feature" can improve the performance of the cheap PCI NE2000 compatible Nic.
  
Solution: as only one user puts forward a report to use it as a solution, do not place too much hope on it. Re-use the read operation before writing, you can simply edit the driver file under linux/drivers/net/, and cancel the annotation of the line containing NE_RW_BUGFIX, then re-build the kernel or load the corresponding module. If this is true, please send me an e-mail describing the performance difference and the network card/chip type you are using. (The ne2k-pci.c driver can also be processed .)
  
Problem: The ne2k-pci.c driver reports errors such as timeout waiting for Tx RDC on the PCI NE2000 Nic and cannot work properly.
  
Cause: The connection from your Nic or Nic to the PCI bus cannot process the long-character I/O optimization used by the driver.
  
Solution: First, check the BIOS/CMOS settings to see if the timing related to the PCI bus is too strict for reliable operations. Otherwise, use the ISA/PCI ne. c driver (or remove # define USE_LONGIO from the ne2k-pci.c) to make your Nic available.
  
Problem: No ISA detected

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.