개발업무/인프라

nslookup -debug

NickTop 2023. 10. 31. 21:42

명령어

nslookup -debug jjjjqqq.tistory.com

 

결과

------------
Got answer:
    HEADER:
        opcode = QUERY, id = 1, rcode = NOERROR
        header flags:  response, want recursion, recursion avail.
        questions = 1,  answers = 1,  authority records = 0,  additional = 0

    QUESTIONS:
        82.163.220.210.in-addr.arpa, type = PTR, class = IN
    ANSWERS:
    ->  82.163.220.210.in-addr.arpa
        name = bns1.hananet.net
        ttl = 24816 (6 hours 53 mins 36 secs)

------------
서버:    bns1.hananet.net
Address:  210.220.163.82

내 PC의 DNS 서버는 210.220.163.82이다

처음 nslookup을 할때는 DNS 서버 IP로 질의한다

type=PTR은 IP로 부터 레코드 이름을 가져온다

도메인서버는 오른쪽에서 왼쪽으로 읽기 때문에 IP가 역방향으로 되어있다

 

------------
Got answer:
    HEADER:
        opcode = QUERY, id = 2, rcode = NOERROR
        header flags:  response, want recursion, recursion avail.
        questions = 1,  answers = 2,  authority records = 0,  additional = 0

    QUESTIONS:
        jjjjqqq.tistory.com, type = A, class = IN
    ANSWERS:
    ->  jjjjqqq.tistory.com
        canonical name = wildcard-tistory-fz0x1pwf.kgslb.com
        ttl = 3600 (1 hour)
    ->  wildcard-tistory-fz0x1pwf.kgslb.com
        internet address = 211.249.222.33
        ttl = 17 (17 secs)

jjjjqqq.tistory.com이 CNAME을 통하여 wildcard-tistory-fz0x1pwf.kgslb.com로 변경되었다

type = A는 도메인으로 IP 주소를 반환함

wildcard-tistory-fz0x1pwf.kgslb.com에 해당하는 IP는 211.249.222.33이다

 

------------
Got answer:
    HEADER:
        opcode = QUERY, id = 3, rcode = NOERROR
        header flags:  response, want recursion, recursion avail.
        questions = 1,  answers = 1,  authority records = 1,  additional = 0

    QUESTIONS:
        jjjjqqq.tistory.com, type = AAAA, class = IN
    ANSWERS:
    ->  jjjjqqq.tistory.com
        canonical name = wildcard-tistory-fz0x1pwf.kgslb.com
        ttl = 3600 (1 hour)
    AUTHORITY RECORDS:
    ->  kgslb.com
        ttl = 69 (1 min 9 secs)
        primary name server = gsx-gslb01.kakao.com
        responsible mail addr = hostmaster.gsx-gslb01.kakao.com
        serial  = 2023102602
        refresh = 10800 (3 hours)
        retry   = 3600 (1 hour)
        expire  = 604800 (7 days)
        default TTL = 180 (3 mins)

 

type=AAAA : ipv6 주소 반환한다 (반환 안한것으로 보아 ipv6는 지원하지 않는 것 같음)

primary name server : 응답을 반환한 name server 이름

 

name server에 대해 자세히 보고싶으면

> nslookup -type=ns kakao.com
서버:    bns1.hananet.net
Address:  210.220.163.82

권한 없는 응답:
kakao.com       nameserver = ns1.kakao.com
kakao.com       nameserver = ns2.kakao.com

ns1.kakao.com   internet address = 113.61.106.5
ns2.kakao.com   internet address = 113.61.107.5

 

권한없는 응답 (Non-authoritative answer)

제 PC는 210.220.163.82에 질의를 하기 때문에

cache나 다른네임서버가 응답을 내릴 수 있습니다

 

'개발업무 > 인프라' 카테고리의 다른 글

SCP/SSH : host key verification failed  (0) 2022.11.28
https SSL 인증서 작동 원리  (0) 2022.11.13
MYSQL : Master Slave replication  (1) 2022.11.11
NAT : Network Address Translation  (2) 2022.11.08
DNS name server IP 확인하는 법  (1) 2022.11.07