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

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

提示

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

升级

S9300, S9300E, S9300X V200R010C00 配置指南-IP业务

本文档介绍了IP业务的配置,具体包括IP地址配置、ARP配置、DHCP配置、DNS配置、mDNS网关配置、mDNS中继配置、UDP Helper配置、IP性能优化配置、IPv6基础配置、DHCPv6配置、IPv6 DNS配置、IPv6 over IPv4隧道配置和IPv4 over IPv6隧道配置。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置6to4隧道示例

配置6to4隧道示例

组网需求

图12-13所示,SwitchA为6to4交换机,其IPv6侧连接的是6to4网络。SwitchB为6to4中继交换机,它和IPv6的Internet网络(2002::/64)相连。SwitchC和SwitchD通过IPv4骨干网络相连。客户希望在SwitchA和SwitchB之间配置6to4隧道,使6to4网络的主机与IPv6网络的主机互通。

图12-13  配置6to4隧道组网图

配置思路

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

  1. 在SwitchA和SwitchB上配置IPv4/IPv6双协议栈,使其可以同时和IPv4网络以及IPv6网络互通

  2. 在SwitchA和SwitchB上配置6to4隧道,使IPv6网络能够通过IPv4骨干网进行互联。

  3. 在SwitchA和SwitchB上配置相关的静态路由,使SwitchA能够和SwitchB通过IPv4网络进行互联。

