最新消息:

[翻译]Windows最常用IPv6命令解析

IT技术 ipcpu 2699浏览

Most Commonly Used ipv6 Command In My Windows XP Workstation
最常用IPv6命令解析【WindowsXP平台】

ipv6 if
This command displays interface information.
显示接口的详细信息

C:\Documents and Settings\Administrator>ipv6 if 7
Interface 7: Ethernet: 本地连接 2
Guid {B5DA9CC8-7A44-4F24-B2C6-8F92F813BF0B}
zones: link 7 site 2
uses Neighbor Discovery
uses Router Discovery
link-layer address: 00-e0-4c-46-f2-4f
preferred global 2001:470:19:13c::dead:beef, life infinite (manual)
preferred site-local fec0::a:2e0:4cff:fe46:f24f, life 47h57m34s/27m34s (publ
ic)
preferred global 2002:404:401:a:9123:a5b3:bed4:df11, life 47h57m34s/27m34s (
temporary)
preferred global 2002:404:401:a:2e0:4cff:fe46:f24f, life 47h57m34s/27m34s (p
ublic)
preferred link-local fe80::2e0:4cff:fe46:f24f, life infinite
multicast interface-local ff01::1, 1 refs, not reportable
multicast link-local ff02::1, 1 refs, not reportable
multicast link-local ff02::1:ff46:f24f, 3 refs, last reporter
multicast link-local ff02::1:ffd4:df11, 1 refs, last reporter
multicast link-local ff02::1:ffad:beef, 1 refs, last reporter
link MTU 1500 (true link MTU 1500)
current hop limit 128
reachable time 42500ms (base 30000ms)
retransmission interval 1000ms
DAD transmits 1
default site prefix length 48

C:\Documents and Settings\Administrator>

ipv6 rt
This command displays the current contents of the routing table.
显示IPv6路由表

C:\Documents and Settings\Administrator>ipv6 rt
fec0:0:0:b::/64 -> 7/fe80::f898:2bda:2f5d:e06d pref 16 life 47h56m26s (autoconf)

fec0:0:0:a::/64 -> 7 pref 8 life 47h56m26s (autoconf)
2002:404:401:b::/64 -> 7/fe80::f898:2bda:2f5d:e06d pref 16 life 47h56m26s (autoc
onf)
2002:404:401:a::/64 -> 7 pref 8 life 47h56m26s (autoconf)
::/0 -> 7/fe80::f898:2bda:2f5d:e06d pref 256 life 18h8m41s (autoconf)

C:\Documents and Settings\Administrator>

tracert6
send ICMPv6 or ICMP Echo Request messages to produce command-line report information about each router that is crossed and the roundtrip time (RTT) for each hop.
tracert的IPv6版本

D:\Documents and Settings\harry>tracert6 ipv6.he.net

Tracing route to ipv6.he.net [2001:470:0:64::2]

from 2001:470:19:13c:219:d1ff:feea:ee16 over a maximum of 30 hops:

1������ <1 ms��� <1 ms��� <1 ms� d.ns.kutukupret.org [2001:470:19:13c::1:4]
2����� 246 ms�� 242 ms�� 245 ms� leenoux-1.tunnel.tserv20.hkg1.ipv6.he.net [2001:470:18:13c::1]
3����� 259 ms�� 253 ms�� 248 ms� gige-g3-13.core1.hkg1.he.net [2001:470:0:ba::1]
4����� 437 ms�� 418 ms�� 421 ms� v1026.core1.sjc1.he.net [2001:470:0:c3::1]
5����� 420 ms�� 426 ms�� 429 ms� 10gigabitethernet2-1.core1.sjc2.he.net [2001:470:0:55::2]
6����� 435 ms�� 442 ms�� 594 ms� 10gigabitethernet1-1.core1.fmt1.he.net [2001:470:0:2f::1]
7����� 426 ms�� 421 ms�� 420 ms� ipv6.he.net [2001:470:0:64::2]

11 Trace complete.

ping6
send ICMPv6 or ICMP Echo Request messages to perform network diagnostics and test reachability for a specific destination.
ping的IPv6版本

D:\Documents and Settings\harry>ping6 ipv6.he.net

