Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
DHCPv4 scope without gateway or DNS
« previous
next »
Print
Pages: [
1
]
Author
Topic: DHCPv4 scope without gateway or DNS (Read 1144 times)
Hypocrisy7186
Newbie
Posts: 11
Karma: 0
DHCPv4 scope without gateway or DNS
«
on:
May 07, 2023, 12:39:06 pm »
Hi I'm attempting to set up a DHCP scope for a network where I only want to allocate IP addresses. I can see I can set the gateway to "none" but I can't find away not to allocate DNS servers or DNS search suffix. Is this possible?
Logged
sphbecker
Newbie
Posts: 14
Karma: 2
Re: DHCPv4 scope without gateway or DNS
«
Reply #1 on:
May 08, 2023, 11:44:36 pm »
I don't see a way to do that with the included DHCP server. Just set DNS to 192.0.2.1 (RFC 1166 unusable address).
Considering your hosts will have no gateway, they will instantly see no possible route to that address, which should cause connection attempts to instantly fail without a single packet ever leaving the NIC.
Logged
Hypocrisy7186
Newbie
Posts: 11
Karma: 0
Re: DHCPv4 scope without gateway or DNS
«
Reply #2 on:
May 11, 2023, 09:06:20 am »
Thanks I'll give that a try
Logged
Hypocrisy7186
Newbie
Posts: 11
Karma: 0
Re: DHCPv4 scope without gateway or DNS
«
Reply #3 on:
May 18, 2023, 08:50:16 am »
Well it turned out that 192.0.2.1 did cause slow DNS for me as I hadn't considered instances that had network connections in to this network and then another network that had a default gateway. This then cause the 192.0.2.1 DNS server to be used from the DHCP network but then attempt to route out of network that had a default gateway. This then led to DNS resolution delays while this timed out.
I tried changing the DNS server to 127.0.0.255, the thinking being that my local resolver listens on 127.0.0.53 so it would fail quicker but it actually cause the DNS servers not to be applied. I'm not sure if its the DHCP server not publishing or my systems ignoring the loopback DNS config but either way its now working as I wanted.
So to summarise. If you want a DHCPv4 scope that only gives out IP addresses and not a gateway or DNS server(s) then setting the gateway to "none" and DNS to "127.0.0.255" worked for me.
«
Last Edit: May 18, 2023, 08:52:51 am by Hypocrisy7186
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
DHCPv4 scope without gateway or DNS