华为NE40E路由器实验配置示例 | 配置SR-MPLS BE隧道的TI-LFA FRR功能

Posted COCOgsta

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为NE40E路由器实验配置示例 | 配置SR-MPLS BE隧道的TI-LFA FRR功能相关的知识,希望对你有一定的参考价值。

组网需求

图1所示,该网络使能IS-IS,配置SR-MPLS BE功能。其中,DeviceC和DeviceD之间链路Cost是100,其他链路的Cost均为10。当前从DeviceA到DeviceF的最优路径是:DeviceA->DeviceB->DeviceE->DeviceF。通过在DeviceB上配置TI-LFA FRR局部保护功能,在DeviceB和DeviceE之间链路故障时,数据流量可以快速切换到备份路径:DeviceA->DeviceB->DeviceC->DeviceD->DeviceE->DeviceF。

图1 配置SR-MPLS BE隧道的TI-LFA FRR功能组网图

 配置思路

  1. 整网配置IS-IS实现设备之间的互通。

  2. 整网使能MPLS,配置Segment Routing,建立SR-MPLS BE隧道。

  3. DeviceB上使能TI-LFA FRR保护功能,并且同时使能防微环功能。

操作步骤

1. 配置接口的IP地址

# 配置DeviceA。

<HUAWEI> system-view
[~HUAWEI] sysname DeviceA
[*HUAWEI] commit
[~DeviceA] interface loopback 1
[*DeviceA-LoopBack1] ip address 1.1.1.9 32
[*DeviceA-LoopBack1] quit
[*DeviceA] interface gigabitethernet1/0/0
[*DeviceA-GigabitEthernet1/0/0] ip address 10.1.1.1 24
[*DeviceA-GigabitEthernet1/0/0] quit
[*DeviceA] commit

其他设备的配置过程与DeviceA类似,具体请参考后面的配置文件,在此不再赘述。

2. 配置IGP协议,实现网络互通。本例中以IS-IS为例进行说明

# 配置DeviceA。

[~DeviceA] isis 1
[*DeviceA-isis-1] is-level level-1
[*DeviceA-isis-1] network-entity 10.0000.0000.0001.00
[*DeviceA-isis-1] cost-style wide
[*DeviceA-isis-1] quit
[*DeviceA] interface loopback 1
[*DeviceA-LoopBack1] isis enable 1
[*DeviceA-LoopBack1] quit
[*DeviceA] interface gigabitethernet1/0/0
[*DeviceA-GigabitEthernet1/0/0] isis enable 1
[*DeviceA-GigabitEthernet1/0/0] quit
[*DeviceA] commit

其他设备的配置过程与DeviceA类似,具体请参考后面的配置文件,在此不再赘述。

同时配置DeviceC与DeviceD之间链路开销为100,模拟特殊网络场景。

# 配置DeviceC。

[~DeviceC] interface gigabitethernet2/0/0
[~DeviceC-GigabitEthernet2/0/0] isis cost 100
[*DeviceC-GigabitEthernet2/0/0] quit
[*DeviceC] commit

# 配置DeviceD。

[~DeviceD] interface gigabitethernet1/0/0
[~DeviceD-GigabitEthernet1/0/0] isis cost 100
[*DeviceD-GigabitEthernet1/0/0] quit
[*DeviceD] commit

3. (可选)在骨干网上配置MPLS基本能力

当接口下使能IS-IS功能后,接口自动使能MPLS能力,所以也可以忽略此步骤。

# 配置DeviceA。

[~DeviceA] mpls lsr-id 1.1.1.9
[*DeviceA] mpls
[*DeviceA-mpls] commit
[~DeviceA-mpls] quit

# 配置DeviceB。

[~DeviceB] mpls lsr-id 2.2.2.9
[*DeviceB] mpls
[*DeviceB-mpls] commit
[~DeviceB-mpls] quit

# 配置DeviceC。

[~DeviceC] mpls lsr-id 3.3.3.9
[*DeviceC] mpls
[*DeviceC-mpls] commit
[~DeviceC-mpls] quit

# 配置DeviceD。

[~DeviceD] mpls lsr-id 4.4.4.9
[*DeviceD] mpls
[*DeviceD-mpls] commit
[~DeviceD-mpls] quit

# 配置DeviceE。

[~DeviceE] mpls lsr-id 5.5.5.9
[*DeviceE] mpls
[*DeviceE-mpls] commit
[~DeviceE-mpls] quit

# 配置DeviceF。

[~DeviceF] mpls lsr-id 6.6.6.9
[*DeviceF] mpls
[*DeviceF-mpls] commit
[~DeviceF-mpls] quit

4. 在骨干网上配置Segment Routing,建立SR-MPLS BE隧道

# 配置DeviceA。

[~DeviceA] segment-routing
[*DeviceA-segment-routing] quit
[*DeviceA] isis 1
[*DeviceA-isis-1] segment-routing mpls
[*DeviceA-isis-1] segment-routing global-block 16000 23999
[*DeviceA-isis-1] quit
[*DeviceA] interface loopback 1
[*DeviceA-LoopBack1] isis prefix-sid index 10
[*DeviceA-LoopBack1] quit
[*DeviceA] commit

# 配置DeviceB。

[~DeviceB] segment-routing
[*DeviceB-segment-routing] quit
[*DeviceB] isis 1
[*DeviceB-isis-1] segment-routing mpls
[*DeviceB-isis-1] segment-routing global-block 16000 23999
[*DeviceB-isis-1] quit
[*DeviceB] interface loopback 1
[*DeviceB-LoopBack1] isis prefix-sid index 20
[*DeviceB-LoopBack1] quit
[*DeviceB] commit

# 配置DeviceC。

[~DeviceC] segment-routing
[*DeviceC-segment-routing] quit
[*DeviceC] isis 1
[*DeviceC-isis-1] segment-routing mpls
[*DeviceC-isis-1] segment-routing global-block 16000 23999
[*DeviceC-isis-1] quit
[*DeviceC] interface loopback 1
[*DeviceC-LoopBack1] isis prefix-sid index 30
[*DeviceC-LoopBack1] quit
[*DeviceC] commit

# 配置DeviceD。

[~DeviceD] segment-routing
[*DeviceD-segment-routing] quit
[*DeviceD] isis 1
[*DeviceD-isis-1] segment-routing mpls
[*DeviceD-isis-1] segment-routing global-block 16000 23999
[*DeviceD-isis-1] quit
[*DeviceD] interface loopback 1
[*DeviceD-LoopBack1] isis prefix-sid index 40
[*DeviceD-LoopBack1] quit
[*DeviceD] commit

# 配置DeviceE。

[~DeviceE] segment-routing
[*DeviceE-segment-routing] quit
[*DeviceE] isis 1
[*DeviceE-isis-1] segment-routing mpls
[*DeviceE-isis-1] segment-routing global-block 16000 23999
[*DeviceE-isis-1] quit
[*DeviceE] interface loopback 1
[*DeviceE-LoopBack1] isis prefix-sid index 50
[*DeviceE-LoopBack1] quit
[*DeviceE] commit

# 配置DeviceF。

[~DeviceF] segment-routing
[*DeviceF-segment-routing] quit
[*DeviceF] isis 1
[*DeviceF-isis-1] segment-routing mpls
[*DeviceF-isis-1] segment-routing global-block 16000 23999
[*DeviceF-isis-1] quit
[*DeviceF] interface loopback 1
[*DeviceF-LoopBack1] isis prefix-sid index 60
[*DeviceF-LoopBack1] quit
[*DeviceF] commit

# 配置完成后,在各设备上执行display segment-routing prefix mpls forwarding命令,可以看到SR-MPLS BE标签转发路径已建立。以DeviceA的显示为例。

[~DeviceA] display segment-routing prefix mpls forwarding
                   Segment Routing Prefix MPLS Forwarding Information
             --------------------------------------------------------------
             Role : I-Ingress, T-Transit, E-Egress, I&T-Ingress And Transit

Prefix             Label      OutLabel   Interface         NextHop          Role  MPLSMtu   Mtu     State          
-----------------------------------------------------------------------------------------------------------------
1.1.1.9/32         16010      NULL       Loop1             127.0.0.1        E     ---       1500    Active          
2.2.2.9/32         16020      3          GE1/0/0           10.1.1.2         I&T   ---       1500    Active          
3.3.3.9/32         16030      16030      GE1/0/0           10.1.1.2         I&T   ---       1500    Active          
4.4.4.9/32         16040      16040      GE1/0/0           10.1.1.2         I&T   ---       1500    Active          
5.5.5.9/32         16050      16050      GE1/0/0           10.1.1.2         I&T   ---       1500    Active          
6.6.6.9/32         16060      16060      GE1/0/0           10.1.1.2         I&T   ---       1500    Active          

Total information(s): 6

5. 配置TI-LFA FRR功能

# 配置DeviceB。

[~DeviceB] isis 1
[~DeviceB-isis-1] avoid-microloop frr-protected
[*DeviceB-isis-1] avoid-microloop frr-protected rib-update-delay 5000
[*DeviceB-isis-1] avoid-microloop segment-routing
[*DeviceB-isis-1] avoid-microloop segment-routing rib-update-delay 10000
[*DeviceB-isis-1] frr
[*DeviceB-isis-1-frr] loop-free-alternate level-1
[*DeviceB-isis-1-frr] ti-lfa level-1
[*DeviceB-isis-1-frr] quit
[*DeviceB-isis-1] quit
[*DeviceB] commit

