发布时间:2025-12-10 11:51:33 浏览次数:7
IPv6 6to4隧道配置和验证实验
【实验目的】
熟悉IPv6 6to4隧道的概念。
掌握IPv6和IPv4共存的实现方法。
掌握IPv6 6to4地址编址规则。
掌握IPv6 6to4隧道的配置。
验证配置。
【实验拓扑】
设备参数如下表所示。
| 设备 | 接口 | IP地址 | 子网掩码 | 默认网关 |
| R1 | S0/0 | 192.168.12.1 | 24 | N/A |
| Loopback 0 | 2000:F106:F208:1::1 | 64 | N/A | |
| R2 | S0/0 | 192.168.12.2 | 24 | N/A |
| Loopback 0 | 2000:F106:F208:2::1 | 64 | N/A |
实验步骤:
在 R1 上进行的配置:
在 R2 上进行的配置:
实验脚本:
//R1
interface Serial0/0ip address 192.168.12.1 255.255.255.0clock rate 2000000interface Loopback0no ip addressipv6 address 2000:F106:F208:1::1/64ipv6 enableinterface Tunnel0ipv6 address 2002:C0A8:C01::1/64ipv6 enabletunnel source Serial0/0tunnel mode ipv6ip 6to4ipv6 route 2000:F106:F208:2::/64 2002:C0A8:C02::2ipv6 route 2002::/16 Tunnel0//R2
interface Serial0/0ip address 192.168.12.2 255.255.255.0clock rate 2000000interface Loopback0ipv6 address 2000:F106:F208:2::1/64ipv6 enableinterface Tunnel0ipv6 address 2002:C0A8:C02::2/64ipv6 enabletunnel source Serial0/0tunnel mode ipv6ip 6to4ipv6 route 2000:F106:F208:1::/64 2002:C0A8:C01::1ipv6 route 2002::/16 Tunnel0【实验调试】
R1#show interfaces tunnel 0
Tunnel0 is up, line protocol is up
Hardware is Tunnel
MTU 1514 bytes, BW 9 Kbit/sec, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source 192.168.12.1 (Serial0/0), destination UNKNOWN
Tunnel protocol/transport IPv6 6to4
Fast tunneling enabled
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 00:17:48, output 00:17:48, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
10 packets input, 1400 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
27 packets output, 2832 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out
R1#
R1#ping ipv6 2000:F106:F208:2::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2000:F106:F208:2::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/22/72 ms
R1#
R2# ping ipv6 2000:F106:F208:1::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2000:F106:F208:1::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms
R2#
【实验原理】
这个实验中使用的原理是IPv6 6to4隧道技术。
下面是这种技术的基本原理:
1.IPv6地址编址规则:
2.隧道配置:
3.路由配置:
4.通信验证:
注意:此实验可在GNS3或EVE-NG里面进行模拟配置。