Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a VLAN composed of multiple subnets, and I would like to use DHCP to centralize IP address designation.

The DHCP server (100.100.25.88) is a Debian machine on the subnet 100.100.25.64/27. I would like to assign IP addresses to machines in the subnet 100.100.68.0/24. The ultimate goal is to enable PXE booting on all machines in the 100.100.68.0/24 subnet.

Below is my dhcpd.conf file,

# DHCP Configuration file
use-host-decl-names on;
ddns-update-style interim;
ignore client-updates;
next-server 100.100.25.88;

# Subnet of DHCP server
subnet 100.100.25.64 netmask 255.255.255.224 {
        option subnet-mask              255.255.255.224;
        range dynamic-bootp             100.100.25.66 100.100.25.94;
        default-lease-time              21600;
        max-lease-time                  43200;
        option domain-name-servers      100.100.25.69, 100.100.44.21;
        option routers                  100.100.25.65;
        filename "pxelinux.0";
}

# Subnet of client machines
subnet 100.100.68.0 netmask 255.255.255.0 {
        range dynamic-bootp             100.100.68.10 100.100.68.200;
        option subnet-mask              255.255.255.0;
        default-lease-time              21600;
        max-lease-time                  43200;
        option domain-name-servers      100.100.25.69, 100.100.44.21;
        option routers                  100.100.68.1;
        option broadcast-address        100.100.68.255;
        filename "pxelinux.0";
        allow unknown-clients;
}

The way I understand DHCP, the DHCP server should be broadcasting packets to broadcast address specified for the second subnet, 100.100.68.255. No clients are able to retrieve an IP address, though. Is this an error in my DHCP configuration, or possibly because the router does not enable DHCP relays?

Thanks!

share|improve this question
    
Surely, in your second paragraph, you meant to say 100.100.68.0/24, not 100.100.68.0/255! –  Steven Monday Dec 8 '10 at 22:50
    
I did indeed, whoops! –  Ben Webber Dec 8 '10 at 23:54

1 Answer 1

up vote 1 down vote accepted

If you want your DHCP server to receive client requests from other networks, you will need to set up a DHCP relay in each such network, and each relay will need to be configured to forward client requests to your DHCP server. I believe that the ISC DHCP package is capable of providing relay service, but I have never used it in that capacity. Many routers can also be configured to act as DHCP relays on networks they're attached to.

In your case, it seems logical to configure a DHCP relay on 100.100.68.1, since it's a router. However, any server (with a static IP) on the 100.100.68.0/24 network could just as easily fill that role.

(By the way, DHCP servers never broadcast, they always send direct (unicast) messages.)

share|improve this answer
    
Thanks for your quick response, Steven. So, were I to point the ip helper-address on the Cisco router at 100.100.68.1 to my DHCP server, DHCP requests on the 100.100.68.0/24 subnet would be filled properly? –  Ben Webber Dec 8 '10 at 23:53
    
@Ben: Provided that everything is configured correctly, yes, I believe so. Just be aware that, by default, ip helper-address forwards broadcasts for a number of ports/protocols, in addition to DHCP. –  Steven Monday Dec 9 '10 at 1:06
    
I'll take a look, thanks again Steven! –  Ben Webber Dec 9 '10 at 1:27
    
How does DHCP decide which scope to use when handing out an IP address? DHCP receives the broadcast request for an IP and DHCP replies via unicast with an IP from one of its scopes. How does it decide which scope to pull the IP from? –  Ruisu Sep 21 '11 at 17:34
    
I asked a similar question (different scope) here, if anyone is interested and if it helps anyone: serverfault.com/questions/575897/… –  BGM Feb 17 at 1:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.