博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
《深入解析IPv6(第3版)》——2.8 使用Windows PowerShell来查看IPv6配置信息
阅读量:7081 次
发布时间:2019-06-28

本文共 3570 字,大约阅读时间需要 11 分钟。

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

2.8 使用Windows PowerShell来查看IPv6配置信息

在一台运行Windows Server 2012和Windows 8的计算上,通过Windows PowerShell来查看IPv6配置信息的常用命令如下所示。

  • Get-NetIPInterface -AddressFamily IPv6
  • Get-NetIPAddress -AddressFamily IPv6
  • Get-NetRoute -AddressFamily IPv6
  • Get-NetNeighbor -AddressFamily IPv6

如需了解Windows PowerShell中所有可以用来查看TCP/IP配置的命令,可以在Windows PowerShell中运行命令gcm -ModuleNetTCPIP。

2.8.1 Get-NetIPInterface -AddressFamily IPv6

该命令可以显示出IPv6的接口列表,下面是输出信息的示例:

ifIndex ifAlias          AddressFamily ConnectionState NlMtu(Bytes)------- -------          ------------- --------------- ------------InterfaceMetric Dhcp     Store--------------- ----     -----20    Reusable ISATAP Interface {...  IPv6    Disconnected  0      0Enabled  Persistent13     isatap.corp.contoso.com      IPv6    Disconnected  1280      5Enabled Persistent12     Wired Ethernet Connection    IPv6    Disconnected  1500      5Enabled Persistent10     Local Area Connection* 9    IPv6    Disconnected  0      0Enabled Persistent12     Wired Ethernet Connection    IPv6    Connected    1500      5Enabled Active13     isatap.corp.contoso.com      IPv6    Connected    1280      5Disabled Active1     Loopback Pseudo-Interface 1    IPv6    Connected    4294967295  50Disabled Active

2.8.2 Get-NetIPAddress -AddressFamily IPv6

该命令可以显示出各接口的IPv6地址列表,下面是输出信息的示例:

Store       : ActiveIPAddress     : fe80::c51d:624b:b276:6a03%12InterfaceIndex   : 12InterfaceAlias   : Wired Ethernet ConnectionAddressFamily     : IPv6Type        : UnicastPrefixLength     : 64PrefixOrigin     : WellKnownSuffixOrigin     : LinkAddressState     : PreferredValidLifetime     : Infinite ([TimeSpan]::MaxValue)PreferredLifetime   : Infinite ([TimeSpan]::MaxValue)SkipAsSource    : FalseStore       : ActiveIPAddress     : fe80::5efe:10.198.16.202%13InterfaceIndex   : 13InterfaceAlias   : isatap.corp.contoso.comAddressFamily     : IPv6Type        : UnicastPrefixLength     : 128PrefixOrigin     : WellKnownSuffixOrigin     : LinkAddressState     : PreferredValidLifetime     : Infinite ([TimeSpan]::MaxValue)PreferredLifetime   : Infinite ([TimeSpan]::MaxValue)SkipAsSource     : False

2.8.3 Get-NetRoute -AddressFamily IPv6

该命令可以显示出IPv6地址路由表中的路由条目列表,下面是输出信息的示例:

ifIndex  RouteMetric  DestinationPrefix        NextHop      Store-------  -----------  -----------------        -------      -----12    256       ff00::/8             ::         Active1    256       ff00::/8             ::         Active12    256       fe80::c51d:624b:b276:6a03/128    ::         Active13    256       fe80::5efe:10.198.16.202/128     ::         Active12    256       fe80::/64           ::         Active13    256       2001:db8:0:fff:0:5efe:10.198.16.202/128 ::       Active13    256       2001:db8:0:fff::/64       ::         Active1    256       ::1/128             ::         Active13    256       ::/0               fe80::5efe:10.36.0.4 Active

2.8.4 Get-NetNeighbor -AddressFamily IPv6

该命令可以显示出接口缓存的内容,该缓存中会保存最新解析出来的下一跳地址的链路层地址(MAC地址),下面是输出信息的示例:

ifIndex    IPAddress        MacAddress    State    Store-------    ---------        ----------    -----    -----12      ff02::1:ffe5:a5ed    3333ffe5a5ed    Permanent    Active12      ff02::1:ff25:d862    3333ff25d862    Permanent    Active12      ff02::1:3        333300010003    Permanent    Active12      ff02::1:2        333300010002    Permanent    Active12      ff02::2        333300000002    Permanent    Active12      ff02::1        333300000001    Permanent    Active13      fe80::5efe:10.36.0.4  10.36.0.4      Permanent    Active

转载地址:http://dbtml.baihongyu.com/

你可能感兴趣的文章
golang接口的使用(练习一)
查看>>
linux笔记之DNS服务配置(一)
查看>>
我的友情链接
查看>>
Nginx HTTP负载均衡和反向代理配置
查看>>
Redis 安装(一)
查看>>
nil, Nil, NULL 的区别
查看>>
lsof -i -n -P
查看>>
RocketMQ高并发读写
查看>>
Kali linux上运行quasibot时主页不显示内容的问题
查看>>
CentOS 5.5下搭建Mysql+DRBD+Heartbeat
查看>>
端口镜像
查看>>
apache 虚拟主机配置
查看>>
升级nuxt2.0后遇到的问题
查看>>
c++缺陷与不足
查看>>
异常java.lang.NullPointerException
查看>>
我必须得告诉大家的MySQL优化原理
查看>>
几种 hive join 类型简介
查看>>
用 Asterisk 搭建自己的免费 VoIP 服务器
查看>>
安装配置ASMlib驱动
查看>>
如何将24位RGB颜色转换16位RGB颜色
查看>>