一、网络拓扑
R1-R3(Internet)-R2之间的网络为IPv4环境,PC1及PC2处于IPv6孤岛,R1及R2为IPv6/IPv4双栈设备,在R1和R2上部署6to4隧道使得PC1及PC2能够互相访问。
二、基本配置
- R1配置
<R1>display current-configuration
[V200R003C00]
#
sysname R1
#
ipv6
#
interface GigabitEthernet0/0/1
ip address 200.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/2
ipv6 enable
ipv6 address 2002:C801:101::FFFF/64
#
interface Tunnel0/0/0
ipv6 enable
ipv6 address auto link-local
tunnel-protocol ipv6-ipv4 6to4
source 200.1.1.1
#
ip route-static 0.0.0.0 0.0.0.0 200.1.1.2
#
ipv6 route-static 2002:C802:202:: 64 Tunnel0/0/0
#
return
<R1>
- R2配置
<R2>display current-configuration
[V200R003C00]
#
sysname R2
#
ipv6
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2002:C802:202::FFFF/64
#
interface GigabitEthernet0/0/2
ip address 200.2.2.2 255.255.255.0
#
interface Tunnel0/0/0
ipv6 enable
ipv6 address auto link-local
tunnel-protocol ipv6-ipv4 6to4
source 200.2.2.2
#
ip route-static 0.0.0.0 0.0.0.0 200.2.2.1
#
ipv6 route-static 2002:C801:101:: 64 Tunnel0/0/0
#
return
<R2>
- R3(Internet)配置
<Internet>display current-configuration
[V200R003C00]
#
sysname Internet
#
interface GigabitEthernet0/0/1
ip address 200.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 200.2.2.1 255.255.255.0
#
return
<Internet>
- PC1设置
IPv6地址:2002:C801:0101::1/64
IPv6网关:2002:C801:0101::FFFF - PC2设置
IPv6地址:2002:C802:0202::1/64
IPv6网关:2002:C802:0202::FFFF
三、结果验证
- R1接口状态
[R1]display ipv6 interface brief
*down: administratively down
(l): loopback
(s): spoofing
Interface Physical Protocol
GigabitEthernet0/0/2 up up
[IPv6 Address] 2002:C801:101::FFFF
Tunnel0/0/0 up up
[IPv6 Address] FE80::C801:101
[R1]dis
[R1]display ip in
[R1]display ip interface bri
[R1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 3
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 unassigned down down
GigabitEthernet0/0/1 200.1.1.1/24 up up
GigabitEthernet0/0/2 unassigned up down
NULL0 unassigned up up(s)
Tunnel0/0/0 unassigned up down
[R1]
- PC1 ping测PC2 IPv6地址
PC1>ping 2002:C802:0202::1 -t
Ping 2002:c802:202::1: 32 data bytes, Press Ctrl_C to break
From 2002:c802:202::1: bytes=32 seq=1 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=2 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=3 hop limit=253 time=47 ms
From 2002:c802:202::1: bytes=32 seq=4 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=5 hop limit=253 time=47 ms
From 2002:c802:202::1: bytes=32 seq=6 hop limit=253 time=32 ms
From 2002:c802:202::1: bytes=32 seq=7 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=8 hop limit=253 time=47 ms
From 2002:c802:202::1: bytes=32 seq=9 hop limit=253 time=15 ms
From 2002:c802:202::1: bytes=32 seq=10 hop limit=253 time=32 ms
From 2002:c802:202::1: bytes=32 seq=11 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=12 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=13 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=14 hop limit=253 time=16 ms
From 2002:c802:202::1: bytes=32 seq=15 hop limit=253 time=16 ms
From 2002:c802:202::1: bytes=32 seq=16 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=17 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=18 hop limit=253 time=31 ms
From 2002:c802:202::1: bytes=32 seq=19 hop limit=253 time=32 ms
--- 2002:c802:202::1 ping statistics ---
19 packet(s) transmitted
19 packet(s) received
0.00% packet loss
round-trip min/avg/max = 15/31/47 ms
PC1>