IPv6 over IPv4 自动隧道

 

 

 实验目的:

        通过IPv4地址建立隧道,实现IPv6地址的互联互通

实验环境:

        R1、R2使用Router,交换机使用S5700

实验过程

        规划拓扑图

89329fff40ce495f947bf16a49672aaa.png

        规划IP地址

R1:
GigabitEthernet 0/0/0             10.0.12.1
Tunnel0/0/1                       ::10.0.12.1/64

R2:
GigabitEthernet 0/0/0             10.0.12.2
Tunnel0/0/1                       ::10.0.12.2/64

        配置IP地址

[R1]ipv6
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.0.12.1 24
[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ipv6 enable
[R2-Tunnel0/0/1]ipv6 address ::10.0.12.1/64
[R2]ipv6
[R2]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0] ip address 10.0.12.2 255.255.255.0
[R2-GigabitEthernet0/0/1]interface Tunnel0/0/1
[R2-Tunnel0/0/1] ipv6 enable
[R2-Tunnel0/0/1]ipv6 address ::10.0.12.2/64 

ping测试IPv4地址连通性

[R1]ping 10.0.12.2
  PING 10.0.12.2: 56  data bytes, press CTRL_C to break
    Reply from 10.0.12.2: bytes=56 Sequence=1 ttl=255 time=220 ms
    Reply from 10.0.12.2: bytes=56 Sequence=2 ttl=255 time=60 ms
    Reply from 10.0.12.2: bytes=56 Sequence=3 ttl=255 time=40 ms
    Reply from 10.0.12.2: bytes=56 Sequence=4 ttl=255 time=40 ms
    Reply from 10.0.12.2: bytes=56 Sequence=5 ttl=255 time=50 ms

  --- 10.0.12.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/82/220 ms

配置自动隧道

[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]tunnel-protocol ipv6-ipv4 auto-tunnel
                #配置隧道类型为自动隧道
[R1-Tunnel0/0/1]source GigabitEthernet 0/0/0
                #配置出接口
[R2]interface Tunnel 0/0/1
[R2-Tunnel0/0/1] tunnel-protocol ipv6-ipv4 auto-tunnel
[R2-Tunnel0/0/1] source GigabitEthernet0/0/0

配置IPv6静态路由使接口互通

[R1]ipv6 route-static :: 0 Tunnel 0/0/1
[R2]ipv6 route-static :: 0 Tunnel0/0/1 

 ping测试

[R2]ping ipv6 ::10.0.12.1
  PING ::10.0.12.1 : 56  data bytes, press CTRL_C to break
    Reply from ::10.0.12.1 
    bytes=56 Sequence=1 hop limit=64  time = 30 ms
    Reply from ::10.0.12.1 
    bytes=56 Sequence=2 hop limit=64  time = 30 ms
    Reply from ::10.0.12.1 
    bytes=56 Sequence=3 hop limit=64  time = 50 ms
    Reply from ::10.0.12.1 
    bytes=56 Sequence=4 hop limit=64  time = 50 ms
    Reply from ::10.0.12.1 
    bytes=56 Sequence=5 hop limit=64  time = 40 ms

  --- ::10.0.12.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/40/50 ms

 

 

 

 

 

  • 14
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值