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

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

提示

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

升级

S7700, S9700 V200R010C00 配置指南-IP业务

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

配置设备作为DHCP中继示例(中继与服务器之间跨越BGP/MPLS IP VPN隧道)

组网需求

图3-16所示,某企业为了实现企业总部和分支机构的安全互联,分支1和分支2和总部之间通过BGP/MPLS IP VPN隧道连接。CE_1和CE_2分别为分支1和分支2的出口网关,分支1和分支2之间要求业务隔离,分别部署在vpna和vpnb中。企业管理员为了方便统一管理,在总部部署一台DHCP服务器(MCE作为企业总部出口网关),实现为分支的终端分配IP地址,分支1和分支2终端规划的IP地址均为10.1.1.0/24。

图3-16  配置设备作为DHCP中继组网图

配置思路

  1. 在PE_1和PE_2之间配置OSPF路由协议,实现PE间路由互通;配置MP-IBGP交换VPN路由信息。

  2. 在PE_1和PE_2上配置MPLS基本功能和MPLS LDP,建立LDP LSP。

  3. 在PE_1、PE_2和MCE上创建不同的VPN实例(vpna和vpnb),实现不同VPN间的业务隔离。

  4. PE_1与相连的CE之间建立EBGP对等体,引入VPN路由表中。

  5. 在MCE上配置基于全局地址池的DHCP服务器,实现DHCP服务器从全局地址池中选择IP地址分配给分支1和分支2的终端。

  6. 在CE_1和CE_2上配置DHCP中继功能,作为分支部门的网关转发终端与DHCP服务器之间的DHCP报文,实现终端向DHCP服务器申请IP地址。

  7. 在终端上配置通过DHCP服务器动态获取IP地址。

PE_1和PE_2以Huawei AR系列企业路由器V200R005C20为例;MCE以Huawei S系列交换机为例。

