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

Re: DHCP Question

> How do I install DHCP Client?   What should be the content of this file?

Either install dhcp-client or dhcp3-client.  I don't know what the difference 
is in practical terms.  If you have the hardware in place at install time, 
Sarge's installer will set up up with dhcp-client.

> I have 2 NIC cards in my computer

That can be a bit tricky.  In my experience, neither discover nor hotplug is 
reliable in detecting and setting up the NICs in the same order consistently 
at every boot.  Not with a 2.4 kernel anyway.  In order to make sure eth0 was 
always the card plugged into my router, I had to write a cheap little init 
script to manually insert each module in turn, and take up the associated 
interface.  That way I'm assured they will come up in the right order.

> iconfig -a
> should list the all the eth  - however it doesnt.   Is there a way I can
> have it to identify both the NICs?

They both need to have entries in /etc/network/interfaces

It might look something like this:

# the router NIC
iface eth0 inet dhcp

# a local NIC with a static IP
iface eth1 inet static

I explicitly do not have "auto eth0" or "auto eth1" in there because my script 
has to take matters into its own hands at boot time to ensure the correct 

Here's a slightly doctored version of my script.  Adjust to suit.  YMMV.

->cat /etc/init.d/manual-module-load-LOCAL

# This script manually loads the modules for eth0 and eth1.
# This requires that both NICs be set without auto in /etc/network/interfaces.

echo "Configuring eth0 and connecting to router..."
echo "Inserting module for Linksys NIC..."
modprobe tulip
echo "Running ifup eth0..."
ifup eth0

echo "Configuring eth1 and connecting to LAN..."
echo "Inserting module for sis900 NIC..."
modprobe sis900
echo "Running ifup eth1..."
ifup eth1

Michael McIntyre  ----   Silvan <dmmcintyr@users.sourceforge.net>
Linux fanatic, and certified Geek;  registered Linux user #243621

Reply to: