t1n1wall

t1n1wall Support (English) => Installation => Topic started by: huub on January 17, 2016, 12:57:15 PM

Title: SOLVED DNS/DHCP problems
Post by: huub on January 17, 2016, 12:57:15 PM
I think I ran into some DHCP problems.

My router looks like:
LAN vr0 192.168.10.1
WAN vlan on vr2 DHCP
OPT1 vlan on vr1 192.168.20.1 (DWZ)
OPT2 vlan on vr1 192.168.30.1

The DHCP server is active on LAN and OPT2.
On the LAN most pc's run with a fixed IP-address.
In the DMZ I have a DNS.
On OPT2 however it seems the pc's does cannot find the DNS, I suspect a wrong route (gw 192.168.10.1 instead of 192.168.30.1).

Do you have any suggestions how I can check if the router supplied is correct?
For my phone I have a hard time using fixed IP-settings.

I would rather check this in the router since it saves me the trouble of searching through different interfaces for each device.

PS the dirty workaround is using NAT on the Wifi router at the OPT2 network. Currently it works, but 2x NAT is not optimal. However it proves the problem is in the DHCP data.
Title: Re: DNS/DHCP problems
Post by: andywhite on January 17, 2016, 02:52:53 PM
can you go to exec.php and execute

Code: [Select]
cat / var/ etc/dnsmasq/dnsmasq.conf
(without the spaces - the forum doesn't like me posting without them , probably a security thing)

and post the output ?
Title: Re: DNS/DHCP problems
Post by: huub on January 17, 2016, 03:09:51 PM
Spaces inserted where necessary
Code: [Select]
$ cat / var/ etc/ dnsmasq/ dnsmasq.conf
edns-packet-max=4096
log-facility=local7
except-interface=ngwan0
Title: Re: DNS/DHCP problems
Post by: huub on January 17, 2016, 03:14:55 PM
Code: [Select]
$ cat / var/ etc/ dnsmasq/ dhcpd.conf
dhcp-option=option:domain-name, "local"
dhcp-authoritative
dhcp-leasefile=/ var/ db/ dnsmasq.dhcpd.leases
dhcp-range=set:lan,192.168.10.128,192.168.10.191
 dhcp-option=tag:lan,option:dns-server,192.168.20.100
 dhcp-option=tag:lan,option:router,192.168.10.1
 dhcp-option=tag:lan,option:netbios-ns,192.168.10.100
        dhcp-option=tag:lan,option:netbios-nodetype,8
dhcp-range=set:lan,192.168.30.128,192.168.30.191
 dhcp-option=tag:opt2,option:dns-server,192.168.20.100
 dhcp-option=tag:opt2,option:router,192.168.30.1
 dhcp-option=tag:opt2,option:netbios-ns,192.168.10.100
        dhcp-option=tag:opt2,option:netbios-nodetype,8

This information shows the correct gateways for each subnet...
The range set seems weird to me (both lan).
Title: Re: DNS/DHCP problems
Post by: andywhite on January 17, 2016, 03:16:16 PM
Looks like the tag on the range is wrong. I'll take a look
Title: Re: DNS/DHCP problems
Post by: andywhite on January 17, 2016, 04:07:01 PM
can you try b92 in a few minutes ? (it's uploading now)
Title: Re: DNS/DHCP problems
Post by: huub on January 17, 2016, 05:41:30 PM
Works like it should  8)