[plug] dhcp networking
Craig Ringer
craig at postnewspapers.com.au
Thu Jul 31 17:06:03 WST 2003
> I have a debian box with dhcp installed. and i was wondering how to
> write a script for my debian client so when my server is turned off it
> will still have an ip so it can access the rest of my network.
> does anyone have any sujestions on how i might go about this?
You're probably better off just not using DHCP. If you want the rest of
the network to be contolled using DHCP anyway, then use a static IP on
those clients that you want to, and make sure you tell the DHCP server
that there are hosts fixed to those IPs. For example:
host bob {
fixed-address 192.168.1.4;
}
Personally, I just allocate 192.168.1.100 - 192.168.1.254 to DHCP, and
anything below that is reserved address space for static hosts. As it
happens, I still put the static hosts in the DHCP server and have them
obtain IPs from DHCP, because my server is always on, but it's the same
idea.
I use a host definition like
host bob {
fixed-address 192.168.0.4;
hardware ethernet 00:C0:14:AE:BC:2D;
}
to lock each handed out static address to the appropriate machine's MAC
address. You can use client-identifiers for this intead, but I find MACs
to be easier.
Craig Ringer
More information about the plug
mailing list