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

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

提示

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

升级

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

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

配置6RD中继示例

通过配置6RD隧道中继可以实现孤立的IPv6网络和6RD域中的主机或设备间的互相访问。

组网需求

图7-5所示,DeviceA和DeviceB支持双协议栈,分别与相应的IPv6网络以及IPv4网络相连。DeviceA为6RD CE设备,连接的IPv6网络为6RD网络。DeviceB为6RD BR设备,连接的IPv6网络为6RD域外的普通IPv6网络。要求在DeviceA和DeviceB之间配置6RD隧道,以便两个IPv6网络内的主机可以互通。

图7-5  配置6RD域与普通IPv6网络互通场景下6RD隧道组网图

配置思路

配置6RD隧道的思路如下:

  1. DeviceA和DeviceB上配置连接IPv4网络的物理接口IPv4地址,并开启设备IPv6报文转发功能。

  2. DeviceA和DeviceB上配置6RD隧道,指定源地址、6RD前缀及前缀长度、IPv4前缀长度,从而生成6RD委托前缀。

  3. DeviceA和DeviceB上根据6RD委托前缀配置6RD隧道,以及连接6RD域、IPv6网络的物理接口的IPv6地址。

  4. 在PC1和PC2上配置接口的IPv6地址。其中,PC1的地址前缀为6RD前缀和子网ID组合的64位地址前缀,PC2的地址前缀为普通IPv6地址前缀。

  5. DeviceA和DeviceB上配置到达对方6RD域或IPv6网络 nage的静态路由。

数据准备

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

  • 接口的IPv4地址

  • 隧道的源地址

  • 隧道的6RD前缀

  • 隧道的IPv4前缀长度