配置完成后,在DeviceB上执行display isis route [ level-1 | level-2 ] [ process-id ] [ verbose ]命令,可以看到IS-IS TI-LFA FRR备份表项信息。

[~DeviceB] display isis route level-1 verbose
                         Route information for ISIS(1)
                         -----------------------------

                        ISIS(1) Level-1 Forwarding Table
                        --------------------------------


 IPV4 Dest  : 1.1.1.9/32         Int. Cost : 10            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 1             Flags     : A/-/-/-
 Priority   : Medium             Age       : 04:35:30
 NextHop    :                    Interface :               ExitIndex :
    10.1.1.1                           GE1/0/0                    0x0000000e
 Prefix-sid : 16010              Weight    : 0             Flags     : -/N/-/-/-/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.1.1.1                           GE1/0/0                    3

 IPV4 Dest  : 2.2.2.9/32         Int. Cost : 0             Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 1             Flags     : D/-/L/-
 Priority   : -                  Age       : 04:35:30
 NextHop    :                    Interface :               ExitIndex :
    Direct                             Loop1                      0x00000000
 Prefix-sid : 16020              Weight    : 0             Flags     : -/N/-/-/-/-/A/L
 SR NextHop :                    Interface :               OutLabel  :
    Direct                             Loop1                      -

 IPV4 Dest  : 3.3.3.9/32         Int. Cost : 10            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 1             Flags     : A/-/-/-
 Priority   : Medium             Age       : 04:09:15
 NextHop    :                    Interface :               ExitIndex :
    10.2.1.2                           GE2/0/0                     0x0000000a
 TI-LFA:        
 Interface  : GE3/0/0                                                               
 NextHop    : 10.5.1.2           LsIndex    : 0x00000002   ProtectType: L
 Backup Label Stack (Top -> Bottom): 16040, 48141
 Prefix-sid : 16030              Weight    : 0             Flags     : -/N/-/-/-/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.2.1.2                           GE2/0/0                    3
 TI-LFA:        
 Interface  : GE3/0/0                                                               
 NextHop    : 10.5.1.2           LsIndex    : 0x00000002   ProtectType: L
 Backup Label Stack (Top -> Bottom): 16040, 48141

 IPV4 Dest  : 4.4.4.9/32         Int. Cost : 20            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 1             Flags     : A/-/-/-
 Priority   : Medium             Age       : 04:09:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           GE3/0/0                    0x00000007
 TI-LFA:        
 Interface  : GE2/0/0                                                               
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003   ProtectType: N
 Backup Label Stack (Top -> Bottom): 48142
 Prefix-sid : 16040              Weight    : 0             Flags     : -/N/-/-/-/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.5.1.2                           GE3/0/0                    16040
 TI-LFA:        
 Interface  : GE2/0/0                                                               
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003   ProtectType: N
 Backup Label Stack (Top -> Bottom): 48142

 IPV4 Dest  : 5.5.5.9/32         Int. Cost : 10            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 1             Flags     : A/-/-/-
 Priority   : Medium             Age       : 04:09:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           GE3/0/0                    0x00000007
 TI-LFA:        
 Interface  : GE2/0/0                                                               
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003   ProtectType: L
 Backup Label Stack (Top -> Bottom): 48142
 Prefix-sid : 16050              Weight    : 0             Flags     : -/N/-/-/-/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.5.1.2                           GE3/0/0                    3
 TI-LFA:        
 Interface  : GE2/0/0                                                               
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003   ProtectType: L
 Backup Label Stack (Top -> Bottom): 48142

 IPV4 Dest  : 6.6.6.9/32         Int. Cost : 20            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 1             Flags     : A/-/-/-
 Priority   : Medium             Age       : 04:09:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           GE3/0/0                    0x00000007
 TI-LFA:        
 Interface  : GE2/0/0                                                               
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003   ProtectType: L
 Backup Label Stack (Top -> Bottom): 48142
 Prefix-sid : 16060              Weight    : 0             Flags     : -/N/-/-/-/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.5.1.2                           GE3/0/0                    16060
 TI-LFA:        
 Interface  : GE2/0/0                                                               
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003   ProtectType: L
 Backup Label Stack (Top -> Bottom): 48142

 IPV4 Dest  : 10.1.1.0/24        Int. Cost : 10            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : D/-/L/-
 Priority   : -                  Age       : 04:35:30
 NextHop    :                    Interface :               ExitIndex :
    Direct                             GE1/0/0                    0x00000000

 IPV4 Dest  : 10.2.1.0/24        Int. Cost : 10            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : D/-/L/-
 Priority   : -                  Age       : 04:35:30
 NextHop    :                    Interface :               ExitIndex :
    Direct                             GE2/0/0                    0x00000000

 IPV4 Dest  : 10.3.1.0/24        Int. Cost : 110           Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : A/-/-/-
 Priority   : Low                Age       : 04:09:15
 NextHop    :                    Interface :               ExitIndex :
    10.2.1.2                           GE2/0/0                    0x0000000a
 TI-LFA:        
 Interface  : GE3/0/0                                                               
 NextHop    : 10.5.1.2           LsIndex    : 0x00000003   ProtectType: L
 Backup Label Stack (Top -> Bottom): 

 IPV4 Dest  : 10.4.1.0/24        Int. Cost : 20            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : A/-/-/-
 Priority   : Low                Age       : 04:09:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           GE3/0/0                    0x00000007
 TI-LFA:        
 Interface  : GE2/0/0                                                               
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003   ProtectType: L
 Backup Label Stack (Top -> Bottom): 48142

 IPV4 Dest  : 10.5.1.0/24        Int. Cost : 10            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : D/-/L/-
 Priority   : -                  Age       : 04:09:37
 NextHop    :                    Interface :               ExitIndex :
    Direct                             GE3/0/0                    0x00000000

 IPV4 Dest  : 10.6.1.0/24        Int. Cost : 20            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : A/-/-/-
 Priority   : Low                Age       : 04:09:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           GE3/0/0                    0x00000007
 TI-LFA:        
 Interface  : GE2/0/0                                                               
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003   ProtectType: L
 Backup Label Stack (Top -> Bottom): 48142
     Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, 
            U-Up/Down Bit Set, LP-Local Prefix-Sid
     Protect Type: L-Link Protect, N-Node Protect

