In principle, it is easy to set up a Linux box so that it knows its own IP
address, without using DHCP to get it. You do it with the "ifconfig"
command, and the line will be approximately like this:

/sbin/ifconfig eth0 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0

(You'll replace the dummy numbers with the ones appropriate to your LAN.)

Look in your rc* scripts (I forget if RH5.1 puts them in /etc/rc.d/ or
/sbin/rc.d/) for a line that looks something like what is above and edit it
to suit your setup (and remove the # if it is commented out). (It may use
shell variables for the numbers, setting them in prior lines, lines like
IPADDR="192.168.1.1". That's fine. Just edit as needed.) Then comment out
the lines that run DHCP during the boot process and you should be set.

You will also need to add a default route, if you don't already have one.
Again, the line will be somewhere in the rc* scripts and will look something
like this:

/sbin/route add default gw 192.168.1.127 netmask 0.0.0.0 metric 1

where you will replace 192.168.1.127 with an address appropriate to your LAN
(a router, or firewall, or whatever).

Without knowing the specifics of how your LAN is managed, though, I can't
say if this will work for you, since I don't know why you needed to use DHCP
in the first place. As an alternative to all of this, you might look at how
your system runs the DHCP client to get an address, to make sure you don't
have a configuration error that causes it to run too often.

(BTW, you spoke of the "hardware address" of your card, but I've assumed
this was a slip of the tongue. THe hardware address is the card's Ethernet
address, which is probably displayed during the boot process. I assumed you
want to set the IP address, not find out the Ethernet address.)

At 09:52 AM 12/16/98 -0600, Brian Dunnette wrote:
[deleted]
>Anyway, my question is this:
>I there a way to tell Linux what the hardware address of my network card is,
>rather than letting it figure it out on its own?  Or some other way that
>this problem could be solved?
------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
762 Garland Drive
Palo Alto, CA  94303-3603
650.321.3561 voice     650.322.1209 fax          [EMAIL PROTECTED]        
----------------------------------------------------------------

Reply via email to