操作步骤

  1. 配置IPv4/IPv6双协议栈

    # 配置DeviceA。

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] interface gigabitethernet 1/0/1
    [*DeviceA-GigabitEthernet1/0/1] ip address 10.1.1.1 24
    [*DeviceA-GigabitEthernet1/0/1] commit
    [~DeviceA-GigabitEthernet1/0/1] quit

    # 配置DeviceB。

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceB
    [*HUAWEI] commit
    [~DeviceB] interface gigabitethernet 1/0/1
    [*DeviceB-GigabitEthernet1/0/1] ip address 10.1.1.2 24
    [*DeviceB-GigabitEthernet1/0/1] commit
    [~DeviceB-GigabitEthernet1/0/1] quit

  2. 配置6RD隧道

    # 配置DeviceA。

    [~DeviceA] interface Tunnel 1
    [*DeviceA-Tunnel1] tunnel-protocol ipv6-ipv4 6rd
    [*DeviceA-Tunnel1] ipv6 enable
    [*DeviceA-Tunnel1] source GigabitEthernet 1/0/1
    [*DeviceA-Tunnel1] ipv6-prefix 2001:db8::/32
    [*DeviceA-Tunnel1] ipv4-prefix length 8
    [*DeviceA-Tunnel1] border-relay address 10.1.1.2
    [*DeviceA-Tunnel1] commit

    # 配置DeviceB。

    [~DeviceB] interface Tunnel 1
    [*DeviceB-Tunnel1] tunnel-protocol ipv6-ipv4 6rd
    [*DeviceB-Tunnel1] ipv6 enable
    [*DeviceB-Tunnel1] source GigabitEthernet 1/0/1
    [*DeviceB-Tunnel1] ipv6-prefix 2001:db8::/32
    [*DeviceB-Tunnel1] ipv4-prefix length 8
    [*DeviceB-Tunnel1] commit
    说明:

    配置6RD隧道的源地址或源接口、6RD前缀、前缀长度和IPv4前缀长度后,设备会自动计算出6RD委托前缀的值。可以使用display this interface命令显示委托前缀,再配置Tunnel接口的IPv6地址。

  3. 查看计算出的6RD委托前缀

    # 查看DeviceA。

    [~DeviceA-Tunnel1] display this interface
    Tunnel1 current state : UP (ifindex: 9)
    Line protocol current state : DOWN 
    Description: 
    Route Port,The Maximum Transmit Unit is 1500
    Internet protocol processing : disabled
    Encapsulation is TUNNEL, loopback not set
    Tunnel source 10.1.1.1, destination unknown
    Tunnel protocol/transport IPv6 over IPv4 (6rd)
    ipv6 prefix 2001:DB8::/32 
    ipv4 prefix length 8 
    6RD Operational, Delegated Prefix is 2001:DB8:101:100::/56
    Current system time: 2017-09-02 10:14:49
      300 seconds input rate 0 bits/sec, 0 packets/sec
      300 seconds output rate 0 bits/sec, 0 packets/sec
      0 seconds input rate 0 bits/sec, 0 packets/sec
      0 seconds output rate 0 bits/sec, 0 packets/sec
      0 packets input,  0 bytes
      0 input error
      0 packets output,  0 bytes                                
      0 output error
      Input:
        Unicast: 0 packets, Multicast: 0 packets
      Output:
        Unicast: 0 packets, Multicast: 0 packets
        Last 300 seconds input utility rate:  --
        Last 300 seconds output utility rate: --

    # 查看DeviceB。

    [DeviceB-Tunnel1] display this interface
    Tunnel1 current state : UP (ifindex: 10)
    Line protocol current state : DOWN 
    Description: 
    Route Port,The Maximum Transmit Unit is 1500
    Internet protocol processing : disabled
    Encapsulation is TUNNEL, loopback not set
    Tunnel source 10.1.1.2, destination unknown
    Tunnel protocol/transport IPv6 over IPv4 (6rd)
    ipv6 prefix 2001:DB8::/32 
    ipv4 prefix length 8 
    6RD Operational, Delegated Prefix is 2001:db8:101:200::/56
    Current system time: 2017-09-02 10:22:13
      300 seconds input rate 0 bits/sec, 0 packets/sec
      300 seconds output rate 0 bits/sec, 0 packets/sec
      0 seconds input rate 0 bits/sec, 0 packets/sec
      0 seconds output rate 0 bits/sec, 0 packets/sec
      0 packets input,  0 bytes
      0 input error
      0 packets output,  0 bytes                                
      0 output error
      Input:
        Unicast: 0 packets, Multicast: 0 packets
      Output:
        Unicast: 0 packets, Multicast: 0 packets
        Last 300 seconds input utility rate:  --
        Last 300 seconds output utility rate: --

  4. 根据6RD委托前缀,配置Tunnel接口的IPv6地址

    # 配置DeviceA。

    [~DeviceA-Tunnel1] ipv6 address 2001:db8:101:100::1 56
    [*DeviceA-Tunnel1] commit
    [~DeviceA-Tunnel1] quit

    # 配置DeviceB。

    [~DeviceB-Tunnel1] ipv6 address 2001:db8:101:200::1 56
    [*DeviceB-Tunnel1] commit
    [~DeviceB-Tunnel1] quit

  5. 配置接口GigabitEthernet1/0/2的IPv6地址

    # 配置DeviceA。

    [~DeviceA] interface gigabitethernet 1/0/2
    [*DeviceA-GigabitEthernet1/0/2] ipv6 enable
    [*DeviceA-GigabitEthernet1/0/2] ipv6 address 2001:db8:101:101::1 64
    [*DeviceA-GigabitEthernet1/0/2] commit
    [~DeviceA-GigabitEthernet1/0/2] quit

    # 配置DeviceB。

    [~DeviceB] interface gigabitethernet 1/0/2
    [*DeviceB-GigabitEthernet1/0/2] ipv6 enable
    [*DeviceB-GigabitEthernet1/0/2] ipv6 address 2002:db8::1 64
    [*DeviceB-GigabitEthernet1/0/2] commit
    [~DeviceB-GigabitEthernet1/0/2] quit

  6. 配置静态路由

    # 配置DeviceA到DeviceB连接的IPv6网络的静态路由。

    [~DeviceA] ipv6 route-static 2001:db8:: 32 Tunnel 1
    [~DeviceA] ipv6 route-static 2002:db8:: 32 Tunnel 1 2001:DB8:101:200::1
    [*DeviceA] commit

    # 配置DeviceB到DeviceA连接的6RD域的静态路由。

    [~DeviceB] ipv6 route-static 2001:db8:: 32 Tunnel 1
    [*DeviceB] commit

  7. 配置PC地址

    # 配置PC1。

    根据6RD委托前缀,配置PC1地址为2001:db8:101:101::2/64,与DeviceA的接口GigabitEthernet1/0/2同一网段。IPv6地址的配置方法与PC1的操作系统有关,配置方法略。

    # 配置PC2。

    根据6RD委托前缀,配置PC2地址为2002:db8::2/64,与DeviceB的接口GigabitEthernet1/0/2同一网段。IPv6地址的配置方法与PC2的操作系统有关,配置方法略。

  8. 检查配置结果

    # 在DeviceA或DeviceB上查看Tunnel1的IPv6状态为Up。

    [DeviceA] display ipv6 interface Tunnel 1
    Tunnel1 current state : UP 
    IPv6 protocol current state : UP 
    IPv6 is enabled, link-local address is FE80::3ABA:9A00:9DC:D303 
      Global unicast address(es):
        2001:DB8:101:100::1, subnet is 2001:DB8:101:100::/56 
      Joined group address(es):
        FF02::1:FF00:1
        FF02::1:FFDC:D303
        FF02::2
        FF02::1
      MTU is 1500 bytes 
      ND DAD is enabled, number of DAD attempts: 1
      ND reachable time is 1200000 milliseconds
      ND retransmit interval is 1000 milliseconds
      Hosts use stateless autoconfig for addresses

    # 在DeviceA上Ping DeviceB的GigabitEthernet1/0/2的接口地址。

    [DeviceA] ping ipv6 2002:db8::1
      PING 2002:db8::1 : 56  data bytes, press CTRL_C to break
        Reply from 2002:db8::1
        bytes=56 Sequence=1 hop limit=64  time = 4 ms
        Reply from 2002:db8::1
        bytes=56 Sequence=2 hop limit=64  time = 3 ms
        Reply from 2002:db8::1
        bytes=56 Sequence=3 hop limit=64  time = 2 ms
        Reply from 2002:db8::1
        bytes=56 Sequence=4 hop limit=64  time = 2 ms
        Reply from 2002:db8::1
        bytes=56 Sequence=5 hop limit=64  time = 2 ms
      --- 2002:db8::1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 2/2/4 ms

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

    C:\> ping 2002:db8::2
    Pinging 2002:db8::2 with 32 bytes of data:
    Reply from 2002:db8::2: time<1ms
    Reply from 2002:db8::2: time<1ms
    Reply from 2002:db8::2: time<1ms
    Reply from 2002:db8::2: time<1ms
    Ping statistics for 2002:db8::2:
        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/1
 undo shutdown
 ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/2
 undo shutdown
 ipv6 enable
 ipv6 address 2001:db8:101:101::1 64
#
interface Tunnel 1
 ipv6 enable
 ipv6 address 2001:db8:101:100::1 56
 tunnel-protocol ipv6-ipv4 6rd
 source GigabitEthernet1/0/1
 ipv6-prefix 2001:db8::/32
 ipv4-prefix length 8
 border-relay address 10.1.1.2
#
ipv6 route-static 2001:db8:: 32 Tunnel1
ipv6 route-static 2002:DB8:: 32 Tunnel1 2001:DB8:101:200::1
#
return

DeviceB的配置文件

#
sysname DeviceB
#
interface GigabitEthernet1/0/1
 undo shutdown
 ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/2
 undo shutdown
 ipv6 enable
 ipv6 address 2002:db8::1 64
#
interface Tunnel 1
 ipv6 enable
 ipv6 address 2001:db8:101:200::1 56
 tunnel-protocol ipv6-ipv4 6rd
 source GigabitEthernet1/0/1
 ipv6-prefix 2001:db8::/32
 ipv4-prefix length 8
#
ipv6 route-static 2001:db8:: 32 Tunnel1
#
return
下载文档
更新时间:2018-07-12

文档编号:EDOC1100028549

浏览量:20088

下载量:206

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