6. 检查配置结果

# 在DeviceA设备上执行Tracert命令,检测到DeviceF的SR-MPLS BE隧道的连通性。例如:

[~DeviceA] tracert lsp segment-routing ip 6.6.6.9 32 version draft2
  LSP Trace Route FEC: SEGMENT ROUTING IPV4 PREFIX 6.6.6.9/32 , press CTRL_C to break.
  TTL    Replier            Time    Type      Downstream
  0                                 Ingress   10.1.1.2/[16060 ]
  1      10.1.1.2           291 ms  Transit   10.5.1.2/[16060 ]
  2      10.5.1.2           10 ms   Transit   10.6.1.2/[3 ]
  3      6.6.6.9            11 ms   Egress

# 在DeviceB的GE3/0/0接口上执行shutdown命令,模拟DeviceB->DeviceE之间链路故障。

[~DeviceB] interface gigabitethernet3/0/0
[~DeviceB-GigabitEthernet3/0/0] shutdown
[*DeviceB-GigabitEthernet3/0/0] quit
[*DeviceB] commit

# 立即在DeviceA上使用Tracert命令,检测SR-MPLS BE隧道的连通性,例如:

[~DeviceA] tracert lsp segment-routing ip 6.6.6.9 32 version draft2
  LSP Trace Route FEC: SEGMENT ROUTING IPV4 PREFIX 6.6.6.9/32 , press CTRL_C to break.
  TTL    Replier            Time    Type      Downstream
  0                                 Ingress   10.1.1.2/[16060 ]
  1      10.1.1.2           3 ms    Transit   10.2.1.2/[16060 ]
  2      10.2.1.2           46 ms   Transit   10.3.1.2/[16060 ]
  3      10.3.1.2           33 ms   Transit   10.4.1.2/[16060 ]
  4      10.4.1.2           48 ms   Transit   10.6.1.2/[3 ]
  5      6.6.6.9            4 ms    Egress

从以上显示信息可以看出,SR-MPLS BE隧道已经切换到TI-LFA FRR备份路径。

以上是关于华为NE40E路由器实验配置示例 | 配置SR-MPLS BE隧道的TI-LFA FRR功能的主要内容,如果未能解决你的问题,请参考以下文章

华为NE40E路由器实验配置示例 | 配置SR-MPLS BE隧道的TI-LFA FRR功能

华为NE40E路由器实验配置示例 | 配置EVdPdNd VPLS over SR-MPLS BE(BD EVdPdNd)

华为NE40E路由器实验配置示例 | 配置L3VdPdNd over OSPF SR-MPLS BE

华为NE40E路由器实验配置示例 | 配置L3VdPdNd over OSPF SR-MPLS BE

华为NE40E路由器实验配置示例 | 配置EVdPdNd L3VdPdNdv4 over SRv6 BE

华为NE40E路由器实验配置示例 | 配置EVdPdNd L3VdPdNdv6 over SRv6 BE