How does DHCP works after replacment of NIC

0 pts.
Tags:
DHCP
A server is getting IP Address from the DHCP server, and is given 30d lease time. Assuming that the NIC is changed in the middle of the lease period (ie. the 2nd week), I would like to understand how DHCP works .. a) after the change of the NIC, will the server receives the same IP address that was leased earlier (i.e. the lease has not expired). b) Using the above scenario, will the client sends out DHCPDISCOVER packet or a DHCPREQUEST packet? c) What does the DHCP packets contain ... the NIC MAC address? or the Computer name?
ASKED: February 26, 2006  11:10 PM
UPDATED: February 28, 2006  6:58 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Your server will get a different IP address. DHCP servers use the mac address of a machine to track assigned Ip addresses.

I don’t recall if there a DHCP DISCOVER or a REQUEST is sent first.

BTW: Just an obversation: Server’s shouls use static IPs, or at least have a DHCP reservation setup. (Of course, the reservation is keyed off the MAC address, so you’ll have to change the reservation when changing the NIC.)

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Stevesz
    I don't really know, but, since the MAC address of the NIC is registered in the DHCP tables I've seen, I suspect it would pick up a new address along with the new NIC. The IP address that was given was bound by the software to the current NIC and would disappear with a new NIC, I think. Ifg it does pick up the new IP , as I suspect, you may be able to release the old address dependent on the software making up the DHCP server. Steve//
    2,015 pointsBadges:
    report
  • Gentooq
    The answer to Part a) of your question is that once a computer is assigned a new MAC address, it will receive a new DHCP lease, with a new DHCP assigned address. The answer to Part b) is that the client computer, if set to DHCP as its method of obtaining an IP address, will ask for a new one when you start it up. IF the MAC address is still the same, the DHCP server will assign the same address. IF the MAC address is different (new NIC), the DHCP server will assign an unleased address. I've never bothered to disect DHCP packets, ergo, Part c) is an unknown to me. My educated guess is that it will contain the MAC address because, without the MAC address there is nothing to tie the UDP packets with the address info to on the return trip. The question I would have for you is *why* you have a "server" on an IP network receiving a DHCP-assigned IP address. Unless you have a program that can handle dynamic DNS changes on your network, the "server" could be notoriously difficult to find *when* the IP address changes. This would presumably be why you are asking this question in the first place. Hope this helps,
    0 pointsBadges:
    report
  • OngBak
    I have to completely agree with the previous two replies. Yes, DHCP does tie to the MAC address...it can't really tie to an IP address since the machine doesn't have one yet, hence it asking DHCP for one. I think you should forget about why DHCP works the way it does and not use DHCP for any servers. Servers should ALWAYS have a static IP address. I started my current job 2 months ago and about half of the 50 servers were set to use DHCP. It was a nightmare, and I was accused of not knowing what I was doing because I wanted to give them statics and the last IT guy was apparently "a guru"...yeah...some guru.
    0 pointsBadges:
    report
  • Sonyfreek
    From memory of my last sniff of DHCP: DHCP Packets are sent out to the from the client to the broadcast destinatio address of 255.255.255.255, source IP 0.0.0.0 and include the MAC address of the requesting computer. I believe the first packet is a DHCPDISCOVER. Even if the client responded with a DHCPREQUEST for the previous IP, the DHCP server will see that it's already been used by another MAC address, so it will respond with a different IP Address (ie: the lease on the other IP is still valid). To answer the last question, just think about this: In order for a DHCP broadcast to get across a router, you need an IP helper address. The router rewrites the broadcast to the subnet with the DHCP and spoofs the clients actions throughout the DHCP process. Routers do not know or care about server names, so you can be certain that server names/host names have nothing to do with the proper operation of DHCP. Hope this clarifies it. You can get more about the exact protocol dump from MS: http://support.microsoft.com/?kbid=169289 SF
    0 pointsBadges:
    report
  • Jcan123
    The correct order for NEW DHCP Client (ex new NIC) is Client sends DHCPDISCOVER DHCP send DHCPOFFER Clent sends DHCPREQUEST DHCP send DHCPACK Another issue is Name resolution (DNS, WINS, Client resolver cache etc.), and that's why you should use static IP for server to avoid inconsistencies in name resolution and users reporting mysterious errors because of this. Also remember when replacing NIC's on Win2k and Win2k3 servers that they remember the IP-address even though you remove the NIC physically. So remove the NIC from Device manager before physically remove the NIC OR change the IP to DHCP before removing OR edit registry afterwards. Pick your choice.
    0 pointsBadges:
    report
  • petkoa
    Hi, I suppose that having 10-15 servers with static addresses is OK, but if you have more, they could become hardly managable; so there are reasons for assigning them IPs through DHCP. Fixing their IPs to MACs on the DHCP server(s) is, however, obligatory - I think everybody concur on this. So, there should be two sollutions - reconfigure host definition for the server with new NIC (the proper sollution), or configure old NIC's MAC on the new NIC (i should treat this as a temporary workaround if for some reasons you can't put your hands on the DHCP server immedeatly). Almost any modern NIC's driver have an option for MAC assignment, but I'll emphasize again that this should be only a temporary workaround. BR and good luck, Petko
    3,120 pointsBadges:
    report
  • petkoa
    Hi, I suppose that having 10-15 servers with static addresses is OK, but if you have more, they could become hardly managable; so there are reasons for assigning them IPs through DHCP. Fixing their IPs to MACs on the DHCP server(s) is, however, obligatory - I think everybody concur on this. So, there should be two sollutions - reconfigure host definition for the server with new NIC (the proper sollution), or configure old NIC's MAC on the new NIC (i should treat this as a temporary workaround if for some reasons you can't put your hands on the DHCP server immedeatly). Almost any modern NIC's driver have an option for MAC assignment, but I'll emphasize again that this should be only a temporary workaround. BR and good luck, Petko
    3,120 pointsBadges:
    report
  • 2572971
    if you having a dhcp server.then in client machines are giving obtain automaticaly ip address these client machine getting ip address from dhcp server.the dhcp server is checking the mac address of the machine.if you changing the nic also no problem.if you given like this each time your client machines are booting time ip address will change.if you want permanent ip address for these clients.for that you denote ip address and mac address of the client machine in dhcp server .if you do like that .the particular machine will get only that ip address.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following