V
V
Vadim Rybalko2015-04-29 13:07:58
Domain Name System
Vadim Rybalko, 2015-04-29 13:07:58

Why does OS X Yosemite not resolve domain names after waking up?

I noticed that often when waking up a laptop with OS X 10.10 Yosemite I have problems connecting to the network.
The symptoms are as follows:
1. The IP address was received correctly, everything is in place:

$ ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
  ether 78:31:c1:bf:bf:b0 
  inet6 fe80::7a31:c1ff:febf:bfb0%en0 prefixlen 64 scopeid 0x4 
  inet 10.10.1.52 netmask 0xfffffe00 broadcast 10.10.1.255
  nd6 options=1<PERFORMNUD>
  media: autoselect
  status: active

2. Routes are OK:
$ netstat -nr
Routing tables

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            10.10.0.1          UGSc           47        5     en0
10.10/23           link#4             UCS            10        0     en0
10.10.0.1/32       link#4             UCS             1        0     en0
10.10.0.1          0:0:c:9f:f0:0      UHLWIir        51       80     en0   1188
10.10.0.2          0:b:0:10:2:63      UHLWI           0     1110     en0   1185
10.10.1.255        ff:ff:ff:ff:ff:ff  UHLWbI          0        1     en0
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              5    36523     lo0
169.254            link#4             UCS             0        0     en0

3. the address of the resolver is correct and is in /etc/resolv.conf:
$ cat /etc/resolv.conf 
#
# Mac OS X Notice
#
# This file is not used by the host name and address resolution
# or the DNS query routing mechanisms used by most processes on
# this Mac OS X system.
#
# This file is automatically generated.
#
nameserver 10.10.0.2

4. The dig cmd utility resolves perfectly:
$ dig ya.ru

; <<>> DiG 9.8.3-P1 <<>> ya.ru
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8303
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 4

;; QUESTION SECTION:
;ya.ru.				IN	A

;; ANSWER SECTION:
ya.ru.			2100	IN	A	213.180.204.3
ya.ru.			2100	IN	A	213.180.193.3
ya.ru.			2100	IN	A	93.158.134.3

;; AUTHORITY SECTION:
ya.ru.			174234	IN	NS	ns1.yandex.ru.
ya.ru.			174234	IN	NS	ns2.yandex.ru.

;; ADDITIONAL SECTION:
ns1.yandex.ru.		20497	IN	A	213.180.193.1
ns1.yandex.ru.		20497	IN	AAAA	2a02:6b8::1
ns2.yandex.ru.		20497	IN	A	93.158.134.1
ns2.yandex.ru.		20497	IN	AAAA	2a02:6b8:0:1::1

;; Query time: 138 msec
;; SERVER: 10.10.0.2#53(10.10.0.2)
;; WHEN: Wed Apr 29 12:28:21 2015
;; MSG SIZE  rcvd: 202

5. ICMP Ping outside the network goes to the IP address normally (we ping Yandex):
$ ping 213.180.204.3
PING 213.180.204.3 (213.180.204.3): 56 data bytes
64 bytes from 213.180.204.3: icmp_seq=0 ttl=58 time=5.637 ms
64 bytes from 213.180.204.3: icmp_seq=1 ttl=58 time=11.494 ms
64 bytes from 213.180.204.3: icmp_seq=2 ttl=58 time=24.724 ms
64 bytes from 213.180.204.3: icmp_seq=3 ttl=58 time=29.018 ms
^C
--- 213.180.204.3 ping statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 5.637/17.718/29.018/9.506 ms

6. ICMP Ping by domain name ends with unsuccessful name resolution
7. Accordingly, all resources that the computer accesses by domain names are not available (the browser does not open anything, many instant messengers do not connect to servers, etc.)
8. Running dscacheutil - flushcache does not help
9. After 3-5 minutes after waking up, everything starts working.
Actually the question is: why such a problem with name resolution? I understand that in OS X there is a certain DNS-cacher that works transparently, at the level of which the problem occurs. I came across similar symptoms on the resource, but some completely infernal methods for solving the problem are offered there in the form of pulling the mDNSResponder utility from the old version of OS X and replacing it with the standard discoveryd in 10.10, but this seems not the most correct solution to the problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Semionych, 2015-05-07
@Semionych

Do you happen to have Kaspersky Internet Security for Mac?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question