Tag Info

Hot answers tagged

24

SEE UPDATE BELOW! I also enjoy using Dnsmasq on my local machine, and I had this problem too. Here is the solution: From man 5 resolver: The configuration for a particular client may be read from a file having the format described in this man page. These are at present located by the system in the /etc/resolv.conf file and in the files found in the ...


17

IMHO This sounds like you need mysqld to stop using DNS. Please do the following: Add this to /etc/my.cnf [mysqld] skip-host-cache skip-name-resolve Them restart mysql. From then on, mysql will no longer resolve addresses via DNS. Give it a Try !!! CAVEAT Please read these options in the MySQL Documentation: skip-host-cache skip-name-resolve DNS ...


10

DNS resolvers can be added in OS X via the networksetup command: sudo networksetup -setdnsservers Wi-Fi 8.8.8.8 8.8.4.4 Insert name of network connection as appropriate. These resolvers will appear in resolv.conf as it is automatically generated, but direct edits to resolv.conf will not result in those resolvers being used. I assume the resolvers are ...


9

You probably got bitten by nscd: http://linux.die.net/man/8/nscd Cheers


8

This is working as designed. Preferring IPv6 over IPv4 is the default configuration for most computers. To use IPv4 instead of IPv6, the computer must be specifically set up for this (varies by OS). If you want specific hostnames to be inaccessible via IPv6, then you'll have to remove the wildcard CNAME and use records only for the specific hosts you want ...


7

The default behavior for resolv.conf and the resolver is to try the servers in the order listed. The resolver will only try the next nameserver if the first nameserver times out. The resolv.conf manpage says: nameserver Name server IP address Internet address (in dot notation) of a name server that the resolver should query. Up to MAXNS ...


7

This is described via man resolv.conf. Please try one of the timeout options to lower the default from 5 seconds to perhaps 1 second... options timeout:1 nameserver 123.123.123.123 nameserver 8.8.8.8 But really, DNS has so many resiliencies available, it's possible to live without lower resolution timeouts. Is it possible to pick better public DNS or run ...


7

. is the top-most point in the DNS hierarchy. com, org, net, etc are all under .. The reason that you don't see people type http://google.com. into their browsers or other applications is that over time, applications have been developed to "help" you by not requiring it. A proper FQDN still has a period at the end, though it doesn't matter much in most cases ...


6

Is the machine sourcing it's IP address from DHCP? If so, resolv.conf will be turned over by the DHCP client, to reflect the details in the lease it receives. Take a look at the manpage for the DHCP client you are using. For instance dhcpcd has a -R flag which prevents this behaviour.


6

Most applications intialize the resolver once, at startup (with res_init), and never do it again afterwards. It is not a problem for short-life applications like ping but more serious for long-running daemons. The Apache process (which runs mod_php) was probably in that case. Restarting Apache would have suffice.


6

There's a hint about this on http://docstore.mik.ua/orelly/networking_2ndEd/dns/ch06_01.htm: In other words, an instance of the resolver still queries the first name server in resolv.conf first, but for the next domain name it looks up, it queries the second name server first, and so on. Note that many programs can't take advantage of this since most ...


6

The right way to do this these days is, I believe, to add the DNS information to your /etc/conf.d/net file, so that the rc scripts manage your /etc/resolv.conf file correctly. Add: dns_servers="8.8.8.8 8.8.4.4" to that file and you should be good to go. If you need other resolver settings, look at the net.example file in /usr/share/doc/openrc-*/. Some of ...


5

Ahhhh....it doesn't really work that way. As long as the first nameserver is running and active all bind requests will go to it. The only way that you get to the second nameserver is if the previous nameserver in the list has died and after a LONG timeout. To fix your problem, I'm guessing that you might have to build a local caching DNS server ...


5

