WLAN on different subnet to LAN: How to get name resolution from LAN DNS servers?

Soldato
Joined
19 Oct 2002
Posts
2,714
Location
Auckland, New Zealand
Hi

I'm new to this networking malarky with subnets and vlans etc. I've just replaced all my network gear with Ubiquiti Unifi (USG, AP-AC-LR & 24 switch) and have utilised the second LAN port on the USG for the AP.

As the USG Lan 2 port is a routable port and not switchable, i needed to set up a new subnet to get it to work... This works fine and devices connected can see the internet as well as ping devices on the LAN, but what I can't get working is name resolution.

Pinging 192.168.1.3 returns fine, but pinging dc1 errors out; for reference DC1 is a AD/DNS/DHCP server on 192.168.1.3.

The WLAN exists on 192.168.2.0/24 with the main lan on 192.168.1.0/24.

Is it possible to 'bridge' the DNS/DHCP server across the subnets and then avoid the USG dishing out DHCP on WLAN subnet?

Thanks

Chris
 
So for the options on the USG allow me to setup a DHCP server, relay or none... I've tried the relay options but the devices lose their IPs which suggests that the DNS / DHCP servers on the LAN subnet haven't been routed, or cannot route. The routing options of the USG have entries for the LAN>WLAN and WLAN > LAN with the interface set rather than next hop.

I'm not sure how to change which DNS server it uses.
 
Forget about routing issues.. Don't change those.. Your working ping rules that out.. what dns serve does dc1 use, what dns server does the device you are pinging from use? If they are not the same that's your issue..

There are several ways to fix it.. All easy... But hard to explain!

First off Are they both using different dns?
 
DC1 is the DNS server (along with DC2) for LAN (192.168.1.0/24). WLAN subnet doesn't have a dedicated DNS server attached and is getting its IP address from the USG DHCP server, which is probably the google dns, and this clearly won't resolve private names I guess what I need the Unifi USG to do is allow me to specify a DNS server in its DHCP or even better allow me to relay the DHCP from the LAN subnet to the WLAN subnet.

As you can tell I am really new to networking at this sort of simple complexity :)

edit: ipconfig /all on the laptop shows DNS servers to be 192.168.2.1 which is the subnet gateway for the USG
 
Right so I'm an idiot.

Clearly the subnet routing was working fine as I was able to ping ok, what I had missed was the ability to set a custom DNS server. Shifting those over to my DNS servers now does name resolution... Stupid!

Question though, is it possible to create a new scope in Windows DHCP for the new subnet; so I'll have a DHCP scope for LAN and a DHCP scope for WLAN? If so, with the routing setup that means that I can assign DHCP settings across my network from the same servers rather than a device?
 
For a DHCP server in subnet A to give out DHCP addresses in subnet B you need two things:

- On your AD/ DHCP server you need a scope for subnet b. This is where you'd set the option to use your ad server as the dns server, and also set the gateway for subnet b (which will be the interface/vlan ip you set for that network on your router).

- On your router you need to configure an IP helper that points to the ip of your DHCP server (assuming it is your ad server). I don't know that router, but there will be an IP helper equivalent. The ip helper will listen for broadcasts from devices in subnet b for a DHCP address, and then tell it to go to your DHCP server in subnet a to get an address lease.

That's it. As both vlans/ subnet exist on your router, and assuming that is your default gateway for all your devices, it should just work. No static routes or anything else necessary.

... but don't forget to disable DHCP on you router or you will effectively have two DHCP servers issuing addresses. If you have windows domain, I would absolutely configure AD to handle DHCP instead of your router. Far more flexible.
 
Last edited:
Back
Top Bottom