一种检测标签交换路径连通性的方法及装置Method and device for detecting connectivity of label switching path
技术领域Technical field
本文涉及多协议标签交换(MPLS,multi-protocol label switching)领域中的操作、管理和维护(OAM,Operation Administration and Maintenance)技术,尤其涉及一种检测标签交换路径连通性的方法及装置。This document relates to OAM (Operation Administration and Maintenance) technology in the field of multi-protocol label switching (MPLS), and more particularly to a method and apparatus for detecting connectivity of a label switching path.
背景技术Background technique
目前,标签交换路径的故障主要通过OAM机制进行检测,OAM机制需要在链路上通过发送OAM检测报文来检测链路的故障,包括:在源端按照一定的周期发送OAM检测报文,并在宿端进行监测,如果在一定的周期内没有收到OAM检测报文,则认为链路出现故障。发送OAM检测报文时需要消耗一定的带宽资源,尤其在链路上如果传送的是快速OAM检测报文,则消耗的带宽资源更多,这在一定程度上降低了用户的有效带宽。Currently, the fault of the label switching path is mainly detected by the OAM mechanism. The OAM mechanism needs to send an OAM detection packet on the link to detect the fault of the link, including: sending the OAM detection packet at a source according to a certain period. The monitoring is performed on the sink. If the OAM detection packet is not received within a certain period, the link is considered to be faulty. When the OAM detection packet is sent, a certain bandwidth resource is consumed. In particular, if a fast OAM detection packet is transmitted on the link, the bandwidth resource is consumed, which reduces the effective bandwidth of the user to a certain extent.
相关技术中提供了一种标签交换路径连通性的检测方法,在建立标签交换路径时,宿端标签交换路由器将源端标签交换路由器的ID与标签交换路径绑定并保存;然后按预定的周期形成连通性检测标签并压入用户数据报文的多协议标签交换标签栈,如果在3倍于上述周期的时间内,没有检测到相关报文,则判断标签交换路径出现问题。该方法虽然在没有OAM检测报文的情况下能够检测标签交换路径的问题,但需要在宿端维护源端标签交换路由器的ID与标签交换路径的绑定关系,并且要按照预定的周期形成连通性检测标签并压入用户数据报文的多协议标签交换标签栈,在一定程度上增加了处理的复杂性并且对带宽有一定的损耗;而且该方法没有明确在没有用户报文的情况下怎么检测标签交换路径问题。The related art provides a method for detecting label switching path connectivity. When establishing a label switching path, the sink label switching router binds and saves the ID of the source label switching router to the label switching path; and then according to a predetermined period. A multi-protocol label switching label stack is formed by forming a connectivity detection label and pushing the user data packet. If the relevant packet is not detected within 3 times of the period, it is determined that the label switching path has a problem. Although the method can detect the label switching path without the OAM detection packet, the binding relationship between the ID of the source label switching router and the label switching path needs to be maintained at the sink end, and the connection is formed according to a predetermined period. Sexually detecting tags and pushing the multi-protocol label switching label stack of user data packets increases the complexity of processing and the bandwidth loss to some extent; and the method does not explicitly describe how to eliminate user packets. Detect label switching path problems.
发明内容Summary of the invention
本发明实施例的目的在于提供一种检测标签交换路径连通性的方法及
装置,以解决如何减少由于插入OAM检测报文造成的对业务有效带宽的损耗,从而使得有效带宽能够达到最大的利用的技术问题。An object of the embodiments of the present invention is to provide a method for detecting connectivity of a label switching path and
The device solves the technical problem of how to reduce the loss of the effective bandwidth of the service caused by the insertion of the OAM detection message, so that the effective bandwidth can be maximized.
为了达到上述目的,本发明实施例提供了一种检测标签交换路径连通性的方法,应用于源端,包括:In order to achieve the above object, an embodiment of the present invention provides a method for detecting connectivity of a label switching path, which is applied to a source end, and includes:
对源端存在业务报文的情况进行检测,当源端不存在业务报文时,构造第一虚拟业务报文进行发送,当源端存在业务报文时,将业务报文进行发送;When the source device does not have a service packet, the first virtual service packet is configured to be sent. When the source device has a service packet, the service packet is sent.
对源端发送的业务报文或第一虚拟业务报文的频率进行检测,得到检测结果,并将检测结果与OAM检测频率进行比对,得到比对结果;Detecting the frequency of the service packet or the first virtual service packet sent by the source end, obtaining the detection result, and comparing the detection result with the OAM detection frequency to obtain a comparison result;
当比对结果为业务报文或第一虚拟业务报文的频率小于OAM检测频率时构造第二虚拟业务报文;Constructing a second virtual service packet when the frequency of the comparison is that the frequency of the service packet or the first virtual service packet is less than the OAM detection frequency;
向宿端发送业务报文、第一虚拟业务报文或第二虚拟业务报文。Send a service packet, a first virtual service packet, or a second virtual service packet to the sink.
其中,对源端发送的业务报文或第一虚拟业务报文的频率进行检测,得到检测结果,并将检测结果与OAM检测频率进行比对,得到比对结果,包括:The frequency of the service packet or the first virtual service packet sent by the source end is detected, and the detection result is obtained, and the detection result is compared with the OAM detection frequency to obtain a comparison result, including:
源端通过OAM与标签交换路径预设的绑定关系向标签交换路径发送业务报文或第一虚拟业务报文,并对业务报文或第一虚拟业务报文的频率进行检测,得到检测结果;The source sends the service packet or the first virtual service packet to the label switching path through the binding relationship between the OAM and the label switching path, and detects the frequency of the service packet or the first virtual service packet, and obtains the detection result. ;
将检测后的业务报文或第一虚拟业务报文的频率与OAM检测频率进行比对,得到比对结果。The frequency of the detected service packet or the first virtual service packet is compared with the frequency of the OAM detection, and the comparison result is obtained.
其中,当比对结果为业务报文或第一虚拟业务报文的频率小于OAM检测频率时构造第二虚拟业务报文,包括:The second virtual service packet is configured when the comparison result is that the frequency of the service packet or the first virtual service packet is less than the OAM detection frequency, including:
当业务报文或第一虚拟业务报文的频率小于OAM检测频率时,计算出补偿频率,根据补偿频率构造第二虚拟业务报文。When the frequency of the service packet or the first virtual service packet is less than the OAM detection frequency, the compensation frequency is calculated, and the second virtual service packet is constructed according to the compensation frequency.
本发明实施例还提供了一种检测标签交换路径连通性的方法,应用于宿端,包括:The embodiment of the present invention further provides a method for detecting connectivity of a label switching path, which is applied to a sink, and includes:
宿端接收源端发送的业务报文、当业务报文不存在时构造的第一虚拟业务报文或当业务报文、第一虚拟业务报文的频率小于OAM检测频率时构造的第二虚拟业务报文;The sink receives the service packet sent by the source, the first virtual service packet that is configured when the service packet does not exist, or the second virtual structure that is configured when the frequency of the service packet and the first virtual service packet is less than the OAM detection frequency. Business message
宿端对接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频
率进行检测,得到检测结果;The frequency of the received service packet, the first virtual service packet, or the second virtual service packet
The rate is tested and the test result is obtained;
宿端根据检测结果来确定路径的连通性并对业务报文、第一虚拟业务报文或第二虚拟业务报文进行处理。The sink determines the connectivity of the path according to the detection result, and processes the service packet, the first virtual service packet, or the second virtual service packet.
其中,宿端根据检测结果来确定路径的连通性并对业务报文、第一虚拟业务报文或第二虚拟业务报文进行处理,包括:The sink end determines the connectivity of the path according to the detection result, and processes the service packet, the first virtual service packet, or the second virtual service packet, including:
当宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率小于OAM检测频率时,输出告警产生指示;When the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is less than the OAM detection frequency, the alarm generation indication is output;
当宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率大于或等于OAM检测频率时,识别出第一虚拟业务报文或第二虚拟业务报文,将业务报文投递到后续的业务转发处理流程,如果存在告警,输出告警消失指示。When the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is greater than or equal to the OAM detection frequency, the first virtual service packet or the second virtual service packet is identified. The service packet is delivered to the subsequent service forwarding process. If an alarm is generated, the alarm disappears.
本发明实施例还提供一种检测标签交换路径连通性的装置,应用于源端,包括:The embodiment of the present invention further provides an apparatus for detecting connectivity of a label switching path, which is applied to a source end, and includes:
报文检测模块,设置为对源端存在业务报文的情况进行检测,当源端不存在业务报文时,构造第一虚拟业务报文进行发送,当源端存在业务报文时,将业务报文进行发送;The packet detection module is configured to detect that a service packet exists at the source end. When the source end does not have a service packet, the first virtual service packet is configured to be sent. When the source end has a service packet, the service is performed. The message is sent;
第一处理模块,设置为对源端发送的业务报文或第一虚拟业务报文的频率进行检测,得到检测结果,并将检测结果与OAM检测频率进行比对,得到比对结果;The first processing module is configured to detect the frequency of the service packet or the first virtual service packet sent by the source end, obtain a detection result, and compare the detection result with the OAM detection frequency to obtain a comparison result;
构造模块,设置为当比对结果为业务报文或第一虚拟业务报文的频率小于OAM检测频率时构造第二虚拟业务报文;Constructing a module, configured to construct a second virtual service message when the comparison result is that the frequency of the service packet or the first virtual service packet is less than the OAM detection frequency;
频率检测模块,设置为向宿端发送业务报文、第一虚拟业务报文或第二虚拟业务报文。The frequency detection module is configured to send a service packet, a first virtual service packet, or a second virtual service packet to the sink end.
其中,第一处理模块包括:The first processing module includes:
检测单元,设置为通过OAM与标签交换路径预设的绑定关系向标签交换路径发送业务报文或第一虚拟业务报文,并对业务报文或第一虚拟业务报文的频率进行检测,得到检测结果;The detecting unit is configured to send the service packet or the first virtual service packet to the label switching path through the binding relationship preset by the OAM and the label switching path, and detect the frequency of the service packet or the first virtual service packet. Obtaining test results;
比对单元,设置为将检测后的业务报文或第一虚拟业务报文的频率与OAM检测频率进行比对,得到比对结果。
The comparison unit is configured to compare the frequency of the detected service message or the first virtual service message with the OAM detection frequency to obtain a comparison result.
其中,构造模块是设置为:Among them, the construction module is set to:
当业务报文或第一虚拟业务报文的频率小于OAM检测频率时,计算出补偿频率,根据补偿频率构造第二虚拟业务报文。When the frequency of the service packet or the first virtual service packet is less than the OAM detection frequency, the compensation frequency is calculated, and the second virtual service packet is constructed according to the compensation frequency.
本发明实施例还提供了一种检测标签交换路径连通性的装置,应用于宿端,包括:The embodiment of the present invention further provides an apparatus for detecting connectivity of a label switching path, which is applied to a sink end, and includes:
接收模块,设置为接收源端发送的业务报文、当业务报文不存在时构造的第一虚拟业务报文或当业务报文、第一虚拟业务报文的频率小于OAM检测频率时构造的第二虚拟业务报文;The receiving module is configured to receive the service packet sent by the source, the first virtual service packet configured when the service packet does not exist, or the service packet and the frequency of the first virtual service packet are smaller than the OAM detection frequency. Second virtual service message;
检测模块,设置为对接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率进行检测,得到检测结果;The detecting module is configured to detect the frequency of the received service packet, the first virtual service packet, or the second virtual service packet, and obtain a detection result;
第二处理模块,设置为根据检测结果来确定路径的连通性并对业务报文、第一虚拟业务报文或第二虚拟业务报文进行处理。The second processing module is configured to determine the connectivity of the path according to the detection result, and process the service packet, the first virtual service packet, or the second virtual service packet.
其中,第二处理模块包括:The second processing module includes:
第一处理单元,设置为当宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率小于OAM检测频率时,输出告警产生指示;The first processing unit is configured to output an alarm generation indication when the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is less than the OAM detection frequency;
第二处理单元,设置为当宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率大于或等于OAM检测频率时,识别出第一虚拟业务报文或第二虚拟业务报文,将业务报文投递到后续的业务转发处理流程,如果存在告警,输出告警消失指示。The second processing unit is configured to: when the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is greater than or equal to the OAM detection frequency, identify the first virtual service packet or the first The second virtual service packet delivers the service packet to the subsequent service forwarding process. If an alarm is generated, the alarm disappears.
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述的方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the above method.
本发明实施例的有益效果是:通过在源端按照用户配置的OAM检测频率监测业务报文或第一虚拟业务报文的发送情况,及时计算补偿频率按照补偿频率构造第二虚拟业务报文以满足OAM检测频率要求,在宿端按照用户配置的OAM检测频率监测业务报文、第一虚拟业务报文或第二虚拟业务报文的接收情况,来确定链路的连通性,不需要发送OAM检测报文,有效地解决了由于插入OAM检测报文对业务有效带宽造成的损耗,并且,该方法检测的标准由用户进行配置,不依赖于业务流量,具有较大的灵活性。此外,
The beneficial effects of the embodiment of the present invention are: monitoring the transmission status of the service packet or the first virtual service packet according to the OAM detection frequency configured by the user at the source end, and calculating the compensation frequency in time to construct the second virtual service packet according to the compensation frequency. The OAM detection frequency requirement is met, and the connectivity of the service packet, the first virtual service packet, or the second virtual service packet is monitored at the sink according to the OAM detection frequency configured by the user to determine the connectivity of the link. The detection packet effectively solves the loss caused by the insertion of the OAM detection packet to the effective bandwidth of the service, and the standard detected by the method is configured by the user, and does not depend on the service traffic, and has greater flexibility. In addition,
本发明实施例通过构造第一虚拟业务报文在源端无业务报文的情况下发送,实现了在源端无业务报文的情况下正常检测路径连通性的目的。In the embodiment of the present invention, the first virtual service packet is configured to be sent without the service packet at the source end, so that the purpose of detecting the connectivity of the path is normal when the source end has no service packet.
附图概述BRIEF abstract
图1表示本发明实施例应用于源端的检测标签交换路径连通性的方法步骤流程图;1 is a flow chart showing the steps of a method for detecting connectivity of a label switched path applied to a source end according to an embodiment of the present invention;
图2表示本发明实施例应用于源端的检测标签交换路径连通性的方法中检测报文频率并与OAM检测频率进行比对的步骤流程图;2 is a flow chart showing the steps of detecting a message frequency and comparing it with an OAM detection frequency in a method for detecting connectivity of a label switching path applied to a source end according to an embodiment of the present invention;
图3表示本发明实施例应用于宿端的检测标签交换路径连通性的方法步骤流程图;3 is a flow chart showing the steps of a method for detecting connectivity of a label switched path applied to a sink by an embodiment of the present invention;
图4表示本发明实施例应用于宿端的检测标签交换路径连通性的方法中根据报文频率确定路径的连通性并对报文进行处理的步骤流程图;4 is a flow chart showing the steps of determining the connectivity of a path according to the message frequency and processing the message in the method for detecting the connectivity of the label switched path applied to the sink by the embodiment of the present invention;
图5表示本发明实施例检测标签交换路径连通性的方法流程图;FIG. 5 is a flowchart of a method for detecting connectivity of a label switching path according to an embodiment of the present invention; FIG.
图6表示本发明实施例检测标签交换路径连通性的方法网络构架示意图;6 is a schematic diagram of a network architecture of a method for detecting connectivity of a label switching path according to an embodiment of the present invention;
图7表示本发明实施例应用于源端的检测标签交换路径连通性的装置框图;7 is a block diagram showing an apparatus for detecting connectivity of a label switching path applied to a source end according to an embodiment of the present invention;
图8表示本发明实施例应用于源端的检测标签交换路径连通性的装置中第一处理模块框图;8 is a block diagram showing a first processing module in an apparatus for detecting connectivity of a label switching path applied to a source end according to an embodiment of the present invention;
图9表示本发明实施例应用于宿端的检测标签交换路径连通性的装置框图;FIG. 9 is a block diagram showing an apparatus for detecting connectivity of a label switched path applied to a sink by an embodiment of the present invention; FIG.
图10表示本发明实施例应用于宿端的检测标签交换路径连通性的装置中第二处理模块框图;10 is a block diagram showing a second processing module in an apparatus for detecting connectivity of a label switched path applied to a sink by an embodiment of the present invention;
图11表示本发明实施例检测标签交换路径连通性的装置框图。Figure 11 is a block diagram showing the apparatus for detecting the connectivity of a label switched path in accordance with an embodiment of the present invention.
本发明的较佳实施方式Preferred embodiment of the invention
下面将结合附图及具体实施例对本发明进行详细描述。The invention will be described in detail below with reference to the drawings and specific embodiments.
本发明实施例针对相关技术中用来检测标签交换路径连通性的方法中
存在的对业务有效带宽造成损耗、处理复杂或在无业务报文时无法进行检测的问题,提供了一种检测标签交换路径连通性的方法及装置,通过在源端按照用户配置的OAM检测频率监测业务报文或第一虚拟业务报文的发送情况,及时计算出补偿频率按照补偿频率构造第二虚拟业务报文以满足OAM检测频率要求,在宿端按照用户配置的OAM检测频率监测业务报文、第一虚拟业务报文或第二虚拟业务报文的接收情况,来确定链路的连通性,不需要发送OAM检测报文,有效地解决了由于插入OAM检测报文对业务有效带宽造成的损耗,并且,本发明实施例通过构造第一虚拟业务报文在源端无业务报文的情况下进行发送,实现了在源端无业务报文的情况下正常检测路径连通性的目的。。The embodiment of the present invention is directed to a method for detecting connectivity of a label switched path in the related art.
The problem of the loss of the effective bandwidth of the service, the complexity of the processing, or the inability to detect when there is no service packet, provides a method and device for detecting the connectivity of the label switched path, and the detection frequency of the OAM is configured according to the user at the source end. Monitor the transmission of the service packet or the first virtual service packet, calculate the compensation frequency in time, construct the second virtual service packet according to the compensation frequency to meet the OAM detection frequency requirement, and monitor the service report according to the OAM detection frequency configured by the user at the sink end. The information of the first virtual service packet or the second virtual service packet is received to determine the connectivity of the link. The OAM detection packet is not required to be sent, which effectively solves the problem that the effective bandwidth of the service is caused by the insertion of the OAM detection packet. In the embodiment of the present invention, the first virtual service packet is configured to be sent without the service packet at the source end, so that the path connectivity is normally detected when the source end has no service packet. .
如图1所示,本发明实施例提供一种检测标签交换路径连通性的方法,应用于源端,包括:As shown in FIG. 1 , an embodiment of the present invention provides a method for detecting connectivity of a label switching path, which is applied to a source end, and includes:
步骤S100、对源端存在业务报文的情况进行检测,当源端不存在业务报文时,构造第一虚拟业务报文进行发送,当源端存在业务报文时,将业务报文进行发送;Step S100: Detecting that a service packet exists at the source end. When the source end does not have a service packet, the first virtual service packet is configured to be sent. When the source end has a service packet, the service packet is sent. ;
步骤S200、对源端发送的业务报文或第一虚拟业务报文的频率进行检测,得到检测结果,并将检测结果与OAM检测频率进行比对,得到比对结果;Step S200: Detecting the frequency of the service packet or the first virtual service packet sent by the source end, obtaining the detection result, and comparing the detection result with the OAM detection frequency to obtain a comparison result;
步骤S300、当比对结果为业务报文或第一虚拟业务报文的频率小于OAM检测频率时构造第二虚拟业务报文;Step S300, constructing a second virtual service packet when the frequency of the comparison is that the service packet or the first virtual service packet is less than the OAM detection frequency;
步骤S400、向宿端发送业务报文、第一虚拟业务报文或第二虚拟业务报文,由宿端对接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率进行检测,以确定路径的连通性。Step S400: Send a service packet, a first virtual service packet, or a second virtual service packet to the sink end, where the sink end receives the service packet, the first virtual service packet, or the second virtual service packet. The frequency is detected to determine the connectivity of the path.
应当说明的是,第一虚拟业务报文和第二虚拟业务报文是一种在源端发送的特殊用户报文,该报文能够通过标签交换路径到达宿端,在宿端用来检测路径的通断,不投递给具体的用户。当源端不存在业务报文时,构造第一虚拟业务报文代替业务报文来发送,当路经上的业务报文或第一虚拟业务报文的频率达不到OAM检测频率的时候,构造第二虚拟业务报文,以便宿端能够正常检测到业务报文。It should be noted that the first virtual service packet and the second virtual service packet are special user packets sent by the source end, and the packet can reach the sink end through the label switching path, and is used to detect the path at the sink end. The continuity is not delivered to specific users. When there is no service packet at the source end, the first virtual service packet is configured to be sent instead of the service packet. When the frequency of the service packet or the first virtual service packet fails to reach the OAM detection frequency, A second virtual service packet is configured, so that the sink can detect the service packet normally.
可选的,通过在源端按照用户配置的OAM检测频率监测业务报文或第
一虚拟业务报文的发送情况,及时计算出补偿频率按照补偿频率构造第二虚拟业务报文以满足OAM检测频率要求,在宿端按照用户配置的OAM检测频率监测业务报文、第一虚拟业务报文或第二虚拟业务报文的接收情况,来确定链路的连通性,不需要发送OAM检测报文,有效地解决了由于插入OAM检测报文对业务有效带宽造成的损耗。Optionally, the service packet is monitored by using the OAM detection frequency configured by the user at the source end.
In the case of the transmission of a virtual service packet, the compensation frequency is calculated in accordance with the compensation frequency to construct the second virtual service packet to meet the OAM detection frequency requirement, and the service packet and the first virtual service are monitored at the sink according to the OAM detection frequency configured by the user. The receiving of the packet or the second virtual service packet is used to determine the connectivity of the link. The OAM detection packet is not required to be sent, which effectively solves the loss caused by the insertion of the OAM detection packet to the effective bandwidth of the service.
在本发明上述实施例中,如图2所示,步骤S200包括:In the above embodiment of the present invention, as shown in FIG. 2, step S200 includes:
步骤S201、源端通过OAM与标签交换路径预设的绑定关系向标签交换路径发送业务报文或第一虚拟业务报文,并对业务报文或第一虚拟业务报文的频率进行检测,得到检测结果;Step S201: The source end sends a service packet or a first virtual service packet to the label switching path through the binding relationship between the OAM and the label switching path, and detects the frequency of the service packet or the first virtual service packet. Obtaining test results;
步骤S202、将检测后的业务报文或第一虚拟业务报文的频率与OAM检测频率进行比对,得到比对结果。Step S202: Compare the frequency of the detected service packet or the first virtual service packet with the OAM detection frequency to obtain a comparison result.
应当说明的是,OAM检测的频率(或者周期)是OAM的唯一标识,源端提前配置好OAM与标签交换路径的绑定关系,并对配置信息进行保存。It should be noted that the frequency (or period) of the OAM detection is the unique identifier of the OAM, and the binding relationship between the OAM and the label switching path is configured in advance, and the configuration information is saved.
可选的,当源端发送业务报文或第一虚拟业务报文时,通过OAM与标签交换路径预设的绑定关系向标签交换路径发送业务报文或第一虚拟业务报文,并对业务报文或第一虚拟业务报文的频率进行检测,得到检测结果;根据得到检测结果与OAM检测频率进行比对,得出比对结果。Optionally, when the source sends the service packet or the first virtual service packet, the OAM sends the service packet or the first virtual service packet to the label switching path through the binding relationship preset by the OAM and the label switching path. The frequency of the service packet or the first virtual service packet is detected, and the detection result is obtained; and the comparison result is compared with the OAM detection frequency, and the comparison result is obtained.
在本发明上述实施例中,步骤S300包括:In the above embodiment of the present invention, step S300 includes:
当业务报文或第一虚拟业务报文的频率小于OAM检测频率时,计算出补偿频率,根据补偿频率构造第二虚拟业务报文。When the frequency of the service packet or the first virtual service packet is less than the OAM detection frequency, the compensation frequency is calculated, and the second virtual service packet is constructed according to the compensation frequency.
可选的,在源端发送的业务报文或第一虚拟业务报文的频率小于OAM检测频率的情况下,为了达到OAM的检测频率,需要计算出业务报文或第一虚拟业务报文的频率与OAM检测频率之间的补偿频率,依据补偿频率构造第二虚拟业务报文。Optionally, in the case that the frequency of the service packet or the first virtual service packet sent by the source is smaller than the OAM detection frequency, in order to achieve the OAM detection frequency, the service packet or the first virtual service packet needs to be calculated. The compensation frequency between the frequency and the OAM detection frequency constructs a second virtual service message according to the compensation frequency.
应当说明的是,不管向宿端发送的第一虚拟业务报文还是第二虚拟业务报文,都可以沿着标签交换路径进行传输,但是第一虚拟业务报文或第二虚拟业务报文的封装的标签要与业务报文使用的标签有所区别,其他的封装信息与业务报文相同。It should be noted that the first virtual service packet or the second virtual service packet may be transmitted along the label switching path, but the first virtual service packet or the second virtual service packet is used. The encapsulated label is different from the label used by the service packet. The other encapsulation information is the same as the service packet.
本发明实施例还提供了一种检测标签交换路径连通性的方法,应用于宿
端,如图3所示,包括:The embodiment of the invention further provides a method for detecting connectivity of a label switching path, which is applied to a sink.
The end, as shown in Figure 3, includes:
步骤S500、宿端接收源端发送的业务报文、当业务报文不存在时构造的第一虚拟业务报文或当业务报文、第一虚拟业务报文的频率小于OAM检测频率时构造的第二虚拟业务报文;Step S500: The sink receives the service packet sent by the source end, and the first virtual service packet configured when the service packet does not exist or when the frequency of the service packet and the first virtual service packet is less than the OAM detection frequency. Second virtual service message;
步骤S600、宿端对接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率进行检测,得到检测结果;Step S600: The sink detects the frequency of the received service packet, the first virtual service packet, or the second virtual service packet, and obtains a detection result.
步骤S700、宿端根据检测结果来确定路径的连通性,并对业务报文、第一虚拟业务报文或第二虚拟业务报文进行处理。Step S700: The sink end determines the connectivity of the path according to the detection result, and processes the service packet, the first virtual service packet, or the second virtual service packet.
可选的,宿端对接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率进行检测,并根据设置的OAM检测频率与检测的结果进行比对确定路径的连通性。确定了路径的连通性后,对接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文进行处理。Optionally, the sink detects the frequency of the received service packet, the first virtual service packet, or the second virtual service packet, and compares the set OAM detection frequency with the detected result to determine the path connectivity. Sex. After the connectivity of the path is determined, the received service packet, the first virtual service packet, or the second virtual service packet is processed.
在本发明上述实施例中,如图4所示,步骤S700包括:In the above embodiment of the present invention, as shown in FIG. 4, step S700 includes:
步骤S701、当宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率小于OAM检测频率时,输出告警产生指示;Step S701: When the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is less than the OAM detection frequency, output an alarm generation indication.
步骤S702、当宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率大于或等于OAM检测频率时,识别出第一虚拟业务报文或第二虚拟业务报文,将业务报文投递到后续的业务转发处理流程,如果存在告警,输出告警消失指示。Step S702: When the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is greater than or equal to the OAM detection frequency, the first virtual service packet or the second virtual service packet is identified. The service delivers the service message to the subsequent service forwarding process. If an alarm is generated, the alarm disappears.
可选的,在宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率小于OAM检测频率时,则表明路径的连通性遭到损坏,此时需要输出告警产生指示,并对告警产生指示进行处理;当宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率大于或等于OAM检测频率时,则表明路径的连通性良好,对并对业务报文、第一虚拟业务报文或第二虚拟业务报文进行识别,将识别出的第一虚拟业务报文或第二虚拟业务报文不投递到后续的业务转发处理流程,将识别到的业务报文投递到后续的业务转发处理流程。在检测到路径的连通性良好时,如果存在告警,输出告警消失指示,并对告警消失指示进行处理。应当说明的是,处理告警消失指示包括:更新本端的状态,需要时,并负责向源端通知告警状态。处理告警产
生指示包括:更新本端的状态,需要时,并负责向源端通知告警状态。Optionally, when the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is less than the OAM detection frequency, the connectivity of the path is damaged. An indication is generated, and the alarm generation indication is processed; when the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is greater than or equal to the OAM detection frequency, the connectivity of the path is indicated. If the service packet, the first virtual service packet, or the second virtual service packet is identified, the first virtual service packet or the second virtual service packet is not delivered to the subsequent service forwarding processing. The process delivers the identified service message to a subsequent service forwarding process. When it is detected that the connectivity of the path is good, if there is an alarm, an alarm disappearing indication is output, and the alarm disappearing indication is processed. It should be noted that the processing of the alarm disappearing indication includes: updating the status of the local end, and when needed, is responsible for notifying the source end of the alarm status. Handling alarm production
The raw indication includes: updating the status of the local end, and when needed, is responsible for notifying the source end of the alarm status.
在本发明上述实施例中,如图5和图6所示,源端和宿端通过中间结点连接,经源端发送的业务报文、第一虚拟业务报文或第二虚拟业务报文到达宿端后,由宿端检测业务报文、第一虚拟业务报文或第二虚拟业务报文的频率,来确定路径的连通性。该方法不需要发送OAM检测报文,有效地解决了由于插入OAM检测报文对业务有效带宽造成的损耗。In the foregoing embodiment of the present invention, as shown in FIG. 5 and FIG. 6, the source end and the sink end are connected by an intermediate node, and the service packet, the first virtual service packet, or the second virtual service packet sent by the source end is sent. After the sink reaches the sink, the sink detects the frequency of the service packet, the first virtual service packet, or the second virtual service packet to determine the connectivity of the path. The method does not need to send an OAM detection packet, which effectively solves the loss caused by the insertion of the OAM detection packet to the effective bandwidth of the service.
本发明实施例还提供了一种检测标签交换路径连通性的装置,应用于源端,如图7所示,该装置包括:The embodiment of the present invention further provides an apparatus for detecting connectivity of a label switching path, which is applied to a source end. As shown in FIG. 7, the apparatus includes:
报文检测模块10,设置为对源端存在业务报文的情况进行检测,当源端不存在业务报文时,构造第一虚拟业务报文进行发送,当源端存在业务报文时,将业务报文进行发送;The packet detection module 10 is configured to detect that a service packet exists at the source end. When the source end does not have a service packet, the first virtual service packet is configured to be sent. When the source end has a service packet, the packet detection module 10 Service packets are sent;
第一处理模块20,设置为对源端发送的业务报文或第一虚拟业务报文的频率进行检测,得到检测结果,并将检测结果与OAM检测频率进行比对,得到比对结果;The first processing module 20 is configured to detect the frequency of the service packet or the first virtual service packet sent by the source end, obtain a detection result, and compare the detection result with the OAM detection frequency to obtain a comparison result;
构造模块30,设置为当比对结果为业务报文或第一虚拟业务报文的频率小于OAM检测频率时构造第二虚拟业务报文;The constructing module 30 is configured to construct a second virtual service message when the comparison result is that the frequency of the service packet or the first virtual service packet is less than the OAM detection frequency;
频率检测模块40,设置为向宿端发送业务报文、第一虚拟业务报文或第二虚拟业务报文,由宿端对接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率进行检测,以确定路径的连通性。The frequency detecting module 40 is configured to send a service packet, a first virtual service packet, or a second virtual service packet to the sink end, where the sink end receives the service packet, the first virtual service packet, or the second virtual The frequency of service packets is detected to determine the connectivity of the path.
在本发明上述实施例中,如图8所示,第一处理模块20包括:In the above embodiment of the present invention, as shown in FIG. 8, the first processing module 20 includes:
检测单元21,设置为通过OAM与标签交换路径预设的绑定关系向标签交换路径发送业务报文或第一虚拟业务报文,并对业务报文或第一虚拟业务报文的频率进行检测,得到检测结果;The detecting unit 21 is configured to send a service packet or a first virtual service packet to the label switching path by using a binding relationship preset between the OAM and the label switching path, and detect the frequency of the service packet or the first virtual service packet. , get the test results;
比对单元22,设置为将检测后的业务报文或第一虚拟业务报文的频率与OAM检测频率进行比对,得到比对结果。The comparison unit 22 is configured to compare the frequency of the detected service message or the first virtual service message with the OAM detection frequency to obtain a comparison result.
在本发明上述实施例中,构造模块30是设置为:In the above embodiment of the invention, the construction module 30 is configured to:
当业务报文或第一虚拟业务报文的频率小于OAM检测频率时,计算出补偿频率,根据补偿频率构造第二虚拟业务报文。When the frequency of the service packet or the first virtual service packet is less than the OAM detection frequency, the compensation frequency is calculated, and the second virtual service packet is constructed according to the compensation frequency.
本发明实施例还提供了一种检测标签交换路径连通性的装置,应用于宿
端,如图9所示,该装置包括:An embodiment of the present invention further provides an apparatus for detecting connectivity of a label switching path, which is applied to a sink.
End, as shown in Figure 9, the device includes:
接收模块50,设置为接收源端发送的业务报文、当业务报文不存在时构造的第一虚拟业务报文或当业务报文、第一虚拟业务报文的频率小于OAM检测频率时构造的第二虚拟业务报文;The receiving module 50 is configured to receive a service packet sent by the source, a first virtual service packet configured when the service packet does not exist, or a structure when the frequency of the service packet and the first virtual service packet is less than the OAM detection frequency. Second virtual service message;
检测模块60,设置为对接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率进行检测,得到检测结果;The detecting module 60 is configured to detect the frequency of the received service packet, the first virtual service packet, or the second virtual service packet, to obtain a detection result;
第二处理模块70,设置为根据检测结果来确定路径的连通性并对业务报文、第一虚拟业务报文或第二虚拟业务报文进行处理。The second processing module 70 is configured to determine the connectivity of the path according to the detection result and process the service packet, the first virtual service packet, or the second virtual service packet.
在本发明上述实施例中,如图10所示,第二处理模块70包括:In the above embodiment of the present invention, as shown in FIG. 10, the second processing module 70 includes:
第一处理单元71,设置为当宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率小于OAM检测频率时,输出告警产生指示;The first processing unit 71 is configured to output an alarm generation indication when the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is less than the OAM detection frequency;
第二处理单元72,设置为当宿端接收到的业务报文、第一虚拟业务报文或第二虚拟业务报文的频率大于或等于OAM检测频率时,识别出第一虚拟业务报文或第二虚拟业务报文,将业务报文投递到后续的业务转发处理流程,如果存在告警,输出告警消失指示。The second processing unit 72 is configured to: when the frequency of the service packet, the first virtual service packet, or the second virtual service packet received by the sink is greater than or equal to the OAM detection frequency, identify the first virtual service packet or The second virtual service packet delivers the service packet to the subsequent service forwarding process. If an alarm is generated, the alarm disappears.
如图11所示,为本发明实施例检测标签交换路径连通性的装置框图,通过报文检测模块10对源端是否存在业务报文进行检测,确定要发送业务报文还是第一虚拟业务报文。通过第一处理模块20对业务报文或第一虚拟业务报文的频率进行检测,得到检测结果,并将检测结果与OAM检测频率进行比对,得到比对结果;当业务报文或第一虚拟业务报文的频率小于OAM检测频率时通过构造模块30构造第二虚拟业务报文,最终通过频率检测模块40向宿端发送业务报文、第一虚拟业务报文或第二虚拟业务报文并由宿端对业务报文、第一虚拟业务报文或第二虚拟业务报文的频率进行检测确定路径的连通性。应用于宿端的接收模块50首先接收源端发送的业务报文、第一虚拟业务报文或第二虚拟业务报文,通过检测模块60对业务报文、第一虚拟业务报文或第二虚拟业务报文的频率进行检测,经检测后通过第二处理模块70对业务报文、第一虚拟业务报文或第二虚拟业务报文进行处理。As shown in FIG. 11 , it is a block diagram of a device for detecting connectivity of a label switching path according to an embodiment of the present invention. The packet detecting module 10 detects whether a service packet exists at the source end, and determines whether to send a service packet or a first virtual service packet. Text. The first processing module 20 detects the frequency of the service packet or the first virtual service packet, obtains the detection result, and compares the detection result with the OAM detection frequency to obtain a comparison result; when the service packet or the first The second virtual service packet is configured by the constructing module 30 when the frequency of the virtual service packet is less than the OAM detection frequency, and finally the service packet, the first virtual service packet, or the second virtual service packet is sent to the sink by the frequency detecting module 40. The connectivity of the service packet, the first virtual service packet, or the second virtual service packet is determined by the sink to determine the connectivity of the path. The receiving module 50, which is applied to the sink, first receives the service packet, the first virtual service packet, or the second virtual service packet sent by the source end, and the detection module 60 sends the service packet, the first virtual service packet, or the second virtual The frequency of the service packet is detected, and after the detection, the second processing module 70 processes the service packet, the first virtual service packet, or the second virtual service packet.
本发明实施例检测标签交换路径连通性的方法,通过在源端按照用户配置的OAM检测频率监测业务报文或第一虚拟业务报文的发送情况,及时计
算补偿频率按照补偿频率构造第二虚拟业务报文以满足OAM检测频率要求,在宿端按照用户配置的OAM检测频率监测业务报文、第一虚拟业务报文或第二虚拟业务报文的接收情况,来确定链路的连通性,不需要发送OAM检测报文,有效地解决了由于插入OAM检测报文对业务有效带宽造成的损耗,并且,该方法检测的标准由用户进行配置,不依赖于业务流量,具有较大的灵活性。本发明实施例通过构造第一虚拟业务报文在源端无业务报文的情况下进行发送,正常检测路径的连通性。The method for detecting the connectivity of the label switching path in the embodiment of the present invention is to monitor the transmission status of the service packet or the first virtual service packet according to the OAM detection frequency configured by the user at the source end.
The compensation frequency is configured according to the compensation frequency to construct the second virtual service packet to meet the OAM detection frequency requirement, and the sink receives the service packet, the first virtual service packet, or the second virtual service packet according to the OAM detection frequency configured by the user. In this case, the connectivity of the link is determined, and the OAM detection packet is not required to be sent, which effectively solves the loss caused by the insertion of the OAM detection packet to the effective bandwidth of the service, and the standard detected by the method is configured by the user, and is not dependent. For business traffic, there is greater flexibility. In the embodiment of the present invention, the first virtual service packet is configured to be sent without the service packet at the source end, and the connectivity of the path is normally detected.
需要说明的是,本发明实施例提供的检测标签交换路径连通性的装置是应用上述方法的装置,则上述方法的所有实施例均适用于该装置,且均能达到相同或相似的有益效果。It should be noted that, the apparatus for detecting the connectivity of the label switching path provided by the embodiment of the present invention is the apparatus applying the foregoing method, and all the embodiments of the foregoing method are applicable to the apparatus, and all of the same or similar beneficial effects can be achieved.
以上所述的是本发明的优选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本发明所述的原理前提下还可以作出若干改进和润饰,这些改进和润饰也在本发明的保护范围内。The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. Within the scope of protection of the invention.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
工业实用性Industrial applicability
上述技术方案不需要发送OAM检测报文,有效地解决了由于插入OAM检测报文对业务有效带宽造成的损耗,并且,该方法检测的标准由用户进行配置,不依赖于业务流量,具有较大的灵活性。此外,上述技术方案通过构造第一虚拟业务报文在源端无业务报文的情况下发送,实现了在源端无业务报文的情况下正常检测路径连通性的目的。
The foregoing technical solution does not need to send an OAM detection packet, which effectively solves the loss caused by the insertion of the OAM detection packet to the effective bandwidth of the service, and the standard detected by the method is configured by the user, and does not depend on the service traffic, and has a large Flexibility. In addition, the foregoing technical solution is configured to send the first virtual service packet without the service packet at the source end, so as to achieve the purpose of detecting the connectivity of the path normally when there is no service packet at the source end.