7 3 2009
DNS 캐시 지우기
도메인의 IP 주소를 변경한 후 DNS 서버를 재 시작했음에도 불구하고
nslookup에서는 변경된 IP 주소가 확인되어도 브라우저에서 보거나 ping 을 확인하면 이전 IP 주소가 나올 수 있다.
barney-macbook:~ barney$ nslookup www.some.com Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: Name: www.some.com Address: 123.456.789.123 barney-macbook:~ barney$ ping www.some.com PING www.some.com (456.789.123.123): 56 data bytes 64 bytes from 456.789.123.123: icmp_seq=0 ttl=53 time=1.631 ms
디렉토리와 관련된 캐시때문에 발생하는 것으로 보통 시간이 지나면자연스럽게 해결되지만
당장 확인하기 위해서는 캐시를 제거하면 된다.
각 클라이언트 별로 캐시를 지우는 방법은 다음과 같다:
Mac OS X
barney-macbook:~ barney$ dscacheutil -flushcache
UNIX/Linux
barney-linux:~ barney$ /etc/init.d/nscd stop barney-linux:~ barney$ /etc/init.d/nscd star
Windows
C:> ipconfig /flushdns