[CLUE-Tech] Forcing TCP/IP Address - RedHat 7.3

David Anselmi anselmi at americanisp.net
Sat Jul 27 20:58:05 MDT 2002


Gary Threlkeld wrote:
> 
> I can turn off DHCP but my question is how do I force setting of each
> machine's TCP/IP address so that it is consistantly assigned the same
> IP address on the network?

Here are the choices I can think of:

Give the machines static IPs (in Debian that's in the 
/etc/network/interfaces file, RedHat should be somewhere nearby).

Look at the docs for dhcpcd or dhclient, whichever you have getting the 
IP for the box.  There should be a way to get it to ask for the same IP 
it had originally, even across reboots.  dhclient use a cache file and 
the man page talks about how to use it.  Don't remember about dhcpcd. 
Using a host file with dynamic IPs isn't very reliable though.

Set up a version 3 DHCP server and a name server to do dynamic updates 
so the names are kept correct in DNS.

Run Samba on the boxes and use WINS for lookups.  Samba will advertise 
itself to the browse list so getting the IPs into the list is easy.  I'm 
not sure how well you can get the machine to do lookups with WINS. 
Maybe there is something in the Samba package that will do it, or you 
could write a script that creates a host file from WINS lookups.

I could probably think of some wackier ideas, but the right way is 
either to use static IPs with a host file or DHCP with dynamic DNS.

Dave




More information about the clue-tech mailing list