On Wed, Mar 17, 1999 at 05:14:50PM -0500, Keith wrote:
> That is what I was thinking. I haven't use dhcp on linux, but on other
> systems you specify your mac address in the dhcp server or something to
> identify that machine and associate it with the ip address you want to
> give it. If you do that when the one computer dials in to recieve it's
> address it will always receive the same one. I will stop now because I
> don't know any more than that since I have never used dhcp on Linux.

Dhcp works ok (though with some problems) under Linux, providing you get the
right release.  Under Redhat 5.2, dhcp-2.0b1pl6-2 is the server side.  There
should be only one dhcp running on a given network (the way it works, is the
client sends out a broadcast saying I'm at MAC address xyz, what IP should I
use, and if you have more than one server running, both with answer).  Before
starting it up for the first time, you need to touch the leases file to create
it, since it croaks if it isn't available.

On the client side of things, you have to run a different dhcpcd depending on
whether you have a 2.0.xx kernel (something like dhcpcd-0.90*) or a 2.2.x
kernel (dhcpcd-1.3.16-0).  Then under linuxconf, you specify that you are using
dchp for the network interface (or if you want to get your hands dirty, edit
the /etc/sysconfig/network-scripts/ifcfg-eth0 file and set BOOTPROTO="dhcp",
and unset all of the fields setting IP # and broadcast masks).

Note, that while you can specify various things with the dhcpd server, the
1.3.16 version of dhcpcd won't pass them on to the ifdhcpc-done script in
/etc/sysconfig/network-scripts, as I found out recently (in particular ntp and
lpr servers, both of which I used).

Getting back to diald topics, the names specified in the dhcpd configuration
script should all be in your /etc/hosts file (or you should use raw IP numbers)
if you do not run a local secondary or primary nameserver and you don't want
diald dialing when you boot the system, since dhcpd resolves the names when it
is started, rather than delaying the lookup until a dhcp request is granted.

Here is a version of the dhcpd script for a masquaraded local network that
hardwires some hosts, and dynamically allocates IP addresses for any other
hosts (such as people visiting with laptops):

server-identifier dhcp.mydomain.com
option domain-name "mydomain.com";
option domain-name-servers dns1.mydomain.com, dns2.mydomain.com;
option routers gateway.mydomain.com;
option broadcast-address 10.255.255.255.255;
option lpr-servers print1.mydomain.com, print2.mydomain.com;
option ntp-servers ntp1.mydomain.com, ntp2.mydomain.com;

host host10.mydomain.com {
        hardware ethernet ff:00:00:00:0:00;
        fixed-address 10.0.0.10;
}

host host11.mydomain.com {
        hardware ethernet ff:00:00:00:0:00;
        fixed-address 10.0.0.11;
}

host host12.mydomain.com {
        hardware ethernet ff:00:00:00:0:00;
        fixed-address 10.0.0.12;
}

# ...

subnet 10.0.0.0 netmask 255.0.0.0 {
        range 10.0.1.1 10.0.1.254;
}

-- 
Michael Meissner, Cygnus Solutions
PO Box 98, Ayer Massachusetts, USA 01432-0098
[EMAIL PROTECTED]

-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]

Reply via email to