Faced with the fact that DNS rezolving does not work on my Linux, although everything seems to be configured correctly. I use my router as a DNS server. The router itself perfectly resolves the DNS, so the problem is not with the router. With the Internet connection, everything is in order, google pings by IP-address, but not by the host name.
$ uname -a Linux archlinux 4.8.11-1-ARCH #1 SMP PREEMPT Sun Nov 27 09:26:14 CET 2016 x86_64 GNU/Linux $ ping google.com ping: google.com: Имя или служба не известны $ ping -c 2 216.58.201.142 PING 216.58.201.142 (216.58.201.142) 56(84) bytes of data. 64 bytes from 216.58.201.142: icmp_seq=1 ttl=52 time=195 ms 64 bytes from 216.58.201.142: icmp_seq=2 ttl=52 time=110 ms --- 216.58.201.142 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 110.924/153.054/195.185/42.132 ms $ host google.com google.com has address 216.58.201.142 google.com has IPv6 address 2a00:1450:4003:804::200e google.com mail is handled by 40 alt3.aspmx.l.google.com. google.com mail is handled by 30 alt2.aspmx.l.google.com. google.com mail is handled by 10 aspmx.l.google.com. google.com mail is handled by 50 alt4.aspmx.l.google.com. google.com mail is handled by 20 alt1.aspmx.l.google.com. $ dig google.com ; <<>> DiG 9.11.0-P1 <<>> google.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58292 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;google.com. IN A ;; ANSWER SECTION: google.com. 79 IN A 216.58.201.142 ;; Query time: 0 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Вс дек 04 21:24:39 +05 2016 ;; MSG SIZE rcvd: 55 $ resolveip google.com resolveip: Unable to find hostid for 'google.com': host not found $ cat /etc/resolv.conf search 192.168.1.1 nameserver 192.168.1.1 $ cat /etc/nsswitch.conf passwd: files group: files shadow: files publickey: files hosts: files mdns_minimal [NOTFOUND=return] myhostname networks: files protocols: files services: files ethers: files rpc: files netgroup: files
hosts: files dns- Mike