318 lines
15 KiB
HTML
318 lines
15 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>Linux Ethernet-Howto: Introduction</TITLE>
|
|
<LINK HREF="Ethernet-HOWTO-2.html" REL=next>
|
|
|
|
<LINK HREF="Ethernet-HOWTO.html#toc1" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="Ethernet-HOWTO-2.html">Next</A>
|
|
Previous
|
|
<A HREF="Ethernet-HOWTO.html#toc1">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="main-intro"></A> <A NAME="s1">1. Introduction</A></H2>
|
|
|
|
<P>
|
|
<P>The Ethernet-Howto contains detailed information on the current level
|
|
of support for most of the common ethernet cards available.
|
|
It covers common hardware configuration problems, and problems
|
|
associated with choosing the right driver, and then getting that
|
|
driver loaded and functional. It does not cover the next
|
|
stages of setup (choosing an internet address, routing, etc).
|
|
That information can be found in various other Linux documentation.
|
|
<P>In the early days of linux, the old ISA type ethernet cards
|
|
were the norm. The ISA bus had no sane or safe way for linux
|
|
to determine what cards were installed, or what settings
|
|
each card was to use. This meant that the end user was more
|
|
involved in supplying this information to linux, and they
|
|
turned to this guide for help on doing this.
|
|
<P>Fortunately, the newer PCI bus can be found in nearly every
|
|
computer that is out there today, and the ISA bus is left
|
|
to collect dust with the 386 and 486 computers of yesteryear.
|
|
The designers of the PCI bus recognized the problem with
|
|
card detection on the old ISA bus, and so added support for
|
|
each card to be able to communicate to the host computer their
|
|
manufacturer and model, and what settings are to be used.
|
|
<P>This slow demise of the ISA bus has reduced the involvement of
|
|
the end user drastically. As such, most of today's linux users
|
|
would not need to turn to this guide for help. However there
|
|
are always some corner cases where things don't work as expected,
|
|
or some problems that need troubleshooting. And of course
|
|
there are still some old ISA computers out there doing thankless
|
|
dedicated tasks in the bottom of dark closets too.
|
|
<P>This present revision covers ethernet drivers found in
|
|
kernels up to and including version 2.4.21. Some features
|
|
pertaining to the upcoming 2.6 release are also mentioned.
|
|
<P>The Ethernet-Howto is by:
|
|
<BLOCKQUOTE>
|
|
Paul Gortmaker, <CODE>p_gortmaker @ yahoo.com</CODE>
|
|
</BLOCKQUOTE>
|
|
<P>The primary source of information for the initial
|
|
ASCII-only version of the Ethernet-Howto was:
|
|
<BLOCKQUOTE>
|
|
Donald J. Becker, <CODE>becker @ scyld.com</CODE>
|
|
</BLOCKQUOTE>
|
|
<P>who we should thank for writing a lot of the ethernet
|
|
card drivers that are presently available for Linux.
|
|
<P>This document is Copyright (c) 1993-2003 by Paul Gortmaker.
|
|
Yes, I have been maintaing this thing for 10 years now!
|
|
Please see the Disclaimer and Copying information at the end
|
|
of this document (
|
|
<A HREF="Ethernet-HOWTO-8.html#copyright">copyright</A>)
|
|
for information about redistribution of
|
|
this document and the usual `we are not responsible for what
|
|
you manage to break...' type legal stuff.
|
|
<P>
|
|
<H2><A NAME="new-doc"></A> <A NAME="ss1.1">1.1 New Versions of this Document</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<P>New versions of this document can be retrieved from:
|
|
<P>
|
|
<A HREF="http://metalab.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html">Ethernet-HOWTO</A><P>or for those wishing to use FTP and/or get non-HTML formats:
|
|
<P>
|
|
<A HREF="ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/">Sunsite HOWTO Archive</A><P>This is the `official' location - it can also be found on
|
|
various Linux WWW/ftp mirror sites. Updates will be made
|
|
as new information and/or drivers becomes available. If this copy
|
|
that you are reading is more than 6 months old, then you should
|
|
check to see if an updated copy is available.
|
|
<P>This document is available in various formats (postscript, dvi,
|
|
ASCII, HTML, etc.).
|
|
I would recommend viewing it in HTML (via a WWW browser) or the
|
|
Postscript/dvi format. Both of these contain cross-references
|
|
that are not included in the plain text ASCII format.
|
|
<P>
|
|
<H2><A NAME="using"></A> <A NAME="ss1.2">1.2 Using the Ethernet-Howto</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<P>As this guide is getting bigger and bigger, you probably don't want
|
|
to spend the rest of your afternoon reading the whole thing. And
|
|
the good news is that you don't <EM>have</EM> to read it all. The
|
|
HTML and Postscript/dvi versions have a table of contents which will
|
|
really help you find what you need a lot faster.
|
|
<P>Chances are you are reading this document beacuse you can't get things
|
|
to work and you don't know what to do or check. The next section
|
|
(
|
|
<A HREF="#help">HELP - It doesn't work!</A>)
|
|
is aimed at newcomers to linux and will point you in the
|
|
right direction.
|
|
<P>Typically the same problems and questions are asked <EM>over and over</EM>
|
|
again by different people. Chances are your specific problem
|
|
or question is one of these Frequently Asked Questions, and
|
|
is answered in the FAQ portion of this document .
|
|
(
|
|
<A HREF="Ethernet-HOWTO-2.html#faq">The FAQ section</A>). Everybody should have a
|
|
look through this section before posting for help.
|
|
<P>If you haven't got an ethernet card, then
|
|
you will want to start with deciding on a card.
|
|
(
|
|
<A HREF="Ethernet-HOWTO-2.html#what-card">What card should I buy...</A>)
|
|
<P>If you have already got an ethernet card,
|
|
but are not sure if you can use it with Linux, then you will want to
|
|
read the section which contains specific information on each
|
|
manufacturer, and their cards.
|
|
(
|
|
<A HREF="Ethernet-HOWTO-4.html#card-intro">Vendor Specific...</A>)
|
|
<P>If you are interested in some of the technical aspects
|
|
of the Linux device drivers, then you can have a browse of
|
|
the section with this type of information.
|
|
(
|
|
<A HREF="Ethernet-HOWTO-7.html#tech-intro">Technical Information</A>)
|
|
<P>
|
|
<H2><A NAME="ss1.3">1.3 What do I need to to get ethernet working?</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<P>As a quick overview, you need to: 1) have a plug in ethernet
|
|
card or motherboard that has ethernet support built in,
|
|
2) determine the brand or make and model of the ethernet
|
|
card or on-board ethernet chip, 3) determine if a linux
|
|
driver for this model of card/chip does exist, 4) locate
|
|
and load this driver, 5) check driver output to verify
|
|
it found your card, 6) set or configure network parameters
|
|
for the newly detected network interface.
|
|
<P>
|
|
<H2><A NAME="help"></A> <A NAME="ss1.4">1.4 HELP - It doesn't work!</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<P>Okay, don't panic. This will lead you through the process of
|
|
getting things working, even if you have no prior background
|
|
in linux or ethernet hardware.
|
|
<P>First thing you need to do is figure out what model your card is
|
|
so you can determine if Linux has a driver for that particular
|
|
card. Different cards typically have different ways of being
|
|
controlled by the host computer, and the linux driver (if there
|
|
is one) contains this control information in a format that
|
|
allows linux to use the card.
|
|
<P>If you don't have any manuals or anything of the sort that
|
|
tell you anything about the card model, then you can try
|
|
using the <CODE>lspci</CODE> utility for obtaining information
|
|
on the PCI devices in your computer. Doing a
|
|
<CODE>cat /proc/pci</CODE> gives similar (but less) information.
|
|
For ISA cards, see the section on helping with mystery cards
|
|
(reference section:
|
|
<A HREF="Ethernet-HOWTO-4.html#mystery">Identifying an Unknown Card</A>).
|
|
<P>Now that you know what type of card you have, read through
|
|
the details of your particular card in the card specific section
|
|
(reference section:
|
|
<A HREF="Ethernet-HOWTO-4.html#card-intro">Vendor Specific...</A>)
|
|
which lists in alphabetical order, card manufacturers,
|
|
individual model numbers and whether it has a linux driver or
|
|
not. If it lists it as `Not Supported' you can pretty much
|
|
give up here. If you can't find your card in that list, then
|
|
check to see if your card manual lists it as being `compatible'
|
|
with another known card type. For example there are hundreds,
|
|
if not thousands of different cards made to be compatible
|
|
with the original Novell NE2000 design.
|
|
<P>Assuming you have found out that a linux driver exists for your
|
|
card, you now have to find it and make use of it.
|
|
Just because linux has a
|
|
driver for your card does <EM>not</EM> mean that it is built
|
|
into every kernel. (The kernel is the core operating
|
|
system that is first loaded at boot, and contains drivers
|
|
for various pieces of hardware, among other things.)
|
|
Depending on who made the particular linux distribution
|
|
you are using, there may be only a few pre-built kernels, and
|
|
a whole bunch of drivers as smaller separate modules, or there may
|
|
be a whole lot of kernels, covering a vast combination of
|
|
built-in driver combinations.
|
|
<P>Most linux distributions now ship with a bunch of
|
|
small modules that are the various drivers. The required
|
|
modules are typically loaded late in the boot process, or
|
|
on-demand as a driver is needed to access a particualr device.
|
|
You will need to attach this module to the kernel after it
|
|
has booted up. See the information that came with your
|
|
distribution on installing and using modules, along with
|
|
the module section in this document.
|
|
(
|
|
<A HREF="Ethernet-HOWTO-8.html#modules">Using the Ethernet Drivers as Modules</A>)
|
|
<P>If you didn't find either a pre-built kernel with your driver,
|
|
or a module form of the driver, chances are you have a typically
|
|
uncommon card, and you will have to build your own kernel with
|
|
that driver included. Once you have linux installed, building a
|
|
custom kernel is not difficult at all. You essentially answer
|
|
yes or no to what you want the kernel to contain, and then tell
|
|
it to build it. There is a Kernel-HowTo that will help you along.
|
|
<P>At this point you should have somehow managed to be booting a
|
|
kernel with your driver built in, or be loading it as a module.
|
|
About half of the problems people have are related to not having
|
|
driver loaded one way or another, so you may find things work now.
|
|
<P>If it still doesn't work, then you need to verify that the
|
|
kernel is indeed detecting the card. To do this, you need
|
|
to type <CODE>dmesg | more</CODE> when logged in after the
|
|
system has booted and all modules have been loaded.
|
|
This will allow you to review the boot messages that the
|
|
kernel scrolled up the screen during the boot process.
|
|
If the card has been detected, you should see somewhere in
|
|
that list a message from your card's driver that starts with
|
|
<CODE>eth0</CODE>, mentions the driver name and the hardware parameters
|
|
(interrupt setting, input/output port address, etc) that
|
|
the card is set for. (Note: At boot, linux lists
|
|
all the PCI cards installed in the system, regardless of
|
|
what drivers are available - do not mistake this for the
|
|
driver detection which comes later!)
|
|
<P>If you don't see a driver indentification message like this,
|
|
then the driver didn't detect your card, and that is why things
|
|
aren't working. See the FAQ
|
|
(
|
|
<A HREF="Ethernet-HOWTO-2.html#faq">The FAQ Section</A>) for what to do if
|
|
your card is not detected. If you have a NE2000 compatible,
|
|
there is also some NE2000 specific tips on getting a card
|
|
detected in the FAQ section as well.
|
|
<P>If the card is detected, but the detection message reports
|
|
some sort of error, like a resource conflict, then the driver
|
|
probably won't have initialized properly and the card still
|
|
wont be useable. Most common error messages of this sort are
|
|
also listed in the FAQ section, along with a solution.
|
|
<P>If the detection message seems okay, then double check the
|
|
card resources reported by the driver against those that
|
|
the card is physically set for (either by little black jumpers on the
|
|
card, or by a software utility supplied by the card manufacturer.)
|
|
These must match exactly. For example, if you have the card
|
|
jumpered or configured to IRQ 15 and the driver reports IRQ 10
|
|
in the boot messages, things will not work. The FAQ section
|
|
discusses the most common cases of drivers incorrectly detecting
|
|
the configuration information of various cards.
|
|
<P>At this point, you have managed to get you card detected with
|
|
all the correct parameters, and hopefully everything is working.
|
|
If not, then you either have a software configuration error,
|
|
or a hardware configuration error. A software configuration
|
|
error is not setting up the right network addresses for the
|
|
<CODE>ifconfig</CODE> and <CODE>route</CODE> commands, and details of how
|
|
to do that are fully described in the Network HowTo and the
|
|
`Network Administrator's Guide' which both probably came on
|
|
the CD-ROM you installed from.
|
|
<P>A hardware configuration error is when some sort of resource
|
|
conflict or mis-configuration (that the driver didn't detect
|
|
at boot) stops the card from working properly. This typically
|
|
can be observed in several different ways. (1) You get
|
|
an error message when <CODE>ifconfig</CODE> tries to open the device
|
|
for use, such as ``SIOCSFFLAGS: Try again''. (2) The driver
|
|
reports <CODE>eth0</CODE> error messages (viewed by <CODE>dmesg | more</CODE>)
|
|
or strange inconsistencies for each time it tries to send or
|
|
receive data. (3) Typing <CODE>cat /proc/net/dev</CODE> shows
|
|
non-zero numbers in one of the errs, drop, fifo, frame or
|
|
carrier columns for <CODE>eth0</CODE>. (4) Typing
|
|
<CODE>cat /proc/interrupts</CODE> shows a zero interrupt count
|
|
for the card.
|
|
Most of the typical hardware configuration errors are also
|
|
discussed in the FAQ section.
|
|
<P>Well, if you have got to this point and things still
|
|
aren't working, read the FAQ section
|
|
of this document, read the vendor specific section detailing
|
|
your particular card, <EM>and if it still doesn't work</EM> then
|
|
you may have to resort to posting to an appropriate
|
|
newsgroup for help. If you do post, please detail all
|
|
relevant information in that post, such as the card brand,
|
|
the kernel version, the driver boot messages, the output
|
|
from <CODE>cat /proc/net/dev</CODE>, a clear description of
|
|
the problem, and of course what you
|
|
have already tried to do in an effort to get things to work.
|
|
<P>You would be surprised at how many people post useless things
|
|
like ``Can someone help me? My ethernet doesn't work.'' and
|
|
nothing else.
|
|
Readers of the newsgroups tend to ignore such silly posts,
|
|
whereas a detailed and informational problem description
|
|
may allow a `linux-guru' to spot your problem right away.
|
|
Of course the same holds true when e-mailing a problem
|
|
report - always provide as much information as possible.
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="cable-intro"></A> <A NAME="ss1.5">1.5 Type of cable that your card should support</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<P>The twisted pair cables, with the RJ-45 (giant phone jack)
|
|
connectors is technically called 10BaseT. You may also
|
|
hear it called UTP (Unsheilded Twisted Pair).
|
|
<P>The thinnet, or thin ethernet cabling, (RG-58 coaxial cable)
|
|
with the BNC (metal push and turn-to-lock) connectors is
|
|
technically called 10Base2.
|
|
<P>The older thick ethernet (10mm coaxial cable) which is only
|
|
found in older installations is called 10Base5. The 15 pin
|
|
D-shaped plug found on some ethernet cards (the AUI connector)
|
|
is used to connect to thick ethernet and external transcievers.
|
|
<P>Most ethercards also come in a `Combo' version for only
|
|
$10-$20 more.
|
|
These have both twisted pair and thinnet transceiver built-in,
|
|
allowing you to change your mind later.
|
|
<P>Most installations will use 10BaseT/100BaseT
|
|
10Base2 does not offer any upgrade path to 100Base-whatever.
|
|
10Base2 is fine for hobbyists setting up a home network
|
|
when purchasing a hub is not desireable for some reason
|
|
or another.
|
|
<P>See
|
|
<A HREF="Ethernet-HOWTO-5.html#cable">Cables, Coax...</A>
|
|
for other concerns with different types of ethernet cable.
|
|
<P>
|
|
<HR>
|
|
<A HREF="Ethernet-HOWTO-2.html">Next</A>
|
|
Previous
|
|
<A HREF="Ethernet-HOWTO.html#toc1">Contents</A>
|
|
</BODY>
|
|
</HTML>
|