Do Not Assign Gateway for Particular Static DHCP Mapping

Started by NateroniPizza, February 05, 2023, 06:41:26 AM

Previous topic - Next topic
February 05, 2023, 06:41:26 AM Last Edit: February 05, 2023, 06:43:44 AM by NateroniPizza
Hello, all,

How does one get the "Gateway" field of a Static DHCP Mapping to not assign a gateway? The description says it's as simple as entering "none" into the field, but it looks to be ignoring this entry.

I was under some version of OPNSense 22 before, and just upgraded to 23.1, hoping it would fix this. Unfortunately, no joy.

Am I misunderstanding the use of this field? Should I not be able to enter "none," pull a DHCP address, and have no "gateway" address present for that NIC? For reference, the client is a Windows 11 PC.

Thank you



There are two gateway settings that you can assign, the one on the client's static mapping tab and the one on the default interface tab. Have you tried to set "none" on both?

you want your gateway to be empty?
and just blank?

when you enter "none" opnsense still assigns a gateway to your client machine?

Hmm... Didn't have notifications turned on for the thread.

Quote from: zan on February 11, 2023, 12:49:32 PM
There are two gateway settings that you can assign, the one on the client's static mapping tab and the one on the default interface tab. Have you tried to set "none" on both?
Just tried setting on both - that works. Looks like it's just broken on a per-device basis (which should override the value of any more broad a context). I need it to happen for only one device.

Quote from: tong2x on February 12, 2023, 04:12:33 AM
you want your gateway to be empty?
and just blank?

when you enter "none" opnsense still assigns a gateway to your client machine?
Correct on all counts.



Looks like this is just broken. Submitted an issue on Github: https://github.com/opnsense/core/issues/6343

As stated in the ticket the "none" logic works the same as leaving it empty, but DHCPd will auto-fill the pool gateway, which is why "none" exists there. It makes no sense as static mapping option.


Cheers,
Franco