[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dhcp server - one mac on multiple subnets



Scott Reese wrote:
Erik Persson wrote:
[snip]
Greetings Erik:

From your description, it sounds like you have multiple subnets on the
same physical network (a multihomed server).  While isc dhcpd can be set
up to handle this situation, it won't do what you want it to do. (from
the man page...)

Thanks for your information!
The problem is that my setup should work for a relay agent with option 82 support.

The network topology looks like this (with some 20 subnets):

................./------net1
dhcp-server----router---net2
.................\------net3

The logical layout is similar:
.............................../-----192.168.B.0/24--subnet1
dhcp-server--192.168.A.0/24--router--192.168.C.0/24--subnet2
...............................\-----192.168.D.0/24--subnet3

The router is doing dhcp relaying. I'm not sure if it has option 82 support though.

If any subnet in a shared network has addresses available for dynamic
allocation, those addresses are collected into a  common  pool  for that
shared network and assigned to clients as needed.  There is no way to
distinguish on which subnet of a shared network a client should boot.

When the client issues a DHCPDISCOVER, there is no way for the server to
tell which of the different subnets the request came from.  You could

Well, in my case there is. A relay agent, with option 82 support, adds information about which subnets the requests originates from. A dhcp server with support for this, can based on this information give the client the appropriate ip address. This is what I know.

Something doesn't work in my setup though. Either the router is just doing dhcp relaying without(!?!) option 82 support, or isc dhcp server does not support option 82, but I think isc dhcpd does. I'm not sure about version 2 however. It could be something about the configuration as well, and of course that it don't work for statically assigned ip addresses even if there is 2 different host declarations for 2 different subnets.

However, from the man pages (I guess - its a while since a looked up the info):
       If it is desirable to be able to boot a DHCP or BOOTP
       client on more than one subnet with fixed addresses,
       more than one address may be specified in the
       fixed-address  declaration,  or  more  than  one  host
       statement may be specified.
and
       fixed-address address [, address ... ];
       The fixed-address declaration is used to assign
       one or more fixed IP  addresses to a client.
       It should only appear in a host declaration.
       If more than one  address  is  supplied,  then
       when  the client  boots, it will be assigned
       the address that corresponds to the network on
       which it is booting.

It could be that this is only valid for multi homed dhcp servers, and not for option 82 requests.

probably work around the problem by setting up address pools for each of
your subnets and then assigning the clients to different pools via MAC
address.  Any solution that you come up with is going to have to be
based on MAC address, because that is the only thing that the client has
for the initial request.

We are already assigning the clients ip address based on mac address. The problem is that this is binding them to just one subnet. If they move the computer to another subnet, they will get the old ip address, which doesn't work in the new subnet. Not very nice.

/ep



Reply to: