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

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

提示

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

升级

S7700, S9700 V200R010C00 配置指南-以太网交换

本文档针对设备的以太网业务,主要包括链路聚合配置、VLAN配置、Voice VLAN配置、VLAN mapping配置、QinQ配置、GVRP配置、MAC表配置、STP/RSTP/MSTP配置和SEP配置等。

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

配置CE通过MSTP双归接入VPLS示例

组网需求

说明:

交换机连接ACU2单板的XGE接口不支持此配置。

交换机连接ET1D2IPS0S00、ET1D2FW00S00、ET1D2FW00S01、ET1D2FW00S02单板的XGE接口不支持此配置。

图15-20,CE双归接入PE设备,PE之间建立VPLS全连接。CE与PE之间运行MSTP协议。正常情况下流量沿主用链路转发,当主用链路发生故障时流量切换到备用链路上。

图15-20  配置CE通过MSTP双归接入VPLS组网图

Switch

端口

对应的三层端口

IP地址

PE1

GigabitEthernet1/0/0

GigabitEthernet1/0/0.1

-

GigabitEthernet2/0/0

VLANIF 10

172.16.1.1/24

GigabitEthernet3/0/0

VLANIF 40

172.19.1.2/24

Loopback1

-

1.1.1.1/32

PE2

GigabitEthernet1/0/0

GigabitEthernet1/0/0.1

-

GigabitEthernet2/0/0

VLANIF 10

172.16.1.2/24

GigabitEthernet3/0/0

VLANIF 20

172.17.1.1/24

Loopback1

-

2.2.2.2/32

PE3

GigabitEthernet1/0/0

GigabitEthernet1/0/0.1

-

GigabitEthernet2/0/0

VLANIF 20

172.17.1.2/24

GigabitEthernet3/0/0

VLANIF 30

172.18.1.1/24

Loopback1

-

3.3.3.3/32

PE4

GigabitEthernet1/0/0

GigabitEthernet1/0/0.1

-

GigabitEthernet2/0/0

VLANIF 30

172.18.1.2/24

GigabitEthernet3/0/0

VLANIF 40

172.19.1.1/24

Loopback1

-

4.4.4.4/32

CE1

GigabitEthernet1/0/0

-

-

GigabitEthernet1/0/1

-

-

GigabitEthernet2/0/0

-

-

CE2

GigabitEthernet1/0/0

-

-

GigabitEthernet1/0/1

-

-

GigabitEthernet2/0/0

-

-

配置思路

采用如下思路配置CE通过MSTP双归接入VPLS:

  1. 在骨干网上配置路由协议实现互通。

  2. 在PE之间建立远端LDP会话。

  3. PE间建立VPLS全连接。

  4. 配置MSTP,PE1和PE2为主根,PE3和PE4为备份根。

