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

Say you have two dhcp servers, A and B.

Server A has two IP addresses, 10.0.0.1 and 10.0.0.2. Server B has one IP address, 10.0.0.3.

Server A has two instances of isc-dhcp running, one specifying a local-address of 10.0.0.1 and the other specifying the local-address of 10.0.0.2.

Server B has one instance of isc-dhcp running, specifying a local-address of 10.0.0.3.

If you have another subnet separate from the dhcp servers, 192.168.0.0/24. This subnet's pool is hosted under the instance of isc-dhcp on Server A with IP 10.0.0.1. This subnet is behind a cisco device with the statement "ip helper-address 10.0.0.1". Routes are in place to reach that subnet just fine.

If a device is plugged into the switch/router with the ip helper statement and subnet of 192.168.0.0/24, how does both instances on Server A receive the discover while Server B does not? Both 10.0.0.1 and 10.0.0.2 on Server A are on the same interface.

What I don't understand is why an interface would share discovers with both IPs on it, if that is indeed what happens. If it does share it, why doesn't isc-dhcp see what IP the packets are intended for rather than assuming because it hit the IP it's listening on then it must be for it.

My only guesses:

  1. Either it's a networking thing I don't know about or understand.
  2. The interface itself passes the packet to all IPs on it and isc-dhcp assumes regardless of what IP it listens on that all packets hitting that IP should be looked at and used.
  3. There's nothing in the packet once it gets to the server identifying that it's for a specific IP only, both IPs get the data much like a hub would function, and therefore isc-dhcp HAS to assume if it hits the IP it listens on that it's to be used.

Rewrote the entire question to hopefully clarify the situation. Hopefully I didn't make it worse..

share|improve this question
2  
When a DHCP server receives a broadcast request, it isn't sent to a specific IP. It is a broadcast that is received by an interface. If you are trying to having two DHCP servers listen on a single interface, then you are doing something seriously broken. Also, I am having a difficult time parsing your question about two IPs instead of a 3rd. You need to explain that more. –  Zoredache Apr 19 '13 at 22:09
    
@Zoredache I've edited the question a bit, which might make it a bit too elaborate, but may clarify some of your confusion if you can follow it all. We use a cisco switch with an IP Helper statement, which I was under the impression forces specific protocols (bootp being one of them) to a single IP rather than across the whole network. –  Tim Winter Apr 19 '13 at 22:20
1  
This is why running multiple Layer 3's on a single Layer 2 is Bad Idea (TM). I can't make sense of the question either. –  fukawi2 Apr 19 '13 at 22:34
    
So is the DHCP server on the same subnet as the switch? Generally the helper address is only used when packets are being forwarded across a router. –  Zoredache Apr 19 '13 at 22:39
    
I rewrote the entire question, so hopefully it's easier to follow. Sorry for making it so complicated, but it's a fairly complicated question in my opinion. Both DHCP servers are one one subnet and the switch is on another. –  Tim Winter Apr 19 '13 at 22:54

1 Answer 1

A typical DHCP transaction has 4 steps (wikipedia)

  1. Discover
  2. Offer
  3. Request
  4. Ack

The router with the "ip helper-address 10.0.0.1" statement converts the discover broadcast of the dhcp-client to an unicast towards 10.0.0.1.

10.0.0.1 will sent an offer as a unicast back to the ip-helper-router who will convert it in a broadcast.

A client can receive dhcp-offers from multiple dhcp-servers, but will send only one request (generally to the server with the first offering). If all goes well the server concludes with a ack.

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.