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.

As the title implies, May look like a silly question, But what i'm trying to do, Is to have 2 DHCP servers in one network. One only leases IPs to Bootp clients (And if the client re-requests immediately after leases again) And one DHCP server, which is builtin with my PFsense router, that leases the non-bootp clients so they can access the internet and other network resources. I know by chance that PFsense uses ISC-DHCPd. Maybe they have a delay option?

All i need to do to make sure the bootp/PXE boot clients get the proper address, is slow down the DHCP server in the PFsense box. Question is how. Anyone ideas? Thanks in advance

EDIT:

The reason i have TWO DHCP servers, is because one is being configured and run by Clonezilla, Which configures the dhcp server to ONLY lease to bootp clients (and clients with bootp-registered macs that request a dhcp address). The PFsense DHCP server runs to provide addressing for a different Vlan, which doesn't allow contact with the image server's services.

The reason i'm not putting both configurations in one DHCP server is simply convenience. Clonezilla auto-tweaks the image client's leases automatically so that they boot up correctly with PXE.

Since clonezilla's DHCP doesn't provide IPs to the computers that haven't used bootp, i don't see why it should conflict with the PFsense DHCP server.

The PFsense box IS configured not to lease to bootp clients, However, once the bootp client has loaded a minimal image from the clonezilla server, it'll do a DHCP request instead of bootp, which gives it the wrong IP and therefore it can't access the appropriate network resources. The clonezilla server ONLY gives out IPs to clients that downloaded an image in the past ~2 minutes, so it should not conflict with the other DHCP server.

The easy solution for therefore, would be to delay the DHCP offers from the PFsense server.

Thank you all for the input, though. Suggestions welcome.

share|improve this question
2  
slowing down DHCP hmmm. If your proposed solution to a problem involves re-writing or crippling a major standard then you need to re-think and re-define the problem, the solution or both. –  RobM Jan 28 '11 at 23:28
    
I think there was a configuration command to make a server wait a few seconds before leasing. Like in the case of a failover DHCP server, where you'd want the secondary dhcp server to wait a few seconds before leasing. Also, i assumed bootp was the way PXE clients get their IPs initially, right? like a seperate DHCP-like request just for PXE/lanboot clients. –  Ced Jan 28 '11 at 23:34
    
I see your edit, but I am still not sure you are using the correct terminology here. BOOTP is an ancient protocol that predates DHCP. BOOTP is not used at all by Clonezilla. –  Zoredache Jan 28 '11 at 23:59
    
It isn't? Huh. Weird, cause the funny thing is, the image clients boot up till they loaded the minimal image, and then suddenly complain about getting a wrong IP. .. oh well, i guess i'll have to just tweak both configs a lot then. –  Ced Jan 29 '11 at 0:02
    
Oh, and for the record this request isn't entirely insane, Windows 2008r2, now has a per-scope delay feature. –  Zoredache Jan 29 '11 at 0:07

6 Answers 6

You wouldn't ordinarily have 2 DHCP servers on the same subnet. That's asking for big problems. You would have one DHCP server that handles both tasks.

share|improve this answer
    
The secondary DHCP server is configured to ONLY lease to clients that do bootp requests, and DHCP requests right after doing a bootp request. It's used for distributing images (using clonezilla) –  Ced Jan 28 '11 at 23:32
    
You could simply configure first DHCP server to handle requests from bootp clients and say them to download images from second and leave there only tftp server. Another options: a) configure both servers as failover/load-balance b) drop requests from bootp clients with firewall –  gelraen Jan 28 '11 at 23:46
    
You still will have issues, 2 DHCP servers on a subnet is like sodium and water, they don't work well with each other.. –  Jacob Jan 28 '11 at 23:47
    
Why so? One DHCP is essentially a bootp-only server and the other is dhcp-only. They shouldn't conflict, except as they do right now, where the pfsense box is too fast. –  Ced Jan 28 '11 at 23:54
1  
Thing is I don't think you'd need it. From the Wiki article: The Dynamic Host Configuration Protocol (DHCP) is a more advanced protocol for the same purpose and has superseded the use of BOOTP. Most DHCP servers also function as BOOTP servers. –  Bart Silverstrim Jan 29 '11 at 3:06

I've never done it, but you can have two DHCP servers that both make offers to a client. It is up to the client to pick one of the offers

I think the trick is that you need to add the "authoritative" command to the top of the DHCP configuration on the Clonezilla machine but not on the PFSense box. That way if Clonezilla offers the client a DHCP address the client will accept that one first, otherwise it will fail back to the PFSense offer. YMMV

The article makes mention of this issue near the bottom: http://www.corbacho.info/clonezilla/clonezilla.html

share|improve this answer

This is kind of an old post, but it still comes up in search results, so I'm going to add to it.

First: having two DHCP servers in a subnet is not going to cause problems no matter what, that's a very misleading statement. What will cause issues is two DHCP servers which are offering the same pool of addresses. You can have two servers offering different ranges of IP addresses (like 192.168.1.1-100 on one and .101-200 on a second) within the same subnet without causing any issues at all. In fact, if you want to have redundant DHCP in your network, this is a recommended/best practice way to do it.

Second, here's some instructions from Microsoft which may get someone a little closer if they happen to have a similar issue: http://technet.microsoft.com/en-us/library/ee405264(v=ws.10).aspx

share|improve this answer

Why do you need 2 DHCP servers, why can you not use 1? Theres really no reason for 2 and they will cause issues no matter how many times you tweak it. I think you have a misconception about DHCP ,your issue, and solution...

share|improve this answer
    
Running two servers is fine under certain circumstances. Only one of the servers should be actively issuing addresses for a given scope. The DHCP protocol allows a client to receive options from other servers. –  Zoredache Jan 29 '11 at 0:21

Regarding booting after downloading and launching the OS image:

can't access the appropriate network resources

Can't you make those resources available to your regular pfsense controlled network?

When you have more than one DHCP server on the same switch or network, they should be made to work together. Which might be a challenge between 2 different apps :-)

So in this case it might be easier to use the VLAN port management on your switch(es) ? I.e once an imaged machine is ready to face the pfsense environment, go into your switch settings, and change the VLAN for the machine's port.

share|improve this answer

When you are booting clonezilla, it's default configuration will only accept DHCP responses from the server that it booted from. Did you check to make sure that both your DHCP servers are configured with different names?

share|improve this answer

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.