# Request a specific IP address from DHCP server from Windows?

**URL:** <https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499>\
**Category:** Factual Questions\
**Created:** [June 22, 2011, 11:23pm UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499 "2011-06-22T23:23:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![chorpler](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chorpler/32/2888_2.png) [@chorpler](https://boards.straightdope.com/u/chorpler)\
**Post date:** [June 22, 2011, 11:23pm UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/1 "2011-06-22T23:23:56Z")

</div>

One of my lab’s database servers lost its Internet connection over the weekend. Since our campus IT department’s policies on giving out static IP addresses are designed specifically to thwart me at every turn, this server gets a dynamic address from a not-under-my-control DHCP server, and it was assigned a different address. Not a terrible deal, but annoying. And while I was away for the weekend, another machine snagged our old IP address.

Fortunately, now it’s available again, and I’ve taken hold of it with a spare Ethernet card in one of our spare Linux boxes. Which brings me to the meat of my question…

In Linux, if I’m using **dhclient** to get an (IPv4) IP address, I can put a line in the dhclient.conf’s section for each particular ethernet interface that says:

send dhcp-requested-address xxx.xxx.xxx.xxx;

And most DHCP servers, in my experience, will honor the request and assign you that address if it’s available, and if it isn’t, they’ll just assign you a different one.

Is there a way to do this from a Windows client?

---

<div class="post-metadata">

**Author:** ![yoyodyne](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@yoyodyne](https://boards.straightdope.com/u/yoyodyne)\
**Post date:** [June 22, 2011, 11:47pm UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/2 "2011-06-22T23:47:15Z")

</div>

Windows does it automatically and if the address is still available the server will ACK. So in this case you wouldn’t have gotten it with dhclient either.

IT won’t give you a DHCP reservation?

---

<div class="post-metadata">

**Author:** ![Quartz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/quartz/32/267_2.png) [@Quartz](https://boards.straightdope.com/u/Quartz)\
**Post date:** [June 23, 2011, 8:10am UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/3 "2011-06-23T08:10:05Z")

</div>

Yes, file a ticket with your IT department asking for a DHCP reservation. Be sure to make things easy for them by specifying the MAC address of the NIC.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [June 23, 2011, 8:17am UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/4 "2011-06-23T08:17:20Z")

</div>

If you manually set an IP address, I think Windows will try to get that.

---

<div class="post-metadata">

**Author:** ![chorpler](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chorpler/32/2888_2.png) [@chorpler](https://boards.straightdope.com/u/chorpler)\
**Post date:** [June 23, 2011, 8:57am UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/5 "2011-06-23T08:57:55Z")

</div>

> [@yoyodyne](#):
>
> Windows does it automatically and if the address is still available the server will ACK. So in this case you wouldn’t have gotten it with dhclient either.

Yes, but is there a way to do it manually? The server has since acquired a different address than the old one. It was, obviously, unable to reserve its old address while it was down over the weekend, and someone else set up a new Netware server somewhere in the biology building over the same weekend, and thus snagged that IP address. Fortunately they didn’t need a static IP address since they weren’t going to run a nameserver off the machine, so they had no problem switching addresses, and I was able to re-reserve the old one with one of our spare Linux machines.

> [@](#):
>
> IT won’t give you a DHCP reservation?

I’m telling you, it’s like they specifically designed their policies to screw me over. 😉

Essentially, they require that only university-owned systems be assigned static IP addresses, and our lab director doesn’t want to give up ownership of the servers he brought with him from his old university.

Anyway, so IT compromised and gave us one static IP address, but we have four separate servers and eight separate NICs, and ideally they’d all be static.

So anyway, alas, **Quartz** , your suggestion won’t work. Or at least, it will require a diplomatic and political solution, and I was hoping for a technical solution.

**Reply** , that’s a good idea – I could try something like, say, manually setting the IP address on the LAN2 interface in the Windows Server 2008 machine, then release the DHCP lease on the Linux box and run an **ipconfig /renew LAN2** on the WS2008 box. Maybe if I’m lucky it will request the IP address it’s been set to!

If I’m unlucky, it won’t let me do that if the IP address is set, or it will ignore the manual setting.

Thanks everybody.

---

<div class="post-metadata">

**Author:** ![Quartz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/quartz/32/267_2.png) [@Quartz](https://boards.straightdope.com/u/Quartz)\
**Post date:** [June 23, 2011, 11:02am UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/6 "2011-06-23T11:02:47Z")

</div>

> [@chorpler](#):
>
> Anyway, so IT compromised and gave us one static IP address, but we have four separate servers and eight separate NICs, and ideally they’d all be static.

How about a router, private local addresses, NAT, and port mapping for external access?

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [June 23, 2011, 12:21pm UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/7 "2011-06-23T12:21:52Z")

</div>

> [@chorpler](#):
>
> … **Reply** , that’s a good idea – I could try something like, say, manually setting the IP address on the LAN2 interface in the Windows Server 2008 machine, then release the DHCP lease on the Linux box and run an **ipconfig /renew LAN2** on the WS2008 box. Maybe if I’m lucky it will request the IP address it’s been set to!  
> …

This idea will NOT work, sad to say. I’m not an uber-guru on this, merely a low-ranked guru, but I think you’re SOL, at least with built-in Windows commands up through Win7/Svr08R2.

Clearly the DHCP protocol allows for clients to request a specific lease they don’t already have. If I was stuck in your situation I’d be Googling for some 3rd party app / command line exe which does the equivalent of the Linux dhclient.

---

<div class="post-metadata">

**Author:** ![yoyodyne](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@yoyodyne](https://boards.straightdope.com/u/yoyodyne)\
**Post date:** [June 23, 2011, 12:35pm UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/8 "2011-06-23T12:35:59Z")

</div>

The Windows DHCP client will ask for the last address it had - if it’s available you’ll get it, if it’s taken you won’t. No different than asking for a constant IP with dhclient.

---

<div class="post-metadata">

**Author:** ![Reply](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/reply/32/15952_2.png) [@Reply](https://boards.straightdope.com/u/Reply)\
**Post date:** [June 24, 2011, 3:05am UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/9 "2011-06-24T03:05:42Z")

</div>

> [@LSLGuy](#):
>
> This idea will NOT work, sad to say. I’m not an uber-guru on this, merely a low-ranked guru, but I think you’re SOL, at least with built-in Windows commands up through Win7/Svr08R2.
> 
> Clearly the DHCP protocol allows for clients to request a specific lease they don’t already have. If I was stuck in your situation I’d be Googling for some 3rd party app / command line exe which does the equivalent of the Linux dhclient.

I was wrong about this. I thought this had worked for me in the past, but I just tried it and it indeed does NOT work. Thanks for the correction 🙂

---

<div class="post-metadata">

**Author:** ![Quartz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/quartz/32/267_2.png) [@Quartz](https://boards.straightdope.com/u/Quartz)\
**Post date:** [June 24, 2011, 9:17am UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/10 "2011-06-24T09:17:50Z")

</div>

> [@chorpler](#):
>
> **Reply** , that’s a good idea – I could try something like, say, manually setting the IP address on the LAN2 interface in the Windows Server 2008 machine, then release the DHCP lease on the Linux box and run an **ipconfig /renew LAN2** on the WS2008 box. Maybe if I’m lucky it will request the IP address it’s been set to!

To have a chance of making this work, you need to clone the MAC address.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [June 24, 2011, 12:29pm UTC](https://boards.straightdope.com/t/request-a-specific-ip-address-from-dhcp-server-from-windows/586499/11 "2011-06-24T12:29:05Z")

</div>

> [@yoyodyne](#):
>
> The Windows DHCP client will ask for the last address it had - if it’s available you’ll get it, if it’s taken you won’t. No different than asking for a constant IP with dhclient.

100% True.

But presently he has the “wrong” address issued by DHCP and needs to get back to the “right” one. He can probably persuade the current owner of the “right” address to release it, at least once or twice. But that doesn’t help him be the guy who gets the newly freed “right” address except by luck.
