dhcp with two relay agents

Glenn Satchell Glenn.Satchell at uniq.com.au
Wed Oct 29 12:53:33 UTC 2008


>Subject: dhcp with two relay agents
>From: fadey <fadey at scancom.es>
>To: dhcp-users at isc.org
>Date: Wed, 29 Oct 2008 11:59:35 +0100
>
>Hi,everyone
>
>I guess it is a common issue, however I couldn't find any solution
>searching this list.
>
>I have two networks behind two routers (please, see diagram image
>attached). I'd like to use the same dhcp server for both of those
>networks. Right now I've configured two separate network cards on my
>dhcp machine and in dhcpd.conf I have two separate shared-networks for
>each card:
>
>shared-network eth1 {
>  subnet actual.subnet.behind.router1 {...}
>  subnet that.is.on.networkcard1 {...}
>}
>
>shared-network eth2 {
>  subnet actual.subnet.behind.router2 {...}
>  subnet that.is.on.networkcard2 {...}
>}
>
>This is the only way I've managed to configure the system so that the
>network1 IPs are server to router1's relay agent and network2 IPs are
>served to router2's relay agent.
>As you can see this will not scale very well since for every additional
>router in the network I'll have to add an additional network card to
>dhcp server (secondary IP for existing network card won't do the trick).
>I was wondering if there is another solution for this. Such as explicit
>matching on giaddr field...
>Thanks in advance
>
Hi Fadey

Have a look at the example in the dhcpd.conf man page.

dhcpd does the matching on giaddr automatically, so you only need to
define the subnets in dhcpd.conf, set up a relay on each subnet (could
be the router, eg cisco ip helper command).

Be careful with shared-networks, as what you have is not a
shared-network. A shared-network is where you have two subnets on the
same physical part of the network. This means dhcpd can assign
addresses from either subnet to clients and they will be valid. In your
case 1.1.1.0/28 and 10.10.10.0/24 are not shared subnets, as there is a
router in between them.

Your dhcpd.conf should look something like this:

subnet that.is.on.networkcard1 {...}
subnet actual.subnet.behind.router1 {...}
subnet actual.subnet.behind.router2 {...}

regards,
-glenn




More information about the dhcp-users mailing list