07-MPLS OAM配置
本章节下载: 07-MPLS OAM配置 (287.43 KB)
· 当系统工作模式为IPv4增强模式时,设备不支持MPLS OAM。关于系统工作模式的介绍请参见“基础配置指导”中的“设备管理”。
· 设备支持两种运行模式:独立运行模式和IRF模式,缺省情况为独立运行模式。有关IRF模式的介绍,请参见“IRF配置”中的“IRF”。
MPLS提供一个完全不依赖于任何三层协议或二层协议的OAM(Operation, Administration and Maintenance,操作、管理和维护)机制,在MPLS的数据平面实现以下功能:
· 确定LSP的连通性;
· 衡量网络的利用率以及度量网络的性能;
· 在链路出现缺陷或故障时迅速进行保护倒换,以便根据与客户签订的SLA(Service Level Agreement,服务等级协定)提供相应等级的服务。
利用MPLS OAM机制,可以有效地检测、确认并定位出源于MPLS层网络内部的缺陷;报告缺陷并做出相应的处理;在出现故障的时候,能够提供保护倒换的触发机制。
· 目前的实现中,设备只支持对MPLS TE的LSP检测,即包括RSVP-TE和静态CR-LSP。下文中如果未特殊说明,LSP指以上两种。
· MPLS OAM配置完全依赖MPLS TE配置,因此在配置MPLS OAM之前必须完成MPLS TE的配置。有关MPLS TE的详细介绍请参见“MPLS配置指导”中的“MPLS TE”。
· 保护倒换的详细介绍,请参见“MPLS配置指导”中的“MPLS TE”。
MPLS OAM的报文类型包括CV(Connectivity Verification,连通性检测)、FFD(Fast Failure Detection,快速缺陷检测)和BDI(Backward Defect Indication,反向缺陷通告)3种。
报文的功能及格式如下:
MPLS OAM CV报文由入节点发送,通过被检测的LSP到达出节点,以此进行LSP的连通性检测。其格式如图1-1。
图1-1 MPLS OAM CV报文格式
表1-1 MPLS OAM CV报文字段含义
字段 |
描述 |
Function type |
报文类型,0x01代表CV报文 |
Reserved |
保留字段,取值为全0 |
LSP trail termination source identifier |
TTSI,源宿连接标识,网络中一条LSP唯一的标识。由16字节的Ingress LSR ID与4字节的LSP ID组成。对于IPv4,Ingress LSR ID的前10字节填充为0x00,接着的2字节填充为0xFF,最后4字节为IPv4地址 |
Padding |
填充字段,取值为全0 |
BIP16 |
报文校验和 |
MPLS OAM FFD报文同CV报文一样,也是由入节点发送,通过被检测的LSP到达出节点,以此进行LSP的连通性检测。其格式如图1-2。
同CV报文相比,FFD报文中多了一个字节的频率信息。CV报文采用固定1s的发送周期,而FFD报文可支持10ms、20ms、50ms、100ms、200ms和500ms多种发送频率。
表1-2 MPLS OAM FFD报文字段含义
字段 |
描述 |
Function type |
报文类型,0x07代表FFD报文 |
Reserved |
保留字段,取值为全0 |
LSP trail termination source identifier |
TTSI,请参见表1-1 |
Frequency |
FFD报文发送频率 |
Padding |
填充字段,取值为全0 |
BIP16 |
报文校验和 |
MPLS OAM BDI报文用于LSP的出节点在发现LSP缺陷后,将缺陷信息通过反向通道告知LSP的入节点,其格式如图1-3。
表1-3 MPLS OAM BDI报文字段含义
字段 |
描述 |
Function type |
报文类型,0x03代表BDI报文 |
Reserved |
保留字段,取值为全0 |
Defect type |
LSP缺陷类型,目前仅支持如下几种缺陷: · dLocv:连通性丢失缺陷 · dExcess:接收超额报文缺陷 · dUnknown:未知缺陷 其中,dLocv的优先级最高,dUnknown优先级最低 |
TTSI |
LSP标识,请参见表1-1;如果不使用TTSI,该字段各字节填充为0x00 |
Defect location |
缺陷定位信息 |
Padding |
填充字段,取值为全0 |
BIP16 |
报文校验和 |
图1-4 MPLS OAM连通性检测示意图
MPLS OAM基本检测功能主要用来检测连通性,工作过程如图1-4所示:
(1) 入节点发送CV/FFD报文,报文通过被检测的LSP到达出节点;
(2) 出节点把接收到的报文类型、频率、TTSI等信息字段与本地记录的对应值相比较来判断报文的正误,并统计检测周期内收到的正确报文与错误报文的数量,从而对LSP的连通性随时进行监控;
(3) 当出节点检测到LSP缺陷后,分析出缺陷类型,通过反向通道将携带缺陷信息的BDI报文发送给入节点,从而使入节点及时获知缺陷状态。如果正确配置了保护组,则还会触发相应的保护倒换。
在配置MPLS OAM基本检测功能时,需要为被检测LSP绑定一个反向通道。反向通道是与被检测LSP具有相反的入节点和出节点的LSP。承载BDI报文的反向通道,有以下两种类型:
· 独占反向LSP。每条前向LSP都有自己的反向LSP,这种方法相对稳定,但可能造成资源浪费。
· 共享反向LSP。多条前向LSP共用一条反向LSP,所有LSP返回BDI报文均通过这一条反向LSP,这种方法可以减少资源浪费,但当多条前向LSP同时出现缺陷时,这条反向LSP上可能会出现拥堵。
当LSP入节点晚于出节点开启MPLS OAM功能,或出节点开启而入节点不开启MPLS OAM功能时,会造成出节点的LOCV(Loss of Connectivity Verification defect,连通性检测缺陷)告警。可以通过首包触发功能解决这个问题。
所谓首包触发功能,是指出节点在超时等待时间(OverTime)内接收到第一个CV/FFD报文,以此时作为连通性检测的起点;如果出节点在配置MPLS OAM功能的OverTime时间后,没有接收到CV/FFD报文,则产生BDI报文。
只有在出节点才能配置首包触发功能。
如果要更详细了解MPLS OAM的原理,请参考以下文档:
· ITU-T Recommendation Y.1710:Requirements for Operation & Maintenance functionality for MPLS networks
· ITU-T Recommendation Y.1711:Operation & Maintenance mechanism for MPLS networks
表1-4 MPLS OAM配置任务简介
配置任务 |
说明 |
详细配置 |
|
使能MPLS OAM功能 |
必选 |
||
配置MPLS OAM基本检测功能 |
配置入节点MPLS OAM功能 |
必选 |
|
配置出节点MPLS OAM功能 |
必选 |
MPLS OAM基本检测功能用于随时监控MPLS网络连通状况,有效地检测、确认并定位出源于MPLS层网络内部的缺陷。若需要为MPLS提供网络连通性检测时,可以为LSP配置MPLS OAM功能。
在配置MPLS OAM的基本功能之前,需完成以下配置
· 配置MPLS基本功能,请参见“MPLS配置指导”中的“MPLS基础”
· 使能MPLS TE和创建MPLS TE隧道,请参见“MPLS配置指导”中的“MPLS TE”
表1-5 使能MPLS OAM功能
命令 |
说明 |
|
进入系统视图 |
system-view |
- |
进入MPLS视图 |
mpls |
- |
全局使能MPLS OAM |
mpls oam |
必选 缺省情况下,全局MPLS OAM功能处于禁止状态 |
在配置入节点的MPLS OAM的基本功能之前,需完成以下任务:
· 使能入节点MPLS OAM功能
在配置入节点的MPLS OAM的基本功能之前,需准备以下数据:
· 被检测Tunnel的名称
· 反向通道的保护方式
· 反向通道LSP的入节点LSR ID和Tunnel ID
如果采用共享反向通道,则不配置反向通道的相关参数。
表1-6 配置入节点MPLS OAM功能
操作 |
命令 |
说明 |
进入系统视图 |
system-view |
- |
配置入节点的MPLS OAM参数 |
mpls oam ingress tunnel-name [ type { cv | ffd frequency ffd-fre } ] [ packet-priority priority ] |
必选 缺省情况下,没有配置入节点的MPLS OAM参数 |
启动入节点MPLS OAM功能 |
mpls oam ingress enable { tunnel-name | all } |
必选 |
在配置出节点的MPLS OAM的基本功能之前,需完成以下任务:
· 使能出节点MPLS OAM功能
在配置出节点的MPLS OAM的基本功能之前,需准备以下数据:
· 被检测LSP的入节点LSR ID和Tunnel ID
· 反向通道的Tunnel名称和保护方式
表1-7 配置出节点MPLS OAM功能
操作 |
命令 |
说明 |
进入系统视图 |
system-view |
- |
配置出节点的MPLS OAM参数 |
mpls oam egress lsr-id ingress-lsr-id tunnel-id tunnel-id type { cv | ffd frequency ffd-fre } [ auto-trigger [ overtime over-time ] ] [ backward-lsp tunnel-name [ private | share ] ] |
必选 缺省情况下,没有配置出节点的MPLS OAM参数 |
启动出节点MPLS OAM功能 |
mpls oam egress enable { all | lsr-id ingress-lsr-id tunnel-id tunnel-id } |
必选 |
· MPLS OAM参数配置完毕后并不生效,需要使能后才能启动。启动顺序最好是入节点先启动,避免出节点在非自动协议情况下会产生log告警信息,并发送BDI报文。
· 入节点和出节点上配置的MPLS OAM检测报文类型需要相同。采用FFD报文检测时,入节点和出节点上配置的FFD报文发送频率需要相同。
在完成上述配置后,在任意视图下执行display命令可以显示配置后MPLS OAM的运行情况,通过查看显示信息验证配置的效果。
在用户视图下执行reset命令可以清除MPLS OAM统计信息。
表1-8 MPLS OAM显示和维护
操作 |
命令 |
显示出节点上配置了MPLS OAM功能的LSP当前状态与配置信息(独立运行模式) |
display mpls oam egress { all | lsr-id ingress-lsr-id tunnel-id tunnel-id } [ slot slot-id | verbose ] [ | { begin | exclude | include } regular-expression ] |
显示出节点上配置了MPLS OAM功能的LSP当前状态与配置信息(IRF模式) |
display mpls oam egress { all | lsr-id ingress-lsr-id tunnel-id tunnel-id } [ chassis chassis-number slot slot-number | verbose ] [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM出节点接收报文的统计信息(独立运行模式) |
display mpls oam egress receive-packet { all | cv | error | ffd } slot slot-id [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM出节点接收报文的统计信息(IRF模式) |
display mpls oam egress receive-packet { all | cv | error | ffd } chassis chassis-number slot slot-number [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM出节点发送报文的统计信息(独立运行模式) |
display mpls oam egress send-packet { all | bdi | error } slot slot-id [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM出节点发送报文的统计信息(IRF模式) |
display mpls oam egress send-packet { all | bdi | error } chassis chassis-number slot slot-number [ | { begin | exclude | include } regular-expression ] |
显示入节点上配置了MPLS OAM功能的LSP当前状态与配置信息(独立运行模式) |
display mpls oam ingress { tunnel-name | all } [ slot slot-id | verbose ] [ | { begin | exclude | include } regular-expression ] |
显示入节点上配置了MPLS OAM功能的LSP当前状态与配置信息(IRF模式) |
display mpls oam ingress { tunnel-name | all } [ chassis chassis-number slot slot-number | verbose ] [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM入节点接收报文的统计信息(独立运行模式) |
display mpls oam ingress receive-packet { all | bdi | error } slot slot-id [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM入节点接收报文的统计信息(IRF模式) |
display mpls oam ingress receive-packet { all | bdi | error } chassis chassis-number slot slot-number [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM入节点发送报文的统计信息(独立运行模式) |
display mpls oam ingress send-packet { all | cv | error | ffd } slot slot-id [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM入节点发送报文的统计信息(IRF模式) |
display mpls oam ingress send-packet { all | cv | error | ffd } chassis chassis-number slot slot-number [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM入节点指定实例发送和接收报文统计信息(独立运行模式) |
display mpls oam packet-statistics ingress tunnel-name slot slot-id [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM入节点指定实例发送和接收报文统计信息(IRF模式) |
display mpls oam packet-statistics ingress tunnel-name chassis chassis-number slot slot-number [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM出节点指定实例发送和接收报文统计信息(独立运行模式) |
display mpls oam packet-statistics egress lsr-id ingress-lsr-id tunnel-id tunnel-id slot slot-id [ | { begin | exclude | include } regular-expression ] |
显示MPLS OAM出节点指定实例发送和接收报文统计信息(IRF模式) |
display mpls oam packet-statistics egress lsr-id ingress-lsr-id tunnel-id tunnel-id chassis chassis-number slot slot-number [ | { begin | exclude | include } regular-expression ] |
清除入节点的MPLS OAM报文统计信息 |
reset mpls oam packet-statistics ingress { tunnel-name | all } |
清除出节点的MPLS OAM报文统计信息 |
reset mpls oam packet-statistics egress { all | lsr-id ingress-lsr-id tunnel-id tunnel-id } |
清除MPLS OAM报文统计信息(独立运行模式) |
reset mpls oam packet-statistics slot slot-id |
清除MPLS OAM报文统计信息(IRF模式) |
reset mpls oam packet-statistics chassis chassis-number slot slot-number |
· 如图1-5所示,Router A和Router C之间存在主备两条隧道及一条专用反向通道;
· 当主隧道出现连通性缺陷时,由出节点Router C向入节点Router A通告检测结果,由Route A将数据流切换到备份隧道;
· 这里只需Router A和Router C支持MPLS OAM,Router B、Router D和Router E不要求支持MPLS OAM。
图1-5 配置MPLS OAM及保护倒换基本功能的组网图
设备 |
接口 |
IP地址 |
设备 |
接口 |
IP地址 |
Router A |
Loop1 |
1.1.1.1/32 |
Router B |
Loop1 |
2.2.2.2/32 |
|
POS5/0/1 |
10.1.1.1/24 |
|
POS5/0/1 |
10.1.2.2/24 |
|
POS5/0/2 |
10.1.2.1/24 |
|
POS5/0/2 |
10.1.3.1/24 |
|
POS5/0/3 |
10.1.5.1/24 |
Router D |
Loop1 |
4.4.4.4/32 |
Router C |
Loop1 |
3.3.3.3/32 |
|
POS5/0/1 |
10.1.1.2/24 |
|
POS5/0/1 |
10.1.3.2/24 |
|
POS5/0/2 |
10.1.4.2/24 |
|
POS5/0/2 |
10.1.4.1/24 |
Router E |
Loop1 |
5.5.5.5/32 |
|
POS5/0/3 |
10.1.6.2/24 |
|
POS5/0/1 |
10.1.5.2/24 |
|
|
|
|
POS5/0/2 |
10.1.6.1/24 |
(1) 配置各接口的IP地址
按照图1-5配置各接口的IP地址和掩码,包括各Loopback接口,具体配置过程略。
(2) 配置IGP协议
在所有路由器上配置IS-IS协议,发布各自的主机路由,具体配置过程略。
配置完成后,各LSR之间应该在网络层互通。可通过在各设备上执行display ip routing-table命令查看路由表项。
(3) 配置MPLS及MPLS TE隧道
按照图1-5在Router A上配置主备隧道Tunnel1、Tunnel3,在Router C上配置专用反向通道Tunnel2。
请参见“MPLS配置指导”中的“MPLS TE”,具体配置过程略。
(4) 配置Router A的MPLS OAM
# 全局使能MPLS OAM。
<RouterA> system-view
[RouterA] mpls
[RouterA-mpls] mpls oam
[RouterA-mpls] quit
# 配置入节点MPLS OAM参数。
[RouterA] mpls oam ingress tunnel1 type ffd frequency 100
# 配置保护组。
[RouterA] interface tunnel 1
[RouterA-Tunnel1] mpls te protection tunnel 300 holdoff 10 mode revertive wtr 20
[RouterA-Tunnel1] mpls te commit
[RouterA-Tunnel1] quit
用display mpls te protection tunnel all命令查看,可以看到如下显示信息:
[RouterA] display mpls te protection tunnel all
------------------------------------------------------------------
Work-tunnel id Protect-tunnel id Switch-Result
------------------------------------------------------------------
100 300 work-tunnel
------------------------------------------------------------------
Total PG Num: 1
# 启动入节点MPLS OAM功能。
[RouterA] mpls oam ingress enable all
(5) 配置Router C的MPLS OAM
# 全局使能MPLS OAM。
<RouterC> system-view
[RouterC] mpls
[RouterC-mpls] mpls oam
[RouterC-mpls] quit
# 配置出节点MPLS OAM参数。
[RouterC] mpls oam egress lsr-id 1.1.1.1 tunnel-id 100 type ffd frequency 100 auto-trigger backward-lsp tunnel2 private
[RouterC] mpls oam egress enable all
在本例中,因为出节点配置为首包触发,当出节点收到第一个正确的检测报文后,才启动MPLS OAM检测功能。
配置完成后,可以在入节点Router A和出节点Router C上查看到当前LSP、MPLS OAM的相关信息,以及MPLS OAM检测报文的统计信息。
下面以出节点Router C显示为例。
# 查看LSP及MPLS OAM的配置信息。
<RouterC> display mpls oam egress all verbose
Total number of OAMs : 1
Total number of OAMs started : 1
Total number of OAMs in defect : 0
OAM index : 256
LSR ID in TTSI : 1.1.1.1
Tunnel ID in TTSI : 100
Enable state : Enabled
Auto-trigger : Enabled
Auto-overtime : 300 s
Auto-trigger state: Started
Backward Tunnel : Tunnel2
Bdi-frequency : 1 s
Detect type : FFD
Detect frequency : 100 ms
Detect state : Started
Defect state : No-defect
Defect type : --
# 查看出节点接收报文统计信息。
<RouterC> display mpls oam egress receive-packet all slot 1
--------------------------------------------------------------------------
CV Packet FFD Packet Error Packet
--------------------------------------------------------------------------
0 31959 0
(6) 验证配置结果
把Router B的POS5/0/2接口shutdown,这时Router A上的隧道Tunnel1保持up状态。
在Router A用命令display mpls te protection tunnel all查看,可看到数据流已切换到备用隧道上。
[RouterA] display mpls te protection tunnel all
------------------------------------------------------------------
Work-tunnel id Protect-tunnel id Switch-Result
------------------------------------------------------------------
100 300 protect-tunnel
------------------------------------------------------------------
Total PG Num: 1
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!