操作步骤

  1. 配置SwitchA

    # 配置业务环回聚合接口。

    说明:

    此处做业务环回聚合的接口必须是空闲的,没有承载业务的接口。

    <Quidway> system-view
    [Quidway] sysname SwitchA
    [SwitchA] interface eth-trunk 1
    [SwitchA-Eth-Trunk1] service type tunnel
    [SwitchA-Eth-Trunk1] quit
    [SwitchA] interface gigabitethernet 1/0/3
    [SwitchA-GigabitEthernet1/0/3] eth-trunk 1
    [SwitchA-GigabitEthernet1/0/3] quit
    

    # 配置IPv4/IPv6双协议栈。

    [SwitchA] ipv6
    [SwitchA] vlan batch 100 200
    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 100
    [SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 100
    [SwitchA-GigabitEthernet1/0/1] quit
    [SwitchA] interface vlanif 100
    [SwitchA-Vlanif100] ip address 10.1.1.1 24
    [SwitchA-Vlanif100] quit
    [SwitchA] interface gigabitethernet 1/0/2
    [SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 200
    [SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 200
    [SwitchA-GigabitEthernet1/0/2] quit
    [SwitchA] interface vlanif 200
    [SwitchA-Vlanif200] ipv6 enable
    [SwitchA-Vlanif200] ipv6 address 2002:0a01:0101:1::1/64
    [SwitchA-Vlanif200] quit

    # 配置6to4隧道。

    [SwitchA] interface tunnel 1
    [SwitchA-Tunnel1] tunnel-protocol ipv6-ipv4 6to4
    [SwitchA-Tunnel1] eth-trunk 1
    [SwitchA-Tunnel1] ipv6 enable
    [SwitchA-Tunnel1] ipv6 address 2002:0a01:0101::1/64
    [SwitchA-Tunnel1] source vlanif 100
    [SwitchA-Tunnel1] quit

    # 配置到其他6to4网络的路由。

    [SwitchA] ipv6 route-static 2002:: 16 tunnel 1

  2. 配置SwitchB

    # 配置业务环回聚合接口。

    说明:

    此处做业务环回聚合的接口必须是空闲的,没有承载业务的接口。

    <Quidway> system-view
    [Quidway] sysname SwitchB
    [SwitchB] interface eth-trunk 1
    [SwitchB-Eth-Trunk1] service type tunnel
    [SwitchB-Eth-Trunk1] quit
    [SwitchB] interface gigabitethernet 1/0/3
    [SwitchB-GigabitEthernet1/0/3] eth-trunk 1
    [SwitchB-GigabitEthernet1/0/3] quit
    

    # 配置IPv4/IPv6双协议栈。

    [SwitchB] ipv6
    [SwitchB] vlan batch 200 300
    [SwitchB] interface gigabitethernet1/0/1
    [SwitchB-GigabitEthernet1/0/1] port hybrid pvid vlan 300
    [SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 300
    [SwitchB-GigabitEthernet1/0/1] quit
    [SwitchB] interface vlanif 300
    [SwitchB-Vlanif300] ip address 10.3.1.2 24
    [SwitchB-Vlanif300] quit
    [SwitchB] interface gigabitethernet1/0/2
    [SwitchB-GigabitEthernet1/0/2] port hybrid pvid vlan 200
    [SwitchB-GigabitEthernet1/0/2] port hybrid untagged vlan 200
    [SwitchB-GigabitEthernet1/0/2] quit
    [SwitchB] interface vlanif 200
    [SwitchB-Vlanif200] ipv6 enable
    [SwitchB-Vlanif200] ipv6 address 2002:0a03:0102:1::1/64
    [SwitchB-Vlanif200] quit

    # 配置6to4隧道。

    [SwitchB] interface tunnel 1
    [SwitchB-Tunnel1] eth-trunk 1
    [SwitchB-Tunnel1] tunnel-protocol ipv6-ipv4 6to4
    [SwitchB-Tunnel1] ipv6 enable
    [SwitchB-Tunnel1] ipv6 address 2002:0a03:0102::1/64
    [SwitchB-Tunnel1] source vlanif 300
    [SwitchB-Tunnel1] quit

    # 配置到其他6to4网络的路由。

    [SwitchB] ipv6 route-static 2002:: 16 tunnel 1

  3. 配置IPv4地址及OSPF路由

    # 在SwitchA上配置OSPF路由。

    [SwitchA] ospf 1
    [SwitchA-ospf-1] area 0
    [SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [SwitchA-ospf-1-area-0.0.0.0] quit
    [SwitchA-ospf-1] quit
    

    # 在SwitchB上配置OSPF路由。

    [SwitchB] ospf 1
    [SwitchB-ospf-1] area 0
    [SwitchB-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
    [SwitchB-ospf-1-area-0.0.0.0] quit
    [SwitchB-ospf-1] quit
    

    # 在SwitchC上配置接口的IP地址,并配置OSPF路由。

    <Quidway> system-view
    [Quidway] sysname SwitchC
    [SwitchC] vlan batch 100 200
    [SwitchC] interface vlanif 100
    [SwitchC-Vlanif100] ip address 10.1.1.2 24
    [SwitchC-Vlanif100] quit
    [SwitchC] interface vlanif 200
    [SwitchC-Vlanif200] ip address 10.2.1.1 24
    [SwitchC-Vlanif200] quit
    [SwitchC] interface gigabitethernet1/0/1
    [SwitchC-GigabitEthernet1/0/1] port hybrid pvid vlan 100
    [SwitchC-GigabitEthernet1/0/1] port hybrid untagged vlan 100
    [SwitchC-GigabitEthernet1/0/1] quit
    [SwitchC] interface gigabitethernet1/0/2
    [SwitchC-GigabitEthernet1/0/2] port hybrid pvid vlan 200
    [SwitchC-GigabitEthernet1/0/2] port hybrid untagged vlan 200
    [SwitchC-GigabitEthernet1/0/2] quit
    [SwitchC] ospf 1
    [SwitchC-ospf-1] area 0
    [SwitchC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [SwitchC-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [SwitchC-ospf-1-area-0.0.0.0] quit
    [SwitchC-ospf-1] quit
    

    # 在SwitchD上配置接口的IP地址,并配置OSPF路由。

    <Quidway> system-view
    [Quidway] sysname SwitchD
    [SwitchD] vlan batch 200 300
    [SwitchD] interface vlanif 200
    [SwitchD-Vlanif200] ip address 10.2.1.2 24
    [SwitchD-Vlanif200] quit
    [SwitchD] interface vlanif 300
    [SwitchD-Vlanif300] ip address 10.3.1.1 24
    [SwitchD-Vlanif300] quit
    [SwitchD] interface gigabitethernet1/0/1
    [SwitchD-GigabitEthernet1/0/1] port hybrid pvid vlan 300
    [SwitchD-GigabitEthernet1/0/1] port hybrid untagged vlan 300
    [SwitchD-GigabitEthernet1/0/1] quit
    [SwitchD] interface gigabitethernet1/0/2
    [SwitchD-GigabitEthernet1/0/2] port hybrid pvid vlan 200
    [SwitchD-GigabitEthernet1/0/2] port hybrid untagged vlan 200
    [SwitchD-GigabitEthernet1/0/2] quit
    [SwitchD] ospf 1
    [SwitchD-ospf-1] area 0
    [SwitchD-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [SwitchD-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
    [SwitchD-ospf-1-area-0.0.0.0] quit
    [SwitchD-ospf-1] quit
    

  4. 检查配置结果

    # 在SwitchA上查看Tunnel1的IPv6状态为UP。

    [SwitchA] display ipv6 interface tunnel 1
    Tunnel1 current state : UP
    IPv6 protocol current state : UP
    IPv6 is enabled, link-local address is FE80::244:1FF:FE41:5410
      Global unicast address(es):
        2002:A01:101::1, subnet is 2002:A01:101::/64
      Joined group address(es):
        FF02::1:FF00:1
        FF02::1:FF41:5410
        FF02::2
        FF02::1
      MTU is 1500 bytes
      ND reachable time is 30000 milliseconds
      ND retransmit interval is 1000 milliseconds
      ND stale time is 1200 seconds 
    

    # 从SwitchA可以Ping通SwitchB的Tunnel接口的6to4地址。

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

配置文件

  • SwitchA的配置文件

    #
    sysname SwitchA
    #
    ipv6
    #
    vlan batch 100 200
    #
    interface Vlanif100
     ip address 10.1.1.1 255.255.255.0
    #
    interface Vlanif200
     ipv6 enable
     ipv6 address 2002:A01:101:1::1/64
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface GigabitEthernet1/0/1
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    interface GigabitEthernet1/0/2
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
    #
    interface GigabitEthernet1/0/3
     eth-trunk 1
    #
    interface Tunnel1
     ipv6 enable
     ipv6 address 2002:A01:101::1/64
     tunnel-protocol ipv6-ipv4 6to4
     source Vlanif100
     eth-trunk 1
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
    #
    ipv6 route-static 2002:: 16 Tunnel1
    #
    return
  • SwitchB的配置文件

    #
    sysname SwitchB
    #
    ipv6
    #
    vlan batch 200 300
    #
    interface Vlanif200
     ipv6 enable
     ipv6 address 2002:A03:102:1::1/64
    #
    interface Vlanif300
     ip address 10.3.1.2 255.255.255.0
    #
    interface Eth-Trunk1
     service type tunnel
    #
    interface GigabitEthernet1/0/1
     port hybrid pvid vlan 300
     port hybrid untagged vlan 300
    #
    interface GigabitEthernet1/0/2
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
    #
    interface GigabitEthernet1/0/3
     eth-trunk 1
    #
    interface Tunnel1
     ipv6 enable
     ipv6 address 2002:A03:102::1/64
     tunnel-protocol ipv6-ipv4 6to4
     source Vlanif300
     eth-trunk 1
    #
    ospf 1
     area 0.0.0.0
      network 10.3.1.0 0.0.0.255
    #
    ipv6 route-static 2002:: 16 Tunnel1
    #
    return
    
  • SwitchC的配置文件

    #
    sysname SwitchC
    #
    vlan batch 100 200
    #
    interface Vlanif100
     ip address 10.1.1.2 255.255.255.0
    #
    interface Vlanif200
     ip address 10.2.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    interface GigabitEthernet1/0/2
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 10.2.1.0 0.0.0.255
    #
    return
    
  • SwitchD的配置文件

    #
    sysname SwitchD
    #
    vlan batch 200 300
    #
    interface Vlanif200
     ip address 10.2.1.2 255.255.255.0
    #
    interface Vlanif300
     ip address 10.3.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port hybrid pvid vlan 300
     port hybrid untagged vlan 300
    #
    interface GigabitEthernet1/0/2
     port hybrid pvid vlan 200
     port hybrid untagged vlan 200
    #
    ospf 1
     area 0.0.0.0
      network 10.2.1.0 0.0.0.255
      network 10.3.1.0 0.0.0.255
    #
    return
    
翻译
下载文档
更新时间:2019-04-17

文档编号:EDOC1000141518

浏览量:13580

下载量:292

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