IPv6实验1_IPv6地址配置

时间:2021-12-12 13:19:31

IPv6地址配置

实验任务

(1)掌握如何在路由器及PC上配置IPv6地址

(2)掌握如何用IPv6 ping命令进行IPv6地址可达性检查

(3)掌握如何用命令来查看IPv6地址配置

IPv6实验1_IPv6地址配置

实验过程

在RT上的配置

<H3C>sys

System View: return to User View with Ctrl+Z.

[H3C]int g0/0

[H3C-GigabitEthernet0/0]dis ipv6 int g0/0

IP6Stack is not configured.

配置链路本地地址

[H3C-GigabitEthernet0/0]ipv6 address fe80::1 link-local

配置全球唯一地址

[H3C-GigabitEthernet0/0]ipv6 address 1::1 64

查看配置情况

[H3C-GigabitEthernet0/0]dis ipv6 int g0/0

GigabitEthernet0/0 current state: UP

Line protocol current state: UP

IPv6 is enabled, link-local address is FE80::1 [TENTATIVE]

Global unicast address(es):

1::1, subnet is 1::/64 [TENTATIVE]

Joined group address(es):

FF02::1

FF02::2

FF02::1:FF00:1

MTU is 1500 bytes

ND DAD is enabled, number of DAD attempts: 1

ND reachable time is 30000 milliseconds

ND retransmit interval is 1000 milliseconds

Hosts use stateless autoconfig for addresses

在PC上的配置

安装IPv6协议并启用

C:\>netsh interface ipv6 install

确定。

C:\>netsh

netsh>interface ipv6

netsh interface ipv6>show interface

正在查询活动状态...

索引 Met   MTU    状态          名称

---- ----  -----  ------------  -----

5     0   1500  已连接           VirtualBox Host-Only Network

4     2   1280  已断开           Teredo Tunneling Pseudo-Interface

3     1   1280  已连接           6to4 Pseudo-Interface

2     1   1280  已连接           Automatic Tunneling Pseudo-Interface

1     0   1500  已连接           Loopback Pseudo-Interface

查看自动配置的链路本地地址

C:\>ipconfig /all

Ethernet adapter 本地连接 6:

Connection-specific DNS Suffix  . :

Description . . . . . . . . . . . : Microsoft Loopback Adapter

Physical Address. . . . . . . . . : 02-00-4C-4F-4F-50

Dhcp Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

Autoconfiguration IP Address. . . : 169.254.25.129

Subnet Mask . . . . . . . . . . . : 255.255.0.0

IP Address. . . . . . . . . . . . : fe80::4cff:fe4f:4f50%8

Default Gateway . . . . . . . . . :

DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1

fec0:0:0:ffff::2%1

fec0:0:0:ffff::3%1

netsh interface ipv6>show address 8

正在查询活动状态...

单一广播地址      : fe80::4cff:fe4f:4f50

类型              : 链接

DAD 状态          : 首选项

有效寿命          : infinite

首选寿命          : infinite

作用域            : 链接

前缀起源          : 著名

后缀起源          : 链路层地址

没有找到项目。

netsh interface ipv6>add address 8 fe80::2

确定。

netsh interface ipv6>add address 8 1::2

确定。

netsh interface ipv6>show address 8

正在查询活动状态...

单一广播地址      : 1::2

类型              : 手动

DAD 状态          : 首选项

有效寿命          : infinite

首选寿命          : infinite

作用域            : 全局

前缀起源          : 手动

后缀起源          : 手动

单一广播地址      : fe80::2

类型              : 手动

DAD 状态          : 首选项

有效寿命          : infinite

首选寿命          : infinite

作用域            : 链接

前缀起源          : 手动

后缀起源          : 手动

单一广播地址      : fe80::4cff:fe4f:4f50

类型              : 链接

DAD 状态          : 首选项

有效寿命          : infinite

首选寿命          : infinite

作用域            : 链接

前缀起源          : 著名

后缀起源          : 链路层地址

没有找到项目。

测试IPv6地址可达性

在RT上测试PC

[H3C-GigabitEthernet0/0]ping ipv6 -i g0/0 fe80::2

