Return to the Linux Tips
Troubleshooting Ethernet
From: Tony Steidler-Dennison 11.12.2002 PenguinREPORT http://www.lockergnome.com/issues/penguinshell/20021112.html One of the vexing problems that plagues Linux less and less is the inability to set up an ethernet card. Given that Linux is a robust networking platform, the tools to troubleshoot and solve network problems exist right out of the box. Today, we'll look at two high-level problems that might prevent your machine from connecting. The most likely cause of ethernet failure on your Linux box is the ethernet card module itself. In most cases, either the proper module hasn't been built, or it hasn't loaded. In order to correct this problem, you'll first need need to know how your system sees your ethernet card: more /proc/pci We've talked about this command in previous Penguin Shell issues. This will display a list of devices in your system, including any PCI or integrated network interface cards. Mine, for instance, lists the 3Com 3C905 100BaseTX NIC. This uses the 3c59x module in Linux. If you're not sure which module to compile or load for your network card, check here for a fairly comprehensive listing cards and related modules. Now, check to see if your particular module is already loaded. As root: lsmod In Red Hattish systems, you'll find the lsmod command at /sbin/lsmod. This will list all the loaded modules. If your module is loaded, we'll move on to the second step in troubleshooting. If not, you can attempt to load the module: modprobe 3c59x (Or, of course, /sbin/modprobe 3c59x.) If you're returned to a shell command without an error, the module was already built and was loaded properly at the modprobe command. Use lsmod again to assure yourself that this is, in fact, the case. If the module has loaded successfully, you should restart the network services. It's likely that you'll then be up and running. The other issue is related to card configuration. While there are several good GUI tools, you can configure your NIC quickly with a set of commands similar to the following: ifconfig eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255 default gw 192.168.1.1 up The parameters in this line are, of course, specific to your network connection. ifconfig calls the interface configuration tool. eth0 denotes the interface you're configuring. The first series of numbers is the IP address you're assigning to the card. For most internal networks (inside a router in a home network, for example) the netmask will be 255.255.255.0. The broadcast address will use the first three octets of the IP address with 255 at the end. The next item is your default gateway. Last is the command to bring up the interface. If you're connected directly to the 'net, as opposed to connecting via a router on an internal network, you'll need to secure this information from your ISP.
[report a broken link by clicking here]