[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 817
  • Last Modified:

DHCP

how can you find out where in the config a client knows what server to look at for an ip address?
0
dcreedon
Asked:
dcreedon
  • 4
  • 3
  • 2
  • +6
5 Solutions
 
sirbountyCommented:
Start->Run->CMD (or COMMAND)

IPCONFIG /ALL

should give you the DHCP server info...
0
 
dcreedonAuthor Commented:
what determines whether it goes to the primary or secondary dhcp server?
0
 
Julian_CCommented:
or  ifconfig if you are running *nix
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
dcreedonAuthor Commented:
why would a user be getting an ip from the secondary dhcp server? i presume it is good practice to have a primary and secondary dhcp server in case one of the servers goes down?
0
 
Julian_CCommented:
And the thing about DHCP is it isn't in the config before the DHCP server is used. When a client starts up it makes a broadcast request on a network for a DHCP server and uses the first to reply. In that way it is possible for a rogue DHCP server to mess everything up, giving out incorrect addresses etc.

Cheers
Julian
0
 
adamdrayerCommented:
dhcp is broadcast-based, and usually the first server to respond is the one that issues the address.  
0
 
dcreedonAuthor Commented:
i guess the event logs might be able to tell me which server first answers the request?
0
 
adamdrayerCommented:
"ipconfig /all" should tell you which server is the one that issued you your address.  There shouldn't be any primary or secondary.  That's usually referred to for DNS servers.  Not DHCP.
0
 
dcreedonAuthor Commented:
so dhcp installed on one server is ok? i thought that if this server went down for any reason the server where the secondary dhcp installed would lease ip's?
0
 
adamdrayerCommented:
Well they shouldn't conflict with each other's IP address range.  Otherwise you will have problems.  For example, one server can be issuing 192.16.1.21-192.168.1.100 and another one can issue 192.168.101-192.168.1.180.

That's fine, but they shouldn't overlap if they are both active.  Since DHCP is a pretty simple service that can be run on almost any server, there usually isn't a need for such redundancy.  You can simply turn it on and configure it on a different windows server in a matter of minutes.  If, however, you are in a situation that makes in nescessary to have such redundancy, then of course, you'll have to have multiple DHCP servers on the same subnet.
0
 
lrmooreCommented:
Just a side note. As long as you have a lease period set to a reasonable length of time, say 30 days, the DHCP server can be down for days and nobody would notice. A client does not even re-querry the  DHCP server until 1/2 of the lease time has expired. At that point, they begin a direct conversation - "hey, server, my lease is about up, how about I go ahead and re-new it now?" server: "OK, keep what you got"
no answer from server because it's down: "oh, well, I guess I'll just keep what I got and try again later"...

0
 
texasjpmCommented:
But if you only want it on two servers for backup reasons turn DHCP off on the backup server and only turn it back on if the primary server goes down.
0
 
JammyPakCommented:
lrmoore is right - but there's a gotcha with roaming laptop users...when they leave the office and get a new IP somewhere else (like at home for instance) then they will be looking for a new address when they come back to the office...and if dhcp's down, they'll notice! :)

texasjpm's suggestion can get you in trouble if the two DHCP servers have overlapping scopes - you NEED to make sure that the scopes are separate. Otherwise one server won't know which addresses the other one has given out and you WILL have conflicts. I would setup two servers with non-overlapping scopes and leave them both live all the time.
0
 
PennGwynCommented:
You don't want overlapping scopes EVEN IF YOU LEAVE THE "SECONDARY" TURNED OFF UNTIL THE "PRIMARY" FAILS, because there's no clean way for the backup to know what addresses the primary has already given out, and to whom.  (Some implementations try to use ping to determine if an address is in use, but some firewall products block answers to ping;  some security applications (labrea springs to mind) will answer ARP requests for unpopulated addresses, so you can't rely on that either.)

0
 
friekedCommented:
Here is a nice little pneumonic device for how DHCP works, it's called DORA: Discovery, Offer, Request, Ack
DISCOVERY - Your computer sends out a broadcast that it is looking for a dhcp assigned address.  With a normal DHCP client you can not pick which dhcp server to get an IP address from.  Discovery packets will either be sent until an offer is received or the requests time out (usually because there is no dhcp server available)
OFFER - Any and all DHCP servers that receive the discovery request should send back an offer of an IP address.  The client takes the 1st offer and drops the rest.
REQUEST - The client requests the offered IP address from the server.
ACKNOWLEDGE - The server acknowledges that the IP address offered belongs to the client for the duration of the lease (determined on the server)

What determines which dhcp server sends the fastest offer is usually determined by a combination of physical distance in cable to the server and server speed.  This is why ISPs get mad at you if you run a dhcp server on their network..because it'll mess up a lot of people who get bogus IPs from you.

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 3
  • 2
  • +6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now