Quantcast
Channel: EdgeRouter topics
Viewing all articles
Browse latest Browse all 20028

BUG?: /etc/resolv.conf nameserver order problem

$
0
0

I have specified in the configuration:

# show system name-server 
 name-server 127.0.0.1
 name-server 75.75.75.75
 name-server 75.75.76.76

Intending resolving via the loca dns server (which is dnsmasq in my case) first, followed by fallback nameservers.

 

I also have IPv6 prefix delegation operation, which returns two name servers from my provider:

nameserver 2001:558:feed::1
nameserver 2001:558:feed::2

The problem is that the prefix delegation machinery puts these two lines in the beginning of /etc/resolv.conf, rather than at the end. Since listing order is the order in which name resolution is attempted this does prevent the first attempt to use the local resolver.

 

From clients, everything works fine as all clients approach either 192.168.1.254 (the router), or ::1 (also the router). These effectively consult the local loopback and are not affected by the order of entries in /etc/resolv.conf. In particular reverse loookup for local hosts goes to dnsmasq and returns names, as desired. If, however, the same reverse lookup is attempted on the router itself (console or ssh with CLI), the lookup fails.

 

The reason for failure here is that cli commands obey /etc/resolc.conf and will start using the name servers returned by the ISP before it ever gets to the loopback interface.

 

So, I think that prefix delegation should be smarter and insert any name servers received after those confgured in "system name-server". Furthermore, it should probobly honor the order of IPv4, vs IPv6 entries in there as well. In other words, if the system configuration lists IPv4 servers first, insert ISP received (dhcp if applicable) after all IPv4 servers in the system configuration. If the system configuration lists any IPv6 servers, insert IPv6 received (prefix delegation) after all IPv6 entries in the system configuration.

 


Viewing all articles
Browse latest Browse all 20028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>