《深入解析IPv6(第3版)》——2.9 用Netsh显示IPv6配置

本节书摘来自异步社区《深入解析IPv6(第3版)》一书中的第2章,第2.9节,作者: 【美】Joseph Davies 更多章节内容可以访问云栖社区“异步社区”公众号查看。

2.9 用Netsh显示IPv6配置

在一台运行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.127%10

2.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 Connection

2.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 Permanent

2.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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值