The method for clearing or flushing the local cache in Mac OS X has changed over the years. Clear your DNS cache on Yosemite, Mavericks, Lion, Mountain Lion, Snow Leopard and Leopard using the following Terminal commands:
Tag Archives: DNS
Clear DNS cache on OS X Mavericks
Mac OS X 10.9 ‘Mavericks’ has some DNS changes under the hood. Unlike previous versions, to effectively clear the cache you need to execute these two commands in Terminal:
dscacheutil -flushcache;sudo killall -HUP mDNSResponder
HD streaming on Roku fails
Recently my Roku, attached to a new Airport Extreme 802.11n Dual Band II router, started having problems streaming HD content from both Netflix and Amazon video. It also had intermittent quality problems with SD content as well. In the past, it performed flawlessly.
Network tests (ranging from the obligatory Speed Test to ping and traceroute) seemed to work. Hard wiring the Roku to my router didn’t make a difference, so I was pretty sure it wasn’t my router.
But then, amidst my disgust, I remembered something I changed not so long ago… I changed my DNS on the router from InsightBB to Google’s new public DNS. I did a traceroute to Netflix’ content distribution host (traceroute cdn.netflix.com) and lo and behold, I saw that my requests were being routed from Cincinnati to Atlanta to Washington. Oy! (see output below)
traceroute cdn.netflix.com traceroute: Warning: cdn.netflix.com has multiple addresses; using 208.111.168.7 traceroute to netflix.vo.llnwd.net (208.111.168.7), 64 hops max, 52 byte packets 1 10.0.1.1 (10.0.1.1) 1.243 ms 0.850 ms 0.715 ms 2 74-136-176-1.dhcp.insightbb.com (74.136.176.1) 10.292 ms 7.530 ms 16.441 ms 3 74-128-22-49.dhcp.insightbb.com (74.128.22.49) 14.362 ms 6.205 ms 11.816 ms 4 74-128-19-33.dhcp.insightbb.com (74.128.19.33) 9.586 ms 28.300 ms 40.123 ms 5 74.128.9.233 (74.128.9.233) 14.796 ms 15.419 ms 14.436 ms 6 te-9-2.car1.atlanta2.level3.net (4.71.252.37) 30.392 ms 32.277 ms 32.545 ms 7 ae-72-52.ebr2.atlanta2.level3.net (4.68.103.61) 26.019 ms 23.410 ms 47.447 ms 8 ae-63-60.ebr3.atlanta2.level3.net (4.69.138.4) 37.086 ms 23.687 ms 35.168 ms 9 ae-2.ebr1.washington1.level3.net (4.69.132.86) 41.345 ms 53.264 ms 48.131 ms 10 ae-81-81.csw3.washington1.level3.net (4.69.134.138) 38.460 ms 41.296 ms 55.540 ms 11 ae-41-89.car1.washington3.level3.net (4.68.17.135) 43.551 ms 47.695 ms 45.433 ms 12 te3-4-10g.ar2.dca3.gblx.net (64.212.107.61) 39.097 ms 39.573 ms 38.241 ms 13 limelight.tengigabitethernet6-2.ar2.dc3.gblx.net (64.215.26.126) 39.358 ms 42.771 ms 97.640 ms 14 tge9-3.fr3.lga.llnw.net (69.28.171.158) 44.475 ms 44.565 ms 46.384 ms 15 tge1-2.fr4.ord.llnw.net (69.28.171.193) 49.194 ms 50.696 ms 51.392 ms 16 cdn-208-111-168-7.ord.llnw.net (208.111.168.7) 48.165 ms 47.922 ms 45.886 ms 17 * * *
So, I decided to change my DNS to OpenDNS instead (it’s great…try it out! Great set of features). Voila! Now my requests to Netflix’s content delivery network are routed directly to Chicago!
traceroute cdn.netflix.com traceroute: Warning: cdn.netflix.com has multiple addresses; using 208.111.168.6 traceroute to netflix.vo.llnwd.net (208.111.168.6), 64 hops max, 52 byte packets 1 10.0.1.1 (10.0.1.1) 14.704 ms 1.160 ms 0.603 ms 2 74-136-176-1.dhcp.insightbb.com (74.136.176.1) 12.129 ms 15.592 ms 12.027 ms 3 74-128-22-49.dhcp.insightbb.com (74.128.22.49) 12.657 ms 8.135 ms 13.160 ms 4 74-128-16-133.dhcp.insightbb.com (74.128.16.133) 20.713 ms 9.090 ms 12.973 ms 5 74.128.8.233 (74.128.8.233) 149.239 ms 226.148 ms 239.229 ms 6 4.71.250.29 (4.71.250.29) 20.493 ms 22.167 ms 21.960 ms 7 vlan51.ebr1.chicago2.level3.net (4.69.138.158) 22.478 ms vlan52.ebr2.chicago2.level3.net (4.69.138.190) 27.008 ms vlan51.ebr1.chicago2.level3.net (4.69.138.158) 22.622 ms 8 ae-5.ebr2.chicago1.level3.net (4.69.140.193) 27.992 ms 27.293 ms 39.074 ms 9 ae-23-56.car3.chicago1.level3.net (4.68.101.167) 32.908 ms 24.086 ms 20.232 ms 10 glbx-level3-te.chicago1.level3.net (4.68.110.194) 22.624 ms 25.286 ms 25.018 ms 11 64.215.29.250 (64.215.29.250) 39.314 ms 26.946 ms 23.569 ms 12 tge7-1.fr3.ord.llnw.net (69.28.172.41) 25.630 ms 29.050 ms 22.004 ms 13 cdn-208-111-168-6.ord.llnw.net (208.111.168.6) 22.039 ms 22.772 ms 23.608 ms 14 * * *
Clear DNS cache on Mac OS X
Changing domains around on your web server can leave you with a local DNS cache that doesn’t match your domain’s new settings. Flush your DNS cache on Mac OS X 10.5 by issuing the following command:
dscacheutil -flushcache
Edit 5/19/2014: OS X Mavericks has a slightly different method for clearing the DNS cache.