Ping6(56 data bytes) FE80::1 --> FE80::2, press CTRL_C to break

56 bytes from FE80::2, icmp_seq=0 hlim=128 time=1.150 ms

56 bytes from FE80::2, icmp_seq=1 hlim=128 time=0.662 ms

56 bytes from FE80::2, icmp_seq=2 hlim=128 time=0.691 ms

56 bytes from FE80::2, icmp_seq=3 hlim=128 time=0.543 ms

56 bytes from FE80::2, icmp_seq=4 hlim=128 time=0.732 ms

--- Ping6 statistics for fe80::2 ---

5 packets transmitted, 5 packets received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.543/0.756/1.150/0.207 ms

[H3C-GigabitEthernet0/0]%Oct  7 12:30:10:910 2016 H3C PING/6/PING_STATISTICS: Ping6 statistics for fe80::2: 5 packets transmitted, 5 packets received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.543/0.756/1.150/0.207 ms.

[H3C-GigabitEthernet0/0]

[H3C-GigabitEthernet0/0]ping ipv6 -i g0/0 1::2

Ping6(56 data bytes) 1::1 --> 1::2, press CTRL_C to break

56 bytes from 1::2, icmp_seq=0 hlim=128 time=1.447 ms

56 bytes from 1::2, icmp_seq=1 hlim=128 time=0.708 ms

56 bytes from 1::2, icmp_seq=2 hlim=128 time=0.703 ms

56 bytes from 1::2, icmp_seq=3 hlim=128 time=0.691 ms

56 bytes from 1::2, icmp_seq=4 hlim=128 time=0.688 ms

--- Ping6 statistics for 1::2 ---

5 packets transmitted, 5 packets received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.688/0.847/1.447/0.300 ms

[H3C-GigabitEthernet0/0]%Oct  7 12:32:36:806 2016 H3C PING/6/PING_STATISTICS: Ping6 statistics for 1::2: 5 packets transmitted, 5 packets received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.688/0.847/1.447/0.300 ms.

[H3C-GigabitEthernet0/0]

[H3C-GigabitEthernet0/0]ping ipv6 -i g0/0 fe80::4cff:fe4f:4f50

Ping6(56 data bytes) FE80::1 --> FE80::4CFF:FE4F:4F50, press CTRL_C to break

56 bytes from FE80::4CFF:FE4F:4F50, icmp_seq=0 hlim=128 time=0.769 ms

56 bytes from FE80::4CFF:FE4F:4F50, icmp_seq=1 hlim=128 time=0.721 ms

56 bytes from FE80::4CFF:FE4F:4F50, icmp_seq=2 hlim=128 time=0.681 ms

56 bytes from FE80::4CFF:FE4F:4F50, icmp_seq=3 hlim=128 time=0.717 ms

56 bytes from FE80::4CFF:FE4F:4F50, icmp_seq=4 hlim=128 time=0.740 ms

--- Ping6 statistics for fe80::4cff:fe4f:4f50 ---

5 packets transmitted, 5 packets received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.681/0.726/0.769/0.029 ms

[H3C-GigabitEthernet0/0]%Oct  7 12:33:50:652 2016 H3C PING/6/PING_STATISTICS: Ping6 statistics for fe80::4cff:fe4f:4f50: 5 packets transmitted, 5 packets received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.681/0.726/0.769/0.029 ms.

在PC上测试RT

C:\Documents and Settings\Administrator>ping fe80::1%8

Pinging fe80::1%8 with 32 bytes of data:

Reply from fe80::1%8: time<1ms

Reply from fe80::1%8: time<1ms

Reply from fe80::1%8: time<1ms

Reply from fe80::1%8: time<1ms

Ping statistics for fe80::1%8:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\Administrator>

C:\Documents and Settings\Administrator>ping 1::1

Pinging 1::1 with 32 bytes of data:

Reply from 1::1: time=1ms

Reply from 1::1: time<1ms

Reply from 1::1: time<1ms

Reply from 1::1: time<1ms

Ping statistics for 1::1:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 1ms, Average = 0ms