DHCP & DNS (VLANS)

Soldato
Joined
11 Jun 2003
Posts
7,613
Location
The Shadows (london)
Hi all, just getting to grips with VLANs and was wondering why I can't get an IP address if my DNS settings are a certain config.

I use 2 PiHoles for DNS 192.168.1.5 and 192.168.1.4

I've set up 2 VLANs 10 and 30 with DHCP pools of 192.168.10.x and 192.168.30.x

I can't seem to acquire an IP address if the DNS is set to the piholes

If I set the DNS to 1.1.1.1 they get an IP address. after they get an IP address I can change the DNS back to the piholes and everything works as normal. all DNS is resolved by the piholes for the VLANs.

is this likely a firewall issue or is it some freak occurrence that can't really be explained?
 
That's really strange. DHCP doesn't care about DNS. You could set an invalid DNS server or set no DNS server and DHCP wouldn't care.

Is it really a case that the client doesn't get an IP address or do is get a valid IP address but can't access the internet?
 
While still in IP range reserved for local network addresses, those PiHole DNS IPs are still outside subnet mask.
1.1.1.1 is again honest WAN/public internet IP.
Maybe that difference causes some issue.

But like said DHCP and DNS have nothing to do with each others.
DNS is simply system for translating that URL written into web address of browser into site's IP.
 
If the piholes are DNS server then all I get is APIPA 169 addresses.
if I change DNS to 192.168.x.1 or 1.1.1.1 it will pick up a DHCP address. I can at that point change back to piholes and they work just fine assuming the lease doesn't expire before the device reconnects
its just a pain as now I've learnt how to get the vlans going I need to keep tinkering with the DNS to get clients up and running
 
I've set up 2 VLANs 10 and 30 with DHCP pools of 192.168.10.x and 192.168.30.x

Do the VLANs need tag IDs? Which router do you have? Which DHCP server? Are these wifi VLANs or wired VLANs?

I can't seem to acquire an IP address if the DNS is set to the piholes

That's a DHCP function, not DNS, so totally wierd. Ideally the DNS entry on the client should be empty and the DNS server should be assigned by the DHCP server (option 6, possibly option 15 as well).
 
Do the VLANs need tag IDs? Which router do you have? Which DHCP server? Are these wifi VLANs or wired VLANs?



That's a DHCP function, not DNS, so totally wierd. Ideally the DNS entry on the client should be empty and the DNS server should be assigned by the DHCP server (option 6, possibly option 15 as well).
Wired VLANS
EdgerouterX. switch is VLAN aware. VLAN1,10,30 tagged on vid on the appropriate eth port on ERX and PVID10 and 30 are untagged on the access switch ports
 
one or both of these has sorted the issue
set service dns forwarding options server=/domain.local/192.168.1.5
set service dhcp-server use-dnsmasq enable
 
Back
Top Bottom