Compass note

未踏の地へ踏み出すコンパス的エンジニアノート

nslookup で IPv6 アドレスを正引きしてみる

* 本ページはプロモーションが含まれています

IPv6 のシステム構築を実施したときに、DNS エントリが正しくされているかを nslookup で確認したときのメモ。

OS:Ubuntu 20.04

google.com の IPv6 アドレスを確認するには以下のコマンドで IPv6 アドレスが格納されている AAAA レコードを指定する。

$ nslookup
> set type=AAAA
> google.com
Server:         192.168.11.1
Address:        192.168.11.1#53

Non-authoritative answer:
Name:   google.com
Address: 2404:6800:4004:812::200e

-debug オプションを付けると ttl などの詳細情報も表示されるようになる。

$ nslookup -debug
> set type=AAAA
> google.com
Server:         192.168.11.1
Address:        192.168.11.1#53

------------
    QUESTIONS:
        google.com, type = AAAA, class = IN
    ANSWERS:
    ->  google.com
        has AAAA address 2404:6800:4004:819::200e
        ttl = 234
    AUTHORITY RECORDS:
    ->  google.com
        nameserver = ns1.google.com.
        ttl = 349
    ->  google.com
        nameserver = ns3.google.com.
        ttl = 349
    ->  google.com
        nameserver = ns2.google.com.
        ttl = 349
    ->  google.com
        nameserver = ns4.google.com.
        ttl = 349
    ADDITIONAL RECORDS:
    ->  ns1.google.com
        internet address = 216.239.32.10
        ttl = 1893
    ->  ns2.google.com
        internet address = 216.239.34.10
        ttl = 2060
    ->  ns3.google.com
        internet address = 216.239.36.10
        ttl = 3192
    ->  ns4.google.com
        internet address = 216.239.38.10
        ttl = 1224
    ->  ns1.google.com
        has AAAA address 2001:4860:4802:32::a
        ttl = 1893
    ->  ns2.google.com
        has AAAA address 2001:4860:4802:34::a
        ttl = 2060
    ->  ns3.google.com
        has AAAA address 2001:4860:4802:36::a
        ttl = 3192
    ->  ns4.google.com
        has AAAA address 2001:4860:4802:38::a
        ttl = 1224
------------
Non-authoritative answer:
Name:   google.com
Address: 2404:6800:4004:819::200e