所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级

NE40E V800R010C00 配置指南 - NAT与IPv6过渡技术 01

评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置IPv4 over IPv6隧道示例

配置IPv4 over IPv6隧道示例

本举例介绍IPv4 over IPv6隧道的配置过程。

组网需求

图6-3所示,两个IPv4网络分别通过DeviceA和DeviceB与IPv6网络连接,要求在DeviceA和DeviceB之间配置IPv4 over IPv6隧道,以便两个IPv4网络内的主机可以互通。

图6-3  配置IPv4 over IPv6隧道组网图
说明:

本例中interface1,interface2分别代表GE1/0/0,GE1/0/1



配置思路

本例按如下思路进行配置:

  1. 在两端边界设备上配置IPv4 over IPv6隧道。
  2. 配置经过该隧道接口转发的路由。

数据准备

为完成此配置例,需准备如下的数据:

  • 隧道两端的源IPv6地址、目的Ipv6地址。

  • Tunnel接口的IPv4地址。

操作步骤

  1. 配置接口的IPv6地址

    # 配置DeviceA。

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] interface gigabitethernet 1/0/0
    [~DeviceA-GigabitEthernet1/0/0] ipv6 enable
    [*DeviceA-GigabitEthernet1/0/0] ipv6 address 2001:db8:100::1 64
    [*DeviceA-GigabitEthernet1/0/0] undo shutdown
    [*DeviceA-GigabitEthernet1/0/0] commit
    [~DeviceA-GigabitEthernet1/0/0] quit

    # 配置DeviceB。

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceB
    [*HUAWEI] commit
    [~DeviceB] interface gigabitethernet 1/0/0
    [~DeviceB-GigabitEthernet1/0/0] ipv6 enable
    [*DeviceB-GigabitEthernet1/0/0] ipv6 address 2001:db8:100::2 64
    [*DeviceB-GigabitEthernet1/0/0] undo shutdown
    [*DeviceB-GigabitEthernet1/0/0] commit
    [~DeviceB-GigabitEthernet1/0/0] quit

  2. 配置接口的IPv4地址

    # 配置DeviceA。

    [~DeviceA] interface gigabitethernet 1/0/1
    [~DeviceA-GigabitEthernet1/0/1] ip address 10.1.1.2 255.255.255.0
    [*DeviceA-GigabitEthernet1/0/1] undo shutdown
    [*DeviceA-GigabitEthernet1/0/1] commit
    [~DeviceA-GigabitEthernet1/0/1] quit

    # 配置DeviceB。

    [~DeviceB] interface gigabitethernet 1/0/1
    [~DeviceB-GigabitEthernet1/0/1] ip address 176.16.1.2 255.255.255.0
    [*DeviceB-GigabitEthernet1/0/1] undo shutdown
    [*DeviceB-GigabitEthernet1/0/1] commit
    [~DeviceB-GigabitEthernet1/0/1] quit

  3. 配置Loopback接口

    # 配置DeviceA。

    [~DeviceA] interface LoopBack 1
    [~DeviceA-LoopBack1] ipv6 enable
    [*DeviceA-LoopBack1] ipv6 address 2001:db8:200::1 64
    [*DeviceA-LoopBack1] binding tunnel ipv4-ipv6
    [*DeviceA-LoopBack1] commit

    # 配置DeviceB。

    [~DeviceB] interface LoopBack 1
    [~DeviceB-LoopBack1] ipv6 enable
    [*DeviceB-LoopBack1] ipv6 address 2001:db8:300::2 64
    [*DeviceB-LoopBack1] binding tunnel ipv4-ipv6
    [*DeviceB-LoopBack1] commit

  4. 配置隧道的接口IP地址、源接口、目的地址

    # 配置DeviceA。

    [~DeviceA] interface tunnel 1
    [~DeviceA-Tunnel1] tunnel-protocol ipv4-ipv6
    [~DeviceA-Tunnel1] ip address 192.168.1.1 255.255.255.0
    [*DeviceA-Tunnel1] source LoopBack 1
    [*DeviceA-Tunnel1] destination 2001:db8:300::2
    [*DeviceA-Tunnel1] commit
    [~DeviceA-Tunnel1] quit

    # 配置DeviceB。

    [~DeviceB] interface tunnel 1
    [~DeviceB-Tunnel1] tunnel-protocol ipv4-ipv6
    [~DeviceB-Tunnel1] ip address 192.168.1.2 255.255.255.0
    [*DeviceB-Tunnel1] source LoopBack 1
    [*DeviceB-Tunnel1] destination 2001:db8:200::1
    [*DeviceB-Tunnel1] commit
    [~DeviceB-Tunnel1] quit

  5. 配置经过该隧道接口转发的路由

    # 配置DeviceA。

    [~DeviceA] ipv6 route-static 2001:db8:300::2 64 gigabitethernet 1/0/0 2001:db8:100::2
    [*DeviceA] commit
    [~DeviceA] ospf 1
    [*DeviceA-ospf-1] area 0
    [*DeviceA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*DeviceA-ospf-1-area-0.0.0.0] commit

    # 配置DeviceB。

    [~DeviceB] ipv6 route-static 2001:db8:200::1 64 gigabitethernet 1/0/0 2001:db8:100::1
    [*DeviceB] commit
    [~DeviceB] ospf 1
    [*DeviceB-ospf-1] area 0
    [*DeviceB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*DeviceB-ospf-1-area-0.0.0.0] network 176.16.1.0 0.0.0.255
    [*DeviceB-ospf-1-area-0.0.0.0] commit

  6. 配置PC地址

    # 配置PC1。

    配置PC1地址为10.1.1.1/24,与DeviceA的接口GE1/0/1同一网段。IP地址的配置方法与PC1的操作系统有关,配置方法略。

    # 配置PC2。

    配置PC2地址为176.16.1.1/24,与DeviceB的接口GE1/0/1同一网段。IP地址的配置方法与PC2的操作系统有关,配置方法略。

  7. 检查配置结果

    # 在DeviceA上执行Ping命令,检查DeviceB的Tunnel1接口的IPv4地址是否可达。

    [~DeviceA] ping 192.168.1.2
      PING 192.168.1.2: 56  data bytes, press CTRL_C to break
         Reply from 192.168.1.2: bytes=56 Sequence=1 ttl=255 time=108 ms
         Reply from 192.168.1.2: bytes=56 Sequence=2 ttl=255 time=2 ms
         Reply from 192.168.1.2: bytes=56 Sequence=3 ttl=255 time=3 ms
         Reply from 192.168.1.2: bytes=56 Sequence=4 ttl=255 time=3 ms
         Reply from 192.168.1.2: bytes=56 Sequence=5 ttl=255 time=2 ms
    
        --- 192.168.1.2 ping statistics ---
         5 packet(s) transmitted
         5 packet(s) received
         0.00% packet loss
         round-trip min/avg/max = 2/23/108 ms

    # 在PC1上Ping向PC2的IP地址,可以互通。

    C:\> ping 172.16.1.1
    Pinging 172.16.1.1 with 32 bytes of data:
    Reply from 172.16.1.1: time<1ms
    Reply from 172.16.1.1: time<1ms
    Reply from 172.16.1.1: time<1ms
    Reply from 172.16.1.1: time<1ms
    Ping statistics for 172.16.1.1:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms

