Switch cannot get IP via DHCP

Started by verasense, March 21, 2021, 05:29:31 PM

Previous topic - Next topic
March 21, 2021, 05:29:31 PM Last Edit: March 21, 2021, 06:09:07 PM by verasense
I have a switch A that gets its address via DHCP. The switch is connected to opnsense in this way:

switch A (port 8 ) - VLAN 1 - opnsense (interface 3)
switch A (port 4 ) - VLAN 2 - switch B - opnsense (interface 2)

Both VLANs have DHCP activated and some clients are getting addresses. However, the switch (and also another switch I have) are not getting any address.
- I could see on Wireshark (VLAN 1 computer) the repeated requests from the switch to get an address (not the answers, though, if any exist).
-The firewall has the autogenerated rules to allow DHCP, and I even created a floating rule for that.
- I cannot see any request in the DHCP log

How can I troubleshoot this? Is there any option I might be missing for opnsense not to lease an address?

-----
UPDATE: I captured packets from Interfaces - diagnostics - Packet capture  and I can't see the request from the switch. However, I can see the request from a client. Is it possible that the DHCP request is not sent over the tagged port?  I think this worked for me in the past

Hi, no solution, but i have got identical problem. all active clients get dhcp, new clients didn't. Nothing wrong with opnsense or dhcp. Was problem with switch. poweroff /poweron switch and new clients got ip again.

BTW, was TP-link switch.

The clients get the address OK, but from my observation the switch is not sending the DHCP request to opnsense. It doesn't matter if I restart the switch.