LinuxMoz

Linux Stuff && Coffee

Dig IPv6 Lookup / Reverse Lookup

| Comments

If you are in the process of setting up IPv6 there are a couple of dig commands you should know, how to do a IPv6 lookup on a AAAA record and how to do a IPv6 reverse lookup.

How To do a IPv6 AAAA (Dig IPv6 Forward Lookup)

The following command shows you how to do a Dig IPv6 lookup on Linux:

dig AAAA ipv6.google.com

This should give you an output similar to:

; <<>> DiG 9.8.3-P1 <<>> AAAA ipv6.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55360
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ipv6.google.com.       IN  AAAA

;; ANSWER SECTION:
ipv6.google.com.    43199   IN  CNAME   ipv6.l.google.com.
ipv6.l.google.com.  299 IN  AAAA    2a00:1450:400c:c06::93

;; Query time: 48 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Nov  3 12:20:09 2012
;; MSG SIZE  rcvd: 82

How To do a IPv6 Reverse Lookup on Linux, using Dig IPv6 Reverse Lookup

To do a Dig reverse lookup on Linux simply use the -x option followed by the IPv6 IP address, here is an example using Googles IPv6 address above.

dig -x 2a00:1450:400c:c06::93

This will give you an output similar to:

; <<>> DiG 9.8.3-P1 <<>> -x 2a00:1450:400c:c06::93
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20188
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;3.9.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.0.c.0.c.0.0.4.0.5.4.1.0.0.a.2.ip6.arpa. IN PTR

;; ANSWER SECTION:
3.9.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.0.c.0.c.0.0.4.0.5.4.1.0.0.a.2.ip6.arpa. 43198 IN PTR wb-in-x93.1e100.net.

;; Query time: 43 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Nov  3 12:25:00 2012
;; MSG SIZE  rcvd: 123

Comments