玩转华为ENSP模拟器系列 | 配置SR-MPLS BE隧道的TI-LFA FRR功能示例

素材来源:华为路由器配置指南

一边学习一边整理试验笔记,并与大家分享,侵权即删,谢谢支持!

附上汇总贴:玩转华为ENSP模拟器系列 | 合集_COCOgsta的博客-CSDN博客_华为模拟器实验


目标

配置TI-LFA FRR保护,增强Segment Routing网络可靠性。

组网需求

如图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。

配置思路

  • 整网配置IS-IS实现设备之间的互通。
  • 整网使能MPLS,配置Segment Routing,建立SR-MPLS BE隧道。
  • DeviceB上使能TI-LFA FRR保护功能,并且同时使能防微环功能。

操作步骤

  1. 配置接口的IP地址

配置DeviceA。

DeviceA:
interface LoopBack1
 ip address 1.1.1.9 255.255.255.255
interface Ethernet1/0/0
 ip address 10.1.1.1 255.255.255.0

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

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

配置DeviceA。

DeviceA:
isis 1
 is-level level-1
 cost-style wide
 network-entity 10.0000.0000.0001.00
interface LoopBack1
 isis enable 1
interface Ethernet1/0/0
 isis enable 1

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

  1. 在骨干网上配置MPLS基本能力

配置DeviceA。

DeviceA:
mpls lsr-id 1.1.1.9
mpls

配置DeviceB。

DeviceB:
mpls lsr-id 2.2.2.9
mpls

配置DeviceC。

DeviceC:
mpls lsr-id 3.3.3.9
mpls

配置DeviceD。

DeviceD:
mpls lsr-id 4.4.4.9
mpls

配置DeviceE。

DeviceE:
mpls lsr-id 5.5.5.9
mpls

配置DeviceF。

DeviceF:
mpls lsr-id 6.6.6.9
mpls
  1. 在骨干网上配置Segment Routing,建立SR-MPLS BE隧道。

配置DeviceA。

DeviceA:
segment-routing
isis 1
 segment-routing mpls
 segment-routing global-block 16000 23999
interface LoopBack1
 isis prefix-sid index 10

配置DeviceB。

DeviceB:
segment-routing
isis 1
 segment-routing mpls
 segment-routing global-block 16000 23999
interface LoopBack1
 isis prefix-sid index 20

配置DeviceC。

DeviceC:
segment-routing
isis 1
 segment-routing mpls
 segment-routing global-block 16000 23999
interface LoopBack1
 isis prefix-sid index 30

配置DeviceD。

DeviceD:
segment-routing
isis 1
 segment-routing mpls
 segment-routing global-block 16000 23999
interface LoopBack1
 isis prefix-sid index 40

配置DeviceE。

DeviceE:
segment-routing
isis 1
 segment-routing mpls
 segment-routing global-block 16000 23999
interface LoopBack1
 isis prefix-sid index 50

配置DeviceF。

DeviceF:
segment-routing
isis 1
 segment-routing mpls
 segment-routing global-block 16000 23999
interface LoopBack1
 isis prefix-sid index 60

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

[~DeviceA-LoopBack1]dis segment-routing prefix mpls forward
ing 
                   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          Eth1/0/0          10.1.1.2         I&T 
  ---       1500    Active          
3.3.3.9/32         16030      16030      Eth1/0/0          10.1.1.2         I&T 
  ---       1500    Active          
4.4.4.9/32         16040      16040      Eth1/0/0          10.1.1.2         I&T 
  ---       1500    Active          
5.5.5.9/32         16050      16050      Eth1/0/0          10.1.1.2         I&T 
  ---       1500    Active          
6.6.6.9/32         16060      16060      Eth1/0/0          10.1.1.2         I&T 
  ---       1500    Active          
Total information(s): 6
[~DeviceA-LoopBack1]
  1. 配置TI-LFA FRR功能

配置DeviceB。

Device:
isis 1
 avoid-microloop frr-protected
 avoid-microloop frr-protected rib-update-delay 5000
 avoid-microloop segment-routing
 frr
  loop-free-alternate level-1
  ti-lfa level-1

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

[~DeviceB-Ethernet1/0/2]dis 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       : 00:11:40
 NextHop    :                    Interface :               ExitIndex :
    10.1.1.1                           Eth1/0/0                   0x00000006
 Prefix-sid : 16010              Weight    : 0             Flags     : -/N/-/-/-
/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.1.1.1                           Eth1/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       : 00:11:40
 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       : 00:00:15
 NextHop    :                    Interface :               ExitIndex :
    10.2.1.2                           Eth1/0/1                   0x00000008
 TI-LFA:
 Interface  : Eth1/0/2                                                          
 NextHop    : 10.5.1.2           LsIndex    : 0x00000004
 Backup Label Stack (Top -> Bottom): {16040, 48120}
 Prefix-sid : 16030              Weight    : 0             Flags     : -/N/-/-/-
/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.2.1.2                           Eth1/0/1                   3
 TI-LFA:
 Interface  : Eth1/0/2                                                          
 NextHop    : 10.5.1.2           LsIndex    : 0x00000004
 Backup Label Stack (Top -> Bottom): {16040, 48120}
 IPV4 Dest  : 4.4.4.9/32         Int. Cost : 20            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 1             Flags     : A/-/-/-
 Priority   : Medium             Age       : 00:00:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           Eth1/0/2                   0x0000000a
 TI-LFA:
 Interface  : Eth1/0/1                                                          
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003
 Backup Label Stack (Top -> Bottom): {48121}
 Prefix-sid : 16040              Weight    : 0             Flags     : -/N/-/-/-
/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.5.1.2                           Eth1/0/2                   16040
 TI-LFA:
 Interface  : Eth1/0/1                                                          
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003
 Backup Label Stack (Top -> Bottom): {48121}
 IPV4 Dest  : 5.5.5.9/32         Int. Cost : 10            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 1             Flags     : A/-/-/-
 Priority   : Medium             Age       : 00:00:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           Eth1/0/2                   0x0000000a
 TI-LFA:
 Interface  : Eth1/0/1                                                          
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003
 Backup Label Stack (Top -> Bottom): {48121}
 Prefix-sid : 16050              Weight    : 0             Flags     : -/N/-/-/-
/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.5.1.2                           Eth1/0/2                   3
 TI-LFA:
 Interface  : Eth1/0/1                                                          
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003
 Backup Label Stack (Top -> Bottom): {48121}
 IPV4 Dest  : 6.6.6.9/32         Int. Cost : 20            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 1             Flags     : A/-/-/-
 Priority   : Medium             Age       : 00:00:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           Eth1/0/2                   0x0000000a
 TI-LFA:
 Interface  : Eth1/0/1                                                          
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003
 Backup Label Stack (Top -> Bottom): {48121}
 Prefix-sid : 16060              Weight    : 0             Flags     : -/N/-/-/-
/-/A/-
 SR NextHop :                    Interface :               OutLabel  :
    10.5.1.2                           Eth1/0/2                   16060
 TI-LFA:
 Interface  : Eth1/0/1                                                          
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003
 Backup Label Stack (Top -> Bottom): {48121}
 IPV4 Dest  : 10.1.1.0/24        Int. Cost : 10            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : D/-/L/-
 Priority   : -                  Age       : 00:11:40
 NextHop    :                    Interface :               ExitIndex :
    Direct                             Eth1/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       : 00:11:40
 NextHop    :                    Interface :               ExitIndex :
    Direct                             Eth1/0/1                   0x00000000
 IPV4 Dest  : 10.3.1.0/24        Int. Cost : 110           Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : A/-/-/-
 Priority   : Low                Age       : 00:00:15
 NextHop    :                    Interface :               ExitIndex :
    10.2.1.2                           Eth1/0/1                   0x00000008
 TI-LFA:
 Interface  : Eth1/0/2                                                          
 NextHop    : 10.5.1.2           LsIndex    : --
 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       : 00:00:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           Eth1/0/2                   0x0000000a
 TI-LFA:
 Interface  : Eth1/0/1                                                          
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003
 Backup Label Stack (Top -> Bottom): {48121}
 IPV4 Dest  : 10.5.1.0/24        Int. Cost : 10            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : D/-/L/-
 Priority   : -                  Age       : 00:11:40
 NextHop    :                    Interface :               ExitIndex :
    Direct                             Eth1/0/2                   0x00000000
 IPV4 Dest  : 10.6.1.0/24        Int. Cost : 20            Ext. Cost : NULL
 Admin Tag  : -                  Src Count : 2             Flags     : A/-/-/-
 Priority   : Low                Age       : 00:00:15
 NextHop    :                    Interface :               ExitIndex :
    10.5.1.2                           Eth1/0/2                   0x0000000a
 TI-LFA:
 Interface  : Eth1/0/1                                                          
 NextHop    : 10.2.1.2           LsIndex    : 0x00000003
 Backup Label Stack (Top -> Bottom): {48121}
     Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut, 
            U-Up/Down Bit Set, LP-Local Prefix-Sid
[~DeviceB-Ethernet1/0/2]  
[~DeviceB-Ethernet1/0/2]
  1. 检查配置结果

在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           7 ms    Transit   10.5.1.2/[16060 ]
  2      10.5.1.2           9 ms    Transit   10.6.1.2/[3 ]
  3      6.6.6.9            10 ms   Egress    
[~DeviceA]

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

DeviceB:
interface Ethernet1/0/2
 shutdown

立即在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           12 ms   Transit   10.3.1.2/[16060 ]
  3      10.3.1.2           11 ms   Transit   10.4.1.2/[16060 ]
  4      10.4.1.2           8 ms    Transit   10.6.1.2/[3 ]
  5      6.6.6.9            11 ms   Egress    
[~DeviceA]

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

 

  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值