Dear opnsensers
My setup is as follows:
- OPNsense firewall
- Unifi ultra switch
- Unifi U6+ access point
My home devices are living on the default vlan1 (192.168.1.x). Whenever I go to services -> ISC DHCPv4 -> LAN and assign the MAC address of my laptop (HP, running Windows 11) a static IP address outside of the dynamic range, I am unable to connect to wifi. I am getting an IP address on a completely different network (169.x.x.x) and the wifi status displays "secured, no internet". I can connect via cable again and turn off the static mapping, after which I get a correct IP address and can access the internet. I also did the same for my smartphone (apple iPhone), and that one works fine. Has anyone encountered this before and/or know how to solve? If you need more information, please let me know.
Kind regards
The IP you get on that device is called APIPA 169.254.0.0 to 169.254.255.255.
Its a range from which the Windows will assign itself an IP if it can not get any IP from the DHCP server.
Are you sure you did the reservation properly?
That reserved IP is it in same subnet as is the GW?
Regards,
S.
I will double check and try again once I get home. However, I've tried two times previously and am pretty sure the IP address is within the same subnet: 192.168.1.20. Smartphone is on 192.168.1.22 and works fine. The dynamic range is set from 192.168.1.50 - 192.168.1.250.
Thank you for your reply.
The IP I'm defining is a valid one. Still not working.
You need Wi-Fi connectivity to hit the DHCP server...
A 169.xxx address is assigned when none get attributed statically or via DHCP.
Do you see DHCP entries in the firewall logs (filter on src_port = 67 or 68)?
You don't need to mess with the reservation based on the MAC of your wireless adapter when you're reconnecting wired (the wired NIC has a different one).
Which begs the question whether the Wi-Fi reservation is for the IP address that you have for the wired NIC.
Because I could see DHCP fail (or not honor the reservation) if it has an active lease for the IP...
I can't check with OPNsense's DHCP but my DHCP server ignores the reservation in case of active lease.