OPNsense Forum

English Forums => General Discussion => Topic started by: ianch on March 19, 2024, 05:30:03 PM

Title: DHCP relay on a configured Wireless Access Point
Post by: ianch on March 19, 2024, 05:30:03 PM
My setup

My ISP's router (192.168.0.1) is handing out DHCP and WiFi to most of the house.  So I decided to put together a box for OPNsense to act as a WiFi AP in the area there isn't coverage at the moment.

The box has a single NIC in it which is configured for the LAN and given the static IP of 192.168.0.2

The box also has added a USB Wireless adapter (RT5370) that supports access points. I assigned the interface to WLAN and then proceeded to configure WLAN as a Wireless A/P

So far so good.  I can see my SSID (myWiFi2) being advertised on my android phone.

However when I connect to myWiFi2 it accepts the auth key but doesn't get a IP Address back.

So I assumed to was related to DHCP relay.

In the Services -> ISC DHCPv4 -> Relay. I have that enabled, set to the only available interface (LAN) and set the destination server to the DHCP server on 192.168.0.1

What am I missing?
Title: Re: DHCP relay on a configured Wireless Access Point
Post by: Saarbremer on March 19, 2024, 06:25:20 PM
Hi,

it sounds as if you created a new network segment with your WLAN interface. Relaying DHCP is hence not what will work. You'd create a new IP range for WLAN and route it towards LAN and its gateway - using NAT or a valid route on your ISP's router.

In order to avoid the new network segment you should consider operating both IFs in bridged mode.

Title: Re: DHCP relay on a configured Wireless Access Point
Post by: ianch on March 20, 2024, 11:47:58 AM
I have LAN and WLAN bridged together and that has made no difference.
Title: Re: DHCP relay on a configured Wireless Access Point
Post by: Patrick M. Hausen on March 20, 2024, 12:26:30 PM
Did you move the assignment of "LAN" from the wired interface to the bridge interface? Is the IP address of the OPNsense box assigned to the bridge interface and not any of its members? Did you set the two mandatory tunables as documented?