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

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

提示

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

升级

S7700, S7900, S9700 V200R011C10 配置指南-可靠性

本文档针对设备可靠性业务,主要包括BFD配置、DLDP配置、VRRP配置、Smart Link和Monitor Link配置、EFM配置、CFM配置、Y.1731配置和MAC Swap配置。
评分并提供意见反馈 :
华为采用机器翻译与人工审校相结合的方式将此文档翻译成不同语言,希望能帮助您更容易理解此文档的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 华为对于翻译的准确性不承担任何责任,并建议您参考英文文档(已提供链接)。
配置BFD状态与BFD状态联动示例

配置BFD状态与BFD状态联动示例

组网需求

图2-25所示,CE1和CE2分别双归接入PE1、PE2、PE3、PE4,正常情况下,流量的经主用路径为CE1→PE1→PE3→CE2转发。用户希望当PE间出现故障时,CE能够快速感知故障,将流量切换至备份链路。

图2-25  配置BFD状态与BFD状态联动组网图

配置思路

采用如下思路配置BFD状态与BFD状态联动:

  1. 在CE1和PE1、PE1和PE3、PE3和CE2之间建立BFD会话。

  2. 在PE1上配置CE1和PE1之间BFD会话、PE1和PE3之间BFD会话双向故障传递机制,实现BFD与BFD联动。

  3. 在PE3上配置PE1和PE3之间BFD会话、PE3和CE2之间BFD会话双向故障传递机制,实现BFD与BFD联动。