配置文件

  • DeviceA的配置文件

    #
    sysname DeviceA
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:100::1/64
    #
    interface GigabitEthernet1/0/1
     undo shutdown
     ip address 10.1.1.2 255.255.255.0
    #
    interface LoopBack1
     ipv6 enable
     ipv6 address 2001:DB8:200::1/64
     binding tunnel ipv4-ipv6
    #
    interface Tunnel1
     ip address 192.168.1.1 255.255.255.0
     tunnel-protocol ipv4-ipv6
     source LoopBack1
     destination 2001:DB8:300::2
    #
    ospf 1
     area 0.0.0.0
      network 192.168.1.0 0.0.0.255
      network 10.1.1.0 0.0.0.255
    #
    ipv6 route-static 2001:DB8:300:: 64 GigabitEthernet1/0/0 2001:DB8:100::2
    #
    return
  • DeviceB的配置文件

    #
    sysname DeviceB
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     ipv6 enable
     ipv6 address 2001:DB8:100::2/64
    #
    interface GigabitEthernet1/0/1
     undo shutdown
     ip address 172.16.1.2 255.255.255.0
    #
    interface LoopBack1
     ipv6 enable
     ipv6 address 2001:DB8:300::2/64
     binding tunnel ipv4-ipv6
    #
    interface Tunnel1
     ip address 192.168.1.2 255.255.255.0
     tunnel-protocol ipv4-ipv6
     source LoopBack1
     destination 2001:DB8:200::1
    #
    ospf 1
     area 0.0.0.0
      network 192.168.1.0 0.0.0.255
      network 172.16.1.0 0.0.0.255
    #
    ipv6 route-static 2001:DB8:200:: 64 GigabitEthernet1/0/0 2001:DB8:100::1
    #
    return
下载文档
更新时间:2018-07-12

文档编号:EDOC1100028549

浏览量:19940

下载量:204

平均得分:
本文档适用于这些产品
相关文档
相关版本
Share
上一页 下一页