操作步骤

  1. 配置各接口所属VLAN,并配置接口IP地址。

    # 配置CE_1。

    <HUAWEI> system-view
    [HUAWEI] sysname CE_1
    [CE_1] vlan batch 10 20
    [CE_1] interface gigabitethernet 1/0/1
    [CE_1-GigabitEthernet1/0/1] port link-type hybrid
    [CE_1-GigabitEthernet1/0/1] port hybrid pvid vlan 10
    [CE_1-GigabitEthernet1/0/1] port hybrid untagged vlan 10
    [CE_1-GigabitEthernet1/0/1] quit
    [CE_1] interface gigabitethernet 1/0/2
    [CE_1-GigabitEthernet1/0/2] port link-type hybrid
    [CE_1-GigabitEthernet1/0/2] port hybrid pvid vlan 20
    [CE_1-GigabitEthernet1/0/2] port hybrid untagged vlan 20
    [CE_1-GigabitEthernet1/0/2] quit
    [CE_1] interface vlanif 10
    [CE_1-Vlanif10] ip address 10.1.1.1 24
    [CE_1-Vlanif10] quit
    [CE_1] interface vlanif 20
    [CE_1-Vlanif20] ip address 10.1.2.1 24
    [CE_1-Vlanif20] quit

    # 配置CE_2。

    <HUAWEI> system-view
    [HUAWEI] sysname CE_2
    [CE_2] vlan batch 10 20
    [CE_2] interface gigabitethernet 1/0/1
    [CE_2-GigabitEthernet1/0/1] port link-type hybrid
    [CE_2-GigabitEthernet1/0/1] port hybrid pvid vlan 10
    [CE_2-GigabitEthernet1/0/1] port hybrid untagged vlan 10
    [CE_2-GigabitEthernet1/0/1] quit
    [CE_2] interface gigabitethernet 1/0/2
    [CE_2-GigabitEthernet1/0/2] port link-type hybrid
    [CE_2-GigabitEthernet1/0/2] port hybrid pvid vlan 20
    [CE_2-GigabitEthernet1/0/2] port hybrid untagged vlan 20
    [CE_2-GigabitEthernet1/0/2] quit
    [CE_2] interface vlanif 10
    [CE_2-Vlanif10] ip address 10.1.1.1 24
    [CE_2-Vlanif10] quit
    [CE_2] interface vlanif 20
    [CE_2-Vlanif20] ip address 10.1.2.1 24
    [CE_2-Vlanif20] quit

    # 配置PE_1。

    <HUAWEI> system-view
    [HUAWEI] sysname PE_1
    [PE_1] interface loopback 0
    [PE_1-LoopBack0] ip address 10.10.10.9 32
    [PE_1-LoopBack0] quit
    [PE_1] interface gigabitethernet 3/0/0
    [PE_1-GigabitEthernet3/0/0] ip address 10.1.3.1 24
    [PE_1-GigabitEthernet3/0/0] quit
    

    # 配置PE_2。

    <HUAWEI> system-view
    [HUAWEI] sysname PE_2
    [PE_2] interface loopback 0
    [PE_2-LoopBack0] ip address 10.20.20.9 32
    [PE_2-LoopBack0] quit
    [PE_2] interface gigabitethernet 2/0/0
    [PE_2-GigabitEthernet2/0/0] ip address 10.1.3.2 24
    [PE_2-GigabitEthernet2/0/0] quit
    

  2. 配置PE_1和PE_2间使用OSPF路由。

    # 配置PE_1。

    [PE_1] ospf 1
    [PE_1-ospf-1] area 0
    [PE_1-ospf-1-area-0.0.0.0] network 10.10.10.9 0.0.0.0
    [PE_1-ospf-1-area-0.0.0.0] network 10.1.3.0 0.0.0.255
    [PE_1-ospf-1-area-0.0.0.0] quit
    [PE_1-ospf-1] quit

    # 配置PE_2。

    [PE_2] ospf 1
    [PE_2-ospf-1] area 0
    [PE_2-ospf-1-area-0.0.0.0] network 10.20.20.9 0.0.0.0
    [PE_2-ospf-1-area-0.0.0.0] network 10.1.3.0 0.0.0.255
    [PE_2-ospf-1-area-0.0.0.0] quit
    [PE_2-ospf-1] quit

    # 配置完成后,PE_1和PE_2之间建立OSPF邻居关系。执行命令display ip routing-table命令可以看到PE之间学习到对方的路由。

  3. 在PE_1和PE_2之间配置MPLS基本功能和MPLS LDP,建立LDP LSP。

    # 配置PE_1。

    [PE_1] mpls lsr-id 10.10.10.9
    [PE_1] mpls
    [PE_1-mpls] quit
    [PE_1] mpls ldp
    [PE_1-mpls-ldp] quit
    [PE_1] interface gigabitethernet 3/0/0
    [PE_1-GigabitEthernet3/0/0] mpls
    [PE_1-GigabitEthernet3/0/0] mpls ldp
    [PE_1-GigabitEthernet3/0/0] quit

    # 配置PE_2。

    [PE_2] mpls lsr-id 10.20.20.9
    [PE_2] mpls
    [PE_2-mpls] quit
    [PE_2] mpls ldp
    [PE_2-mpls-ldp] quit
    [PE_2] interface gigabitethernet 2/0/0
    [PE_2-GigabitEthernet2/0/0] mpls
    [PE_2-GigabitEthernet2/0/0] mpls ldp
    [PE_2-GigabitEthernet2/0/0] quit

    # 上述配置完成后,PE_1与PE_2之间建立LDP会话,执行display mpls ldp session命令可以看到显示结果中Status项为“Operational”。执行display mpls ldp lsp命令,可以看到LDP LSP的建立情况。

  4. 在PE_1、PE_2和MCE上配置VPN实例。

    # 配置PE_1。

    [PE_1] ip vpn-instance vpna
    [PE_1-vpn-instance-vpna] ipv4-family
    [PE_1-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1
    [PE_1-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
    [PE_1-vpn-instance-vpna-af-ipv4] quit
    [PE_1-vpn-instance-vpna] quit
    [PE_1] ip vpn-instance vpnb
    [PE_1-vpn-instance-vpnb] ipv4-family
    [PE_1-vpn-instance-vpnb-af-ipv4] route-distinguisher 100:2
    [PE_1-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both
    [PE_1-vpn-instance-vpnb-af-ipv4] quit
    [PE_1-vpn-instance-vpnb] quit
    [PE_1] interface gigabitethernet 2/0/0
    [PE_1-GigabitEthernet2/0/0] ip binding vpn-instance vpna
    [PE_1-GigabitEthernet2/0/0] ip address 10.1.2.2 24
    [PE_1-GigabitEthernet2/0/0] quit
    [PE_1] interface gigabitethernet 1/0/0
    [PE_1-GigabitEthernet1/0/0] ip binding vpn-instance vpnb
    [PE_1-GigabitEthernet1/0/0] ip address 10.1.2.2 24
    [PE_1-GigabitEthernet1/0/0] quit

    # 配置PE_2。

    [PE_2] ip vpn-instance vpna
    [PE_2-vpn-instance-vpna] ipv4-family
    [PE_2-vpn-instance-vpna-af-ipv4]  route-distinguisher 200:1
    [PE_2-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
    [PE_2-vpn-instance-vpna-af-ipv4] quit
    [PE_2-vpn-instance-vpna] quit
    [PE_2] ip vpn-instance vpnb
    [PE_2-vpn-instance-vpnb] ipv4-family
    [PE_2-vpn-instance-vpnb-af-ipv4] route-distinguisher 200:2
    [PE_2-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both
    [PE_2-vpn-instance-vpnb-af-ipv4] quit
    [PE_2-vpn-instance-vpnb] quit
    [PE_2] interface gigabitethernet 1/0/0.1
    [PE_2-GigabitEthernet1/0/0.1] dot1q termination vid 10
    [PE_2-GigabitEthernet1/0/0.1] ip binding vpn-instance vpna
    [PE_2-GigabitEthernet1/0/0.1] ip address 10.1.4.2 24
    [PE_2-GigabitEthernet1/0/0.1] arp broadcast enable
    [PE_2-GigabitEthernet1/0/0.1] quit
    [PE_2] interface gigabitethernet 1/0/0.2
    [PE_2-GigabitEthernet1/0/0.2] dot1q termination vid 20
    [PE_2-GigabitEthernet1/0/0.2] ip binding vpn-instance vpnb
    [PE_2-GigabitEthernet1/0/0.2] ip address 10.1.5.2 24
    [PE_2-GigabitEthernet1/0/0.2] arp broadcast enable
    [PE_2-GigabitEthernet1/0/0.2] quit

    # 配置MCE。

    <HUAWEI> system-view
    [HUAWEI] sysname MCE
    [MCE] ip vpn-instance vpna
    [MCE-vpn-instance-vpna] ipv4-family
    [MCE-vpn-instance-vpna-af-ipv4] route-distinguisher 200:1
    [MCE-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both
    [MCE-vpn-instance-vpna-af-ipv4] quit
    [MCE-vpn-instance-vpna] quit
    [MCE] ip vpn-instance vpnb
    [MCE-vpn-instance-vpnb] ipv4-family
    [MCE-vpn-instance-vpnb-af-ipv4] route-distinguisher 200:2
    [MCE-vpn-instance-vpnb-af-ipv4] vpn-target 222:2 both
    [MCE-vpn-instance-vpnb-af-ipv4] quit
    [MCE-vpn-instance-vpnb] quit
    [MCE] interface GigabitEthernet 1/0/1
    [MCE-GigabitEthernet1/0/1] undo portswitch
    [MCE-GigabitEthernet1/0/1] quit
    [MCE] interface gigabitethernet 1/0/1.1
    [MCE-GigabitEthernet1/0/1.1] ip binding vpn-instance vpna
    [MCE-GigabitEthernet1/0/1.1] dot1q termination vid 10
    [MCE-GigabitEthernet1/0/1.1] ip address 10.1.4.1 24
    [MCE-GigabitEthernet1/0/1.1] arp broadcast enable
    [MCE-GigabitEthernet1/0/1.1] quit
    [MCE] interface gigabitethernet 1/0/1.2
    [MCE-GigabitEthernet1/0/1.2] ip binding vpn-instance vpnb
    [MCE-GigabitEthernet1/0/1.2] dot1q termination vid 20
    [MCE-GigabitEthernet1/0/1.2] ip address 10.1.5.1 24
    [MCE-GigabitEthernet1/0/1.2] arp broadcast enable
    [MCE-GigabitEthernet1/0/1.2] quit

  5. 在PE_1和PE_2之间建立MP-IBGP对等体关系。

    # 配置PE_1。

    [PE_1] bgp 100
    [PE_1-bgp] peer 10.20.20.9 as-number 100
    [PE_1-bgp] peer 10.20.20.9 connect-interface loopback0
    [PE_1-bgp] ipv4-family vpnv4
    [PE_1-bgp-af-vpnv4] peer 10.20.20.9 enable
    [PE_1-bgp-af-vpnv4] quit
    [PE_1-bgp] ipv4-family vpn-instance vpna
    [PE_1-bgp-vpna] import-route direct
    [PE_1-bgp-vpna] quit
    [PE_1-bgp] ipv4-family vpn-instance vpnb
    [PE_1-bgp-vpnb] import-route direct
    [PE_1-bgp-vpnb] quit
    [PE_1-bgp] quit
    

    # 配置PE_2。

    [PE_2] bgp 100
    [PE_2-bgp] peer 10.10.10.9 as-number 100
    [PE_2-bgp] peer 10.10.10.9 connect-interface loopback0
    [PE_2-bgp] ipv4-family vpnv4
    [PE_2-bgp-af-vpnv4] peer 10.10.10.9 enable
    [PE_2-bgp-af-vpnv4] quit
    [PE_2-bgp] ipv4-family vpn-instance vpna
    [PE_2-bgp-vpna] import-route direct
    [PE_2-bgp-vpna] quit
    [PE_2-bgp] ipv4-family vpn-instance vpnb
    [PE_2-bgp-vpnb] import-route direct
    [PE_2-bgp-vpnb] quit
    [PE_2-bgp] quit
    

    # 配置完成后,在PE设备上执行display bgp peer命令,可以看到PE之间的BGP对等体关系已建立,并达到Established状态。

  6. 在CE_1和PE_1以及CE_2和PE_1之间配置EBGP对等体。

    # 配置CE_1。

    [CE_1] bgp 65410
    [CE_1-bgp] peer 10.1.2.2 as-number 100
    [CE_1-bgp] ipv4-family unicast
    [CE_1-bgp-af-ipv4] undo synchronization
    [CE_1-bgp-af-ipv4] import-route direct
    

    # 配置CE_2。

    [CE_2] bgp 65411
    [CE_2-bgp] peer 10.1.2.2 as-number 100
    [CE_2-bgp] ipv4-family unicast
    [CE_2-bgp-af-ipv4] undo synchronization
    [CE_2-bgp-af-ipv4] import-route direct
    

    # 配置PE_1。

    [PE_1] bgp 100
    [PE_1-bgp] ipv4-family vpn-instance vpna
    [PE_1-bgp-vpna] peer 10.1.2.1 as-number 65410
    [PE_1-bgp-vpna] import-route direct
    [PE_1-bgp-vpna] quit
    [PE_1-bgp] ipv4-family vpn-instance vpnb
    [PE_1-bgp-vpnb] peer 10.1.2.1 as-number 65411
    [PE_1-bgp-vpnb] import-route direct
    [PE_1-bgp-vpnb] quit
    [PE_1-bgp] quit

  7. 在MCE和PE_2之间配置OSPF多实例。

    # 配置PE_2。

    MCE与PE_2之间配置OSPF多实例时,PE_2上需进行以下配置:

    • 在PE_2的OSPF视图下引入BGP路由,发布PE_1的私网路由给MCE。
    • 在PE_2的BGP视图下引入该OSPF进程,发布MCE的私网路由信息给PE_1上。
    [PE_2] ospf 100 vpn-instance vpna
    [PE_2-ospf-100] import-route bgp
    [PE_2-ospf-100] area 0
    [PE_2-ospf-100-area-0.0.0.0] network 10.1.4.0 0.0.0.255
    [PE_2-ospf-100-area-0.0.0.0] quit
    [PE_2-ospf-100] quit
    [PE_2] ospf 200 vpn-instance vpnb
    [PE_2-ospf-200] import-route bgp
    [PE_2-ospf-200] area 0
    [PE_2-ospf-200-area-0.0.0.0] network 10.1.5.0 0.0.0.255
    [PE_2-ospf-200-area-0.0.0.0] quit
    [PE_2-ospf-200] quit
    [PE_2] bgp 100
    [PE_2-bgp] ipv4-family vpn-instance vpna
    [PE_2-bgp-vpna] import-route ospf 100
    [PE_2-bgp-vpna] quit
    [PE_2-bgp] ipv4-family vpn-instance vpnb
    [PE_2-bgp-vpnb] import-route ospf 200
    [PE_2-bgp-vpnb] quit
    [PE_2-bgp] quit

    # 配置MCE。

    MCE上需要将私网路由引入到OSPF进程中。

    [MCE] ospf 100 vpn-instance vpna
    [MCE-ospf-100] vpn-instance-capability simple
    [MCE-ospf-100] area 0
    [MCE-ospf-100-area-0.0.0.0] network 10.1.4.0 0.0.0.255
    [MCE-ospf-100-area-0.0.0.0] quit
    [MCE-ospf-100] quit
    [MCE] ospf 200 vpn-instance vpnb
    [MCE-ospf-200] vpn-instance-capability simple
    [MCE-ospf-200] area 0
    [MCE-ospf-200-area-0.0.0.0] network 10.1.5.0 0.0.0.255
    [MCE-ospf-200-area-0.0.0.0] quit
    [MCE-ospf-200] quit

    # 配置完成后,在MCE设备上执行命令display ip routing-table vpn-instance,可以看到去往对端CE的路由。

    # 在PE_1上执行display ip routing-table vpn-instance命令,可以看到去往对端CE的路由。

  8. 配置MCE作为DHCP服务器。

    # 启动DHCP服务。

    [MCE] dhcp enable

    # 创建全局地址池pool1和pool2,分别实现为分支1和分支2中的终端分配IP地址。

    [MCE] ip pool pool1
    [MCE-ip-pool-pool1] network 10.1.1.0 mask 255.255.255.0
    [MCE-ip-pool-pool1] vpn-instance vpna
    [MCE-ip-pool-pool1] gateway-list 10.1.1.1
    [MCE-ip-pool-pool1] quit
    [MCE] ip pool pool2
    [MCE-ip-pool-pool2] network 10.1.1.0 mask 255.255.255.0
    [MCE-ip-pool-pool2] vpn-instance vpnb
    [MCE-ip-pool-pool2] gateway-list 10.1.1.1
    [MCE-ip-pool-pool2] quit
    # 配置客户端从全局地址池中获取IP地址。
    [MCE] interface gigabitethernet 1/0/1.1
    [MCE-GigabitEthernet1/0/1.1] dhcp select global
    [MCE-GigabitEthernet1/0/1.1] quit
    [MCE] interface gigabitethernet 1/0/1.2
    [MCE-GigabitEthernet1/0/1.2] dhcp select global
    [MCE-GigabitEthernet1/0/1.2] quit

  9. 配置CE_1和CE_2作为DHCP中继。

    # 配置CE_1。

    [CE_1] dhcp enable
    [CE_1] interface vlanif 10
    [CE_1-Vlanif10] dhcp select relay
    [CE_1-Vlanif10] dhcp relay server-ip 10.1.4.1
    [CE_1-Vlanif10] quit
    

    # 配置CE_2。

    [CE_2] dhcp enable
    [CE_2] interface vlanif 10
    [CE_2-Vlanif10] dhcp select relay
    [CE_2-Vlanif10] dhcp relay server-ip 10.1.5.1
    [CE_2-Vlanif10] quit
    

  10. 验证配置结果。

    # 在MCE上执行命令display ip pool name,查看地址池的IP地址分配情况,以pool1为例。

    [MCE] display ip pool name pool1
      Pool-name      : pool1
      Pool-No        : 0
      Lease          : 1 Days 0 Hours 0 Minutes
      Domain-name    : -
      DNS-server0    : -
      NBNS-server0   : -
      Netbios-type   : -
      Position       : Local           Status           : Unlocked
      Gateway-0      : 10.1.1.1
      Network        : 10.1.1.0
      Mask           : 255.255.255.0
      VPN instance   : vpna
    
     -----------------------------------------------------------------------------
             Start           End     Total  Used  Idle(Expired)  Conflict  Disable
     -----------------------------------------------------------------------------
            10.1.1.1      10.1.1.254   253     1        252(0)         0        0
     -----------------------------------------------------------------------------       

配置文件

  • PE_1的配置文件

    #
     sysname PE_1
    #
    ip vpn-instance vpna
     ipv4-family
      route-distinguisher 100:1
      vpn-target 111:1 export-extcommunity
      vpn-target 111:1 import-extcommunity
    #
    ip vpn-instance vpnb
     ipv4-family
      route-distinguisher 100:2
      vpn-target 222:2 export-extcommunity
      vpn-target 222:2 import-extcommunity
    #
    mpls lsr-id 10.10.10.9
    mpls
    #
    mpls ldp
    #
    interface GigabitEthernet3/0/0
     ip address 10.1.3.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/0
     ip binding vpn-instance vpnb
     ip address 10.1.2.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     ip binding vpn-instance vpna
     ip address 10.1.2.2 255.255.255.0
    #
    interface LoopBack0
     ip address 10.10.10.9 255.255.255.255
    #
    bgp 100
     peer 10.20.20.9 as-number 100
     peer 10.20.20.9 connect-interface LoopBack0
     #
     ipv4-family unicast
      undo synchronization
      peer 10.20.20.9 enable
     #
     ipv4-family vpnv4
      policy vpn-target
      peer 10.20.20.9 enable
     #
     ipv4-family vpn-instance vpna
      import-route direct
      peer 10.1.2.1 as-number 65410
     #
     ipv4-family vpn-instance vpnb
      import-route direct
      peer 10.1.2.1 as-number 65411
    #
    ospf 1
     area 0.0.0.0
      network 10.10.10.9 0.0.0.0
      network 10.1.3.0 0.0.0.255
    #
    return
  • PE_2的配置文件

    #
     sysname PE_2
    #
    ip vpn-instance vpna
     ipv4-family
      route-distinguisher 200:1
      vpn-target 111:1 export-extcommunity
      vpn-target 111:1 import-extcommunity
    #
    ip vpn-instance vpnb
     ipv4-family
      route-distinguisher 200:2
      vpn-target 222:2 export-extcommunity
      vpn-target 222:2 import-extcommunity
    #
    mpls lsr-id 10.20.20.9
    mpls
    #
    mpls ldp
    #
    interface GigabitEthernet2/0/0
     ip address 10.1.3.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/0.1
     dot1q termination vid 10
     ip binding vpn-instance vpna
     ip address 10.1.4.2 255.255.255.0
     arp broadcast enable
    #
    interface GigabitEthernet1/0/0.2
     dot1q termination vid 20
     ip binding vpn-instance vpnb
     ip address 10.1.5.2 255.255.255.0
     arp broadcast enable
    #
    interface LoopBack0
     ip address 10.20.20.9 255.255.255.255
    #
    bgp 100
     peer 10.10.10.9 as-number 100
     peer 10.10.10.9 connect-interface LoopBack0
     #
     ipv4-family unicast
      undo synchronization
      peer 10.10.10.9 enable
     #
     ipv4-family vpnv4
      policy vpn-target
      peer 10.10.10.9 enable
     #
     ipv4-family vpn-instance vpna
      import-route ospf 100
     #
     ipv4-family vpn-instance vpnb
      import-route ospf 200
    #
    ospf 1
     area 0.0.0.0
      network 10.20.20.9 0.0.0.0
      network 10.1.3.0 0.0.0.255
    #
    ospf 100 vpn-instance vpna
     import-route bgp
     area 0.0.0.0
      network 10.1.4.0 0.0.0.255
    #
    ospf 200 vpn-instance vpnb
     import-route bgp
     area 0.0.0.0
      network 10.1.5.0 0.0.0.255
    #
    return
  • CE_1的配置文件

    #
    sysname CE_1
    #
    vlan batch 10 20
    #
    dhcp enable
    #
    interface Vlanif10
     ip address 10.1.1.1 255.255.255.0
     dhcp select relay
     dhcp relay server-ip 10.1.4.1
    #
    interface Vlanif20
     ip address 10.1.2.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet1/0/2
     port link-type hybrid
     port hybrid pvid vlan 20
     port hybrid untagged vlan 20
    #
    bgp 65410
     peer 10.1.2.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 10.1.2.2 enable
    #
    return
  • CE_2的配置文件

    #
    sysname CE_2
    #
    vlan batch 10 20
    #
    dhcp enable
    #
    interface Vlanif10
     ip address 10.1.1.1 255.255.255.0
     dhcp select relay
     dhcp relay server-ip 10.1.5.1
    #
    interface Vlanif20
     ip address 10.1.2.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid pvid vlan 10
     port hybrid untagged vlan 10
    #
    interface GigabitEthernet1/0/2
     port link-type hybrid
     port hybrid pvid vlan 20
     port hybrid untagged vlan 20
    #
    bgp 65411
     peer 10.1.2.2 as-number 100
     #
     ipv4-family unicast
      undo synchronization
      import-route direct
      peer 10.1.2.2 enable
    #
    return
  • MCE的配置文件

    #
     sysname MCE
    #
    dhcp enable
    #
    ip vpn-instance vpna
     ipv4-family
      route-distinguisher 200:1
      vpn-target 111:1 export-extcommunity
      vpn-target 111:1 import-extcommunity
    #
    ip vpn-instance vpnb
     ipv4-family
      route-distinguisher 200:2
      vpn-target 222:2 export-extcommunity
      vpn-target 222:2 import-extcommunity
    #
    ip pool pool1
     vpn-instance vpna
     gateway-list 10.1.1.1
     network 10.1.1.0 mask 255.255.255.0
    #
    ip pool pool2
     vpn-instance vpnb
     gateway-list 10.1.1.1
     network 10.1.1.0 mask 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     undo portswitch
    #
    interface GigabitEthernet1/0/1.1
     dot1q termination vid 10
     ip binding vpn-instance vpna
     ip address 10.1.4.1 255.255.255.0
     arp broadcast enable
     dhcp select global
    #
    interface GigabitEthernet1/0/1.2
     dot1q termination vid 20
     ip binding vpn-instance vpnb
     ip address 10.1.5.1 255.255.255.0
     arp broadcast enable
     dhcp select global
    #
    ospf 100 vpn-instance vpna
     vpn-instance-capability simple
     area 0.0.0.0
      network 10.1.4.0 0.0.0.255
    #
    ospf 200 vpn-instance vpnb
     vpn-instance-capability simple
     area 0.0.0.0
      network 10.1.5.0 0.0.0.255
    #
    return
翻译
下载文档
更新时间:2019-08-21

文档编号:EDOC1000141459

浏览量:20057

下载量:846

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