test ipv6

ping6

ping

ping6 -c 5 ipv6.google.com
// 也可以指定裝置去ping ping6 -I eth0 ipv6.google.com or ping6 ipv6.google.com%eth1
PING ipv6.google.com(tf-in-x8a.1e100.net) 56 data bytes
64 bytes from tf-in-x8a.1e100.net: icmp_seq=1 ttl=53 time=11.7 ms
64 bytes from tf-in-x8a.1e100.net: icmp_seq=2 ttl=53 time=11.8 ms
64 bytes from tf-in-x8a.1e100.net: icmp_seq=3 ttl=53 time=11.7 ms
64 bytes from tf-in-x8a.1e100.net: icmp_seq=4 ttl=53 time=11.5 ms
64 bytes from tf-in-x8a.1e100.net: icmp_seq=5 ttl=53 time=11.8 ms
--- ipv6.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 11.545/11.745/11.818/0.170 ms

dns 查詢

使用 host

host -t aaaa ipv6.google.com
ipv6.google.com is an alias for ipv6.l.google.com.
ipv6.l.google.com has IPv6 address 2404:6800:4008:c01::8a

使用 nslookup

nslookup -type=aaaa ipv6.google.com
Non-authoritative answer:
ipv6.google.comcanonical name = ipv6.l.google.com.
ipv6.l.google.comhas AAAA address 2404:6800:4008:c01::8a

Authoritative answers can be found from:
google.comhasnameserver = ns2.google.com.
google.comnameserver = ns4.google.com.
google.comnameserver = ns3.google.com.
google.comnameserver = ns1.google.com.
ns1.google.cominternet address = 216.239.32.10
ns2.google.cominternetinternet address = 216.239.34.10
ns3.google.cominternetinternetinternet address = 216.239.36.10
ns4.google.cominternetinternetinternetinternet address = 216.239.38.10

使用 dig

dig @8.8.8.8 ipv6.google.com aaaa
; <<>> DiG 9.9.5-9-Debian <<>> @8.8.8.8 ipv6.google.com aaaa
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60993
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;ipv6.google.com.googleINAAAA

;; ANSWER SECTION:
ipv6.google.com.com21599INCNAMEipv6.l.google.com.
ipv6.l.google.com.com299INAAAA2404:6800:4008:c03::64

;; Query time: 77 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Dec 16 12:15:00 CST 2015
;; MSG SIZE  rcvd: 93

traceroute6

traceroute6 ipv6.google.com
traceroute to ipv6.google.com (2404:6800:4008:c01::65), 30 hops max, 80 byte packets
1  * * *
2  * * *
3  * * *
4  2001:e10:ffff:2000::1 (2001:e10:ffff:2000::1)  10.782 ms  10.769 ms  10.757 ms
5  2001:288:3b0:5::9264:1 (2001:288:3b0:5::9264:1)  16.223 ms  16.212 ms  16.200 ms
6  * 2001:c08:7f:1::35 (2001:c08:7f:1::35)  2.974 ms  2.970 ms
7  2001:288:0:f:109::9 (2001:288:0:f:109::9)  2.958 ms  2.899 ms  2.887 ms
8  2001:c08:7f:1::20 (2001:c08:7f:1::20)  3.364 ms  3.153 ms  3.141 ms
9  2001:4860::1:0:5048 (2001:4860::1:0:5048)  8.281 ms 2001:4860::1:0:73ac (2001:4860::1:0:73ac)  6.851 ms  7.079 ms
10  2001:4860::8:0:73ad (2001:4860::8:0:73ad)  6.607 ms  6.362 ms 2001:4860::8:0:a433 (2001:4860::8:0:a433)  11.505 ms
11  2001:4860::2:0:c6 (2001:4860::2:0:c6)  12.752 ms  11.279 ms  11.757 ms
12  * * *
13  tf-in-x65.1e100.net (2404:6800:4008:c01::65)  11.772 ms  11.769 ms  11.526 ms

刪除 ipv6 的 ip and route

使用 ip -6

ip -6 addr del 2001:e10:2000:10:XXXX:XXXX:XXXX:XXXX dev eth0
ip -6 route del 2001:e10:2000:10::/64

tcpdump

tcpdump -i eth0 -vv ip6
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
12:27:09.851782 IP6 (hlim 64, next-header TCP (6) payload length: 32) 2001:e10:2000:10:b42b:4fac:709e:374d.39342 > ragana.canonical.com.http: Flags [F.], cksum 0xe9db (correct), seq 2658591489, ack 1785573679, win 1432, options [nop,nop,TS val 18530512 ecr 2604514613], length 0
12:27:14.077908 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) fe80::212:deff:fef1:43c3 > fe80::2e0:81ff:feb1:59c5: [icmp6 sum ok] ICMP6, neighbor advertisement, length 24, tgt is fe80::212:deff:fef1:43c3, Flags [router, solicited]
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel

telnet

telnet ipv6.google.com 80
Trying 2404:6800:4008:c03::71...
Connected to ipv6.l.google.com.
Escape character is '^]'.

^C
Connection closed by foreign host.

wget

wget -6 ipv6.google.com
--2015-12-16 12:31:03--  http://ipv6.google.com/
正在查找主機 ipv6.google.com (ipv6.google.com)... 2404:6800:4008:c01::71
正在連接 ipv6.google.com (ipv6.google.com)|2404:6800:4008:c01::71|:80... 連上了。
已送出 HTTP 要求,正在等候回應... 200 OK
長度: 未指定 [text/html]
Saving to: ‘index.html’

index.html [                                  ]  18.66K  --.-KB/s   in 0s

2015-12-16 12:31:04 (221 MB/s) - ‘index.html’ saved [19112]

lynx

lynx http://ipv6.google.com or lynx http://[$i]/

nmap

nmap -6 ipv6.google.com

Starting Nmap 6.47 ( http://nmap.org ) at 2015-12-16 14:24 CST
Nmap scan report for ipv6.google.com (2404:6800:4008:c01::66)
Host is up (0.011s latency).
rDNS record for 2404:6800:4008:c01::66: tf-in-x66.1e100.net
Not shown: 998 filtered ports
PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  https

Nmap done: 1 IP address (1 host up) scanned in 21.76 seconds

ssh

正常情況之下直接ssh就可以了!或是用ssh -6 。另外,如果要內部連線,像是 fe80開頭這種 就要再後面加上裝置名稱 %[netdev]

ping6 fe80::e61f:13ff:fec1:360s%eth0
ssh -6 fe80::e61f:13ff:fec1:360s%eth0

Comments