LAN IP keeps changing?
-
I have a network camera, computers, phone, network printer that runs in my LAN network, and I noticed the IP addresses keeps changing about once a day. I didn't setup them to use static address, but DHCP. Of course, I can make it always get static ip address, but I am more into trying to understand the reason than trying to solve the problem. I know how to solve this myself, I am not posting this to ask about how to solve this, but trying to know how DHCP works in pfsense.
I recall that when I used to have my cisco, linksys, d-link routers, as long as you don't turn off the unit, it will always get the same ip address. But right now pfsense doesn't seem to follow this rule. Is this meant to be like this? Is the DHCP designed this way that when the ip lease is over, it reassign a new ip? -
Take a look at the pfSense DHCP server log: Status -> System Logs, click on DHCP tab to get a better idea what is happening.
Normally a DHCP client will keep the same IP address through renewal of its DHCP lease but if a client reboots or goes to sleep for an extended period I don't think there is any guarantee it will get the same IP address it had previously.
If you are expecting clients to have the same IP address for extended periods you could lengthen the DHCP lease time or direct DHCP to give specific IP addresses to specific MAC addresses.
-
As Wallabybob says clients will usually receive the same IP.
How many DHCP leases does the server have available. It will start re-issuing addresses that have been used previously, but are no longer active, if it runs out of leases that have never been used.Steve
-
I only have about 10 DHCP leases. When I go to Status -> DHCP Lease, I see that my IP camera sometimes the "online" status is OFFLINE, but "lease type" is ACTIVE. But I am pretty sure my camera is online, coz I can use my browser to connect to the camera just fine. I am not sure how pfsense determine if it's offline, and if it only refresh the DHCP lease list every few minutes. Also, if this is the reason that pfsense thinks my ip camera is offline and release the IP lease.
I turned off the logging from writing to disk, because I had memory issue. I just turned it back on, will monitor why my IP changes.