本节书摘来自异步社区《深入解析IPv6(第3版)》一书中的第2章,第2.9节,作者: 【美】Joseph Davies 更多章节内容可以访问云栖社区“异步社区”公众号查看。
在一台运行Windows系统的计算上,可以用来来查看IPv6配置信息的常用命令如下所示。
Netsh interface ipv6 show interface。Netsh interface ipv6 show address。Netsh interface ipv6 show route。Netsh interface ipv6 show neighbors。Netsh interface ipv6 show destinationcache。2.9.1 Netsh interface ipv6 show interface该命令可以显示出IPv6的接口列表,下面是输出信息的示例:
Idx Met MTU State Name --- --- ----- ----------- ------------------- 1 50 4294967295 enabled Loopback Pseudo-Interface 1 9 50 1280 enabled Local Area Connection* 6 6 20 1500 enabled Local Area Connection 10 50 1280 enabled Local Area Connection* 7 7 10 1500 disabled Local Area Connection 2在默认情况下,接口名中含有星号(*)的是隧道接口。
2.9.2 Netsh interface ipv6 show address该命令可以显示出各接口的IPv6地址列表,下面是输出信息的示例:
Interface 1: Loopback Pseudo-Interface 1 Addr Type DAD State Valid Life Pref. Life Address --------- ----------- ---------- ---------- ------------------------ Other Preferred infinite infinite ::1 Interface 9: Local Area Connection* 6 Addr Type DAD State Valid Life Pref. Life Address --------- ----------- ---------- ---------- ------------------------ Other Deprecated infinite infinite fe80::5efe:1.0.0.127%9 Interface 6: Local Area Connection Addr Type DAD State Valid Life Pref. Life Address --------- ----------- ---------- ---------- ------------------------ Public Preferred 29d23h59m59s 6d23h59m59s 2001:db8:21da:7:1f3e:9e51:2178:b9ob Temporary Preferred 5d19h59m25s 5d19h59m25s 2001:db8:21da:7:a299:85ae:21da:59cc Other Preferred infinite infinite fe80::713e:a426:d167:37ab%6 Interface 10: Local Area Connection* 7 Addr Type DAD State Valid Life Pref. Life Address --------- ----------- ---------- ---------- ------------------------ Other Deprecated infinite infinite fe80::5efe:1.0.0.1272.9.3 Netsh interface ipv6 show route该命令可以显示出IPv6地址路由表中的路由条目列表,下面是输出信息的示例:
Publish Type Met Prefix Idx Gateway/Interface Name ------- -------- --- ------------------------ --- ----------------------- No Manual 256 ::/0 8 fe80::3cec:bf16:505:eae6 No Manual 256 ::1/128 1 Loopback Pseudo-Interface 1 No Manual 8 2001:db8::/64 8 Local Area Connection No Manual 256 2001:db8::4074:2dce:b313:7c65/128 8 Local Area Connection No Manual 256 2001:db8::b500:734b:fe5b:3945/128 8 Local Area Connection No Manual 1000 2002::/16 11 Local Area Connection* 7 No Manual 256 fe80::/64 10 Local Area Connection* 9 No Manual 256 fe80::/64 8 Local Area Connection No Manual 256 fe80::100:7f:fffe/128 10 Local Area Connection* 9 No Manual 256 fe80::5efe:10.0.0.3/128 17 Local Area Connection* 6 No Manual 256 fe80::b500:734b:fe5b:3945/128 8 Local Area Connection No Manual 256 ff00::/8 1 Loopback Pseudo-Interface 1 No Manual 256 ff00::/8 10 Local Area Connection* 9 No Manual 256 ff00::/8 8 Local Area Connection2.9.4 Netsh interface ipv6 show neighbors该命令可以显示出接口缓存的内容,该缓存中会保存最新解析出来的下一跳地址的链路层地址(MAC地址),显示信息按照接口来分类,下面是输出信息的示例:
Interface 1: Loopback Pseudo-Interface 1 Internet Address Physical Address Type -------------------------------------------- ----------------- ----------- ff02::16 Permanent ff02::1:3 Permanent Interface 8: Local Area Connection Internet Address Physical Address Type -------------------------------------------- ----------------- ----------- 2001:db8::3cec:bf16:505:eae6 00-13-72-2b-34-07 Stale (Router) 2001:db8::4074:2dce:b313:7c65 00-00-00-00-00-00 Unreachable 2001:db8::6c4b:bf6d:201a:ccbf 00-00-00-00-00-00 Unreachable fe80::3cec:bf16:505:eae6 00-13-72-2b-34-07 Stale (Router) ff02::16 33-33-00-00-00-16 Permanent Interface 10: Local Area Connection* 9 Internet Address Physical Address Type -------------------------------------------- ----------------- ----------- fe80::b500:734b:fe5b:3945 255.255.255.255:65535 Unreachable ff02::16 255.255.255.255:65535 Permanent2.9.5 Netsh interface ipv6 show destinationcache这个命令会显示目的缓存的内容,该缓存中会保存目的地址的下一条地址,显示信息按照接口来分类,下面是输出信息的示例。
Interface 8: Local Area Connection PMTU Destination Address Next Hop Address ---- --------------------------------------------- ------------------------- 1500 2001:db8::3cec:bf16:505:eae6 2001:db8::3cec:bf16:505:eae6