[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: network/ethernet card configuration problem?



On Tue, Jul 18, 2000 at 12:00:46PM -0300, James Polson wrote
> Hi,
> 
> Thanks to all who answered my call for help! This message here is in
> response to the one from John Pearson.
>  
> 
> > Date:          Tue, 18 Jul 2000 13:15:56 +0930
> > From:          John Pearson <huiac@camtech.net.au>
> > Subject:       Re: network/ethernet card configuration problem?
> > To:            debian-user@lists.debian.org
> 
> 
> > The "correct" way to proceed depends on which version of Debian you are
> > using (slink (2.1), potato (2.2), etc.); which is it?
> 
> It is slink (2.1)
> 
> > 
> > You can check if things are going to work out for you by trying the
> > following commands as root:
> > 
> > # lsmod
> > 
> > This lists the driver modules currently loaded.  
> > If the "ne" or "ne2k-pci"driver is loaded then you 
> > should see it listed in the output to this command,
> > like so:
> > ne2k-pci                4136   1
> 
> It was not loaded!
> 
> > 
> > Assuming it isn't loaded, try loading it by hand.
> > If your NIC is a PCI card you should use the ne2k-pci
> > driver, like so:
> > # modprobe ne2k-pci
> > 
> > PCI cards shouldn't need any extra parameters.
> > 
> > If it's an ISA card you will need to use the ne module,
> > and will need to pass at least the IO port as a parameter,
> > with a command like this:
> > # modprobe ne io=0x300 irq=10
> > 
> > You can skip the IRQ parameter, but if you know what it is
> > then it makes things a little more bullet-proof.  If you don't
> > know what IO address the card is using, the Windows Device Manager
> > (under System in Control Panels) will probably tell you.
> > 
> > If the card is a bona-fide ISA/PNP card (as opposed to a
> > traditional ISA card) then this will fail after a cold boot, and
> > you will need to set the card up using isapnp before you can
> > use it under Linux.
> > 
> 
> The full name of the card is D-Link DE220 ISA PnP -- is this
> a bona-fide ISA/PNP adaptor?
> 
> I tried using the command
> 
> # modprobe ne io=0x300 irq=03    (these are the proper settings)
> 
> and it didn't complain. However, I infer from your remarks that
> I will have to use 'isapnp'. I guess that this means I will have to
> edit (properly!) the /etc/isapnp.conf file. I looked at the website
> 
> http://www.roestock.demon.co.uk/isapnptools
> 
> and it looks like I will need a line in the file like:
> 
> (CONFIGURE EDI0119/236861364 ( ...  etc.
> 
> The code 'EDI0119' identifies the ethernet card -- but how can
> I find what code to use for my card?
> 
> Please let me know if there is anything else I have to know about
> 'isapnp'.
> 

OK.

Firstly, some ISA/PnP cards have a "Software Configuration"
mode that allows you to specify a configuration using their
setup disk, rather than doing PnP configuration at run time.
Ignore all of the ISA/PNP stuff below if your card has that
option and you're using it; skip to the line 
"(If it isn't a PNP card, start here)" in that case.

isapnp is the utility you use to set up ISA/PNP cards; there is a
companion utility, pnpdump, that will interrogate your ISA/PNP cards
for you.

First, make asure that the card isn't in use by running
# lsmod

to list the currently loaded modules, and use
# rmmod ne
# rmmod 8390

to unload the ne and 8390 modules if necessary ("8390" is a
low-level module that is used by the "ne" module to talk to
ne-compatible NICs).  Changing the ocnfiguration while the card
is in use is officially Naughty, and may hang your machine.

Run 
# pnpdump > /etc/isapnp.conf.try

This should produce a template isapnp configuration file listing
your card, but with all of the lines that would actually specify
a configuration commented out.

Pnpdump is in the isapnptools package; install that package if
it isn't already on your system.

Here's an excerpt, showing a single device:

>> START of pnpdump output fragment
#
# Logical device id @X@0001
#     Device supports vendor reserved register @ 0x39
#     Device supports vendor reserved register @ 0x3a
#     Device supports vendor reserved register @ 0x3c
#     Device supports vendor reserved register @ 0x3d
#
# Edit the entries below to uncomment out the configuration required.
# Note that only the first value of any range is given, this may be changed if required
# Don't forget to uncomment the activate (ACT Y) when happy
(CONFIGURE CMI0001/16777472 (LD 3
# Multiple choice time, choose one only !
#     Start dependent functions: priority preferred
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0220
#             Maximum IO base address 0x0220
#             IO base alignment 1 bytes
#             Number of IO addresses required: 16
# (IO 0 (SIZE 16) (BASE 0x0220))
#       IRQ 5.
#             High true, edge sensitive interrupt (by default)
# (INT 0 (IRQ 5 (MODE +E)))
#       First DMA channel 1.
#             8 bit DMA only
#             Logical device is not a bus master
#             DMA may execute in count by byte mode
#             DMA may not execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 0 (CHANNEL 1))
#       Next DMA channel 5.
#             16 bit DMA only
#             Logical device is not a bus master
#             DMA may not execute in count by byte mode
#             DMA may execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 1 (CHANNEL 5))

#       Start dependent functions: priority acceptable
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0220
#             Maximum IO base address 0x0240
#             IO base alignment 32 bytes
#             Number of IO addresses required: 16
# (IO 0 (SIZE 16) (BASE 0x0220))
#       IRQ 5, 7, 9 or 10.
#             High true, edge sensitive interrupt (by default)
# (INT 0 (IRQ 5 (MODE +E)))
#       First DMA channel 0, 1 or 3.
#             8 bit DMA only
#             Logical device is not a bus master
#             DMA may execute in count by byte mode
#             DMA may not execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 0 (CHANNEL 0))
#       Next DMA channel 5 or 7.
#             16 bit DMA only
#             Logical device is not a bus master
#             DMA may not execute in count by byte mode
#             DMA may execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 1 (CHANNEL 5))

#       Start dependent functions: priority acceptable
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0220
#             Maximum IO base address 0x0280
#             IO base alignment 32 bytes
#             Number of IO addresses required: 16
# (IO 0 (SIZE 16) (BASE 0x0220))
#       IRQ 5, 7, 9, 10, 11 or 12.
#             High true, edge sensitive interrupt (by default)
# (INT 0 (IRQ 5 (MODE +E)))
#       First DMA channel 0, 1 or 3.
#             8 bit DMA only
#             Logical device is not a bus master
#             DMA may execute in count by byte mode
#             DMA may not execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 0 (CHANNEL 0))
#       Next DMA channel 5 or 7.
#             16 bit DMA only
#             Logical device is not a bus master
#             DMA may not execute in count by byte mode
#             DMA may execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 1 (CHANNEL 5))

#       Start dependent functions: priority acceptable
#       Logical device decodes 16 bit IO address lines
#             Minimum IO base address 0x0220
#             Maximum IO base address 0x0280
#             IO base alignment 32 bytes
#             Number of IO addresses required: 16
# (IO 0 (SIZE 16) (BASE 0x0220))
#       IRQ 5, 7, 9, 10, 11 or 12.
#             High true, edge sensitive interrupt (by default)
# (INT 0 (IRQ 5 (MODE +E)))
#       First DMA channel 0, 1 or 3.
#             8 bit DMA only
#             Logical device is not a bus master
#             DMA may execute in count by byte mode
#             DMA may not execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 0 (CHANNEL 0))
#       Next DMA channel 5 or 7.
#             16 bit DMA only
#             Logical device is not a bus master
#             DMA may not execute in count by byte mode
#             DMA may execute in count by word mode
#             DMA channel speed in compatible mode
# (DMA 1 (CHANNEL 5))
 (NAME "CMI0001/16777472[3]{CMI8330. Audio Adapter}")

#     End dependent functions
# (ACT Y)
))
# End tag... Checksum 0x00 (OK)

# Returns all cards to the "Wait for Key" state
(WAITFORKEY)
<<END of pnpdump output fragment

If your device doesn't appear, then it probably isn't an ISA/PNP
card (or it's an ISA/PNP card that has a jumper or software
register set to take it out of ISA/PNP mode, whih saves this
mucking about).

Each of the sections that start with
#       Start dependent functions:

represents an acceptable configuration for the card; 
by default, all of the configurations are commented out.

Note that a single card may have several sections if there
are several functional units on the card (e.g., a soundcard
may have separate sections for a Soundblaster, MIDI
port, Joystick port, and so on).

You should choose one of the configurations listed, and uncomment
the lines associated with it; selecting the "preferred" configuration
from the above fragment, and filtering out comments, would reduce the
above to
(CONFIGURE CMI0001/16777472 (LD 3
 (IO 0 (SIZE 16) (BASE 0x0220))
 (INT 0 (IRQ 5 (MODE +E)))
 (DMA 0 (CHANNEL 1))
 (DMA 1 (CHANNEL 5))
 (NAME "CMI0001/16777472[3]{CMI8330. Audio Adapter}")
 (ACT Y)
))
(WAITFORKEY)

Make sure the parentheses balance, and probably best not to delete
unused lines until you know you have a working configuration.

Once you've chosen a configuration, you can test it like this:
# isapnp /etc/isapnp.conf.try

(If it isn't a PNP card, start here)
Then run
# modprobe ne io=0x300 irq=3

and then
# lsmod

to confirm that the ne driver has loaded.

You can then do the following:
# mv /etc/isapnp.conf.try /etc/isapnp.conf

This puts the configuration file you've created in the right
place for isapnp to find and use it next time you reboot. 

Next, you should create a new file called
/etc/modutils/ne

or somesuch (the name isn't important), and add the following to
it:
options ne io=0x300 irq=3

and then run
# update-modules

This will build a new conf.modules with the appropriate stuff
for your ne card in it, so that the module can be loaded
automatically without having to specify parameters by hand.

Next, you should add the name of the module to /etc/modules;
this will ensure that the module gets loaded automatically at
boot time.

Finally, you can configure your network.  Network configuration
on slink lives in /etc/init.d/network; you probably have a
skeletal file there at the moment that only lists the loopback
interface.  A sample /etc/init.d/network appears here:

>>START sample /etc/init.d/network
#!      /bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0

IPADDR=192.168.113.114
NETMASK=255.255.255.0
NETWORK=192.168.113.0
BROADCAST=192.168.113.255
GATEWAY=192.168.113.110

ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}

[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
<<END sample /etc/init.d/network

You will, of course, need to substitute your own IP addresses,
etc., for those shown here.

You should then be able to bring up the interface with
# /etc/init.d/network

and see the interface configuration with
# ifconfig

If there wasn't already an /etc/init.d/network (there should
have been) run the commands
# chmod a+rx /etc/init.d/network
# update-rc.d network start 40 S .

to make it executable, and install the correct start-up links.

If this seems like a lot of trouble, it is!  The Debian
installation does this automatically for non-PNP cards when you
load driver modules and configure the network, but Slink
doesn't directly support ISA/PnP cards during installation.

Finally, as you haven't configured the network before, you
should make sure that you have valid nameservers in
/etc/resolv.conf; if necessary add them, and a default domain if
you want one, like this:

domain localnet
nameserver 127.0.0.1
nameserver 192.168.113.110

Hope this covers it,


John P.
-- 
huiac@camtech.net.au
john@huiac.apana.org.au
http://www.mdt.net.au/~john Debian Linux admin & support:technical services



Reply to: