配置MPLS OAM检测静态LSP连通性
应用环境
在对网络可靠性要求较高的组网方案中,可以使用VRP的MPLS OAM功能来检测TE隧道绑定的LSP的连通性,包括RSVP-TE LSP、静态CR-LSP和静态LSP。
配置思路
在配置MPLS OAM检测静态LSP连通性时,采用如下配置思路:
在入节点上建立一条使用静态LSP的TE隧道,目的地是指定的出节点。
建立一条从出节点经中间节点到达入节点的静态CR-LSP,作为反向通道,向入节点通告故障。
在入节点配置OAM参数,并启动OAM功能。
在出节点配置OAM参数,使用OAM自动协议功能。
配置注意事项
为完成此配置例,需准备如下的数据:
各路由器的接口IP地址、各隧道接口名、隧道ID。
发送的检测报文类型。
反向通道的占用方式等参数。
说明
如果反向通道是静态LSP或者静态CR-LSP,则反向通道必须采用独占方式。
如果反向LSP是动态的,且反向通道采用共享方式,则使用static-lsp egress或static-cr-lsp egress命令创建前向LSP时,必须指定参数lsrid ingress-lsr-id tunnel-id tunnel-id。
组网需求
在下图所示的MPLS网络中,RouterA——RouterB——RouterC存在一条静态LSP隧道。
要求使用MPLS OAM机制,对这条静态LSP进行连通性检测。出现连通性故障时,由出节点RouterC向入节点RouterA通告缺陷。
配置MPLS OAM基本检测功能组网图
适用产品和版本
路由器可以使用任意一款NE产品。版本为VRP5.30及后续版本。
配置步骤
步骤 1 配置各接口IP地址和路由协议
按照上图配置各接口的IP地址和掩码,包括各Loopback接口。
在所有路由器上配置OSPF协议,发布各自Loopback接口的主机路由,具体配置过程略。
配置完成后,各LSR可以互相Ping通对方的LSR-ID,在各LSR上执行display ip routing-table命令可以看到到达各LSR-ID的路由表项。
以RouterA的显示为例:
[RouterA] display ip routing-table
Routing Tables: Public
Destinations : 14 Routes : 15
Destination/Mask Proto Pre Cost NextHop Interface
1.1.1.1/32 Direct 0 0 127.0.0.1 InLoopBack0
2.2.2.2/32 OSPF 10 2 10.1.2.2 Pos2/0/0
3.3.3.3/32 OSPF 10 3 10.1.1.2 Pos1/0/0
OSPF 10 3 10.1.2.2 Pos2/0/0
4.4.4.4/32 OSPF 10 2 10.1.1.2 Pos1/0/0
10.1.1.0/24 Direct 0 0 10.1.1.1 Pos1/0/0
10.1.1.1/32 Direct 0 0 127.0.0.1 InLoopBack0
10.1.1.2/32 Direct 0 0 10.1.1.2 Pos1/0/0
10.1.2.0/24 Direct 0 0 10.1.2.1 Pos2/0/0
10.1.2.1/32 Direct 0 0 127.0.0.1 InLoopBack0
10.1.2.2/32 Direct 0 0 10.1.2.2 Pos2/0/0
10.1.3.0/24 OSPF 10 2 10.1.2.2 Pos2/0/0
10.1.4.0/24 OSPF 10 2 10.1.1.2 Pos1/0/0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoopBack0
步骤 2 建立被检测的静态LSP
# 在RouterA上配置MPLS基本能力和MPLS TE基本能力。 [RouterA] mpls lsr-id 1.1.1.1 [RouterA] mpls [RouterA-mpls] mpls te [RouterA-mpls] quit [RouterA] interface pos 1/0/0 [RouterA-Pos1/0/0] mpls [RouterA-Pos1/0/0] mpls te [RouterA-Pos1/0/0] quit [RouterA] interface pos 2/0/0 [RouterA-Pos2/0/0] mpls [RouterA-Pos2/0/0] mpls te [RouterA-Pos2/0/0] quit RouterB、RouterC和RouterD上的配置与RouterA相似,此处不再赘述。 # 在RouterA上配置去往RouterC的MPLS TE隧道,使用静态LSP。 [RouterA] interface tunnel 2/0/0 [RouterA-Tunnel2/0/0] ip address unnumbered interface loopback 1 [RouterA-Tunnel2/0/0] tunnel-protocol mpls te [RouterA-Tunnel2/0/0] destination 3.3.3.3 [RouterA-Tunnel2/0/0] mpls te tunnel-id 200 [RouterA-Tunnel2/0/0] mpls te signal-protocol static [RouterA-Tunnel2/0/0] mpls te commit [RouterA-Tunnel2/0/0] quit # 配置RouterA为静态LSP的入节点,使用TE隧道。 [RouterA] static-lsp ingress tunnel-interface tunnel 2/0/0 destination 3.3.3.3 nexthop 10.1.2.2 out-label 20 # 配置RouterB为静态LSP的中间节点。 [RouterB] static-lsp transit oamlsp incoming-interface pos 1/0/0 in-label 20 nexthop 10.1.3.2 out-label 30 # 配置RouterC为静态LSP的出节点,指定lsrid和tunnel-id。 [RouterC] static-lsp egress oamlsp incoming-interface pos 2/0/0 in-label 30 lsrid 1.1.1.1 tunnel-id 200
配置完成后,在RouterA上执行display mpls te tunnel-interface命令,可以看到TE隧道使用静态信令,运行状态为UP。
[RouterA] display mpls te tunnel-interface
Tunnel Name : Tunnel2/0/0
Tunnel Desc : HUAWEI, Quidway Series, Tunnel2/0/0 Interface
Tunnel State Desc : CR-LSP is Up
Tunnel Attributes :
LSP ID : 1.1.1.1:0
Session ID : 200
Admin State : UP Oper State : UP
Ingress LSR ID : 1.1.1.1 Egress LSR ID: 3.3.3.3
Signaling Prot : STATIC
Tunnel Group : Primary
Primary Tunnel : -
Backup Tunnel : -
IPTN InLabel : -
Group Status : Up
Oam Status : -
在RouterA上执行display mpls static-lsp命令,可以看到Tunnel2/0/0对应的静态LSP状态为Up。
[RouterA] display mpls static-lsp
Name FEC I/O Label I/O If Stat
Tunnel2/0/0 3.3.3.3/32 NULL/20 -/Pos2/0/0 Up
步骤 3 建立反向通道
# 在RouterC上配置去往RouterA的MPLS TE隧道,使用静态CR-LSP。 [RouterC] interface tunnel 1/0/0 [RouterC-Tunnel1/0/0] ip address unnumbered interface loopback 1 [RouterC-Tunnel1/0/0] tunnel-protocol mpls te [RouterC-Tunnel1/0/0] destination 1.1.1.1 [RouterC-Tunnel1/0/0] mpls te tunnel-id 100 [RouterC-Tunnel1/0/0] mpls te signal-protocol cr-static [RouterC-Tunnel1/0/0] mpls te commit [RouterC-Tunnel1/0/0] quit # 配置RouterC为静态CR-LSP的入节点。 [RouterC] static-cr-lsp ingress Tunnel1/0/0 destination 1.1.1.1 nexthop 10.1.4.1 out-label 70 # 配置RouterD为静态CR-LSP的中间节点。 [RouterD] static-cr-lsp transit tunnel1/0/0 incoming-interface pos 2/0/0 in-label 70 nexthop 10.1.1.1 out-label 80 # 配置RouterA为静态CR-LSP的出节点,指定指定lsrid和tunnel-id。 [RouterA] static-cr-lsp egress tunnel1/0/0 incoming-interface pos 1/0/0 in-label 80 lsrid 1.1.1.1 tunnel-id 100
配置完成后,在RouterC上执行display mpls te tunnel-interface命令,可以看到反向TE隧道的运行状态为UP。
[RouterC] display mpls te tunnel-interface
Tunnel Name : Tunnel1/0/0
Tunnel Desc : HUAWEI, Quidway Series, Tunnel1/0/0 Interface
Tunnel State Desc : CR-LSP is Up
Tunnel Attributes :
LSP ID : 3.3.3.3:0
Session ID : 100
Admin State : UP Oper State : UP
Ingress LSR ID : 3.3.3.3 Egress LSR ID: 1.1.1.1
Signaling Prot : STATIC-CR
Tunnel Group : Primary
Primary Tunnel : -
Backup Tunnel : -
IPTN InLabel : -
Group Status : Up
Oam Status : -
在RouterC上执行display mpls static-cr-lsp命令,可以看到建立的静态CR-LSP状态为Up。
[RouterC] display mpls static-cr-lsp
Name FEC I/O Label I/O If Stat
Tunnel1/0/0 1.1.1.1/32 NULL/70 -/Pos1/0/0 Up
步骤 4 配置MPLS OAM功能
# 在RouterA上配置入节点的MPLS OAM功能。采用缺省配置,即发送CV报文。反向通道的具体参数取决于出节点的配置。 [RouterA] mpls [RouterA-mpls] mpls oam [RouterA-mpls] quit [RouterA] mpls oam ingress tunnel 2/0/0 [RouterA] mpls oam ingress enable all # 在RouterC上配置出节点的MPLS OAM功能。 [RouterC] mpls [RouterC-mpls] mpls oam [RouterC-mpls] quit # 配置出节点使用OAM自动协议,指定对名为oamlsp的LSP进行检测,反向通道为tunnel1/0/0对应的LSP。 [RouterC] mpls oam egress lsp-name oamlsp auto-protocol backward-lsp tunnel 1/0/0 private
出节点配置自动协议后,当出节点收到第一个正确的检测报文后,自动启动OAM功能。
配置完成后,在入节点RouterA和出节点RouterC上查看LSP的MPLS OAM参数及状态信息。可以看到入节点和出节点都处于正常检测状态,没有故障。
[RouterA] display mpls oam ingress all verbose
-------------------------------------------------------------------------
Verbose information about the 1th oam at the ingress
-------------------------------------------------------------------------
lsp basic information: oam basic information:
----------------------------------- -----------------------------------
Tunnel-name : Tunnel2/0/0 Oam-Index : 256
Lsp signal status : Up Oam select board : 1
Lsp establish type : Static lsp Enable-state : Manual enable
Lsp ingress lsr-id : 1.1.1.1 Ttsi/lsr-id : 1.1.1.1
Lsp tnl-id/Lsp-id : 200/0 Ttsi/tunnel-id : 200
oam detect information: oam backward information:
----------------------------------- -----------------------------------
Type : CV Share attribute : Share
Frequency : 1 s Lsp-name : --
Detect-state : Start Lsp ingress lsr-id : --
Defect-state : Non-defect Lsp tnl-id/lsp id : --/--
Available-state : available Lsp-inLabel : --
Unavailable time (s): 0 Lsp signal status : --
-------------------------------------------------------------------------
Total Oam Num: 1
Total Start Oam Num: 1
Total Defect Oam Num: 0
Total Unavaliable Oam Num: 0
[RouterC] display mpls oam egress all verbose
-------------------------------------------------------------------------
Verbose information about the 1th oam at the egress
-------------------------------------------------------------------------
lsp basic information: oam basic information:
----------------------------------- -----------------------------------
Lsp name : oamlsp Oam-Index : 256
Lsp signal status : Up Oam select board : 1
Lsp establish type : Static lsp Enable-state : --
Lsp incoming Label : 30 Auto-protocol : Enable
Lsp ingress lsr-id : -- Auto-overtime (s) : 300
Lsp tnl-id/lsp-id : --/-- Ttsi/lsr-id : 1.1.1.1
Ttsi/tunnel-id : 200
oam detect information: oam backward information:
----------------------------------- -----------------------------------
Type : CV Tunnel name : Tunnel1/0/0
Frequency : 1 s Share attribute : Private
Detect-state : Start Lsp signal status : Up
Defect-state : Non-defect Bdi-frequency : Per-second
Available state : Available
Unavailable time (s): 0
-------------------------------------------------------------------------
Total Oam Num: 1
Total Start Oam Num: 1
Total Defect Oam Num: 0
Total Unavaliable Oam Num: 0
验证结果
# 对RouterB的POS2/0/0接口执行shutdown命令,模拟链路故障。
[RouterB] interface pos 2/0/0
[RouterB-Pos2/0/0] shutdown
在RouterC上执行display mpls oam egress all verbose命令,可以看到RouterC发现了这个故障,缺陷状态为dLocv。
[RouterC] display mpls oam egress all
-------------------------------------------------------------------------
Verbose information about the 1th oam at the egress
-------------------------------------------------------------------------
lsp basic information: oam basic information:
---------------------------------- ------------------------------------
Lsp name : oamlsp Oam-Index : 256
Lsp signal status : Up Oam select board : 1
Lsp establish type : Static lsp Enable-state : --
Lsp incoming Label : 30 Auto-protocol : Enable
Lsp ingress lsr-id : -- Auto-overtime (s) : 300
Lsp tnl-id/lsp-id : --/-- Ttsi/lsr-id : 1.1.1.1
Ttsi/tunnel-id : 200
oam detect information: oam backward information:
----------------------------------- -----------------------------------
Type : CV Tunnel name : Tunnel1/0/0
Frequency : 1 s Share attribute : Private
Detect-state : Start Lsp signal status : Up
Defect-type : dLocv Bdi-frequency : Per-second
Available state : Unavailable
Unavailable time (s): 0
-------------------------------------------------------------------------
Total Oam Num: 1
Total Start Oam Num: 1
Total Defect Oam Num: 1
Total Unavaliable Oam Num: 1





