DHCP not giving leases

Started by fczaja, July 15, 2020, 12:39:02 AM

Previous topic - Next topic
Hi Folks,

I've just installed my Opnsense Server and made all config adjustments to my network.
However, the DHCP is not giving leases to the endpoints over the network.
I revised many times all the configs and did not found what could be wrong.
The funny thing is if I configure the wifi router as DHCP, all endpoints can connect to the network, but when I configure the wifi router as bridge, I can't connect to the network, because the endpoints don't receive IP from Opnsense.
I'm using 20.1 version i386.
Does anyone have an idea of what could be wrong?

Cheers,
Fred

Did you only try with wireless clients?

Try plugging a PC directly into a LAN port on the OPNsense box and see if that gets DHCP.

Also, to eliminate your wireless routers firewall completely, just plug the cable from OPNsense into a LAN port on the wireless router, not the WAN port.

Hi Bonkerton,

I have a laptop connected with cable and static IP that works fine.
The problem is with wifi.

When I reload all services on OpnSense, I can get IP on some resources like my laptop and my Android but other ones I didn't, like my Android tablet.

However, suddenly my laptop lost connection to OpnSense and I'm not able to access GUI manager anymore, then I have to reload all services again if I want to connect my laptop again.

I attached the OpnSense General Log that I got just after lost connection and reload all services again.
I'm not sure if it will help.

Thanks


July 21, 2020, 06:04:03 PM #3 Last Edit: July 21, 2020, 06:07:41 PM by hushcoden
Quote from: fczaja on July 15, 2020, 12:39:02 AM
Hi Folks,

I've just installed my Opnsense Server and made all config adjustments to my network.
However, the DHCP is not giving leases to the endpoints over the network.
I revised many times all the configs and did not found what could be wrong.
The funny thing is if I configure the wifi router as DHCP, all endpoints can connect to the network, but when I configure the wifi router as bridge, I can't connect to the network, because the endpoints don't receive IP from Opnsense.
I'm using 20.1 version i386.
Does anyone have an idea of what could be wrong?

Cheers,
Fred
My OPNsense box is connected to a Netgear R7800 configured in AP mode and I have no such issues...

What is your router (WAP) ? Try to configure it as Access Point rather than put it in Bridge mode...

Hi hushcoden,

I did it but no success...
When disable DHCP server of AP, the OpnSense does not give lease and nothing connect on wifi.

Attached the last log.
Hope it give some tip.

Thanks

July 21, 2020, 09:26:16 PM #5 Last Edit: July 21, 2020, 09:28:22 PM by hushcoden
Quote from: fczaja on July 21, 2020, 08:13:54 PM
Hi hushcoden,

I did it but no success...
When disable DHCP server of AP, the OpnSense does not give lease and nothing connect on wifi.

Attached the last log.
Hope it give some tip.

Thanks

Can you attach a screenshot of Services -> DHCPv4 -> [LAN] or whatever the name of the interface where the WAP is connected to is ?

I've attached mine, if it can help...

hushcoden,

Here the screenshot..
I've removed the gateway and DNS from the configuration, and still no success.

Thanks.

Forgot the attachment... kkkk

Quote from: fczaja on July 21, 2020, 08:13:54 PM
Hi hushcoden,

I did it but no success...
When disable DHCP server of AP, the OpnSense does not give lease and nothing connect on wifi.

Attached the last log.
Hope it give some tip.

Thanks
I don't know which router/AP you're using, but in my case (NG R7800) when put it in AP mode the DHCP is automatically disabled...

I'm using a TP-Link WR840N.
When I select the operation setting as AP, it remain with DHCP enable. I have to disable it.

I still do not understand what could be wrong. It looks like that when I disable the DHCP on AP, the leases requests do not reach Opnsense and I don't realize why.
I tried to let AP IP on static ARP but it didn't work too.

Another strange thing is if I let AP with DHCP enabled, I have to reload OpnSense all Services to be able to connect GUI and have internet access. But this connection endures for a short time and I have to reload all services again to get connection again.
The same happens if I change wifi network and back to OpnSense wifi network.

My OpnSense is driving me nuts. kkkkk

Adding more info...

Using AP with DHCP enabled: when I lose connection, if I ping AP from OpnSense, I get reponses, but If I ping OpnSense from AP or any ohter computer connected to AP, I've got no reponses.
I think that this behavior discard problems with interface.

That's strange behaviour... Anyway, one thing for sure is you have to disable the TP-Link DHCP!

Your TP-Link is acting as an access point and your OPNsense router will give out the IP addresses to the wireless devices...

How did you assign the IP address to the TP-Link? In my case it's a static IP assigned within my OPNsense router, but I believe it should work also if you assign the IP within the TP-Link itself, as long as the IP address is outside your OPNsense's DHCP range, in your case anything outside the range 10.1.1.100 - 10.1.1.199, i.e. 10.1.1.50

Delete DNS servers/gateway and try again...

My TP-Link IP is static too, in the same subnet of OpnSense.
I've delete DNS server/Gateway and tried again... Unfortunatelly no lucky.

Tried to connect through cable and also does not got IP.

I'm suspecting that my TP-Link is the problem and, who knows why, drop the connection to OpnSense from time to time, because I didn't find anything, no blocking, no DHCP problems, absolutely nothing in the logs.

I'll try to connect TP-Link AP to ADSL modem and check whow DHCP will behave.

TPLink AP, DHCP disabled, connected to ADSL Router...

Works fine. No problems with leases.

Next try is take a look at the network interfaces.
Try to check if it is working fine or are going down from time to time.

The interfaces are working fine.
No problems in terms of hardware.

The suspicious back to OpnSense config and why it is not giving leases.

If somebody has a tip, it will be very well received.

Thanks.