problem with dhcp server behind dhcprelay

Chuck Anderson cra at WPI.EDU
Sat Aug 2 18:42:19 UTC 2008


On Sat, Aug 02, 2008 at 08:29:19PM +0200, Sebastian Reitenbach wrote:
> I want to move the DHCP server into a single lan, and let the clients have 
> to contact it via a dhcp relay.
> 
> On the relay host, the dhcrelay is started like this:
> 
> /usr/sbin/dhcrelay -a -i eth0 -i eth1 -i vlan3 -i vlan30 -i vlan8 -i 
> vlan13 -i vlan25 192.168.0.5

1. Don't use a shared-network statement, because your subnets are 
actually on separate LANs/VLANs.

2. All host statements are treated as global in nature, regardless of 
where you define them.  Move them to global scope in your config file 
to reduce confusion.

3. You aren't using classes correctly, nor do you need them to do what 
you want. You don't need classes at all to simply match the subnet 
from which a request was relayed.  That is automatic behavior.

So this should work:

subnet 192.168.0.0 netmask 255.255.254.0 {
	option domain-name "one.intern";
	option routers 192.168.0.1;
}
subnet 10.0.0.0 netmask 255.255.255.0 {
	option domain-name "two.intern";
	option routers 10.0.0.1;
}
host one001 {
	hardware ethernet 00:11:11:2B:B6:0B;
	fixed-address 192.168.0.30;
}
host two002 {
	hardware ethernet 00:11:11:2B:B6:0B;
	fixed-address 10.0.0.30;
}


More information about the dhcp-users mailing list