IPv6 over IPv4 手动隧道

实验目的:

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

实验环境:

        R1-R3均使用Router

实验过程

        规划拓扑图

fa8d42e6772e43d89965cc6b99afe41b.png

        规划IP地址

R1:
Ethernet0/0/0                     10.1.10.1/24
Ethernet0/0/1                     3003::1/64
Tunnel0/0/1                       3001::1/64

R2:
Ethernet0/0/0                     10.1.10.2/24     
Ethernet0/0/1                     10.1.20.2/24 

R3:
Ethernet0/0/0                     10.1.20.3/24 
Ethernet0/0/1                     3002::1/64
Tunnel0/0/1                       3001::2/64

        配置IP地址

[R1]interface Ethernet0/0/0
[R1-Ethernet0/0/0] ip address 10.1.10.1 255.255.255.0
[R1-Ethernet0/0/1]quit
[R1]ipv6
[R1]interface Ethernet0/0/1
[R1-Ethernet0/0/1] ipv6 enable
[R1-Ethernet0/0/1] ipv6 address 3003::1/64
[R1-Ethernet0/0/1]interface Tunnel0/0/1
[R1-Tunnel0/0/1] ipv6 enable
[R1-Tunnel0/0/1] ipv6 address 3001::1/64
[R2]interface Ethernet0/0/0
[R2-Ethernet0/0/0] ip address 10.1.10.2 255.255.255.0
[R2-Ethernet0/0/0]interface Ethernet0/0/1
[R2-Ethernet0/0/1] ip address 10.1.20.2 255.255.255.0
[R3]ipv6
[R3]interface Ethernet0/0/0
[R3-Ethernet0/0/0] ip address 10.1.20.3 255.255.255.0
[R3-Ethernet0/0/0]interface Ethernet0/0/1
[R3-Ethernet0/0/1] ipv6 enable
[R3-Ethernet0/0/1] ipv6 address 3002::1/64
[R3-Ethernet0/0/1]interface Tunnel0/0/1
[R3-Tunnel0/0/1] ipv6 enable
[R3-Tunnel0/0/1] ipv6 address 3001::2/64

配置静态路由使IPv4地址互通

[R1]ip route-static 10.1.20.0 255.255.255.0 10.1.10.2
[R3]ip route-static 10.1.10.0 255.255.255.0 10.1.20.2
[R3]ping 10.1.10.1
  PING 10.1.10.1: 56  data bytes, press CTRL_C to break
    Reply from 10.1.10.1: bytes=56 Sequence=1 ttl=254 time=230 ms
    Reply from 10.1.10.1: bytes=56 Sequence=2 ttl=254 time=70 ms
    Reply from 10.1.10.1: bytes=56 Sequence=3 ttl=254 time=140 ms
    Reply from 10.1.10.1: bytes=56 Sequence=4 ttl=254 time=60 ms
    Reply from 10.1.10.1: bytes=56 Sequence=5 ttl=254 time=90 ms

  --- 10.1.10.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 60/118/230 ms

配置手动隧道

[R1]interface Tunnel0/0/1
[R1-Tunnel0/0/1] tunnel-protocol ipv6-ipv4
        #设置类型为ipv6-ipv4手动隧道
[R1-Tunnel0/0/1] source Ethernet0/0/0
        #选择出接口为Ethernet0/0/0
[R1-Tunnel0/0/1] destination 10.1.20.3
        #指定隧道对端的IPv4地址
[R3]interface Tunnel0/0/1
[R3-Tunnel0/0/1] tunnel-protocol ipv6-ipv4
[R3-Tunnel0/0/1] source Ethernet0/0/0
[R3-Tunnel0/0/1] destination 10.1.10.1

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

[R1]ipv6 route-static :: 0 Tunnel0/0/1
[R3]ipv6 route-static :: 0 Tunnel0/0/1
[R3]ping ipv6 -a 3001::2 3001::1
  PING 3001::1 : 56  data bytes, press CTRL_C to break
    Reply from 3001::1 
    bytes=56 Sequence=1 hop limit=64  time = 60 ms
    Reply from 3001::1 
    bytes=56 Sequence=2 hop limit=64  time = 30 ms
    Reply from 3001::1 
    bytes=56 Sequence=3 hop limit=64  time = 80 ms
    Reply from 3001::1 
    bytes=56 Sequence=4 hop limit=64  time = 60 ms
    Reply from 3001::1 
    bytes=56 Sequence=5 hop limit=64  time = 70 ms

  --- 3001::1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/60/80 ms

配置PC1和PC2的IPv6地址并互ping

c14a78baa0d346429de0fd9c492f2060.pngbc06dd0b65754a2689e2f1c750c5fdd3.png

fe7fa0356ce74bc78433c2a6b445ffba.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值