dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
5
share rss forum feed


exocet_cm
Free at last, free at last
Premium
join:2003-03-23
New Orleans, LA
kudos:3
reply to Kilroy

Re: DHCP Question

Really short lease time as others have stated.

You could get insane with it and run two different authoritative DHCP servers on the network each with different DHCP scopes and script one to run for a 24 hour period, (if Windows) "net stop" the DHCP service on the first server and "net start" the DHCP service on the second server at midnight or something.

Not only is the client going to get a new address, it will get one from a second DHCP server with a completely different scope.

Again, insane, but theoretically possible.
--
"I have often regretted my speech, never my silence." - Xenocrates
My wife's Etsy shop: »www.laurenCball.com ; After-hours tech: »www.JLTCtech.com ; My blog: »www.johndball.com


maartena
Elmo
Premium
join:2002-05-10
Orange, CA
kudos:3
said by exocet_cm:

Really short lease time as others have stated.

You could get insane with it and run two different authoritative DHCP servers on the network each with different DHCP scopes and script one to run for a 24 hour period, (if Windows) "net stop" the DHCP service on the first server and "net start" the DHCP service on the second server at midnight or something.

Not only is the client going to get a new address, it will get one from a second DHCP server with a completely different scope.

Again, insane, but theoretically possible.

Windows Active Directory has a system to really prevent dual DHCP servers, because it may cause problems. So you will have to authorize a DHCP server in active directory, and make it the primary. You can have multiple DHCP servers authorized for different network segments, but not on the same segment, the second DHCP server may exist (e.g on a secondary domain controller as a backup server) but will only become operational when the first one goes down, and typically carries an active copy of leases.

What the topic starter wants to do might be a bit difficult to do. Not completely impossible, but it will likely give a lot more headaches then solutions if you do this from the server side. Now, this said, there may be a way to do it from the client side. DHCP works via MAC address, so if you change the MAC address on the client on each boot up, you will get a different IP address. The problem is, that DHCP activates before any scripts can be ran so it will get last nights IP address first, then a script is ran that changes the Mac, followed by a disable and enable of the network connection... And that might cause all sorts of problems with mapped network resources, etc.

Maybe there is a completely reasonable alternative that has nothing to do with DHCP if you could explain some of the why you want to do this.
--
"I reject your reality and substitute my own!"


exocet_cm
Free at last, free at last
Premium
join:2003-03-23
New Orleans, LA
kudos:3
said by maartena:

said by exocet_cm:

Really short lease time as others have stated.

You could get insane with it and run two different authoritative DHCP servers on the network each with different DHCP scopes and script one to run for a 24 hour period, (if Windows) "net stop" the DHCP service on the first server and "net start" the DHCP service on the second server at midnight or something.

Not only is the client going to get a new address, it will get one from a second DHCP server with a completely different scope.

Again, insane, but theoretically possible.

Windows Active Directory has a system to really prevent dual DHCP servers, because it may cause problems. So you will have to authorize a DHCP server in active directory, and make it the primary. You can have multiple DHCP servers authorized for different network segments, but not on the same segment, the second DHCP server may exist (e.g on a secondary domain controller as a backup server) but will only become operational when the first one goes down, and typically carries an active copy of leases.

Correct. This is one way to have DHCP "redundancy" within the same scope/subnet with something like an 80/20 split between two authorized DHCP servers. The second DHCP server would respond to clients after 1000 ms as opposed to the first DHCP server responding to clients after 0 or 1 ms.

But what I was suggesting to the OP was something crazy based on the request that was posted. Not something I would do in production but it might be another brick in the layer to solve his problem.
--
"I have often regretted my speech, never my silence." - Xenocrates
My wife's Etsy shop: »www.laurenCball.com ; After-hours tech: »www.JLTCtech.com ; My blog: »www.johndball.com


Kilroy
Premium,MVM
join:2002-11-21
Saint Paul, MN
reply to maartena
said by maartena:

What the topic starter wants to do might be a bit difficult to do.

It isn't what I want to do, it is what I am dealing with. I think I'll check the DCHP lease time on a machine on Monday. What happens is I may reboot a machine five times while working on an issue and I'll see anywhere from three to five different IP addresses on boot. This makes remote support difficult to say the least, especially if you have to log into the machine with an administrative account, rebuilding a profile for example.

I know why you would set short DHCP times, many mobile machines connecting to the same network. I'm just trying to figure out how this might be configured that the result is a different IP on reboot as I don't have access to the DHCP server. If I had access to the DHCP server this wouldn't be as much of an issue since it would allow me to determine a machine's IP address even if DNS was out of date and the IP address changed on reboot since I could look up the current IP addresses.
--
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something." - Robert A. Heinlein

JoelC707
Premium
join:2002-07-09
Lanett, AL
kudos:5
I was afraid you were going to say this was happening (as opposed to an academic "how would I do this" question) lol.

Since you don't have access to the DHCP server, I suspect there isn't much you yourself can do to solve it (except pass along the info unless it were somehow designed like this). So are you seeing a new IP every single reboot or is it just some reboots?

5 reboots and 3-5 different IPs seem to indicate it's not every reboot but those other times you don't get a new IP, do you have the previous IP or is it one of the ones you have had already? That sounds confusing to me so let me expand on it:
Boot 1: 192.168.101.10
Boot 2: 192.168.101.12
Boot 3: 192.168.101.10
Boot 4: 192.168.101.12
Boot 5: 192.168.101.13

In that example that has given you a "new IP" on every boot but you've really only gone through 3 different IPs. Is this what you are seeing or is it a completely new IP each and every time?

If you are seeing my example above, it could just be the 80/20 split on DHCP scopes like exocet_cm See Profile mentioned. Typically that 20% server should renew the original lease instead of issue a new one but there could be some funky config going on that's stopping it.


Kilroy
Premium,MVM
join:2002-11-21
Saint Paul, MN
No, the same address doesn't repeat, unless the IP stays the same.

Boot 1: 192.168.100.50
Boot 2: 192.168.100.79
Boot 3: 192.168.100.68
Boot 4: 192.168.100.68
Boot 5: 192.168.100.159

Like I said, I'll have to check the lease information on Monday. Don't know why I didn't think of that previously. Currently I have a few machines that need their profiles rebuilt and I would rather do the work remotely than have the users come into my office.
--
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something." - Robert A. Heinlein


DarkLogix
Texan and Proud
Premium
join:2008-10-23
Baytown, TX
kudos:3
reply to Kilroy
said by Kilroy:

said by maartena:

What the topic starter wants to do might be a bit difficult to do.

It isn't what I want to do, it is what I am dealing with. I think I'll check the DCHP lease time on a machine on Monday. What happens is I may reboot a machine five times while working on an issue and I'll see anywhere from three to five different IP addresses on boot. This makes remote support difficult to say the least, especially if you have to log into the machine with an administrative account, rebuilding a profile for example.

I know why you would set short DHCP times, many mobile machines connecting to the same network. I'm just trying to figure out how this might be configured that the result is a different IP on reboot as I don't have access to the DHCP server. If I had access to the DHCP server this wouldn't be as much of an issue since it would allow me to determine a machine's IP address even if DNS was out of date and the IP address changed on reboot since I could look up the current IP addresses.

Well in the case of it happening vs trying to do it then sounds like a poorly programed DHCP server (like some consumer routers) that don't retain the info the right way and then get confused

Back when I used a consumer router I saw it issue a new DHCP lease for every request even if there was already a lease for that mac (IE just lazy programing)
--
semper idem
1KTzRMxN1a2ATrtAAvbmEnMBoY3E2kHtyv