LAN interface and DHCP issues, phone it taking the LAN IP.
-
Hi, we changed our DHCP subnet because we ran out of IP's. It's now 10.0.15.0/23
We changed the DHCP range to 10.0.14.2 - 10.0.15.224 and kept the top end for static IP's.
The LAN interface is set to 10.0.15.1 (which is now in the middle of our range.)
I just found a mobile phone that has also grabbed that IP, so this phone and the LAN interface is using IP 10.0.15.1, which is causing issues.
I tried to change the LAN interface to 10.0.14.1 (outside the range), but the whole DHCP stopped working then.
Does anyone have ezpericne with this bigger subnet, and how I can get the LAN interface outside of the range so there isn't IP address issues. -
@canadianllama if you changed the network from 10.0.15.0/24 to 10.0.14.0/23
and pfsense IP was 10.0.15.1 and you changed it to 14.1 - what about all your clients, their old lease would point them to the 15.1 address as their gateway and dns most likely. So yeah things not going to work until they get a new lease pointing them to the new pfsense 10.0.14.1 IP.
When you change the IP of pfsense interface, make sure it is using the correct mask /23.. And you have restarted your dhcp server. But yeah those settings would work find with
pfsense 10.0.14.1/23 address and a dhcp pool of 10.0.14.2-224
-
@johnpoz Thankyou, I thought it should work, but after I changed it all my UNIFI equipment (switches, WAP, cloudkey) go offline and won't grab an IP again. We even rebooted all the network gear, and the router, deleted all DHCP reservations, I wonder if all the UNIFI equipment need to be forgotten and readded into the controller, so maybe I need to go ask on a different forum if it's not pfSense at this point.
Cheers for the help.
-
@canadianllama there was some other thread recently about someone changing the controller (their cloudkey) and unifi switch.. The only thing with changing them would be some sort of disconnect when doing both at the same time maybe.
I showed him doing it on my switch, with no issues - but there is a time when its provisioned, etc. Are all your unifi devices dhcp? Changing dhcp should work, as long as the dhcp is running.. But none of unifi stuff is dhcp - its all static, so not sure when/how they renew the lease - do they check on power cycle? I would assume so but not sure.
Switches management IP sure shouldn't even matter.. Are you doing any sort of routing with unifi? You sure your unifi stuff isn't running dhcp server? which yeah could all kinds of issues if you have 2 dhcp servers handing out different info.
-
@canadianllama You could create two pools, neither of which include your pfSense IP.
https://docs.netgate.com/pfsense/en/latest/services/dhcp/ipv4.html#additional-pools
Side note: .15.0 is also valid now.
-
@johnpoz Because of the /23 subnet, we had to give static IP's to all the unifi equipment in the .15.0 and not the .14.0 range for them to adopt. So we may need to remove nad read those static mappings. I have a tech going onsite tonight so we will try that.
-
@canadianllama said in LAN interface and DHCP issues, phone it taking the LAN IP.:
equipment in the .15.0 and not the .14.0 range for them to adopt.
not true at all.. if you have a /23 then they are on the same L3 network, and unless you really borked it up good would be the same L2 network.. So you could adopt anything in 192.168.14.0/23 which would be the network 192.168.14.1 - 15.254
If you had a mask mismatch while devices were getting new dhcp lease you manually changing their mask to /23 then yeah you could have issues. Ie device X using /24 still and other device having moved to /23 with IP different than the other devices /24 network.
-
@johnpoz yeah we had issues with all the unifi equipment adopting, even new stuff added after the subnet changed to /23. Did this at 2 locations both have pfsense routers. So we just set up static ips on all the equipment through DHCP reservation on the router, no more adoption issues.
I agree it should work without the static ips as it's all on the same network, but something with the /23 subnet they didn't seem to like. -
@SteveITS I didnt know about pools. That's cool. If we can't fix it properly then we may just try that.
-
@canadianllama said in LAN interface and DHCP issues, phone it taking the LAN IP.:
but something with the /23 subnet they didn't seem to like.
But they are on a /23 now - you just reserved a specific IP for them... I have no idea what is actually going on.. But /23 is not the problem - and if you set a reservation for them - they are still on a /23..
How are you doing your inform? Via dhcp option, pointing to some old IP? Is your controller not discoverable at L2?
The mask of the network your on has zero to do with it, be it a /24 a /23 a /22 or a /25 or 16 etc.. You might have some issues during transition period when some are on mask A and others are on mask B, etc. or if you had dns or IP pointing to something and that is now wrong if that something IP changed, etc.. But the mask/size of the numbers of the IPs possible on the network has zero to do with it.
-
@johnpoz We are using the DHCP server on pfsense, we changed the LAN to /23, deleted all DHCP and ARP reservations, and they still wouldn't adopt. So yeah, we just did the static IP's. It's totally possible I did something wrong but can't figure out what it is. Anyways, we are going on-site this evening and will work on it till we get it fixed.
Thank you for all your replies.
-
@canadianllama static IPs are still in the same network, ie a /23 doesn't matter if they got it from dhcp or not.
You have something going on with how the devices find the controller, the inform is what tells devices which to controller to talk to.. This can be handed out via a dhcp option, it can be a dns record. Or the controller can be found via L2 discovery. None of which matters what size network your unifi devices are on.
Maybe you manually set the inform on the AP to your controllers IP, and now that IP changed so yeah you could have a bad day. Maybe you blew away a dhcp option that was set, believe option 43 or 60 can be used.
But typically the controller when on the same network as devices you want to manage, AP or Switches, etc. this is just done via L2 discovery.
There is also DNS - which would normally be used via L3 adoption, ie controller and devices are on different networks.
Like I said, not exactly sure what issue your running into - but it has zero to do with what size network your using /24 or /23, etc. Or be it the IP of the controller or devices are gotten via dhcp or manually set on them.
Out of the box http://unifi:8080/inform is the default inform that devices send to, but for that to work it L2 has to work, ie that name unifi needs to be resolvable to the IP of the controller. If you do not have that enabled on your controller, either enable it or use one of the other methods.
-
@johnpoz Or maybe some device involved still has a /24 mask? We expanded a network once a while back and had a few straggling printers and other things that needed updating. It helped in our specific case that we left all the static stuff on the original /24 and moved DHCP to the added-on bits.
-
@SteveITS exactly - and I agree mismatched masks can cause you all sorts problems. I have mentioned that a few times now ;)
-
@johnpoz Well I just looked and this is NOT check marked, so I'll turn that on and maybe that will fix the issue as well. Funny thing is, it all worked and discovered fine until the /23 change so I assumed that was the issue.
-
@SteveITS Yeah we found some printers didn't work right after the expansion as well. SO maybe they were holding onto the wrong subnet. We even went as far as to put some computers on static IPs to get the printers to work. I assumed if we deleted the DHCP Leases and rebooted the machines, they would be fine. But we had a lot of static IPs so maybe some of those hung onto the old settings. I've expanded 2 networks this year, but never before in my 20+ years of IT have I ever done that. But it's going to happen more and more I think with all the devices we have nowadays.
-
@canadianllama printers are many times set on the device, so yeah everyone one of those would have to be touched. Your need to change the mask is why you shouldn't set stuff static on the device ;) Just set a reservation for something that needs a specific IP. Then edit the reservation.
We ran into a printer issue one time that had nothing to do with the mask on the network - the customer had set printers as static - but never set a gateway. Had been relying on proxy arp that there old 6509 default to having on. When we were changing that to a nexus setup - proxy arp was no longer on by default. As temp fix we turned it on - but told them they needed to set gateways on printers.. And also to change the mask - they had been using a /16 for their printer segment <rolleyes>, They had at most maybe a 100 printers in the building..
-
@johnpoz We do prefer doing static IPs on the router and mostly do it that way. We aren't full-time tech,s so sometimes the client does whatever they want as well.
-
@johnpoz We spent 6 hours trying to get this to work 2 nights ago. Anytime we changed the LAN Interface IP to 10.0.14.1, all our UNIFI equipment went to 192.168.1.20 IP range, and stopped working. rebooting, resetting and re-adding them to the cloud key, clearing DHCP reservations. I tried pretty much everything I could think of. We even tried giving the LAN Interface 10.0.15.254 IP to keep it in the old range, but that didn't work either.
It's possible something in the cloud key isn't getting updated... I'm not sure how that works with the network gear getting the IP from the router, but then talking to the controller.
Anyways, we are going to set up a test environment and work more on it.
Thanks for all your guys insights.
-
@canadianllama Do you mean DHCP reservations? Yeah we started doing that at some point, after a Windows 10 feature update helpfully removed static IPs by creating a new NIC. That was annoying.