DCHP host entry with 2 IP's ?

Paul Reilly pareilly at tcd.ie
Fri Aug 5 19:55:47 UTC 2011


Thanks for the replies guys,

No, no, and no. No range or pool declaration is necessary to serve hosts
> that have fixed-address statements.
>
>
Yeah, I want fixed static addresses - so I have not specified pool or
ranges.


It should work as posted and it should be automatic.
>
>
That's what I thought. I'm not clear on how the DHCP server knows which
subnet to use though?  Does it use the the router address of the subnet
(where ip helper address is configured)  to determine which subnet the
request is coming from?  All requests come in on eth0  but some some "via
x.y.10.1"  which is the router address in subnet 10.
One issue might be that the DHCP server is in subnet x.y.20.0  and requests
for this do not come from a router address  as it's on the same local
subnet.



In the absence of shared network statements, the fixed-address value used
> will be the one in the same network as the DHCP relay, or if local, the same
> network as the DHCP server itself.
>


> >From the man-page:
> > When dhcpd tries to find a host declaration for a client, it first looks
> for a host declaration which has a fixed-address declaration that lists an
> IP address that is valid for the subnet or shared network on which the
> client is booting. If it doesn't find any such entry, it tries to find an
> entry which has no fixed-address declaration.
>
> host declarations are always global, even if written inside some other
> scope such as a subnet or pool. But option inheritance works as written.
> This can make it very confusing if you write your host declarations anywhere
> other than the global scope.
>

So putting the host within the subnet declarations won't make any difference
then?

Regarding the shared-network configuration, I think I might give that a go.
Would this be the right config?

shared-network  MYNETWORK   {

      subnet x.y.10.0 netmask 255.255.255.0 {
                      option subnet-mask 255.255.255.0;
                      option routers x.y.10.1;
                      max-lease-time 600;
                      default-lease-time 600;

      host myhost1  { hardware ethernet 00:1C:23:EE:C1:8E;  fixed-address
x.y.10.10; }
                      }


      subnet x.y.20.0 netmask 255.255.255.0 {
                      option subnet-mask 255.255.255.0;
                      option routers x.y.20.1;
                      max-lease-time 600;
                      default-lease-time 600;

                      host myhost1  { hardware ethernet 00:1C:23:EE:C1:8E;
fixed-address x.y.20.10; }
                      }
}

Thanks
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20110805/45d4a203/attachment.html>


More information about the dhcp-users mailing list