dhcp with two relay agents

Jeffrey Hutzelman jhutz at cmu.edu
Wed Oct 29 20:59:40 UTC 2008


--On Wednesday, October 29, 2008 05:25:21 PM +0100 fadey <fadey at scancom.es> 
wrote:

> Thanks for your reply. I was trying to simplify my network setup and
> messed it up :-)
>
> I'm in a cable network. Behind every router I have about 3-5 different
> networks. Thats why I use shared-network option:
>
> shared-network eth1 {
>   subnet that.is.on.networkcard1 {...}
>   subnet router1.cable_modems {...}
>   subnet router1.emtas {...}
>   subnet router1.hosts1 {...}
>   subnet router1.hosts2 {...}
> }

This does not mean what you think it means.
A shared network is not a group of subnets reachable via the same router or 
interface.  It is a group of subnets which coexist in the same broadcast 
domain.  Multiple distinct networks behind the same router are not a 
shared-network; they are just distinct subnets.

> Hosts are not. So If I dump it all into one shared-network dhcp server
> will start to offer IPs of router1.hosts1 to hosts behind router2.

As it is, you've dumped things into one shared-network that don't belong 
there, such that the DHCP server will offer addresses belonging to 
router1.cable_modems to hosts on the router1.hosts1 subnet.

Unless your network configuration is very unusal, you should not use the 
shared-network statement _at all_.  Just declare your subnets at the top 
level, and the right thing will happen.  In particular, the DHCP server 
_already_ uses the giaddr to figure out what subnet a request came from.

-- Jeffrey T. Hutzelman (N3NHS) <jhutz+ at cmu.edu>
   Carnegie Mellon University - Pittsburgh, PA



More information about the dhcp-users mailing list