此实验依照网络工程师教程和华为官方拓扑制作,其余等我想想…………

HUAWEI- IPv4 over IPv6 配置6to4隧道实例

HUAWEI- IPv4 over IPv6 配置6to4隧道实例_HUAWEI

背景说明:公司的两个分支各有两个6to4网络,通过核心路由器与IPv4骨干网相连,需要在R1和R2之间配置6to4隧道,以便两个网络相同。

IP地址接口规划表

本端设备

接口

IP地址

对端设备

接口

IP地址

R1

S 1/0/0

12.1.1.1/30

R2

S 1/0/0

12.1.1.2/30

R1

Tunnel 0/0/0

::12.1.1.1/96

R2

Tunnel 0/0/0

::12.1.1.2/96

R1

GE0/0/1

2002:c01:101::1/64

PC1

Ethernet 0/0/1

2002:c01:102::1/64

R2

GE0/0/1

2002:c01:101::ffff/64

PC2

Ethernet 0/0/1

2002:c01:002::ffff/64

配置步骤:

  • 配置IPv4/IPv6双协议栈
  • 配置6to4隧道
  • 配置相关路由,实现互通

实验实施:

一、配置IPv4/IPv6双协议栈

[R1]ipv6 
[R1]interface Serial1/0/0
[R1-Serial1/0/0] ip address 12.1.1.1 255.255.255.252
#
[R1-Serial1/0/0]interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1] ipv6 enable
[R1-GigabitEthernet0/0/1] ipv6 address 2002:C01:101::FFFF/64
[R2]ipv6
[R2]interface Serial1/0/0
[R2-Serial1/0/0] ip address 12.1.1.2 255.255.255.252
[R2-Serial1/0/0]#
[R2-Serial1/0/0]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1] ipv6 enable
[R2-GigabitEthernet0/0/1] ipv6 address 2002:C01:102::FFFF/64

二、配置6to4隧道

[R1]  interface Tunnel0/0/0
[R1-Tunnel0/0/0] ipv6 enable
[R1-Tunnel0/0/0]ipv6 address ::12.1.1.1/64
[R1-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
[R1-Tunnel0/0/0]source 12.1.1.1
[R2]  interface Tunnel0/0/0
[R2-Tunnel0/0/0] ipv6 enable
[R2-Tunnel0/0/0] ipv6 address ::12.1.1.2/64
[R2-Tunnel0/0/0] tunnel-protocol ipv6-ipv4 6to4
[R2-Tunnel0/0/0] source 12.1.1.2

为了让6to4网络之间互通,需要为6to4网络内的主机配置6to4地址。6to4地址的前缀是2002:IPv4地址:,

地址格式:

Tunnel的目的地址是从原始的IPv6报文的目的地址中获取的

三、配置静态路由实现互通

[R1]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
#
[R1]ipv6 route-static :: 0 Tunnel0/0/0
[R2]ip route-static 0.0.0.0 0.0.0.0 12.1.1.1
#
[R2]ipv6 route-static :: 0 Tunnel0/0/0

项目效果验证:

验证网络互通:

HUAWEI- IPv4 over IPv6 配置6to4隧道实例_HUAWEI_02

抓包验证6to4隧道:

HUAWEI- IPv4 over IPv6 配置6to4隧道实例_Ethernet_03