ipv4 to ipv6 tunnel 6to4 (GNS3)

1, topology of FIG.

 

 

2, network address planning

IPV6 address is counted out by the IPV4

Device Name

interface

address

R1

F1 / 0

10.1.1.1/30

F2/0

2001: 0A01: 0101 :: 1/64

R2

F1 / 0

10.1.1.2/30

F2/0

10.3.3.1/30

F3 / 0

10.2.2.4/24

R3

F1 / 0

2001: 0A01: 0202 :: 1/64

F3 / 0

10.2.2.2/30

R4

F1 / 0

2001: 0A03: 0303 :: 1/64

F2/0

10.3.3.3/24

PC-1

E0

Auto ipv6 address

PC-2

E0

Auto ipv6 address

PC-3

E0

Auto ipv6 address

3, configure the network address, and static routes

R1 address configuration

R1(config)#ipv6 unicast-routing

R1(config)#int f1/0

R1(config-if)#ip address 10.1.1.1 255.255.255.252

R1(config-if)#ex

R1(config)#int f2/0

R1(config-if)#ipv6 enable

R1(config-if)#no shutdown

R1(config-if)#ipv6 address 2001:0a01:0101:1::1/64

R1(config-if)#ex

 

R1 Static Routing Configuration

R1(config)#ip route 10.2.2.0 255.255.255.252 10.1.1.2

R1(config)#ip route 10.3.3.0 255.255.255.0 10.1.1.2

 

R2 address configuration

R2(config)#ipv6 unicast-routing

R2(config)#int f1/0

R2(config-if)#ip address 10.1.1.2 255.255.255.252

R2(config-if)#no shu

R2(config-if)#int f3/0

R2(config-if)#ip address 10.2.2.1 255.255.255.252

R2(config-if)#no shutdown

R2(config-if)#int f2/0

R2(config-if)#ip address 10.3.3.4 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

 

R3地址配置

R3(config)#int f3/0

R3(config-if)#no shutdown

R3(config-if)#ip address 10.2.2.2 255.255.255.252

R3(config-if)#ex

R3(config)#ipv6 unicast-routing

R3(config)#int f1/0

R3(config-if)#ipv6 address 2001:0a02:0202:1::1/64

R3(config-if)#ipv6 enable

R3(config-if)#no shutdown

R3(config-if)#exit

 

R3静态路由配置

R3(config)#ip route 10.1.1.0 255.255.255.252 10.2.2.1

R3(config)#ip route 10.3.3.0 255.255.255.0 10.2.2.1

 

3、测试ipv4网络连通性

 

R1 ping R3 R4都通,开始配置6 to 4隧道

 

4、配置ipv6 to 4隧道

R1(config)#int t0

R1(config-if)#ipv6 enable          开启IPV6

R1(config-if)#tunnel source f1/0      出口

R1(config-if)#tunnel mode ipv6ip 6to4  隧道模式6to4

R1(config-if)#ex

R1(config)#ipv6 route 2001::/16 tunnel 0

 

R3(config)#int t0

R3(config-if)#ipv6 enable          开启IPV6

R3(config-if)#tunnel source f3/0      出口

R3(config-if)#tunnel mode ipv6ip 6to4  隧道模式6to4

R3(config-if)#ex

R3(config)#ipv6 route 2001::/16 tunnel 0 

 

5、验证隧道连通性

先查看PC-2、PC-3自动获取的IPV6地址

使用PC-1直接ping PC-2、PC-3

网络通,隧道创建成功。

Guess you like

Origin www.cnblogs.com/YangYuChing/p/10939581.html