DHCP client maintains IP reservation from previous router???
-
My previous network setup used a TP-link router and i used its DHCP IP reservation function to assign a specific IP to a device that doesn’t have any adjustable network settings.
Since then, I replaced that router with a Netgate SG-1100. I haven’t setup any IP reservations on it yet but my old device keeps using the IP reserved by the old router.
The device is not shown on the pfsense DHCP lease list but it is in the ARP list. Therefore, the device is reachable from the network and is working fine without a problem.
Does anybody knows how can tell my pfsense appliance to retain control over the IP reservation that the previous router did?
I honestly ran out of ideas of things to try.
-
@lrossi If the router change was recent, the device has probably not yet requested a new lease. You can set up a static lease in pfSense if you know its MAC address. Note in pfSense it has to be outside the DHCP address pool, unlike, say, Windows DHCP. Booting the device should make it request a lease.
-
@lrossi Have you bounced the device to force it to acquire a new IP address? If you did, did you check the DHCP logs to see what interaction occurred? Have you setup a static mapping for its MAC address pointing to the IP address you want it to have?
-
Would be helpful in understanding if you gave some details. What was the IP range you were using before, what is the IP range your using now.
What is the IP of this device 192.168.1.42 ?? etc..
-
@SteveITS, I thought about that but I changed the router months ago. I’m just dealing with this now because now is when I finally found some time to fix it. I even had to replace my netgate device because of a warranty issue, so this would be the 2nd time the original router gets changed.
@KOM , you will have to excuse my ignorance but…. “bounced”? I might be dealing with the language barrier here but I have no clue what that means.
I have not set static mappings for this particular device either. I was going to do it but then I realized that it already had the IP that I wanted to assign to it (which was set by the previous router).
I figured that the IP was going to expire eventually and that the device was going to request a new IP to the DHCP server in PFsense. To my surprise, the device keeps getting the same IP.
@johnpoz that is a fair point. My router is 10.0.0.1, my DHCP issues IPs in the range 10.0.0.100 to 10.0.0.199
The device in question keeps getting the ip 10.0.0.10 and is an HdHomerun which is a networked tv turner made by SiliconDust.
Honestly, everything is working fine as the device has the IP that I want it to have. I just want to understand how in the world the IP is getting assigned to that device? Who is controlling that and how can I change that IP in the future?
An interesting thing i found is that the device doesn't always appears in the arp table. I just checked and the ip 10.0.0.10 is not there and neither is the device's MAC address. however, pfsense can ping 10.0.0.10 without a problem.
-
@lrossi said in DHCP client maintains IP reservation from previous router???:
“bounced”
Slang for "reboot."
Are you certain the device is set for DHCP? It's not normal to retain an IP after lease expiration.
If the device doesn't send a packet through pfSense it will eventually drop out of its ARP table.
-
@steveits I wish that was the case. It is sure acting like it has a static IP but this device doesn't have ny network settings at all. It comes as a DHCP device from factory and, to my knowledge, there is no way of changing it to a static IP.
-
@lrossi Is it possible that you have another DHCP server on your network that is giving it this address? The device may be set to retain its preferred address (the last one it successfully received) if it can't renew.
-
I do recall an issue with nest thermostat that once it got an IP from dhcp - it would never renew it.. The the only to have it get a different IP was to reset its network settings.
Sniff on that network, or just look in the dhcp log - if you do see a discover or renew from the device then it network asked for a different IP.
-
@KOM, I think you may have found one possible explanation for this behavior. The old TP-Link router is still in the network as I’m using it as my wireless access point. But i did disable its DHCP server and deleted its entire IP reservation table so it should only be a dumb WIFI AP at this time.
Is there any way to find out if that router is the one assigning the IP address to the tv turner?
@johnpoz, i think this particular device is the same way as the Nest then. I just looked at my DHCP logs and i couldn’t find any DHCP request for 10.0.0.10 or from the mac address of the TVturner. However, the tv turner itself has it’s own system log and in there i can see that it’s IP expired on april 5th and then a new IP was obtained. After that, there is no mention of IP renovation.
I believe april 5th was when i introduced the pfsense appliance to the network, so that is when i shut everything down.
Interestingly enough, the tv turner started with the IP 10.0.0.129 (consistent with the IP range of the DHCP server in pfsense), but the log file indicates that such ip was provided on 1970?????
Since this tv turner doesn’t have any network settings, do you think if I reset it will request a new IP from the DHCP server in pfsense?
-
@lrossi You could temporarily disable DHCP on pfSense and then bounce the tuner again and see what it does from the logs. Jan-1-1970 is the start of Unix epoch time. The device starts up with that time and then updates itself likely via NTP once it gets on the network. You should also try running a packet capture on LAN (or whatever the tuner is connected to.) Turn off the tuner, start the capture with the host address set to the MAC of the tuner, then turn on the tuner. Wait for a few seconds and then stop the capture and look for DHCP traffic. If the tuner isn't talking to pfSense and getting an address, there's one explanation for your problem. Perhaps it's asking for an address but there is a problem in the exchange and so the tuner keeps relying on its preferred address.
-
OK, so i dsabled the DHCP server on the LAN interface, turned off the TV turner, turned on the pakcet capture with the interface Set to LAN and the MAC address of the tv turner and then turned on the tv turner. After about 30 seconds this is the only output i got
05:14:49.710584 IP 0.0.0.0.68 > 255.255.255.255.67: UDP, length 300
As you can see, not only the activity was minor but it happened at 05:14 am. The DHCP logs shows nothing after 05:06 am. This tells me that this tv turner is not requesting an IP address (just like the NEST that @KOM mentioned).
I also went to the arp table and, sure enough, there was the tv turner with the ip 10.0.0.10 saying it will expire in 371 seconds.
But, the device was not reachable when i tried to ping 10.0.0.10.
Now, at this point i have not enabled the DHCP server yet, so that might have explained why it wasn't reachable.
Anyway, since the IP was supposed to expire in 371 seconds, i just waited 10 minutes to see what was going to happen. I started the package capture again, restarted the DHCP server and the results are as follows:
The package capture got nothing.
The DHCP logs showed that the tv turner requested a new IP and obtained the address 10.0.0.100 which is in the range of the DHCP server.
Now the tv turner is obtaining its IP address from the PFSense's DHCP server as expected. I guess the only thing that i needed to do was to "bounce" the tv turner and disable/enable the DHCP server to fix this situation.
Thanks to all for the pointers on how to fix this.