操作步骤

  1. 配置设备间的网络互连

    # 配置设备各接口的IP地址,以PE1为例。PE2、PE3、PE4、CE1和CE2的配置与PE1类似,详见配置文件。

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

  2. 配置路由协议

    本例使用OSPF协议

    在CE和PE上运行OSPF,为了使流量从路径CE1→PE1→PE3→CE2上传输,将CE1的VLANIF 40和CE2的VLANIF 60的OSPF开销值改大(例如,改为10)。

    # 配置PE1,PE2、PE3、PE4的配置与PE1类似,具体配置步骤略。

    [PE1] ospf 1
    [PE1-ospf-1] area 0.0.0.0
    [PE1-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255
    [PE1-ospf-1-area-0.0.0.0] network 10.20.1.0 0.0.0.255
    [PE1-ospf-1-area-0.0.0.0] quit
    [PE1-ospf-1] quit
    

    # 配置CE1

    [CE1] ospf 1
    [CE1-ospf-1] area 0.0.0.0
    [CE1-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255
    [CE1-ospf-1-area-0.0.0.0] network 10.40.1.0 0.0.0.255
    [CE1-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [CE1-ospf-1-area-0.0.0.0] quit
    [CE1-ospf-1] quit
    [CE1] interface vlanif 40
    [CE1-Vlanif40] ospf cost 10
    [CE1-Vlanif40] quit
    

    # 配置CE2

    [CE2] ospf 1
    [CE2-ospf-1] area 0.0.0.0
    [CE2-ospf-1-area-0.0.0.0] network 10.30.1.0 0.0.0.255
    [CE2-ospf-1-area-0.0.0.0] network 10.60.1.0 0.0.0.255
    [CE2-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
    [CE2-ospf-1-area-0.0.0.0] quit
    [CE2-ospf-1] quit
    [CE2] interface vlanif 60
    [CE2-Vlanif60] ospf cost 10
    [CE2-Vlanif60] quit

    # 在CE1上执行display ip routing-table命令,可以看到CE1去往192.168.2.0/24的路由出接口为VLANIF 10。即,流量从主路径上传输。

    [CE1] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 13       Routes : 13
    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
    
          10.10.1.0/24  Direct  0    0           D   10.10.1.1       Vlanif10
          10.10.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif10
          10.20.1.0/24  OSPF    10   2           D   10.10.1.2       Vlanif10
          10.30.1.0/24  OSPF    10   3           D   10.10.1.2       Vlanif10
          10.40.1.0/24  Direct  0    0           D   10.40.1.1       Vlanif40
          10.40.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif40
          10.50.1.0/24  OSPF    10   11          D   10.40.1.2       Vlanif40
          10.60.1.0/24  OSPF    10   12          D   10.40.1.2       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
        192.168.1.0/24  Direct  0    0           D   192.168.1.1     Vlanif100
        192.168.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif100
        192.168.2.0/24  OSPF    10   4           D   10.10.1.2       Vlanif10

  3. 配置BFD会话

    # 配置CE1

    [CE1] bfd
    [CE1-bfd] quit
    [CE1] bfd ce1tope1 bind peer-ip 10.10.1.2 interface vlanif 10
    [CE1-bfd-session-ce1tope1] discriminator local 10
    [CE1-bfd-session-ce1tope1] discriminator remote 11
    [CE1-bfd-session-ce1tope1] commit
    [CE1-bfd-session-ce1tope1] quit
    

    # 配置PE1

    [PE1] bfd
    [PE1-bfd] quit
    [PE1] bfd pe1toce1 bind peer-ip 10.10.1.1 interface vlanif 10
    [PE1-bfd-session-pe1toce1] discriminator local 11
    [PE1-bfd-session-pe1toce1] discriminator remote 10
    [PE1-bfd-session-pe1toce1] commit
    [PE1-bfd-session-pe1toce1] quit
    [PE1] bfd pe1tope3 bind peer-ip 10.20.1.2 interface vlanif 20
    [PE1-bfd-session-pe1tope3] discriminator local 13
    [PE1-bfd-session-pe1tope3] discriminator remote 31
    [PE1-bfd-session-pe1tope3] commit
    [PE1-bfd-session-pe1tope3] quit
    

    # 配置PE3

    [PE3] bfd
    [PE3-bfd] quit
    [PE3] bfd pe3toce2 bind peer-ip 10.30.1.2 interface vlanif 30
    [PE3-bfd-session-pe3toce2] discriminator local 32
    [PE3-bfd-session-pe3toce2] discriminator remote 23
    [PE3-bfd-session-pe3toce2] commit
    [PE3-bfd-session-pe3toce2] quit
    [PE3] bfd pe3tope1 bind peer-ip 10.20.1.1 interface vlanif 20
    [PE3-bfd-session-pe3tope1] discriminator local 31
    [PE3-bfd-session-pe3tope1] discriminator remote 13
    [PE3-bfd-session-pe3tope1] commit
    [PE3-bfd-session-pe3tope1] quit
    

    # 配置CE2

    [CE2] bfd
    [CE2-bfd] quit
    [CE2] bfd ce2tope3 bind peer-ip 10.30.1.1 interface vlanif 30
    [CE2-bfd-session-ce2tope3] discriminator local 23
    [CE2-bfd-session-ce2tope3] discriminator remote 32
    [CE2-bfd-session-ce2tope3] commit
    [CE2-bfd-session-ce2tope3] quit
    

    # 配置完成后,在PE或者CE设备上执行display bfd session all,可以看到对应BFD会话的状态为UP,以PE1的显示为例:

    [PE1] display bfd session all
    --------------------------------------------------------------------------------
    Local Remote PeerIpAddr      State     Type        InterfaceName                
    --------------------------------------------------------------------------------
    11     10    10.10.1.1       Up        S_IP_IF     Vlanif10                     
    13     31    10.20.1.2       Up        S_IP_IF     Vlanif20                     
    --------------------------------------------------------------------------------
         Total UP/DOWN Session Number : 2/0  

  4. 配置BFD与BFD状态联动

    在PE1和PE3上配置BFD状态联动

    # 配置PE1

    [PE1] oam-mgr
    [PE1-oam-mgr] oam-bind bfd-session 11 bfd-session 13
    [PE1-oam-mgr] quit

    # 配置PE3

    [PE3] oam-mgr
    [PE3-oam-mgr] oam-bind bfd-session 31 bfd-session 32
    [PE3-oam-mgr] quit

  5. 检查配置结果

    # 在PE1的GE1/0/2接口上执行shutdown,模拟链路故障。

    [PE1] interface gigabitethernet 1/0/2
    [PE1-GigabitEthernet1/0/2] shutdown
    [PE1-GigabitEthernet1/0/2] quit

    # 在PE1或者PE3执行命令display bfd session all查看与对端建立的BFD会话的状态。以PE1的显示为例:

    [PE1] display bfd session all
    --------------------------------------------------------------------------------
    Local Remote PeerIpAddr      State     Type        InterfaceName                
    --------------------------------------------------------------------------------
    11     10    10.10.1.1       Up        S_IP_IF     Vlanif10
    13     31    10.20.1.2       Down      S_IP_IF     Vlanif20                     
    --------------------------------------------------------------------------------
         Total UP/DOWN Session Number : 1/1  

    # 在CE1或者CE3上执行命令display bfd session all verbose命令查看bfd会话状态显示为Reverse Concatenated Path Down,以CE1的显示为例:

    [CE1]display bfd session all verbose
    --------------------------------------------------------------------------------
    Session MIndex : 4096      (One Hop) State : Up      Name : ce1tope1
    --------------------------------------------------------------------------------
      Local Discriminator    : 10               Remote Discriminator   : 11
      Session Detect Mode    : Asynchronous Mode Without Echo Function
      BFD Bind Type          : Interface(Vlanif10)
      Bind Session Type      : Static
      Bind Peer IP Address   : 10.10.1.2
      NextHop Ip Address     : 10.10.1.2 
      Bind Interface         : Vlanif10
      FSM Board Id           : 0                TOS-EXP                : 7
      Min Tx Interval (ms)   : 1000             Min Rx Interval (ms)   : 1000
      Actual Tx Interval (ms): 1000             Actual Rx Interval (ms): 1000
      Local Detect Multi     : 3                Detect Interval (ms)   : 3000
      Echo Passive           : Disable          Acl Number             : -
      Destination Port       : 3784             TTL                    : 255
      Proc Interface Status  : Disable          Process PST            : Disable
      WTR Interval (ms)      : -                
      Active Multi           : 3                DSCP                   : - 
      Last Local Diagnostic  : Reverse Concatenated Path Down                       
      Bind Application       : No Application Bind
      Session TX TmrID       : -                Session Detect TmrID   : -
      Session Init TmrID     : -                Session WTR TmrID      : -
      Session Echo Tx TmrID  : -
      PDT Index              : FSM-0 | RCV-0 | IF-0 | TOKEN-0
      Session Description    : -
    --------------------------------------------------------------------------------
    
         Total UP/DOWN Session Number : 1/0
    

    # 在CE1上执行display ip routing table查看CE1去往CE2的路由,去往192.168.2.0/24的下一跳为10.40.1.2,流量经备用链路转发。

    [CE1] display ip routing-table
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 12       Routes : 12
    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
    
          10.10.1.0/24  Direct  0    0           D   10.10.1.1       Vlanif10
          10.10.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif10
          10.30.1.0/24  OSPF    10   13          D   10.40.1.2       Vlanif40
          10.40.1.0/24  Direct  0    0           D   10.40.1.1       Vlanif40
          10.40.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif40
          10.50.1.0/24  OSPF    10   11          D   10.40.1.2       Vlanif40
          10.60.1.0/24  OSPF    10   12          D   10.40.1.2       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
        192.168.1.0/24  Direct  0    0           D   192.168.1.1     Vlanif100
        192.168.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif100
        192.168.2.0/24  OSPF    10   13          D   10.40.1.2       Vlanif40

配置文件

  • CE1的配置文件

    #
    sysname CE1
    #
    vlan batch 10 40 100
    #
    bfd
    #
    interface Vlanif10
     ip address 10.10.1.1 255.255.255.0
    #
    interface Vlanif40
     ip address 10.40.1.1 255.255.255.0
     ospf cost 10
    #
    interface Vlanif100
     ip address 192.168.1.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 40
     port hybrid untagged vlan 40
    #
    interface GigabitEthernet1/0/3
     port link-type hybrid
     port hybrid pvid vlan 100
     port hybrid untagged vlan 100
    #
    bfd ce1tope1 bind peer-ip 10.10.1.2 interface Vlanif10
     discriminator local 10
     discriminator remote 11
     commit
    #
    ospf 1
     area 0.0.0.0
      network 10.10.1.0 0.0.0.255
      network 10.40.1.0 0.0.0.255
      network 192.168.1.0 0.0.0.255
    #
    return
  • CE2的配置文件

    #
    sysname CE2
    #
    vlan batch 30 60 110
    #
    bfd
    #
    interface Vlanif30
     ip address 10.30.1.2 255.255.255.0
    #
    interface Vlanif60
     ip address 10.60.1.1 255.255.255.0
     ospf cost 10
    #
    interface Vlanif110
     ip address 192.168.2.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid pvid vlan 30
     port hybrid untagged vlan 30
    #
    interface GigabitEthernet1/0/2
     port link-type hybrid
     port hybrid pvid vlan 60
     port hybrid untagged vlan 60
    #
    interface GigabitEthernet1/0/3
     port link-type hybrid
     port hybrid pvid vlan 110
     port hybrid untagged vlan 110
    #
    bfd ce2tope3 bind peer-ip 10.30.1.1 interface Vlanif30
     discriminator local 23
     discriminator remote 32
     commit
    #
    ospf 1
     area 0.0.0.0
      network 10.30.1.0 0.0.0.255
      network 10.60.1.0 0.0.0.255
      network 192.168.2.0 0.0.0.255
    #
    return
  • PE1的配置文件

    #
    sysname PE1
    #
    vlan batch 10 20
    #
    bfd
    #
    interface Vlanif10
     ip address 10.10.1.2 255.255.255.0
    #
    interface Vlanif20
     ip address 10.20.1.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
    #
    bfd pe1toce1 bind peer-ip 10.10.1.1 interface Vlanif10
     discriminator local 11
     discriminator remote 10
     commit
    #
    bfd pe1tope3 bind peer-ip 10.20.1.2 interface Vlanif20
     discriminator local 13
     discriminator remote 31
     commit
    #
    ospf 1
     area 0.0.0.0
      network 10.10.1.0 0.0.0.255
      network 10.20.1.0 0.0.0.255
    #
    oam-mgr
     oam-bind ingress bfd-session 11 egress bfd-session 13
     oam-bind ingress bfd-session 13 egress bfd-session 11 
    #
    return
  • PE2的配置文件

    #
    sysname PE2
    #
    vlan batch 40 50
    #
    interface Vlanif40
     ip address 10.40.1.2 255.255.255.0
    #
    interface Vlanif50
     ip address 10.50.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid pvid vlan 40
     port hybrid untagged vlan 40
    #
    interface GigabitEthernet1/0/2
     port link-type hybrid
     port hybrid pvid vlan 50
     port hybrid untagged vlan 50
    #
    ospf 1
     area 0.0.0.0
      network 10.40.1.0 0.0.0.255
      network 10.50.1.0 0.0.0.255
    #
    return
  • PE3的配置文件

    #
    sysname PE3
    #
    vlan batch 20 30
    #
    bfd
    #
    interface Vlanif20
     ip address 10.20.1.2 255.255.255.0
    #
    interface Vlanif30
     ip address 10.30.1.1 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid pvid vlan 20
     port hybrid untagged vlan 20
    #
    interface GigabitEthernet1/0/2
     port link-type hybrid
     port hybrid pvid vlan 30
     port hybrid untagged vlan 30
    #
    bfd pe3toce2 bind peer-ip 10.30.1.2 interface Vlanif30
     discriminator local 32
     discriminator remote 23
     commit
    #
    bfd pe3tope1 bind peer-ip 10.20.1.1 interface Vlanif20
     discriminator local 31
     discriminator remote 13
     commit
    #
    ospf 1
     area 0.0.0.0
      network 10.20.1.0 0.0.0.255
      network 10.30.1.0 0.0.0.255
    #
    oam-mgr
     oam-bind ingress bfd-session 31 egress bfd-session 32
     oam-bind ingress bfd-session 32 egress bfd-session 31
    #
    return
  • PE4的配置文件

    #
    sysname PE4
    #
    vlan batch 50 60
    #
    interface Vlanif50
     ip address 10.50.1.2 255.255.255.0
    #
    interface Vlanif60
     ip address 10.60.1.2 255.255.255.0
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid pvid vlan 50
     port hybrid untagged vlan 50
    #
    interface GigabitEthernet1/0/2
     port link-type hybrid
     port hybrid pvid vlan 60
     port hybrid untagged vlan 60
    #
    ospf 1
     area 0.0.0.0
      network 10.50.1.0 0.0.0.255
      network 10.60.1.0 0.0.0.255
    #
    return
翻译
下载文档
更新时间:2019-04-17

文档编号:EDOC1000178275

浏览量:30737

下载量:318

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