It's likely that the default timeout is too long and that apps are breaking as a result. Keep in mind that the resolver will go start with the first entry in /etc/resolv.conf -every- time it's called (notwithstanding cached entries). Try adding something like "options timeout:.5" or similar (see the man page - http://linux.die.net/man/5/resolv.conf) to ...


5

There isn't an existing DHCP option for this, so you have to add custom configuration to both the server and clients in order to support this. On the server (/etc/dhcp/dhcpd.conf), define a new option and set the value: option resolv-options code 224 = text; option resolv-options "timeout:2 attempts:4"; On the client (/etc/dhcp/dhclient.conf), define the ...


5

The contents of your resolv.conf have nothing to do with your DNS zones. Rather, they tell your server what DNS servers to use for resolving names. So yes, unless you have a good reason for changing it, leave it as-is.


5

ping use glibc's name resolution system, called Name Service Switch. This uses the /etc/nsswitch.conf file to know where to look for in order to resolve a name to an IP. The hosts: line in this file represents an order of preference for each service. For exemple, files represent the local /etc/hosts file, dns uses the /etc/resolv.conf file to contact a DNS ...


4

The configuration file is one of /etc/dhcp/dhclient-${DEVICE}.conf, /etc/dhclient-${DEVICE}.conf, or /etc/dhcp/dhclient.conf in that order. The first one that exists is used. From /etc/sysconfig/network-scripts/ifup-eth (Fedora 14; RHEL6 may be similar): # allow users to use generic '/etc/dhcp/dhclient.conf' (as documented in manpage!) # if per-device file ...


4

It's hard to answer clearly as I don't know what you're trying to accomplish: Do you want to manage a private DNS zone using your own BIND server? Do you just want to get DNS resolution working properly? Are you trying to set up a local cache for performance reasons? If you're going to run a local DNS resolver on your server, you would point ...


4

This behavior is by design. IPv6 is being preferred - so the status of the resource in AAAA terms is determined first. An NXDOMAIN response comes back - so the client figures it needs to append the search path. Note that the ndots remark you've made is correct - but not the whole story. If the ndots number higher than the name being queried (if it were a ...


4

I solved that issue by adding the lines below to my Vagrantfile: config.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] end Below is the whole of it: $setup = <<SCRIPT DEBIAN_FRONTEND=noninteractive apt-get update SCRIPT $dependencies = <<SCRIPT DEBIAN_FRONTEND=noninteractive apt-get ...


4

You can't easily do what you want. Or how do I configure a different DNS Name Server for eth0 vs eth1? The name lookup for a hostname happens through standard system libraries and isn't associated in any way with a particular "connection". In fact, at the time the DNS query happens, there is no connection, because your application hasn't even ...


4

Why are the DNS servers becoming unavailable? That's the issue we should focus on fixing... You should omit the rotate directive if you want to have a deterministic retry order. rotate basically gives you round-robin lookups, which can have undesirable results in your situation. My DNS /etc/resolv.conf tends to look like: search blah.net client.blah.net ...


4

That's easy to discover. Just run: rpm -qf /etc/resolv.conf You will see the answer is: file /etc/resolv.conf is not owned by any package That's because it's generated by the system at installation time, and later managed by the sysadmin (that is hopefully you) or NetworkManager.


4

The host tool does not simply resolve names (as in, using the system name resolver) but actually queries dns servers (as in, sending packets to udp/53 and possibly tcp/53): it doesn't know nor use the local hosts file. If you want to test the operating system's resolver (as in, gethostbyname() and similar libc functions) you can try to ping the name you ...


4

/etc/resolv.conf is the system-wide configuration of where to look for DNS, as used by gethostbyname() etc. http://linux.die.net/man/5/resolv.conf It is generally overwritten by the network service with the adapter-specific settings given in ifcfg (or provided by DHCP). So any changes to preferred DNS servers should be made in the ifcfg files rather than ...


4

Because fully qualified domain names always have a period at the end. RFC 1034 Since a complete domain name ends with the root label, this leads to a printed form which ends in a dot. We use this property to distinguish between: - a character string which represents a complete domain name (often called "absolute"). For example, ...


3

I'd be invoking the awesome power of chattr +i /etc/resolv.conf to make the file immutable, or else hunting down the author of the VPN client and beating them around the head with a clue-by-four.


3

to prevent dhcp client rewriting your settings you can put as well in dhclient.conf [ /etc/dhcp3 in debian, if you use isc's dhcp3-client ] supersede domain-name "your.domain.name"; supersede domain-name-servers 127.0.0.1, 192.168.1.108 ; this might look differently for other dhcp clients.


3

Most likely you have a dhcp-client service setup on your machine, it is rewriting /etc/resolv.conf with values it receives from the dhcp server.



Only top voted, non community-wiki answers of a minimum length are eligible