操作步骤

  1. 图15-20配置各端口所属的VLAN和VLANIF接口的IP地址。

    说明:
    • 避免将PE上AC侧和PW侧的物理端口加入相同的VLAN中,否则可能引起环路。

    • CE发送给PE的报文需携带VLAN Tag。

    # 配置CE1。
    <HUAWEI> system-view
    [HUAWEI] sysname CE1
    [CE1] vlan batch 100
    [CE1] interface gigabitethernet 1/0/0
    [CE1-GigabitEthernet1/0/0] port link-type trunk
    [CE1-GigabitEthernet1/0/0] port trunk allow-pass vlan 100
    [CE1-GigabitEthernet1/0/0] quit
    [CE1] interface gigabitethernet 1/0/1
    [CE1-GigabitEthernet1/0/1] port link-type trunk
    [CE1-GigabitEthernet1/0/1] port trunk allow-pass vlan 100
    [CE1-GigabitEthernet1/0/1] quit
    [CE1] interface gigabitethernet 2/0/0
    [CE1-GigabitEthernet2/0/0] port link-type access
    [CE1-GigabitEthernet2/0/0] port default vlan 100
    [CE1-GigabitEthernet2/0/0] quit
    
    # 配置CE2。
    <HUAWEI> system-view
    [HUAWEI] sysname CE2
    [CE2] vlan batch 100
    [CE2] interface gigabitethernet 1/0/0
    [CE2-GigabitEthernet1/0/0] port link-type trunk
    [CE2-GigabitEthernet1/0/0] port trunk allow-pass vlan 100
    [CE2-GigabitEthernet1/0/0] quit
    [CE2] interface gigabitethernet 1/0/1
    [CE2-GigabitEthernet1/0/1] port link-type trunk
    [CE2-GigabitEthernet1/0/1] port trunk allow-pass vlan 100
    [CE2-GigabitEthernet1/0/1] quit
    [CE2] interface gigabitethernet 2/0/0
    [CE2-GigabitEthernet2/0/0] port link-type access
    [CE2-GigabitEthernet2/0/0] port default vlan 100
    [CE2-GigabitEthernet2/0/0] quit
    
    # 配置PE1。
    <HUAWEI> system-view
    [HUAWEI] sysname PE1
    [PE1] vlan batch 10 40
    [PE1] interface gigabitethernet 2/0/0
    [PE1-GigabitEthernet2/0/0] port link-type trunk
    [PE1-GigabitEthernet2/0/0] port trunk allow-pass vlan 10
    [PE1-GigabitEthernet2/0/0] quit
    [PE1] interface gigabitethernet 3/0/0
    [PE1-GigabitEthernet3/0/0] port link-type trunk
    [PE1-GigabitEthernet3/0/0] port trunk allow-pass vlan 40
    [PE1-GigabitEthernet3/0/0] quit
    [PE1] interface vlanif 10
    [PE1-Vlanif10] ip address 172.16.1.1 24
    [PE1-Vlanif10] quit
    [PE1] interface vlanif 40
    [PE1-Vlanif40] ip address 172.19.1.2 24
    [PE1-Vlanif40] quit
    # 配置PE2。
    <HUAWEI> system-view
    [HUAWEI] sysname PE2
    [PE2] vlan batch 10 20
    [PE2] interface gigabitethernet 2/0/0
    [PE2-GigabitEthernet2/0/0] port link-type trunk
    [PE2-GigabitEthernet2/0/0] port trunk allow-pass vlan 10
    [PE2-GigabitEthernet2/0/0] quit
    [PE2] interface gigabitethernet 3/0/0
    [PE2-GigabitEthernet3/0/0] port link-type trunk
    [PE2-GigabitEthernet3/0/0] port trunk allow-pass vlan 20
    [PE2-GigabitEthernet3/0/0] quit
    [PE2] interface vlanif 10
    [PE2-Vlanif10] ip address 172.16.1.2 24
    [PE2-Vlanif10] quit
    [PE2] interface vlanif 20
    [PE2-Vlanif20] ip address 172.17.1.1 24
    [PE2-Vlanif20] quit
    
    # 配置PE3。
    <HUAWEI> system-view
    [HUAWEI] sysname PE3
    [PE3] vlan batch 20 30
    [PE3] interface gigabitethernet 2/0/0
    [PE3-GigabitEthernet2/0/0] port link-type trunk
    [PE3-GigabitEthernet2/0/0] port trunk allow-pass vlan 20
    [PE3-GigabitEthernet2/0/0] quit
    [PE3] interface gigabitethernet 3/0/0
    [PE3-GigabitEthernet3/0/0] port link-type trunk
    [PE3-GigabitEthernet3/0/0] port trunk allow-pass vlan 30
    [PE3-GigabitEthernet3/0/0] quit
    [PE3] interface vlanif 20
    [PE3-Vlanif20] ip address 172.17.1.2 24
    [PE3-Vlanif20] quit
    [PE3] interface vlanif 30
    [PE3-Vlanif30] ip address 172.18.1.1 24
    [PE3-Vlanif30] quit
    
    # 配置PE4。
    <HUAWEI> system-view
    [HUAWEI] sysname PE4
    [PE4] vlan batch 30 40
    [PE4] interface gigabitethernet 2/0/0
    [PE4-GigabitEthernet2/0/0] port link-type trunk
    [PE4-GigabitEthernet2/0/0] port trunk allow-pass vlan 30
    [PE4-GigabitEthernet2/0/0] quit
    [PE4] interface gigabitethernet 3/0/0
    [PE4-GigabitEthernet3/0/0] port link-type trunk
    [PE4-GigabitEthernet3/0/0] port trunk allow-pass vlan 40
    [PE4-GigabitEthernet3/0/0] quit
    [PE4] interface vlanif 30
    [PE4-Vlanif30] ip address 172.18.1.2 24
    [PE4-Vlanif30] quit
    [PE4] interface vlanif 40
    [PE4-Vlanif40] ip address 172.19.1.1 24
    [PE4-Vlanif40] quit
    

  2. 配置IGP,本例中使用OSPF

    配置OSPF时,注意需要发布PE1、PE2、PE3和PE4的32位Loopback端口地址(LSR-ID)。

    # 配置PE1。
    [PE1] router id 1.1.1.1
    [PE1] interface loopback 1
    [PE1-LoopBack1] ip address 1.1.1.1 32
    [PE1-LoopBack1] quit
    [PE1] ospf 1
    [PE1-ospf-1] area 0
    [PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
    [PE1-ospf-1-area-0.0.0.0] network 172.16.1.0 0.0.0.255
    [PE1-ospf-1-area-0.0.0.0] network 172.19.1.0 0.0.0.255
    [PE1-ospf-1-area-0.0.0.0] quit
    [PE1-ospf-1] quit
    # 配置PE2。
    [PE2] router id 2.2.2.2
    [PE2] interface loopback 1
    [PE2-LoopBack1] ip address 2.2.2.2 32
    [PE2-LoopBack1] quit
    [PE2] ospf 1
    [PE2-ospf-1] area 0
    [PE2-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
    [PE2-ospf-1-area-0.0.0.0] network 172.16.1.0 0.0.0.255
    [PE2-ospf-1-area-0.0.0.0] network 172.17.1.0 0.0.0.255
    [PE2-ospf-1-area-0.0.0.0] quit
    [PE2-ospf-1] quit
    # 配置PE3。
    [PE3] router id 3.3.3.3
    [PE3] interface loopback 1
    [PE3-LoopBack1] ip address 3.3.3.3 32
    [PE3-LoopBack1] quit
    [PE3] ospf 1
    [PE3-ospf-1] area 0
    [PE3-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
    [PE3-ospf-1-area-0.0.0.0] network 172.17.1.0 0.0.0.255
    [PE3-ospf-1-area-0.0.0.0] network 172.18.1.0 0.0.0.255
    [PE3-ospf-1-area-0.0.0.0] quit
    [PE3-ospf-1] quit
    # 配置PE4。
    [PE4] router id 4.4.4.4
    [PE4] interface loopback 1
    [PE4-LoopBack1] ip address 4.4.4.4 32
    [PE4-LoopBack1] quit
    [PE4] ospf 1
    [PE4-ospf-1] area 0
    [PE4-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
    [PE4-ospf-1-area-0.0.0.0] network 172.18.1.0 0.0.0.255
    [PE4-ospf-1-area-0.0.0.0] network 172.19.1.0 0.0.0.255
    [PE4-ospf-1-area-0.0.0.0] quit
    [PE4-ospf-1] quit
    # 等待40秒后,在PE1、PE2、PE3和PE4上执行display ip routing-table命令可以看到已学到彼此的路由。以PE1的显示为例:
    [PE1] display ip routing-table
    Route Flags: R - relay, D - download to fib                                     
    ------------------------------------------------------------------------------  
    Routing Tables: Public                                                          
             Destinations : 12       Routes : 13                                    
                                                                                    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface      
                                                                                    
            1.1.1.1/32  Direct  0    0           D   127.0.0.1       LoopBack1      
            2.2.2.2/32  OSPF    10   1           D   172.16.1.2      Vlanif10       
            3.3.3.3/32  OSPF    10   2           D   172.19.1.1      Vlanif40       
                        OSPF    10   2           D   172.16.1.2      Vlanif10       
            4.4.4.4/32  OSPF    10   1           D   172.19.1.1      Vlanif40       
          127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0    
          127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0    
         172.16.1.0/24  Direct  0    0           D   172.16.1.1      Vlanif10       
         172.16.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif10       
         172.17.1.0/24  OSPF    10   2           D   172.16.1.2      Vlanif10       
         172.18.1.0/24  OSPF    10   2           D   172.19.1.1      Vlanif40       
         172.19.1.0/24  Direct  0    0           D   172.19.1.2      Vlanif40       
         172.19.1.2/32  Direct  0    0           D   127.0.0.1       Vlanif40       

  3. 配置MPLS基本能力和LDP

    # 配置PE1。
    [PE1] mpls lsr-id 1.1.1.1
    [PE1] mpls
    [PE1-mpls] quit
    [PE1] mpls ldp
    [PE1-mpls-ldp] quit
    [PE1] interface vlanif 10
    [PE1-Vlanif10] mpls
    [PE1-Vlanif10] mpls ldp
    [PE1-Vlanif10] quit
    [PE1] interface vlanif 40
    [PE1-Vlanif40] mpls
    [PE1-Vlanif40] mpls ldp
    [PE1-Vlanif40] quit
    # 配置PE2。
    [PE2] mpls lsr-id 2.2.2.2
    [PE2] mpls
    [PE2-mpls] quit
    [PE2] mpls ldp
    [PE2-mpls-ldp] quit
    [PE2] interface vlanif 10
    [PE2-Vlanif10] mpls
    [PE2-Vlanif10] mpls ldp
    [PE2-Vlanif10] quit
    [PE2] interface vlanif 20
    [PE2-Vlanif20] mpls
    [PE2-Vlanif20] mpls ldp
    [PE2-Vlanif20] quit
    # 配置PE3。
    [PE3] mpls lsr-id 3.3.3.3
    [PE3] mpls
    [PE3-mpls] quit
    [PE3] mpls ldp
    [PE3-mpls-ldp] quit
    [PE3] interface vlanif 20
    [PE3-Vlanif20] mpls
    [PE3-Vlanif20] mpls ldp
    [PE3-Vlanif20] quit
    [PE3] interface vlanif 30
    [PE3-Vlanif30] mpls
    [PE3-Vlanif30] mpls ldp
    [PE3-Vlanif30] quit
    # 配置PE4。
    [PE4] mpls lsr-id 4.4.4.4
    [PE4] mpls
    [PE4-mpls] quit
    [PE4] mpls ldp
    [PE4-mpls-ldp] quit
    [PE4] interface vlanif 30
    [PE4-Vlanif30] mpls
    [PE4-Vlanif30] mpls ldp
    [PE4-Vlanif30] quit
    [PE4] interface vlanif 40
    [PE4-Vlanif40] mpls
    [PE4-Vlanif40] mpls ldp
    [PE4-Vlanif40] quit

  4. 在PE之间建立远端LDP会话

    # 配置PE1。

    [PE1] mpls ldp remote-peer 3.3.3.3
    [PE1-mpls-ldp-remote-3.3.3.3] remote-ip 3.3.3.3
    [PE1-mpls-ldp-remote-3.3.3.3] quit

    # 配置PE2。

    [PE2] mpls ldp remote-peer 4.4.4.4
    [PE2-mpls-ldp-remote-4.4.4.4] remote-ip 4.4.4.4
    [PE2-mpls-ldp-remote-4.4.4.4] quit

    # 配置PE3。

    [PE3] mpls ldp remote-peer 1.1.1.1
    [PE3-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
    [PE3-mpls-ldp-remote-1.1.1.1] quit

    # 配置PE4。

    [PE4] mpls ldp remote-peer 2.2.2.2
    [PE4-mpls-ldp-remote-2.2.2.2] remote-ip 2.2.2.2
    [PE4-mpls-ldp-remote-2.2.2.2] quit
    配置完成后,在PE上执行display mpls ldp session命令可以看到对等体的Status项为“Operational”,即远端对等体关系已建立。以PE1的显示为例:
    [PE1] display mpls ldp session
    
    LDP Session(s) in Public Network
    Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)
    A '*' before a session means the session is being deleted.
    ------------------------------------------------------------------------------
    PeerID             Status      LAM  SsnRole  SsnAge      KASent/Rcv
    ------------------------------------------------------------------------------
    2.2.2.2:0          Operational DU   Passive  0000:00:00  4/4
    3.3.3.3:0          Operational DU   Passive  0000:00:00  4/4
    4.4.4.4:0          Operational DU   Passive  0000:00:00  4/4
    ------------------------------------------------------------------------------
    TOTAL: 3 session(s) Found.
    

  5. 在PE上使能MPLS L2VPN

    # 配置PE1。

    [PE1] mpls l2vpn
    [PE1-l2vpn] quit

    # 配置PE2。

    [PE2] mpls l2vpn
    [PE2-l2vpn] quit

    # 配置PE3。

    [PE3] mpls l2vpn
    [PE3-l2vpn] quit

    # 配置PE4。

    [PE4] mpls l2vpn
    [PE4-l2vpn] quit

  6. 在PE上配置VSI

    # 配置PE1。

    [PE1] vsi a2 static
    [PE1-vsi-a2] pwsignal ldp
    [PE1-vsi-a2-ldp] vsi-id 2
    [PE1-vsi-a2-ldp] peer 2.2.2.2
    [PE1-vsi-a2-ldp] peer 3.3.3.3
    [PE1-vsi-a2-ldp] peer 4.4.4.4
    [PE1-vsi-a2-ldp] quit
    [PE1-vsi-a2] quit

    # 配置PE2。

    [PE2] vsi a2 static
    [PE2-vsi-a2] pwsignal ldp
    [PE2-vsi-a2-ldp] vsi-id 2
    [PE2-vsi-a2-ldp] peer 1.1.1.1
    [PE2-vsi-a2-ldp] peer 3.3.3.3
    [PE2-vsi-a2-ldp] peer 4.4.4.4
    [PE2-vsi-a2-ldp] quit
    [PE2-vsi-a2] quit

    # 配置PE3。

    [PE3] vsi a2 static
    [PE3-vsi-a2] pwsignal ldp
    [PE3-vsi-a2-ldp] vsi-id 2
    [PE3-vsi-a2-ldp] peer 1.1.1.1
    [PE3-vsi-a2-ldp] peer 2.2.2.2
    [PE3-vsi-a2-ldp] peer 4.4.4.4
    [PE3-vsi-a2-ldp] quit
    [PE3-vsi-a2] quit

    # 配置PE4。

    [PE4] vsi a2 static
    [PE4-vsi-a2] pwsignal ldp
    [PE4-vsi-a2-ldp] vsi-id 2
    [PE4-vsi-a2-ldp] peer 1.1.1.1
    [PE4-vsi-a2-ldp] peer 2.2.2.2
    [PE4-vsi-a2-ldp] peer 3.3.3.3
    [PE4-vsi-a2-ldp] quit
    [PE4-vsi-a2] quit

  7. 在PE上配置VSI与端口的绑定

    说明:

    配置终结子接口前请先执行命令display vcmp status查看VCMP的角色,如果“Role”字段显示为“Client”,则需要执行命令vcmp role { silent | transparent },将VCMP角色修改为Silent或Transparent。

    # 配置PE1。

    [PE1] interface gigabitethernet 1/0/0
    [PE1-GigabitEthernet1/0/0] port link-type hybrid
    [PE1-GigabitEthernet1/0/0] quit
    [PE1] interface gigabitethernet 1/0/0.1
    [PE1-GigabitEthernet1/0/0.1] dot1q termination vid 100
    [PE1-GigabitEthernet1/0/0.1] l2 binding vsi a2
    [PE1-GigabitEthernet1/0/0.1] quit

    # 配置PE2。

    [PE2] interface gigabitethernet 1/0/0
    [PE2-GigabitEthernet1/0/0] port link-type hybrid
    [PE2-GigabitEthernet1/0/0] quit
    [PE2] interface gigabitethernet 1/0/0.1
    [PE2-GigabitEthernet1/0/0.1] dot1q termination vid 100
    [PE2-GigabitEthernet1/0/0.1] l2 binding vsi a2
    [PE2-GigabitEthernet1/0/0.1] quit

    # 配置PE3。

    [PE3] interface gigabitethernet 1/0/0
    [PE3-GigabitEthernet1/0/0] port link-type hybrid
    [PE3-GigabitEthernet1/0/0] quit
    [PE3] interface gigabitethernet 1/0/0.1
    [PE3-GigabitEthernet1/0/0.1] dot1q termination vid 100
    [PE3-GigabitEthernet1/0/0.1] l2 binding vsi a2
    [PE3-GigabitEthernet1/0/0.1] quit

    # 配置PE4。

    [PE4] interface gigabitethernet 1/0/0
    [PE4-GigabitEthernet1/0/0] port link-type hybrid
    [PE4-GigabitEthernet1/0/0] quit
    [PE4] interface gigabitethernet 1/0/0.1
    [PE4-GigabitEthernet1/0/0.1] dot1q termination vid 100
    [PE4-GigabitEthernet1/0/0.1] l2 binding vsi a2
    [PE4-GigabitEthernet1/0/0.1] quit

  8. 配置STP

    1. 配置域,激活域配置

      # 配置PE1

      [PE1] stp region-configuration
      [PE1-mst-region] region-name RG1
      [PE1-mst-region] active region-configuration
      [PE1-mst-region] quit

      # 配置PE4

      [PE4] stp region-configuration
      [PE4-mst-region] region-name RG1
      [PE4-mst-region] active region-configuration
      [PE4-mst-region] quit

      # 配置CE1

      [CE1] stp region-configuration
      [CE1-mst-region] region-name RG1
      [CE1-mst-region] active region-configuration
      [CE1-mst-region] quit

      # 配置PE2

      [PE2] stp region-configuration
      [PE2-mst-region] region-name RG1
      [PE2-mst-region] active region-configuration
      [PE2-mst-region] quit

      # 配置PE3

      [PE3] stp region-configuration
      [PE3-mst-region] region-name RG1
      [PE3-mst-region] active region-configuration
      [PE3-mst-region] quit

      # 配置CE2

      [CE2] stp region-configuration
      [CE2-mst-region] region-name RG1
      [CE2-mst-region] active region-configuration
      [CE2-mst-region] quit
    2. 配置设备优先级,使得PE1、PE2为根桥,PE3、PE4为备根

      # 配置PE1

      [PE1] stp instance 0 priority 0

      # 配置PE2

      [PE2] stp instance 0 priority 0

      # 配置PE3

      [PE3] stp instance 0 priority 4096

      # 配置PE4

      [PE4] stp instance 0 priority 4096
    3. 配置CE与PE间使能MSTP与VPLS联动,并在备根上配置根保护

      # 配置CE1

      [CE1] stp enable
      [CE1] interface gigabitethernet 1/0/1
      [CE1-GigabitEthernet1/0/1] stp enable
      [CE1-GigabitEthernet1/0/1] quit
      [CE1] interface gigabitethernet 1/0/0
      [CE1-GigabitEthernet1/0/0] stp enable
      [CE1-GigabitEthernet1/0/0] quit
      [CE1] interface gigabitethernet 2/0/0
      [CE1-GigabitEthernet2/0/0] stp edged-port enable
      [CE1-GigabitEthernet2/0/0] quit

      (可选)配置CE1的BPDU保护功能。

      [CE1] stp bpdu-protection

      # 配置CE2

      [CE2] stp enable
      [CE2] interface gigabitethernet 1/0/1
      [CE2-GigabitEthernet1/0/1] stp enable
      [CE2-GigabitEthernet1/0/1] quit
      [CE2] interface gigabitethernet 1/0/0
      [CE2-GigabitEthernet1/0/0] stp enable
      [CE2-GigabitEthernet1/0/0] quit
      [CE2] interface gigabitethernet 2/0/0
      [CE2-GigabitEthernet2/0/0] stp edged-port enable
      [CE2-GigabitEthernet2/0/0] quit

      (可选)配置CE2的BPDU保护功能。

      [CE2] stp bpdu-protection
      说明:
      如果与边缘端口相连的是使能了STP功能的网络设备,配置BPDU保护功能后,如果边缘端口收到BPDU报文,边缘端口将会被shutdown,边缘端口属性不变。

      # 配置PE1

      [PE1] stp enable
      [PE1] interface gigabitethernet 1/0/0
      [PE1-GigabitEthernet1/0/0] stp vpls-subinterface enable
      [PE1-GigabitEthernet1/0/0] stp enable
      [PE1-GigabitEthernet1/0/0] quit
      [PE1] interface gigabitethernet 2/0/0
      [PE1-GigabitEthernet2/0/0] stp disable
      [PE1-GigabitEthernet2/0/0] quit
      [PE1] interface gigabitethernet 3/0/0
      [PE1-GigabitEthernet3/0/0] stp disable
      [PE1-GigabitEthernet3/0/0] quit
      

      # 配置PE2

      [PE2] stp enable
      [PE2] interface gigabitethernet 1/0/0
      [PE2-GigabitEthernet1/0/0] stp vpls-subinterface enable
      [PE2-GigabitEthernet1/0/0] stp enable
      [PE2-GigabitEthernet1/0/0] quit
      [PE2] interface gigabitethernet 2/0/0
      [PE2-GigabitEthernet2/0/0] stp disable
      [PE2-GigabitEthernet2/0/0] quit
      [PE2] interface gigabitethernet 3/0/0
      [PE2-GigabitEthernet3/0/0] stp disable
      [PE2-GigabitEthernet3/0/0] quit
      

      # 配置PE3

      [PE3] stp enable
      [PE3] interface gigabitethernet 1/0/0
      [PE3-GigabitEthernet1/0/0] stp vpls-subinterface enable
      [PE3-GigabitEthernet1/0/0] stp root-protection
      [PE3-GigabitEthernet1/0/0] stp enable
      [PE3-GigabitEthernet1/0/0] quit
      [PE3] interface gigabitethernet 2/0/0
      [PE3-GigabitEthernet2/0/0] stp disable
      [PE3-GigabitEthernet2/0/0] quit
      [PE3] interface gigabitethernet 3/0/0
      [PE3-GigabitEthernet3/0/0] stp disable
      [PE3-GigabitEthernet3/0/0] quit
      

      # 配置PE4

      [PE4] stp enable
      [PE4] interface gigabitethernet 1/0/0
      [PE4-GigabitEthernet1/0/0] stp vpls-subinterface enable
      [PE4-GigabitEthernet1/0/0] stp root-protection
      [PE4-GigabitEthernet1/0/0] stp enable
      [PE4-GigabitEthernet1/0/0] quit
      [PE4] interface gigabitethernet 2/0/0
      [PE4-GigabitEthernet2/0/0] stp disable
      [PE4-GigabitEthernet2/0/0] quit
      [PE4] interface gigabitethernet 3/0/0
      [PE4-GigabitEthernet3/0/0] stp disable
      [PE4-GigabitEthernet3/0/0] quit
      

  9. 验证配置结果

    在PE1上执行display vsi name a2 verbose命令,VSI状态为UP。

    [PE1] display vsi name a2 verbose
    
     ***VSI Name               : a2
        Administrator VSI      : no
        Isolate Spoken         : disable
        VSI Index              : 0
        PW Signaling           : ldp
        Member Discovery Style : static
        PW MAC Learn Style     : unqualify
        Encapsulation Type     : vlan
        MTU                    : 1500
        Diffserv Mode          : uniform
        Mpls Exp               : --
        DomainId               : 255
        Domain Name            :
        Ignore AcState         : disable
        P2P VSI                : disable
        Create Time            : 0 days, 20 hours, 29 minutes, 54 seconds
        VSI State              : up
    
        VSI ID                 : 2
       *Peer Router ID         : 2.2.2.2
        Negotiation-vc-id      : 2
        primary or secondary   : primary
        ignore-standby-state   : no
        VC Label               : 4099
        Peer Type              : dynamic
        Session                : up
        Tunnel ID              : 0xd
        Broadcast Tunnel ID    : 0xd
        Broad BackupTunnel ID  : 0x0
        CKey                   : 2
        NKey                   : 1
        Stp Enable             : 0
        PwIndex                : 0
        Control Word           : disable
       *Peer Router ID         : 3.3.3.3
        Negotiation-vc-id      : 2
        primary or secondary   : primary
        ignore-standby-state   : no
        VC Label               : 4100
        Peer Type              : dynamic
        Session                : up
        Tunnel ID              : 0xf
        Broadcast Tunnel ID    : 0xf
        Broad BackupTunnel ID  : 0x0
        CKey                   : 4
        NKey                   : 3
        Stp Enable             : 0
        PwIndex                : 0
        Control Word           : disable
       *Peer Router ID         : 4.4.4.4
        Negotiation-vc-id      : 2
        primary or secondary   : primary
        ignore-standby-state   : no
        VC Label               : 4101
        Peer Type              : dynamic
        Session                : up
        Tunnel ID              : 0xb
        Broadcast Tunnel ID    : 0xb
        Broad BackupTunnel ID  : 0x0
        CKey                   : 6
        NKey                   : 5
        Stp Enable             : 0
        PwIndex                : 0
        Control Word           : disable
    
        Interface Name         : GigabitEthernet1/0/0.1
        State                  : up
        Access Port            : false
        Last Up Time           : 2015/03/16 15:56:44
        Total Up Time          : 0 days, 0 hours, 1 minutes, 24 seconds
    
       **PW Information:
    
       *Peer Ip Address        : 3.3.3.3
        PW State               : up
        Local VC Label         : 4100
        Remote VC Label        : 4099
        Remote Control Word    : disable
        PW Type                : label
        Local  VCCV            : alert lsp-ping bfd
        Remote VCCV            : alert lsp-ping bfd
        Tunnel ID              : 0xf
        Broadcast Tunnel ID    : 0xf
        Broad BackupTunnel ID  : 0x0
        Ckey                   : 0x4
        Nkey                   : 0x3
        Main PW Token          : 0xf
        Slave PW Token         : 0x0
        Tnl Type               : LSP
        OutInterface           : Vlanif10
        Backup OutInterface    :
        Stp Enable             : 0
        PW Last Up Time        : 2015/03/16 15:56:48
        PW Total Up Time       : 0 days, 0 hours, 1 minutes, 24 seconds
       *Peer Ip Address        : 4.4.4.4
        PW State               : up
        Local VC Label         : 4101
        Remote VC Label        : 4099
        Remote Control Word    : disable
        PW Type                : label
        Local  VCCV            : alert lsp-ping bfd
        Remote VCCV            : alert lsp-ping bfd
        Tunnel ID              : 0xb
        Broadcast Tunnel ID    : 0xb
        Broad BackupTunnel ID  : 0x0
        Ckey                   : 0x6
        Nkey                   : 0x5
        Main PW Token          : 0xb
        Slave PW Token         : 0x0
        Tnl Type               : LSP
        OutInterface           : Vlanif40
        Backup OutInterface    :
        Stp Enable             : 0
        PW Last Up Time        : 2015/03/16 15:56:49
        PW Total Up Time       : 0 days, 0 hours, 1 minutes, 24 seconds
       *Peer Ip Address        : 2.2.2.2
        PW State               : up
        Local VC Label         : 4099
        Remote VC Label        : 4099
        Remote Control Word    : disable
        PW Type                : label
        Local  VCCV            : alert lsp-ping bfd
        Remote VCCV            : alert lsp-ping bfd
        Tunnel ID              : 0xd
        Broadcast Tunnel ID    : 0xd
        Broad BackupTunnel ID  : 0x0
        Ckey                   : 0x2
        Nkey                   : 0x1
        Main PW Token          : 0xd
        Slave PW Token         : 0x0
        Tnl Type               : LSP
        OutInterface           : Vlanif10
        Backup OutInterface    :
        Stp Enable             : 0
        PW Last Up Time        : 2015/03/16 15:57:06
        PW Total Up Time       : 0 days, 0 hours, 1 minutes, 24 seconds
    

    在PC1(10.1.1.1)上能够ping通PC2(10.1.1.2)。

    当CE1和PE1之间的链路或者PE1设备出现故障时,PE4由备根切换为主根。PC1和PC2仍然可以相互Ping通,流量经PE4转发。

配置文件

  • CE1的配置文件

    #
    sysname CE1
    #
    vlan batch 100
    #
    stp bpdu-protection
    #
    stp region-configuration                                                        
     region-name RG1                                                                
     active region-configuration                                                    
    #
    interface GigabitEthernet1/0/0
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    interface GigabitEthernet2/0/0
     port link-type access                                                          
     port default vlan 100
     stp edged-port enable
    #
    return
  • CE2的配置文件

    #
    sysname CE2
    #
    vlan batch 100
    #
    stp bpdu-protection
    #
    stp region-configuration                                                        
     region-name RG1                                                                
     active region-configuration
    #
    interface GigabitEthernet1/0/0
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    interface GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 100
    #
    interface GigabitEthernet2/0/0
     port link-type access                                                          
     port default vlan 100
     stp edged-port enable
    #
    return
  • PE1的配置文件

    #
    sysname PE1
    #
    router id 1.1.1.1
    #
    vlan batch 10 40
    #
    stp instance 0 priority 0 
    #
    stp region-configuration                                                        
     region-name RG1                                                                
     active region-configuration                                                    
    #
    mpls lsr-id 1.1.1.1
    mpls
    #
    mpls l2vpn
    #
    vsi a2 static 
     pwsignal ldp 
      vsi-id 2
      peer 2.2.2.2 
      peer 3.3.3.3
      peer 4.4.4.4
    # 
    mpls ldp
    #
    mpls ldp remote-peer 3.3.3.3
     remote-ip 3.3.3.3
    #
    interface Vlanif10
     ip address 172.16.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface Vlanif40
     ip address 172.19.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/0
     port link-type hybrid
     stp vpls-subinterface enable
    #
    interface GigabitEthernet1/0/0.1
     dot1q termination vid 100
     l2 binding vsi a2
    #
    interface GigabitEthernet2/0/0
     port link-type trunk
     port trunk allow-pass vlan 10
     stp disable
    #
    interface GigabitEthernet3/0/0
     port link-type trunk
     port trunk allow-pass vlan 40
     stp disable
    #
    interface LoopBack1
     ip address 1.1.1.1 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 1.1.1.1 0.0.0.0
      network 172.16.1.0 0.0.0.255
      network 172.19.1.0 0.0.0.255
    #
    return
  • PE2的配置文件

    #
    sysname PE2
    #
    router id 2.2.2.2
    #
    vlan batch 10 20
    #
    stp instance 0 priority 0 
    #
    stp region-configuration                                                        
     region-name RG1                                                                
     active region-configuration                                                    
    #
    mpls lsr-id 2.2.2.2
    mpls
    #
    mpls l2vpn
    #
    vsi a2 static
     pwsignal ldp
      vsi-id 2
      peer 1.1.1.1
      peer 3.3.3.3
      peer 4.4.4.4
    #
    mpls ldp
    #
    mpls ldp remote-peer 4.4.4.4
     remote-ip 4.4.4.4
    #
    interface Vlanif10
     ip address 172.16.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface Vlanif20
     ip address 172.17.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/0
     port link-type hybrid
     stp vpls-subinterface enable
    #
    interface GigabitEthernet1/0/0.1
     dot1q termination vid 100
     l2 binding vsi a2
    #
    interface GigabitEthernet2/0/0
     port link-type trunk
     port trunk allow-pass vlan 10
     stp disable
    #
    interface GigabitEthernet3/0/0
     port link-type trunk
     port trunk allow-pass vlan 20
     stp disable
    #
    interface LoopBack1
     ip address 2.2.2.2 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 2.2.2.2 0.0.0.0
      network 172.16.1.0 0.0.0.255
      network 172.17.1.0 0.0.0.255
    #
    return
  • PE3的配置文件

    #
    sysname PE3
    #
    router id 3.3.3.3
    #
    vlan batch 20 30
    #
    stp instance 0 priority 4096 
    #
    stp region-configuration                                                        
     region-name RG1                                                                
     active region-configuration                                                    
    #
    mpls lsr-id 3.3.3.3
    mpls
    #
    mpls l2vpn
    #
    vsi a2 static
     pwsignal ldp
      vsi-id 2
      peer 1.1.1.1
      peer 2.2.2.2
      peer 4.4.4.4
    #
    mpls ldp
    #
    mpls ldp remote-peer 1.1.1.1
     remote-ip 1.1.1.1
    #
    interface Vlanif20
     ip address 172.17.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface Vlanif30
     ip address 172.18.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/0
     port link-type hybrid
     stp root-protection
     stp vpls-subinterface enable
    #
    interface GigabitEthernet1/0/0.1
     dot1q termination vid 100
     l2 binding vsi a2
    #
    interface GigabitEthernet2/0/0
     port link-type trunk
     port trunk allow-pass vlan 20
     stp disable
    #
    interface GigabitEthernet3/0/0
     port link-type trunk
     port trunk allow-pass vlan 30
     stp disable
    #
    interface LoopBack1
     ip address 3.3.3.3 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 3.3.3.3 0.0.0.0
      network 172.17.1.0 0.0.0.255
      network 172.18.1.0 0.0.0.255
    #
    return
  • PE4的配置文件

    #
    sysname PE4
    #
    router id 4.4.4.4
    #
    vlan batch 30 40
    #
    stp instance 0 priority 4096 
    #
    stp region-configuration                                                        
     region-name RG1                                                                
     active region-configuration                                                    
    #
    mpls lsr-id 4.4.4.4
    mpls
    #
    mpls l2vpn
    #
    vsi a2 static
     pwsignal ldp
      vsi-id 2
      peer 1.1.1.1
      peer 2.2.2.2
      peer 3.3.3.3
    #
    mpls ldp
    #
    mpls ldp remote-peer 2.2.2.2
     remote-ip 2.2.2.2
    #
    interface Vlanif30
     ip address 172.18.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface Vlanif40
     ip address 172.19.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet1/0/0
     port link-type hybrid
     stp root-protection
     stp vpls-subinterface enable
    #
    interface GigabitEthernet1/0/0.1
     dot1q termination vid 100
     l2 binding vsi a2
    #
    interface GigabitEthernet2/0/0
     port link-type trunk
     port trunk allow-pass vlan 30
     stp disable
    #
    interface GigabitEthernet3/0/0
     port link-type trunk
     port trunk allow-pass vlan 40
     stp disable
    #
    interface LoopBack1
     ip address 4.4.4.4 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 4.4.4.4 0.0.0.0
      network 172.18.1.0 0.0.0.255
      network 172.19.1.0 0.0.0.255
    #
    return
翻译
下载文档
更新时间:2019-12-27

文档编号:EDOC1000141467

浏览量:84854

下载量:1001

平均得分:
本文档适用于这些产品

相关版本

相关文档

Share
上一页 下一页