aparcar / openwrt

Staging tree of Paul Spooren
Other
8 stars 1 forks source link

FS#17 - DNS Issues #83

Closed aparcar closed 8 years ago

aparcar commented 8 years ago

elitewarrior101:

I had this issue for a while but I assumed it was my ISP modem/router so I never bothered with this before. But now I am trying out a secondary ISP and I have 2 modem/routers and the issue persists. ISP 1: 192.168.1.1 ISP 2: 192.168.1.2 TL-WDR3600 Lede r732: 192.168.1.3

The ISP routers are connected to the Lede using the LAN ports. The issue is that if I set my IP on Lede statically, DNS stops working. This happens regardless of which ISP router I point my Lede router too. The /tmp/resolv.conf.auto is never empty.

As per suggestion of someone in IRC: nslookup google.com nslookup: can't resolve '(null)': Name does not resolve

I can ping IP's but not domain names.

aparcar commented 8 years ago

elitewarrior101:

Forgot the most important part: this is a regression. This was working during OpenWRT 15.05 and the bug was introduced sometime before Lede forked off.

aparcar commented 8 years ago

Ansuel:

if find that, if you have ipv6 connection the router itsleft can't resolve anything but all the traffic outside function like usual

I think in this case the router try to use the ipv6 address but if the address is not present in ipv6 dns it fail

aparcar commented 8 years ago

alive4ever:

Since you set a static ip address, you should also set forwarding dns server manually. # uci add_list dhcp.@dnsmasq[0].server=192.168.1.1 ##for isp 1

uci add_list dhcp.@dnsmasq[0].server=192.168.1.2 ##for isp 2

reload_config

If the dns has been confirmed to be working, commit the change. # uci commit dhcp

I hope this solves your problem.

If you have more than one ISP, you should also read more about load balancing / multiwan.

aparcar commented 8 years ago

jow-:

When you did set your IP statically did you also set the DNS server statically? (option dns ...)

aparcar commented 8 years ago

elitewarrior101:

Jo-Phillip Wich: Yes I did, [[http://pastebin.com/9Z0KszkK|here]] is the network config that I am using.

alive4ever: Ok, I will try that when I get home from work tonight. Side question though, I have never had to do this before, is this a new change or just the recommended way of doing things?

aparcar commented 8 years ago

alive4ever:

My suggestion above is not a new way to do things. It's just a way to specify dns-forwarding, since dnsmasq by default handles the dns requests and dnsmasq by itself is not a recursive dns resolver. It needs to know where to forward dns request.

In your network configuration, it seems that you don't specify a 'wan' interface. Are you just using the device for access point or as router? If you use the device as router, you should specify a wan interface. #part of /etc/config/network config interface 'wan' option ifname 'eth1' option proto 'dhcp'

config interface 'wan6' option ifname 'eth1' option proto 'dhcpv6'

If you just use the device as access point (if you intentionally remove 'wan' section from your network config), you need to disable dhcp server on the device and let the 'ISP' handle dhcp. For this to work, the traffic on 'lan' interface must be passed freely to 'eth0:1' interface.

#Remove this section from /etc/config/dhcp config dhcp 'lan' option interface 'lan' option start '100' option limit '150' option leasetime '12h' option dhcpv6 'server' option ra 'server'

or simply use this 'uci' command # uci del dhcp.lan

uci commit dhcp

Reload the configuration afterwards. # reload_config

aparcar commented 8 years ago

elitewarrior101:

alive4ever: Yes I intentionally removed the WAN part from my config because I am using it as a bridge. I then added the WAN (port 1) to VLAN1 so I could use the WAN port as an additional LAN port.

Note I have made sure to factory reset and check before any of my changes to make sure it was on an issue caused by my own doing.

Edit: To restate, I don't think this is a config issue. These exact settings worked on Openwrt 15.05