-4

I have now seen an HP ProLiant DL385 G7 (573088-421) and HP ProLiant DL360p Gen8 both being able to remember the DHCP address for its NIC's even though I had powered off the server, and pulled the power cords.

In both cases dhclient -r did do anything, and in the first case, it only got renewed when I pulled the network cable while in operation. In the other case running OmniOS (Solaris 10) I had to ifconfig ixgbe0 dhcp release.

Update

On the DHCP server had I deleted the reservation, so the client would have to ask for a new DHCP address.

Update 2

MAC addresses the DHCP server doesn't know are assigned a 192.168.x.x IP, and it was this (always the same) IP it kept getting despite I had registered the MAC on the DHCP server to get 10.10.111.12.

Question

How does the NIC's remember the DHCP address, and therefore won't renew?

Is there a way to disable this feature/bug?

Jasmine Lognnes
  • 2,520
  • 8
  • 33
  • 51
  • 7
    NICs don't remember IP addresses. What are you talking about? What is the _actual_ problem you are having? – Michael Hampton Sep 13 '14 at 14:15
  • 4
    It's the lease time set on the DHCP server. It remembers that a particular MAC had a particular IP and will continue to assign it until the lease time expires. – dartonw Sep 13 '14 at 14:20
  • @MichaelHampton Believe it or not, but they did. I had deleted the DHCP reservation, so the DHCP server didn't knew the clients MAC addresses anymore. Still it got the same IP. That is the mystery. – Jasmine Lognnes Sep 13 '14 at 16:23
  • `Is there a way to disable this feature/bug?` - It's not a bug. Go read up on how DHCP works. – joeqwerty Sep 13 '14 at 16:23
  • @dartonw That was my first thought also, so I deleted the reservation, but that didn't change anything. – Jasmine Lognnes Sep 13 '14 at 16:24
  • @joeqwerty I have just updated the OP, as people think it is the lease time that gives me the same IP. – Jasmine Lognnes Sep 13 '14 at 16:25
  • Read the dhclient.conf man page. – user9517 Sep 13 '14 at 16:34
  • It's likely that the assigned IP was simply the next address in the reservation pool, regardless of the client lease. As you noted in the answer comment, unplugging the cable renewed the lease because the DHCP server had not yet returned that IP to the pool. Another client powered up on the network while the machine in question was off probably would have received that IP as well. – dartonw Sep 13 '14 at 17:29
  • 2
    I don't think this question deserves so many downvotes; the power-off premise is incorrect but it's an annoying behavior that deserves an explanation. – dartonw Sep 13 '14 at 18:05

2 Answers2

2

The client OS (not the NIC) knows the lease time. If you want a new IP, delete the lease and reservation on the server and force a renewal on the client.

mfinni
  • 36,144
  • 4
  • 53
  • 86
1

The DHCP server keeps track of the MAC address of the NIC, and will continue to assign the same IP address to it as long as it renews in the specified interval. The DHCP server decides who gets what. If you pull the cable, and plug it back in before your IP lease has expired, you will get the same IP. Also, if you pull the cable and your lease DOES expire, you will get the same IP address anyway unless someone/something else has occupied that IP address. DHCP IPs are typically assigned in ascending order, with the lowest available address given out when a request is made.

The NIC itself doesn't concern itself with 'saving' this info, though your OS might(but it still cannot stop the DHCP server from giving it a new IP if it feels so inclined).

This of course doesn't apply if you assign a static IP to your NIC through your OS.

Lee Harrison
  • 486
  • 1
  • 5
  • 19