Pinging ipv6.he.net [2001:470:0:64::2]

from 2001:470:19:13c:219:d1ff:feea:ee16 with 32 bytes of data:

Reply from 2001:470:0:64::2: bytes=32 time=423ms
Reply from 2001:470:0:64::2: bytes=32 time=435ms
Reply from 2001:470:0:64::2: bytes=32 time=421ms
Reply from 2001:470:0:64::2: bytes=32 time=432ms

Ping statistics for 2001:470:0:64::2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 421ms, Maximum = 435ms, Average = 427ms

ipv6 rtu
This command adds or removes a route in the routing table.
增加或删除IPv6路由
e.g.例如
add static routing
增加一条静态路由

ipv6 -p rtu ::/0 7/2001:470:19:13c::1

add static route to ::/0 (default route) on interface index 7 with ip gateway 2001:470:19:13c::1
增加一条静态默认路由

delete static route
删除静态路由

ipv6 rtu ::/0 7/2001:470:19:13c::1 life 0
Specifying a lifetime of zero causes the route to be deleted.
使用生存时间为零来删除路由

-p Saves the setting in the registry.(static)
参数-p可以是路由条目保存在系统中,重启之后不会失效。

ipv6 adu
This command adds or removes a unicast or anycast address assignment on an interface.
增加单播或者任播IPv6地址
e.g.
ipv6 -p adu 7/2001:470:19:13c::dead:beef
add static ipv6 address to intreface index 7 with ipv6 2001:470:19:13c::dead:beef
在7号接口增加了一个IPv6地址
delete static ipv6
删除接口上IPv6地址
ipv6 adu 7/2001:470:19:13c::dead:beef life 0
Specifying a lifetime of zero causes the address to be removed.
使用生存时间为零来删除地址
-p Saves the setting in the registry.(static)
ipv6 gpu UseTemporaryAddresses
参数-p可以是路由条目保存在系统中,重启之后不会失效。

ipv6 gpu UseTemporaryAddresses

This command determines whether temporary addresses are used at a global level.
i used this command to removes any temporary ipv6 address on interface
清除临时地址(网友tobacco-ubuntu提供)
-p Saves the UseTemporaryAddresses setting in the registry.

=============================================
相关说明:

关于第一条命令的ipv6 if 7,这里面的7是哪里来的,我不想再重复了
C:\Documents and Settings\Administrator>netsh int ipv6 sh int
正在查询活动状态…

索引 Met�� MTU��� 状态��������� 名称
—- —-� —–� ————� —–
6���� 0�� 1500� 已连接���������� VMware Network Adapter VMnet8
5���� 0�� 1500� 已连接���������� 本地连接
4���� 2�� 1280� 已断开���������� Teredo Tunneling Pseudo-Interface
3���� 1�� 1280� 已连接���������� 6to4 Tunneling Pseudo-Interface
2���� 1�� 1280� 已连接���������� Automatic Tunneling Pseudo-Interface
1���� 0�� 1500� 已连接���������� Loopback Pseudo-Interface

这里的索引就是接口ID.也就是上面说的7
此命令可以查看接口的ID、状态和名称。

原文地址:
http://www.kutukupret.com/2009/10/14/most-commonly-used-ipv6-command-in-my-windows-xp-workstation/

end

精彩评论:

tobacco-ubuntu | #1
January 5, 2011 at 4:54 pm
nt6开始ipv6命令全部纳入netsh命令中去。
以下个人了解。
最后那条命令用于重置网卡上的临时ipv6地址。
开启ipv6之后会产生临时ipv6地址。举个例子,比如跨内网利用ipv6传输文件时需要对方的v6地址,ipconfig后会得到多个200x:开头 的v6ip(我一般是两个),其中有一个时效性长,一般不会变化(与DHCP服务器设置有关);另外的时效性比较短,每次联网都会变动(系统自动生成), 这些都是临时地址。
而手动add的v6ip就是固定地址,不会被最后那条命令清除。

多ip同时标识一个机器,这也是ipv6的一个特色。

转载请注明:IPCPU-网络之路 » [翻译]Windows最常用IPv6命令解析