WO2013078873A1 - Method and device for identifying response message - Google Patents

Method and device for identifying response message Download PDF

Info

Publication number
WO2013078873A1
WO2013078873A1 PCT/CN2012/079243 CN2012079243W WO2013078873A1 WO 2013078873 A1 WO2013078873 A1 WO 2013078873A1 CN 2012079243 W CN2012079243 W CN 2012079243W WO 2013078873 A1 WO2013078873 A1 WO 2013078873A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
message
identifier
sent
response
Prior art date
Application number
PCT/CN2012/079243
Other languages
French (fr)
Chinese (zh)
Inventor
徐耀
张艳梅
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2013078873A1 publication Critical patent/WO2013078873A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method and device for identifying a response message.
  • the Ethernet OAM Operaation, Management, and Maintenance
  • the measurement of the frame delay and the frame delay variation is performed by periodically transmitting the DM information to the Maintenance End Point (MEP).
  • MEP Maintenance End Point
  • the frame is received by the peer MEP in the diagnostic interval with the frame with the DM information. After the measurement message is sent, the MEP must be able to identify the response message corresponding to each measurement message from the received message. .
  • the quality of service (QoS) priority may be used to consider that the response message is a response message corresponding to the sent message.
  • the packets sent by the first device to the second device are often passed through at least one intermediate device.
  • the priority of the packet header changes after the intermediate device is changed.
  • the device does not recognize the response packet corresponding to the sent packet.
  • subsequent operations such as delay measurement or statistical packet loss cannot be completed.
  • Embodiments of the present invention provide a method and a device for identifying a response message, to solve the prior art. The problem that the response message could not be identified due to the change in priority.
  • a method for identifying a response message includes: sending, by a first device, a sending message, where a reserved field or an extended field of the sending message carries a first identifier;
  • a method for identifying a response message includes: receiving, by a second device, a sending message sent by the first device, where the reserved field or the extended field of the sending message carries the first Message identifier
  • the first device sends a sending packet, where the sending the first packet identifier includes: the first device generates a sending packet, and obtains the priority of the sent packet as the first packet.
  • the identifier is sent to the reserved field or the extended field of the sent packet, and the sent packet carrying the priority is sent.
  • the first device sends a sending packet, where the sending the packet carries the first packet identifier, where: the first device generates a sending packet, and generates a sequence number for the sending packet as the first The message identifier is sent to the extension field of the sending packet, and the sending packet carrying the sequence number is sent.
  • the first device sends a sending packet, where the sending the first packet identifier includes: the first device generates a sending packet, and the subsequent device is mapped by the intermediate device to the same priority. More than one sent message is divided into a packet group, and a text identifier is determined for each packet group, and the same first identifier is written in all the measurement and texts in a group. Carrying the sent packet of the first packet identifier.
  • the determining the first packet identifier for each packet group includes: generating a sequence number for each packet group as the first packet identifier of the packet group, or, for each packet The priority of one or more packets sent in the group is used as the first packet identifier of the packet group.
  • the first packet identifier is compared with the second packet identifier, and determining, according to the comparison result, whether the response packet is a response packet corresponding to the sent packet includes: If the first packet identifier is the same as the second packet identifier, if the first packet identifier and the second packet identifier are the same, it is confirmed whether the response packet is the same as the sending packet. The response message corresponding to the text.
  • a device for identifying a response message includes: a transceiver module, configured to send a message, where a reserved field or an extension field of the sent message carries a first message identifier Receiving a response message, where the reserved field or the extension field of the response message carries a second message identifier;
  • a device for identifying a response packet includes: a receiving module, configured to: Receiving, by the first device, a sending message, where the reserved field or the extended field of the sending message carries the first message identifier;
  • a generating module configured to generate a response message, and carry the first message identifier in a reserved field or an extended field of the response message
  • a sending module configured to send the response message to the first device.
  • the transceiver module includes: a first identifier unit, configured to acquire a priority of the sent packet as a first packet identifier, and write the priority to a reserved field or extension of the sent packet In the field.
  • a first identifier unit configured to acquire a priority of the sent packet as a first packet identifier, and write the priority to a reserved field or extension of the sent packet In the field.
  • the transceiver module includes: a second identifier unit, configured to generate a sequence number for the sent packet as the first packet identifier, and write the sequence number into an extended field of the sent packet .
  • the transceiver module includes: a third identifier unit, configured to divide two or more sending packets that are subsequently mapped to the same priority by the intermediate device into one packet group, and determine, for each packet group A first four-character identifier, the same first identifier is written in all the measurement texts in a group.
  • a third identifier unit configured to divide two or more sending packets that are subsequently mapped to the same priority by the intermediate device into one packet group, and determine, for each packet group A first four-character identifier, the same first identifier is written in all the measurement texts in a group.
  • the determining module is configured to compare the first packet identifier with the second packet identifier, if the first packet identifier and the second packet are Standard If the acknowledgment is the same, it is confirmed whether the response message is a response message corresponding to the sent message.
  • the response message corresponding to the sent message can be identified by comparing the message identifier.
  • FIG. 1 is a flowchart of a method for identifying a response message according to an embodiment of the present invention
  • FIG. 2a is a schematic diagram of a package format of a packet loss measurement message (LMM);
  • FIG. 2b is a schematic diagram of a package format of a packet loss measurement response (LMR);
  • FIG. 2C is a schematic diagram of a package format of an extended LMM message according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for identifying a response message according to another embodiment of the present invention
  • FIG. 5 is a schematic diagram of an apparatus for identifying a response message according to another embodiment of the present invention.
  • Embodiment 1 provides a method and a device for identifying a response message, which can solve the problem that the response message cannot be identified due to the priority change in the prior art.
  • Embodiments of the present invention also provide corresponding devices. The details are described below separately.
  • Embodiment 1 provides a method and a device for identifying a response message, which can solve the problem that the response message cannot be identified due to the priority change in the prior art.
  • Embodiments of the present invention also provide corresponding devices. The details are described below separately. Embodiment 1
  • an embodiment of the present invention provides a method for identifying a response packet, including: 101.
  • a first device sends a sending packet, where a reserved field or an extended field of the sent packet carries a first packet identifier. .
  • the first device at the source end can carry the packet identifier in the sent packet, and the packet carrying the packet identifier is sent.
  • the original priority of the sent packet generated by the first device may be used as the packet identifier.
  • another sequence number may be generated.
  • the packet identifier may be carried in the reserved field of the sent packet, or may be extended by the protocol, and the extended field is added, and the packet identifier is carried in the extended field of the sent packet.
  • the packet identifier carried in the sent packet is referred to as the first packet identifier.
  • the second device at the receiving end After receiving the sent packet from the first device, the second device at the receiving end extracts the carried packet identifier from the sent packet, generates a response packet, carries the packet identifier in the response packet, and then sends the packet
  • the response message of the message identifier is sent to the first device.
  • the packet identifier carried in the response message is referred to as the second packet identifier.
  • the first device may first extract the second packet identifier carried in the response packet, and then determine the correspondence between the response packet and the sent packet according to the packet identifier. It is.
  • the second packet identifier carried in the response packet can be compared with the first packet identifier carried in the sent packet, if the second packet identifier of a response packet is sent to the first packet of a certain packet. If the identifiers are the same, it can be confirmed that the response message is a response message corresponding to the sent message.
  • the first device can perform subsequent operations according to the following, for example, performing packet loss calculation according to the number of the packet identification statistical response packets; or extracting data carried in the response packet and correspondingly transmitting the packet The data is compared and data such as frame delay is calculated.
  • the embodiment of the present invention provides a method for identifying a response message, which is a technical solution for carrying a message identifier in a sending message and a response message, so that the message can be identified and sent by comparing the message identifier.
  • the response message corresponding to the text.
  • This embodiment is described by taking the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example.
  • the packet loss measurement method recommended by the ITU-T Y.1731 standard is that the source MEP sends a Lost Measurement Message (LMM) to the peer MEP, and receives the packet loss measurement response returned by the peer MEP (Loss Measurement Reply).
  • LMM Lost Measurement Message
  • LMR Packets are counted according to the priority of the packets.
  • the priority of the message after being forwarded by the intermediate device A change has occurred, and the MEP cannot correctly identify the response message. Therefore, the result of the packet loss statistics is inaccurate.
  • the encapsulation format of the Protocol Data Unit (PDU) of the LMM and LMR packets is shown in Figure 2a and 2b, respectively.
  • the "tag” field which usually takes a value of 0, is not currently used and is a reserved field. The length of this field is one byte.
  • the original priority is written to the "tag" field of the message. Specifically, the source MEP may write the original priority in the tag field of the LMM packet when generating the sending packet, such as the LMM packet, and the peer MEP may first extract the LMM packet after receiving the LMM packet.
  • the original priority of the tag field is written, and then the response message, that is, the LMR message, is generated, and the original priority is written in the tag field of the LMR message, and the source MEP receives the LMR message. It can be determined whether the packet identifier carried in the LMR packet is the same as the packet identifier carried in the LMM packet. If the identifier is the same, the LMR packet is a response packet corresponding to the LMM packet. In the above process, the tag field will not be modified, and the MEP can be guaranteed to recognize the response message by identifying the original priority written by the tag field. In this way, there is no need to modify the protocol standard, it is compatible with existing standards, and it is easy to implement.
  • the standard can be improved by writing the 4 ⁇ initial priority defined in the ITU-T Y.1731 standard into the extension field of the message.
  • the four bytes of packets 5-8 can be used as extension fields to carry the packet identifier.
  • the length of the extended field can be determined according to actual needs, and is not limited to four bytes.
  • Embodiment 3 uses the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example to illustrate how to use the original priority as the identifier of the text, and how to carry the identifier in the sent text and the response, and then identify The response message solves the problem that the response message cannot be identified due to the priority change in the prior art.
  • Embodiment 3 uses the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example to illustrate how to use the original priority as the identifier of the text, and how to carry the identifier in the sent text and the response, and then identify The response message solves the problem that the response message cannot be identified due to the priority change in the prior art.
  • Embodiment 3 uses the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example to illustrate how to use the original priority as the identifier of the text, and how to carry the identifier in the sent text and the response, and then identify The response message solves the problem that the response message cannot be identified due to
  • the Ethernet OAM proposed by the ITU-T Y.1731 standard is still described by taking the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example.
  • the reserved number of the message is written to the reserved field of the message, for example in the "Mark"field; however, since the "Mark" field is only one byte in length, the value represented can only be up to 256, and the serial number ⁇ ⁇ may exceed 256, so, alternatively, in another embodiment, the standard may be improved and written into the extension field of the message.
  • the method of extending the packet refer to the foregoing method.
  • the four bytes of the fifth to eighth of the packet may be used as an extension field to carry the packet identifier.
  • the length of the extended field can be determined according to actual needs, and is not limited to four bytes.
  • the first device For the same statistic or measurement object, the first device generates the same sequence number, and the response message of the sent message will also carry the same sequence number.
  • the first device can identify the response message according to the sequence number. Correspondence between the text and the sent message.
  • Embodiment 4 is based on the Ethernet OAM proposed by the ITU-T Y.1731 standard. It shows how to use the sequence number as the packet identifier. How to carry the packet identifier in the sending packet and the response packet, and then identify The response message solves the problem that the response message cannot be identified due to the priority change in the prior art.
  • Embodiment 4 is based on the Ethernet OAM proposed by the ITU-T Y.1731 standard. It shows how to use the sequence number as the packet identifier. How to carry the packet identifier in the sending packet and the response packet, and then identify The response message solves the problem that the response message cannot be identified due to the priority change in the prior art.
  • Embodiment 4 is based on the Ethernet OAM proposed by the ITU-T Y.1731 standard. It shows how to use the sequence number as the packet identifier. How to carry the packet identifier in the sending packet and the response packet, and then identify The response message solves the problem that the response message cannot be identified due to
  • a sequence number can be generated for each packet group as the packet identifier of the packet group, and the serial number is written in each of the sent packets in the packet group. Refer to Example 3 for how to generate and write a serial number.
  • the priority of one of the packet groups, or the combination of the priorities of the multiple packets may be used as the packet identifier of the packet.
  • the packet identifier of the packet For the manner of generating and writing the identifier of the packet, refer to Embodiment 2.
  • the combination of the sequence number and the priority of the sent message may also be used as the identifier of the message group. For example, a sequence number may be generated for each group, and the combination of the sequence number and the priority of all the packets sent by the group is used as the message identifier of the packet.
  • the above embodiment uses the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example to describe how to divide a packet group, determine the packet identifier according to the packet group, and then identify the response packet, which solves the prior art.
  • the above embodiments 2 to 4 are described by taking the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example, and solving the problem that the response message cannot be identified due to the change of the priority, but it should be noted that the present invention
  • the technical solution disclosed in the embodiment is applicable to an application scenario in which all the Ethernet OAMs need to identify and determine the correspondence between the sent message and the response message, and is not limited to solving the scenario in which the message is identified by using the priority as the key.
  • an embodiment of the present invention provides a method for identifying a response message, including:
  • the second device receives the sending packet sent by the first device, where the reserved field or the extended field of the sending packet carries the first packet identifier.
  • the first device at the source end can carry the packet identifier in the sent packet, and the packet carrying the packet identifier is sent.
  • the packet identifier carried in the sent packet is referred to as the first packet identifier.
  • the second device at the receiving end After receiving the sent packet from the first device, the second device at the receiving end extracts the carried packet identifier from the sent packet, generates a response packet, carries the extracted packet identifier in the response packet, and then sends the packet
  • the response message carrying the message identifier is sent to the first device.
  • the packet identifier carried in the response packet is referred to as a second packet identifier.
  • the first device may determine the correspondence between the response message and the sent message according to the message identifier. If the second packet identifier of a response packet is the same as the first packet identifier of a certain packet, the response packet can be confirmed.
  • the text is a response message corresponding to the sent message.
  • the embodiment of the present invention provides a method for identifying a response message, which is a technical solution for carrying a message identifier in a sending message and a response message, so that the message can be identified and sent by comparing the message identifier.
  • the response message corresponding to the text.
  • an embodiment of the present invention provides a device for identifying a response packet, including: a transceiver module 401, configured to send a packet, where a reserved field or an extension field of the packet carries a first packet Receiving a response message, where the reserved field or the extension field of the response message carries a second message identifier;
  • the determining module 402 is configured to compare the first message identifier and the second packet identifier.
  • the transceiver module may include:
  • a first identifier unit configured to acquire a priority of the sent packet as a first packet identifier, and write the priority into a reserved field or an extended field of the sent packet;
  • a second identifier unit configured to generate a sequence number for the sent packet as a first packet identifier, and write the sequence number into an extended field of the sent packet
  • a third identifier unit configured to divide two or more transmission packets that are subsequently mapped to the same priority by the intermediate device into one packet group, and determine a first packet identifier for each packet group, in a report The same first message identifier is written in all measurement messages in the group.
  • the determining module 402 is specifically configured to compare the first packet identifier with the second packet identifier, and if the first packet identifier and the second packet identifier are the same, Whether the response message is a response message corresponding to the sent message.
  • the embodiment of the present invention provides a device for identifying a response packet, where the device can carry a packet identifier in the sent packet, and extract the packet identifier carried in the response packet, and identify and match the packet identifier by comparing the packet identifier.
  • the response packet corresponding to the packet is sent, which solves the problem that the response packet cannot be identified due to the priority change in the prior art.
  • an embodiment of the present invention provides an apparatus for identifying a response message, including: a receiving module 501, configured to receive a sending message sent by a first device, where the sending field is carried in a reserved field or an extended field. Have the first message identifier;
  • the generating module 502 is configured to generate a response message, where the first message identifier is carried in a reserved field or an extended field of the response message;
  • the sending module 503 is configured to send the response message to the first device.
  • the embodiment of the present invention provides a device for identifying a response packet, where the device can extract the packet identifier carried in the sent packet from the sending device, and carry the packet identifier in the response packet and return it to the response packet.
  • the sender device is configured to identify the response packet corresponding to the sent packet by comparing the packet identifier, which solves the problem that the response packet cannot be identified due to the priority change in the prior art.
  • the program can be stored in a computer readable storage medium.
  • the storage medium can include: Read-only memory, read-only memory, disk or disc, and more.

Abstract

Disclosed is a method for identifying a response message, comprising: a first device transmitting a transmission message, a reserved field or an extended field of the transmission message carrying a first message identification; receiving a response message, a reserved field or an extended field of the response message carrying a second message identification; comparing the first message identification with the second message identification; and determining, according to a comparison result, whether the response message is a response message corresponding to the transmission message. Embodiments of the present invention further provide a corresponding device. In the technical solutions of the embodiment of the present invention, the message identifications are carried in the transmission message and the response message, so that the response message corresponding to the transmission message can be identified by comparing the message identifications, thereby solving the problem in the prior art that the response messages cannot be identified due to the change of the priority level.

Description

识别应答报文的方法及设备 本申请要求于 2011 年 11 月 29 日提交中国专利局、 申请号为 201110387521.3、 发明名称为 "识别应答报文的方法及设备" 的中国专利申 请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明涉及通信技术领域, 具体涉及一种识别应答报文的方法及设备。 背景技术 以太网 OAM ( Operation Administration and Maintenance, 操作、 管理 和维护) 实现的机制中, 通常需要识别应答报文, 以确定发送报文与应答 报文的对应关系。 例如, 在时延测量( Delay Measurement , DM )技术的实 现中, 帧时延和帧时延变化的测量是通过向对等维护边界点 (Maintenance End Point, MEP )周期地发送带有 DM信息的帧, 并在诊断间隔内从对等 MEP接收带有 DM信息的帧来完成的; MEP发出测量报文后, 必须能够从 收到的报文中识别与每个测量报文对应的应答报文。  Method and device for identifying a response message. The present application claims priority to a Chinese patent application filed on November 29, 2011 by the Chinese Patent Office, Application No. 201110387521.3, entitled "Method and Apparatus for Identifying Response Messages", The entire contents are incorporated herein by reference. The present invention relates to the field of communications technologies, and in particular, to a method and device for identifying a response message. In the mechanism implemented by the Ethernet OAM (Operation, Management, and Maintenance), it is usually necessary to identify a response packet to determine the correspondence between the sent packet and the response packet. For example, in the implementation of the Delay Measurement (DM) technique, the measurement of the frame delay and the frame delay variation is performed by periodically transmitting the DM information to the Maintenance End Point (MEP). The frame is received by the peer MEP in the diagnostic interval with the frame with the DM information. After the measurement message is sent, the MEP must be able to identify the response message corresponding to each measurement message from the received message. .
现有技术中, 可以采用服务质量(Quality of Service, QoS )优先级来 则认为该应答报文是与该发送报文对应的应答报文。 但实际上, 第一设备 发送给第二设备的报文往往会经过至少一个中间设备, 由于优先级配置的 不同, 经过中间设备后, 报文头中携带的优先级会变化, 从而, 第二设备 致第一设备无法识别出与发送报文对应的应答报文。 进而, 无法完成后续 操作, 如时延测量, 或统计丟包数等。 发明内容 本发明实施例提供一种识别应答报文的方法及设备, 以解决现有技术 中因优先级变化导致无法识别应答报文的问题。 In the prior art, the quality of service (QoS) priority may be used to consider that the response message is a response message corresponding to the sent message. In fact, the packets sent by the first device to the second device are often passed through at least one intermediate device. The priority of the packet header changes after the intermediate device is changed. The device does not recognize the response packet corresponding to the sent packet. Furthermore, subsequent operations such as delay measurement or statistical packet loss cannot be completed. SUMMARY OF THE INVENTION Embodiments of the present invention provide a method and a device for identifying a response message, to solve the prior art. The problem that the response message could not be identified due to the change in priority.
根据本发明实施例的一个方面, 一种识别应答报文的方法, 包括: 第一设备发出发送报文, 所述发送报文的保留字段或扩展字段中携带 有第一 ^艮文标识;  According to an aspect of the present invention, a method for identifying a response message includes: sending, by a first device, a sending message, where a reserved field or an extended field of the sending message carries a first identifier;
接收应答报文 , 所述应答报文的保留字段或扩展字段中携带有第二报 文标识;  Receiving a response message, where the reserved field or the extension field of the response message carries a second message identifier;
将所述第一报文标识和所述第二报文标识进行比较, 根据比较结果判 断所述应答报文是否是与所述发送报文对应的应答报文。  Comparing the first packet identifier with the second packet identifier, and determining, according to the comparison result, whether the response packet is a response packet corresponding to the sent packet.
根据本发明实施例的另一个方面, 一种识别应答报文的方法, 包括: 第二设备接收第一设备发出的发送报文, 所述发送报文的保留字段或 扩展字段中携带有第一报文标识;  According to another aspect of the embodiments of the present invention, a method for identifying a response message includes: receiving, by a second device, a sending message sent by the first device, where the reserved field or the extended field of the sending message carries the first Message identifier
生成应答报文, 将所述第一报文标识携带在所述应答报文的保留字段 或扩展字段中, 将所述应答报文发送给第一设备。  Generating a response packet, and the first packet identifier is carried in a reserved field or an extension field of the response packet, and the response packet is sent to the first device.
可选地, 所述第一设备发出发送报文, 所述发送报文中携带有第一报 文标识包括: 第一设备生成发送报文, 获取所述发送报文的优先级作为第 一报文标识, 将所述优先级写入所述发送报文的保留字段或者扩展字段中, 发出携带优先级的所述发送报文。  Optionally, the first device sends a sending packet, where the sending the first packet identifier includes: the first device generates a sending packet, and obtains the priority of the sent packet as the first packet. The identifier is sent to the reserved field or the extended field of the sent packet, and the sent packet carrying the priority is sent.
可选地, 所述第一设备发出发送报文, 所述发送报文中携带有第一报 文标识包括: 第一设备生成发送报文, 为所述发送报文生成一个序列号作 为第一报文标识, 将所述序列号写入所述发送报文的扩展字段中, 发出携 带序列号的所述发送报文。  Optionally, the first device sends a sending packet, where the sending the packet carries the first packet identifier, where: the first device generates a sending packet, and generates a sequence number for the sending packet as the first The message identifier is sent to the extension field of the sending packet, and the sending packet carrying the sequence number is sent.
可选地, 所述第一设备发出发送报文, 所述发送报文中携带有第一报 文标识包括: 第一设备生成发送报文, 将后续会被中间设备映射为相同优 先级的两个以上发送报文划分到一个报文组中, 为每个报文组确定一个第 文标识, 在一个 ^艮文组内的所有测量 ·艮文中写入相同的第一^艮文标识 , 发出携带所述第一报文标识的所述发送报文。  Optionally, the first device sends a sending packet, where the sending the first packet identifier includes: the first device generates a sending packet, and the subsequent device is mapped by the intermediate device to the same priority. More than one sent message is divided into a packet group, and a text identifier is determined for each packet group, and the same first identifier is written in all the measurement and texts in a group. Carrying the sent packet of the first packet identifier.
可选地, 所述为每个报文组确定一个第一报文标识包括: 为每个报文 组生成一个序列号作为该报文组的第一报文标识, 或者, 以每个报文组中 的一个或多个发送报文的优先级作为该报文组的第一报文标识。 可选地, 所述将所述第一报文标识和所述第二报文标识进行比较, 根 据比较结果判断所述应答报文是否是与所述发送报文对应的应答报文包 括: 将所述第一报文标识和所述第二报文标识进行比较, 如果所述第一报 文标识和所述第二报文标识相同, 则确认所述应答报文是否是与所述发送 报文对应的应答报文。 Optionally, the determining the first packet identifier for each packet group includes: generating a sequence number for each packet group as the first packet identifier of the packet group, or, for each packet The priority of one or more packets sent in the group is used as the first packet identifier of the packet group. Optionally, the first packet identifier is compared with the second packet identifier, and determining, according to the comparison result, whether the response packet is a response packet corresponding to the sent packet includes: If the first packet identifier is the same as the second packet identifier, if the first packet identifier and the second packet identifier are the same, it is confirmed whether the response packet is the same as the sending packet. The response message corresponding to the text.
根据本发明实施例的又一个方面, 一种识别应答报文的设备, 包括: 收发模块, 用于发出发送报文, 所述发送报文的保留字段或扩展字段 中携带有第一报文标识; 接收应答报文, 所述应答报文的保留字段或扩展 字段中携带有第二报文标识;  According to still another aspect of the embodiments of the present invention, a device for identifying a response message includes: a transceiver module, configured to send a message, where a reserved field or an extension field of the sent message carries a first message identifier Receiving a response message, where the reserved field or the extension field of the response message carries a second message identifier;
判断模块, 用于将所述第一报文标识和所述第二报文标识进行比较, 根据本发明实施例的又一个方面, 一种识别应答报文的设备, 包括: 接收模块, 用于接收第一设备发出的发送报文, 所述发送报文的保留 字段或扩展字段中携带有第一报文标识;  The determining module is configured to compare the first packet identifier with the second packet identifier. According to still another aspect of the embodiments of the present invention, a device for identifying a response packet includes: a receiving module, configured to: Receiving, by the first device, a sending message, where the reserved field or the extended field of the sending message carries the first message identifier;
生成模块, 用于生成应答报文, 将所述第一报文标识携带在所述应答 才艮文的保留字段或扩展字段中;  a generating module, configured to generate a response message, and carry the first message identifier in a reserved field or an extended field of the response message;
发送模块, 用于将所述应答报文发送给第一设备。  And a sending module, configured to send the response message to the first device.
可选地, 所述收发模块包括: 第一标识单元, 用于获取所述发送报文 的优先级作为第一报文标识, 将所述优先级写入所述发送报文的保留字段 或者扩展字段中。  Optionally, the transceiver module includes: a first identifier unit, configured to acquire a priority of the sent packet as a first packet identifier, and write the priority to a reserved field or extension of the sent packet In the field.
可选地, 所述收发模块包括: 第二标识单元, 用于为所述发送报文生 成一个序列号作为第一报文标识, 将所述序列号写入所述发送报文的扩展 字段中。  Optionally, the transceiver module includes: a second identifier unit, configured to generate a sequence number for the sent packet as the first packet identifier, and write the sequence number into an extended field of the sent packet .
可选地, 所述收发模块包括: 第三标识单元, 用于将后续会被中间设 备映射为相同优先级的两个以上发送报文划分到一个报文组中, 为每个报 文组确定一个第一 4艮文标识, 在一个 4艮文组内的所有测量 文中写入相同 的第一 ^艮文标识。  Optionally, the transceiver module includes: a third identifier unit, configured to divide two or more sending packets that are subsequently mapped to the same priority by the intermediate device into one packet group, and determine, for each packet group A first four-character identifier, the same first identifier is written in all the measurement texts in a group.
可选地, 其特征在于: 所述判断模块, 具体用于将所述第一报文标识 和所述第二报文标识进行比较, 如果所述第一报文标识和所述第二报文标 识相同, 则确认所述应答报文是否是与所述发送报文对应的应答报文。 本 发明实施例技术方案, 通过在发送 ^艮文和应答 ^艮文中携带 ^艮文标识, 可以 通过比较报文标识来识别与发送报文对应的应答报文。 附图说明 Optionally, the determining module is configured to compare the first packet identifier with the second packet identifier, if the first packet identifier and the second packet are Standard If the acknowledgment is the same, it is confirmed whether the response message is a response message corresponding to the sent message. In the technical solution of the embodiment of the present invention, by transmitting the identifier of the message and the response message, the response message corresponding to the sent message can be identified by comparing the message identifier. DRAWINGS
图 1是本发明一个实施例提供的识别应答报文的方法的流程图; 图 2a是丟包测量报文 ( LMM ) 的封装格式示意图; 1 is a flowchart of a method for identifying a response message according to an embodiment of the present invention; FIG. 2a is a schematic diagram of a package format of a packet loss measurement message (LMM);
图 2b是丟包测量应答(LMR ) 的封装格式示意图;  Figure 2b is a schematic diagram of a package format of a packet loss measurement response (LMR);
图 2c是本发明实施例扩展后的 LMM报文的封装格式示意图; 图 3是本发明另一实施例提供的识别应答报文的方法的流程图; 图 4是本发明一个实施例提供的识别应答报文的设备的示意图; 图 5是本发明另一实施例提供的识别应答报文的设备的示意图。 具体实施方式  2C is a schematic diagram of a package format of an extended LMM message according to an embodiment of the present invention; FIG. 3 is a flowchart of a method for identifying a response message according to another embodiment of the present invention; FIG. A schematic diagram of a device for responding to a message; FIG. 5 is a schematic diagram of an apparatus for identifying a response message according to another embodiment of the present invention. detailed description
本发明实施例提供一种识别应答报文的方法及设备, 可以解决现有技 术中因优先级变化导致无法识别应答报文的问题。 本发明实施例还提供相 应的设备。 以下分别进行详细说明。 实施例一、 The embodiment of the invention provides a method and a device for identifying a response message, which can solve the problem that the response message cannot be identified due to the priority change in the prior art. Embodiments of the present invention also provide corresponding devices. The details are described below separately. Embodiment 1
请参考图 1 , 本发明实施例提供一种识别应答报文的方法, 包括: 101、 第一设备发出发送报文, 所述发送报文的保留字段或扩展字段中 携带有第一报文标识。  Referring to FIG. 1 , an embodiment of the present invention provides a method for identifying a response packet, including: 101. A first device sends a sending packet, where a reserved field or an extended field of the sent packet carries a first packet identifier. .
为了能够识别发送报文和后续收到的应答报文的对应关系, 源端的第 一设备在发出发送报文时, 可以在发送报文中携带报文标识, 将携带报文 标识的发送报文发送给接收端的第二设备。 第一设备和第二设备之间可以 没有中间设备, 也可以有一个或两个以上中间设备。  In order to be able to identify the correspondence between the sent packet and the subsequent received response packet, the first device at the source end can carry the packet identifier in the sent packet, and the packet carrying the packet identifier is sent. The second device sent to the receiving end. There may be no intermediate device between the first device and the second device, and there may be one or more intermediate devices.
在基于优先级的统计和时延测量等场景中, 可以以第一设备生成的发 送报文的原始优先级作为报文标识, 当然, 也可以另外生成一个序列号作 为报文标识。 该报文标识可以携带在发送报文的保留字段中, 也可以对协 议进行扩展, 增加扩展字段, 将报文标识携带在发送报文的扩展字段中。 In the scenario of the priority-based statistics and the delay measurement, the original priority of the sent packet generated by the first device may be used as the packet identifier. Of course, another sequence number may be generated. Identifies the message. The packet identifier may be carried in the reserved field of the sent packet, or may be extended by the protocol, and the extended field is added, and the packet identifier is carried in the extended field of the sent packet.
为方便描述, 后续将发送报文中携带的报文标识称为第一报文标识。 For the convenience of description, the packet identifier carried in the sent packet is referred to as the first packet identifier.
102、 接收应答报文, 所述应答报文的保留字段或扩展字段中携带有第 二才艮文标识。 102. Receive a response message, where the reserved field or the extended field of the response message carries a second identifier.
接收端的第二设备收到来自第一设备的发送报文后, 从发送报文提取 出携带的报文标识, 生成应答报文, 将该报文标识携带在应答报文中, 然 后发送携带该报文标识的应答报文给第一设备。 为方便描述, 后续, 将应 答报文中携带的报文标识称为第二报文标识。  After receiving the sent packet from the first device, the second device at the receiving end extracts the carried packet identifier from the sent packet, generates a response packet, carries the packet identifier in the response packet, and then sends the packet The response message of the message identifier is sent to the first device. For convenience of description, the packet identifier carried in the response message is referred to as the second packet identifier.
第一设备收到第二设备返回的应答报文后, 可以先提取出应答报文中 携带的第二报文标识, 然后就可以根据报文标识判断该应答报文和发送报 文的对应关系了。  After receiving the response message returned by the second device, the first device may first extract the second packet identifier carried in the response packet, and then determine the correspondence between the response packet and the sent packet according to the packet identifier. It is.
103、 将所述第一报文标识和所述第二报文标识进行比较, 根据比较结 果判断所述应答报文是否是与所述发送报文对应的应答报文。  103. Compare the first packet identifier with the second packet identifier, and determine, according to the comparison result, whether the response packet is a response packet corresponding to the sent packet.
可以将应答报文中携带的第二报文标识和发送报文携带的第一报文标 识进行比较, 如果某个应答报文的第二报文标识与某个发送报文的第一报 文标识相同, 则, 可以确认该应答报文是与该发送报文对应的应答报文。  The second packet identifier carried in the response packet can be compared with the first packet identifier carried in the sent packet, if the second packet identifier of a response packet is sent to the first packet of a certain packet. If the identifiers are the same, it can be confirmed that the response message is a response message corresponding to the sent message.
然后, 第一设备就可以据此进行后续操作了, 例如, 按照报文标识统 计应答报文的数量, 进行丟包计算; 或者, 提取应答报文中携带的数据, 与对应的发送报文的数据进行比较, 计算帧时延等数据。  Then, the first device can perform subsequent operations according to the following, for example, performing packet loss calculation according to the number of the packet identification statistical response packets; or extracting data carried in the response packet and correspondingly transmitting the packet The data is compared and data such as frame delay is calculated.
综上, 本发明实施例提供了一种识别应答报文的方法, 该方法通过在 发送报文和应答报文中携带报文标识的技术方案, 使得可以通过比较报文 标识来识别与发送报文对应的应答报文。 实施例二、  In summary, the embodiment of the present invention provides a method for identifying a response message, which is a technical solution for carrying a message identifier in a sending message and a response message, so that the message can be identified and sent by comparing the message identifier. The response message corresponding to the text. Embodiment 2
本实施例以 ITU-T Y.1731标准建议的以太网 OAM为例进行说明。  This embodiment is described by taking the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example.
ITU-T Y.1731标准建议的丟包统计方法是由源端 MEP发送丟包测量报 文( Loss Measurement Message, LMM )给对等 MEP, 接收对等 MEP返回的 丟包测量应答(Loss Measurement Reply, LMR )报文, 根据报文的优先级 分别进行统计。 现有技术中, 由于经过中间设备的转发后, 报文的优先级 发生了变化, MEP无法正确识别应答报文, 因而, 丟包统计的结果是不准 确的。 The packet loss measurement method recommended by the ITU-T Y.1731 standard is that the source MEP sends a Lost Measurement Message (LMM) to the peer MEP, and receives the packet loss measurement response returned by the peer MEP (Loss Measurement Reply). , LMR) Packets are counted according to the priority of the packets. In the prior art, the priority of the message after being forwarded by the intermediate device A change has occurred, and the MEP cannot correctly identify the response message. Therefore, the result of the packet loss statistics is inaccurate.
LMM和 LMR两种报文的协议数据单元( Protocol Date Unit, PDU ) 的 封装格式分别如图 2a和 2b所示。 其中, 通常取值为 0的 "标记" 字段在当前 没有使用, 是保留字段。 该字段的长度为一个字节。 将原始优先级写入报文的 "标记" 字段中。 具体的, 源端 MEP可以在生成 发送报文, 如 LMM报文时, 在 LMM报文的标记字段写入原始优先级, 而对 等 MEP收到该 LMM报文后,可以先提取出 LMM报文的标记字段写入的原始 优先级, 然后生成应答报文, 即 LMR报文, 将所述原始优先级写入 LMR报 文的标记字段中, 则源端 MEP收到 LMR报文后, 就可以判断 LMR报文中携 带的报文标识和 LMM报文携带的报文标识是否相同, 如果相同, 说明该 LMR报文是对应于该 LMM报文的应答报文。 在上述整个过程中, 标记字段 不会被修改, 可以保证 MEP能够通过识别标记字段写入的原始优先级来识 别应答报文。 该种方式, 不需要修改协议标准, 与现有的标准兼容, 易于 实施。  The encapsulation format of the Protocol Data Unit (PDU) of the LMM and LMR packets is shown in Figure 2a and 2b, respectively. The "tag" field, which usually takes a value of 0, is not currently used and is a reserved field. The length of this field is one byte. The original priority is written to the "tag" field of the message. Specifically, the source MEP may write the original priority in the tag field of the LMM packet when generating the sending packet, such as the LMM packet, and the peer MEP may first extract the LMM packet after receiving the LMM packet. The original priority of the tag field is written, and then the response message, that is, the LMR message, is generated, and the original priority is written in the tag field of the LMR message, and the source MEP receives the LMR message. It can be determined whether the packet identifier carried in the LMR packet is the same as the packet identifier carried in the LMM packet. If the identifier is the same, the LMR packet is a response packet corresponding to the LMM packet. In the above process, the tag field will not be modified, and the MEP can be guaranteed to recognize the response message by identifying the original priority written by the tag field. In this way, there is no need to modify the protocol standard, it is compatible with existing standards, and it is easy to implement.
另一种实现方式中, 可以改进标准, 对 ITU-T Y.1731标准中定义的 4艮文 始优先级写入报文的扩展字段中。 例如图 2c所示, 可以将报文的第 5-8这四 个字节作为扩展字段, 用来携带报文标识。 当然, 扩展字段的长度可以根 据实际需要决定, 不限于四个字节。  In another implementation, the standard can be improved by writing the 4 艮 initial priority defined in the ITU-T Y.1731 standard into the extension field of the message. For example, as shown in Figure 2c, the four bytes of packets 5-8 can be used as extension fields to carry the packet identifier. Of course, the length of the extended field can be determined according to actual needs, and is not limited to four bytes.
以上, 本实施例以 ITU-T Y.1731标准建议的以太网 OAM为例, 说明了 如何以原始优先级为 ^艮文标识, 如何将 文标识携带在发送 文和应答才艮 文中, 进而识别应答报文, 解决了现有技术中因优先级变化导致无法识别 应答报文的问题。 实施例三、  The above embodiment uses the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example to illustrate how to use the original priority as the identifier of the text, and how to carry the identifier in the sent text and the response, and then identify The response message solves the problem that the response message cannot be identified due to the priority change in the prior art. Embodiment 3
本实施例仍以 ITU-T Y.1731标准建议的以太网 OAM为例进行说明。 可选地, 在一种实施例中, 在生成发送 文时, 为发送 文生成一个 序列号, 以该序列号作为 ^艮文标识; 可选地, 在一种实施例中, 可以将作 为报文标识的序列号写入报文的保留字段, 例如 "标记" 字段中; 但是, 由于 "标记" 字段的长度只有一个字节, 表示的值最大只能到 256, 而序列 号^ ί艮可能会超过 256, 因此, 可选地, 在另一种实施例中, 可以改进标准, 写入报文的扩展字段中。 扩展报文的方式可以参考前述方法, 例如图 2c所 示, 可以将报文的第 5-8这四个字节作为扩展字段, 用来携带报文标识。 当 然, 扩展字段的长度可以根据实际需要决定, 不限于四个字节。 This embodiment is still described by taking the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example. Optionally, in an embodiment, when generating the sent message, generating a serial number for the sent message, and using the serial number as the identifier; optionally, in an embodiment, The reserved number of the message is written to the reserved field of the message, for example in the "Mark"field; however, since the "Mark" field is only one byte in length, the value represented can only be up to 256, and the serial number ^ ί艮 may exceed 256, so, alternatively, in another embodiment, the standard may be improved and written into the extension field of the message. For the method of extending the packet, refer to the foregoing method. For example, as shown in FIG. 2c, the four bytes of the fifth to eighth of the packet may be used as an extension field to carry the packet identifier. Of course, the length of the extended field can be determined according to actual needs, and is not limited to four bytes.
对于相同的统计或测量对象, 第一设备生成的发送 4艮文采用相同的序 列号, 这些发送报文的应答报文中也将携带相同的序列号, 第一设备可以 根据序列号识别应答报文与发送报文的对应关系。  For the same statistic or measurement object, the first device generates the same sequence number, and the response message of the sent message will also carry the same sequence number. The first device can identify the response message according to the sequence number. Correspondence between the text and the sent message.
以上, 本实施例以 ITU-T Y.1731标准建议的以太网 OAM为例, 说明了 如何以序列号为报文标识, 如何将报文标识携带在发送报文和应答报文中, 进而识别应答报文, 解决了现有技术中因优先级变化导致无法识别应答报 文的问题。 实施例四、  The above embodiment is based on the Ethernet OAM proposed by the ITU-T Y.1731 standard. It shows how to use the sequence number as the packet identifier. How to carry the packet identifier in the sending packet and the response packet, and then identify The response message solves the problem that the response message cannot be identified due to the priority change in the prior art. Embodiment 4
本实施例仍以 ITU-T Y.1731标准建议的以太网 OAM为例进行说明。 事实上, 在网络规划的时候, 可以了解到哪些优先级最终会映射到同 一个优先级上, 因此, 本实施例提出报文组(Group ) 的概念, 可以在生成 发送报文时, 将后续会被中间设备映射为相同优先级的两个以上发送报文 划分到一个 4艮文组中, 为每个 4艮文组确定一个 4艮文标识, 在一个 4艮文组内 的所有测量报文中写入相同的报文标识。 进行丟包统计时, 可以按报文组 进行统计, 一个报文组共用一个计数器, 对同一报文组的发送报文和应答 才艮文统一进行统计。  This embodiment is still described by taking the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example. In fact, during the network planning, it can be understood that the priorities are finally mapped to the same priority. Therefore, the concept of the group is proposed in this embodiment, and may be followed when generating the sent packet. Two or more transmitted messages that are mapped to the same priority by the intermediate device are divided into a group of 4 艮 , , , 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定 确定The same message identifier is written in the text. When packet loss statistics are performed, statistics can be performed according to the packet group. A packet group shares a counter, and the packets sent and responded to the same packet group are uniformly counted.
可以为每个报文组生成一个序列号作为该报文组的报文标识, 该报文 组中的各个发送报文中都写入该序列号。 生成和写入序列号的方式参考实 施例三。  A sequence number can be generated for each packet group as the packet identifier of the packet group, and the serial number is written in each of the sent packets in the packet group. Refer to Example 3 for how to generate and write a serial number.
也可以采用一个报文组中某一个发送报文的优先级, 或多个发送报文 的优先级的组合, 作为该报文组的报文标识。 生成和写入该种报文标识的 方式参考实施例二。 可选地, 还可以以序列号和发送报文的优先级的组合, 作为报文组的 才艮文标识。 例如, 可以为每个 ^艮文组生成一个序列号, 将该序列号和该才艮 文组所有发送报文的优先级的组合, 作为该报文组的报文标识。 The priority of one of the packet groups, or the combination of the priorities of the multiple packets, may be used as the packet identifier of the packet. For the manner of generating and writing the identifier of the packet, refer to Embodiment 2. Optionally, the combination of the sequence number and the priority of the sent message may also be used as the identifier of the message group. For example, a sequence number may be generated for each group, and the combination of the sequence number and the priority of all the packets sent by the group is used as the message identifier of the packet.
以上, 本实施例以 ITU-T Y.1731标准建议的以太网 OAM为例, 说明了 如何划分报文组, 按报文组确定报文标识, 进而识别应答报文, 解决了现 有技术中因优先级变化导致无法识别应答报文的问题。  The above embodiment uses the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example to describe how to divide a packet group, determine the packet identifier according to the packet group, and then identify the response packet, which solves the prior art. The problem of unrecognized response messages due to a change in priority.
以上实施例二至四是以 ITU-T Y.1731标准建议的以太网 OAM为例进行 说明的, 解决的是因优先级变化导致无法识别应答报文的问题, 但需要说 明的是, 本发明实施例公开的技术方案适用于所有以太网 OAM中需要识别 和确定发送 文和应答 ^艮文的对应关系的应用场景, 也不限于解决以优先 级为关键字进行报文识别的场景。  The above embodiments 2 to 4 are described by taking the Ethernet OAM proposed by the ITU-T Y.1731 standard as an example, and solving the problem that the response message cannot be identified due to the change of the priority, but it should be noted that the present invention The technical solution disclosed in the embodiment is applicable to an application scenario in which all the Ethernet OAMs need to identify and determine the correspondence between the sent message and the response message, and is not limited to solving the scenario in which the message is identified by using the priority as the key.
实施例五、  Embodiment 5
请参考图 3 , 本发明实施例提供一种识别应答报文的方法, 包括: Referring to FIG. 3, an embodiment of the present invention provides a method for identifying a response message, including:
301、 第二设备接收第一设备发出的发送报文, 所述发送报文的保留字 段或扩展字段中携带有第一报文标识。 301. The second device receives the sending packet sent by the first device, where the reserved field or the extended field of the sending packet carries the first packet identifier.
为了能够识别发送报文和后续收到的应答报文的对应关系, 源端的第 一设备在发出发送报文时, 可以在发送报文中携带报文标识, 将携带报文 标识的发送报文发送给接收端的第二设备。 第一设备和第二设备之间可以 没有中间设备, 也可以有一个或两个以上中间设备。 为方便描述, 后续将 发送报文中携带的报文标识称为第一报文标识。  In order to be able to identify the correspondence between the sent packet and the subsequent received response packet, the first device at the source end can carry the packet identifier in the sent packet, and the packet carrying the packet identifier is sent. The second device sent to the receiving end. There may be no intermediate device between the first device and the second device, and there may be one or more intermediate devices. For the convenience of description, the packet identifier carried in the sent packet is referred to as the first packet identifier.
302、 生成应答报文, 将所述第一报文标识携带在所述应答报文的保留 字段或扩展字段中, 将所述应答报文发送给第一设备。  302. Generate a response packet, and send the first packet identifier to a reserved field or an extension field of the response packet, and send the response packet to the first device.
接收端的第二设备收到来自第一设备的发送报文后, 从发送报文提取 出携带的报文标识, 生成应答报文, 将提取出的报文标识携带在应答报文 中, 然后发送携带该报文标识的应答报文给第一设备。 为方便描述, 后续, 将应答报文中携带的报文标识称为第二报文标识。  After receiving the sent packet from the first device, the second device at the receiving end extracts the carried packet identifier from the sent packet, generates a response packet, carries the extracted packet identifier in the response packet, and then sends the packet The response message carrying the message identifier is sent to the first device. For convenience of description, the packet identifier carried in the response packet is referred to as a second packet identifier.
这样, 第一设备收到第二设备返回的应答报文后, 然后就可以根据报 文标识判断该应答报文和发送报文的对应关系了。 如果某个应答报文的第 二报文标识与某个发送报文的第一报文标识相同, 则, 可以确认该应答报 文是与该发送报文对应的应答报文。 In this way, after receiving the response message returned by the second device, the first device may determine the correspondence between the response message and the sent message according to the message identifier. If the second packet identifier of a response packet is the same as the first packet identifier of a certain packet, the response packet can be confirmed. The text is a response message corresponding to the sent message.
综上, 本发明实施例提供了一种识别应答报文的方法, 该方法通过在 发送报文和应答报文中携带报文标识的技术方案, 使得可以通过比较报文 标识来识别与发送报文对应的应答报文。 实施例六、  In summary, the embodiment of the present invention provides a method for identifying a response message, which is a technical solution for carrying a message identifier in a sending message and a response message, so that the message can be identified and sent by comparing the message identifier. The response message corresponding to the text. Embodiment 6
请参考图 4, 本发明实施例提供一种识别应答报文的设备, 包括: 收发模块 401 , 用于发出发送报文, 所述发送报文的保留字段或扩展字 段中携带有第一报文标识; 接收应答报文, 所述应答报文的保留字段或扩 展字段中携带有第二报文标识;  Referring to FIG. 4, an embodiment of the present invention provides a device for identifying a response packet, including: a transceiver module 401, configured to send a packet, where a reserved field or an extension field of the packet carries a first packet Receiving a response message, where the reserved field or the extension field of the response message carries a second message identifier;
判断模块 402 , 用于将所述第一报文标识和所述第二报文标识进行比 文。  The determining module 402 is configured to compare the first message identifier and the second packet identifier.
可选地, 所述收发模块可以包括:  Optionally, the transceiver module may include:
第一标识单元, 用于获取所述发送报文的优先级作为第一报文标识, 将所述优先级写入所述发送报文的保留字段或者扩展字段中;  a first identifier unit, configured to acquire a priority of the sent packet as a first packet identifier, and write the priority into a reserved field or an extended field of the sent packet;
或者,  Or,
第二标识单元, 用于为所述发送报文生成一个序列号作为第一报文标 识, 将所述序列号写入所述发送报文的扩展字段中;  a second identifier unit, configured to generate a sequence number for the sent packet as a first packet identifier, and write the sequence number into an extended field of the sent packet;
或者,  Or,
第三标识单元, 用于将后续会被中间设备映射为相同优先级的两个以 上发送报文划分到一个报文组中, 为每个报文组确定一个第一报文标识, 在一个报文组内的所有测量报文中写入相同的第一报文标识。  a third identifier unit, configured to divide two or more transmission packets that are subsequently mapped to the same priority by the intermediate device into one packet group, and determine a first packet identifier for each packet group, in a report The same first message identifier is written in all measurement messages in the group.
其中, 所述判断模块 402, 具体用于将所述第一报文标识和所述第二报 文标识进行比较, 如果所述第一报文标识和所述第二报文标识相同, 则确 认所述应答报文是否是与所述发送报文对应的应答报文。  The determining module 402 is specifically configured to compare the first packet identifier with the second packet identifier, and if the first packet identifier and the second packet identifier are the same, Whether the response message is a response message corresponding to the sent message.
综上, 本发明实施例提供了一种识别应答报文的设备, 该设备可以在 发送报文中携带报文标识, 提取应答报文中携带的报文标识, 通过比较报 文标识来识别与发送报文对应的应答报文, 解决了现有技术中因优先级变 化导致无法识别应答报文的问题。 实施例六、 In summary, the embodiment of the present invention provides a device for identifying a response packet, where the device can carry a packet identifier in the sent packet, and extract the packet identifier carried in the response packet, and identify and match the packet identifier by comparing the packet identifier. The response packet corresponding to the packet is sent, which solves the problem that the response packet cannot be identified due to the priority change in the prior art. Embodiment 6
请参考图 5 , 本发明实施例提供一种识别应答报文的设备, 包括: 接收模块 501 , 用于接收第一设备发出的发送报文, 所述发送报文的保 留字段或扩展字段中携带有第一报文标识;  Referring to FIG. 5, an embodiment of the present invention provides an apparatus for identifying a response message, including: a receiving module 501, configured to receive a sending message sent by a first device, where the sending field is carried in a reserved field or an extended field. Have the first message identifier;
生成模块 502, 用于生成应答报文, 将所述第一报文标识携带在所述应 答报文的保留字段或扩展字段中;  The generating module 502 is configured to generate a response message, where the first message identifier is carried in a reserved field or an extended field of the response message;
发送模块 503 , 用于将所述应答报文发送给第一设备。  The sending module 503 is configured to send the response message to the first device.
综上, 本发明实施例提供了一种识别应答报文的设备, 该设备可以提 取来自发送端设备的发送报文中携带的报文标识, 将该报文标识携带在应 答报文中返回给发送端设备, 以便发送端设备通过比较报文标识来识别与 发送报文对应的应答报文, 解决了现有技术中因优先级变化导致无法识别 应答报文的问题。 本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分 步骤是可以通过程序来指令相关的硬件来完成, 该程序可以存储于一计算 机可读存储介质中, 存储介质可以包括: 只读存储器、 随即读取存储器、 磁盘或光盘等。  In summary, the embodiment of the present invention provides a device for identifying a response packet, where the device can extract the packet identifier carried in the sent packet from the sending device, and carry the packet identifier in the response packet and return it to the response packet. The sender device is configured to identify the response packet corresponding to the sent packet by comparing the packet identifier, which solves the problem that the response packet cannot be identified due to the priority change in the prior art. A person skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware. The program can be stored in a computer readable storage medium. The storage medium can include: Read-only memory, read-only memory, disk or disc, and more.
以上对本发明实施例所提供的识别应答报文的方法及设备进行了详细 介绍, 但以上实施例的说明只是用于帮助理解本发明的方法及其核心思想, 不应理解为对本发明的限制。 本技术领域的技术人员在本发明揭露的技术 范围内, 可轻易想到的变化或替换, 都应涵盖在本发明的保护范围之内。  The method and the device for identifying the response message provided by the embodiment of the present invention are described in detail above. However, the description of the above embodiments is only for helping to understand the method and the core idea of the present invention, and should not be construed as limiting the present invention. Those skilled in the art will be able to devise variations or substitutions within the scope of the present invention within the scope of the present invention.

Claims

权利要求 Rights request
1、 一种识别应答 文的方法, 其特征在于, 包括: A method for identifying a response message, comprising:
第一设备发出发送报文, 所述发送报文的保留字段或扩展字段中携带 有第一 ^艮文标识;  The first device sends a sending message, where the reserved field or the extended field of the sent message carries the first identifier;
接收应答报文 , 所述应答报文的保留字段或扩展字段中携带有第二报 文标识;  Receiving a response message, where the reserved field or the extension field of the response message carries a second message identifier;
将所述第一报文标识和所述第二报文标识进行比较, 根据比较结果判 断所述应答报文是否是与所述发送报文对应的应答报文。  Comparing the first packet identifier with the second packet identifier, and determining, according to the comparison result, whether the response packet is a response packet corresponding to the sent packet.
2、 根据权利要求 1所述的方法, 其特征在于, 所述第一设备发出发送 报文, 所述发送报文中携带有第一报文标识包括:  The method according to claim 1, wherein the first device sends a sending message, where the first message carrying the first message identifier includes:
第一设备生成发送报文, 获取所述发送报文的优先级作为第一报文标 识, 将所述优先级写入所述发送报文的保留字段或者扩展字段中, 发出携 带优先级的所述发送报文。  The first device generates a sending packet, and obtains a priority of the sent packet as a first packet identifier, and writes the priority into a reserved field or an extended field of the sent packet, and sends a priority carrying identifier. Send a message.
3、 根据权利要求 1所述的方法, 其特征在于, 所述第一设备发出发送 报文, 所述发送报文中携带有第一报文标识包括:  The method according to claim 1, wherein the first device sends a sending message, where the sending the first message identifier in the sending message includes:
第一设备生成发送报文, 为所述发送报文生成一个序列号作为第一报 文标识, 将所述序列号写入所述发送报文的扩展字段中, 发出携带序列号 的所述发送报文。  The first device generates a sending message, generates a sequence number for the sending message as the first message identifier, writes the sequence number into an extended field of the sending message, and sends the sending with the serial number Message.
4、 根据权利要求 1所述的方法, 其特征在于, 所述第一设备发出发送 报文, 所述发送报文中携带有第一报文标识包括:  The method according to claim 1, wherein the first device sends a sending message, where the first message carrying the first message identifier includes:
第一设备生成发送报文, 将后续会被中间设备映射为相同优先级的两 个以上发送报文划分到一个报文组中, 为每个报文组确定一个第一报文标 识, 在一个报文组内的所有测量报文中写入相同的第一报文标识, 发出携 带所述第一报文标识的所述发送报文。  The first device generates a transmission packet, and then divides two or more transmission packets that are subsequently mapped to the same priority by the intermediate device into one packet group, and determines a first packet identifier for each packet group. The same first packet identifier is written in all the measurement packets in the packet group, and the sent packet carrying the first packet identifier is sent.
5、 根据权利要求 4所述的方法, 其特征在于, 所述为每个报文组确定 一个第 文标识包括:  The method according to claim 4, wherein the determining, for each packet group, a text identifier comprises:
为每个报文组生成一个序列号作为该报文组的第一报文标识, 或者, 以每个报文组中的一个或多个发送报文的优先级作为该报文组的第一报文 标识。 A sequence number is generated for each packet group as the first packet identifier of the packet group, or the priority of one or more packets in each packet group is used as the first packet group. Message ID.
6、 根据权利要求 1所述的方法, 其特征在于, 所述将所述第一报文标 识和所述第二报文标识进行比较, 根据比较结果判断所述应答报文是否是 与所述发送报文对应的应答报文包括: The method according to claim 1, wherein the comparing the first message identifier with the second packet identifier, and determining, according to a comparison result, whether the response packet is The response packet corresponding to the sent packet includes:
将所述第一报文标识和所述第二报文标识进行比较, 如果所述第一报 文标识和所述第二报文标识相同, 则确认所述应答报文是否是与所述发送 报文对应的应答报文。  Comparing the first packet identifier with the second packet identifier, and if the first packet identifier and the second packet identifier are the same, confirm whether the response packet is sent with the identifier The response packet corresponding to the packet.
7、 一种识别应答 文的方法, 其特征在于, 包括:  7. A method for identifying a response message, comprising:
第二设备接收第一设备发出的发送报文, 所述发送报文的保留字段或 扩展字段中携带有第一报文标识;  The second device receives the sending packet sent by the first device, where the reserved field or the extended field of the sending packet carries the first packet identifier;
生成应答报文, 将所述第一报文标识携带在所述应答报文的保留字段 或扩展字段中, 将所述应答报文发送给第一设备。  Generating a response packet, and the first packet identifier is carried in a reserved field or an extension field of the response packet, and the response packet is sent to the first device.
8、 一种识别应答 文的设备, 其特征在于, 包括:  8. A device for identifying a response message, comprising:
收发模块, 用于发出发送报文, 所述发送报文的保留字段或扩展字段 中携带有第一报文标识; 接收应答报文, 所述应答报文的保留字段或扩展 字段中携带有第二报文标识;  a transceiver module, configured to send a message, where the reserved field or the extension field of the sent message carries a first message identifier; and receives a response message, where the reserved field or extension field of the response message carries Second message identification;
判断模块, 用于将所述第一报文标识和所述第二报文标识进行比较,  a determining module, configured to compare the first packet identifier with the second packet identifier,
9、 根据权利要求 8所述的设备, 其特征在于, 所述收发模块包括: 第一标识单元, 用于获取所述发送报文的优先级作为第一报文标识, 将所述优先级写入所述发送报文的保留字段或者扩展字段中。 The device according to claim 8, wherein the transceiver module comprises: a first identifier unit, configured to acquire a priority of the sent packet as a first packet identifier, and write the priority Enter the reserved field or extension field of the sent message.
10、 根据权利要求 8所述的设备, 其特征在于, 所述收发模块包括: 第二标识单元, 用于为所述发送报文生成一个序列号作为第一报文标 识, 将所述序列号写入所述发送报文的扩展字段中。  The device according to claim 8, wherein the transceiver module comprises: a second identifier unit, configured to generate a sequence number for the sent packet as the first packet identifier, and the serial number is Write to the extension field of the sent message.
11、 根据权利要求 8所述的设备, 其特征在于, 所述收发模块包括: 第三标识单元, 用于将后续会被中间设备映射为相同优先级的两个以 上发送报文划分到一个报文组中, 为每个报文组确定一个第一报文标识, 在一个报文组内的所有测量报文中写入相同的第一报文标识。  The device according to claim 8, wherein the transceiver module comprises: a third identifier unit, configured to divide two or more transmission messages that are subsequently mapped by the intermediate device to the same priority into one report In the group, a first packet identifier is determined for each packet group, and the same first packet identifier is written in all measurement packets in a packet group.
12、 根据权利要求 8所述的设备, 其特征在于:  12. Apparatus according to claim 8 wherein:
所述判断模块, 具体用于将所述第一报文标识和所述第二报文标识进 行比较, 如果所述第一报文标识和所述第二报文标识相同, 则确认所述应 答报文是否是与所述发送报文对应的应答报文。 The determining module is configured to compare the first packet identifier with the second packet identifier, and if the first packet identifier and the second packet identifier are the same, confirm the Whether the message is a response message corresponding to the sent message.
13、 一种识别应答 文的设备, 其特征在于, 包括:  13. A device for identifying a response message, comprising:
接收模块, 用于接收第一设备发出的发送报文, 所述发送报文的保留 字段或扩展字段中携带有第一报文标识;  a receiving module, configured to receive a sending packet sent by the first device, where the reserved field or the extended field of the sent packet carries the first packet identifier;
生成模块, 用于生成应答报文, 将所述第一报文标识携带在所述应答 才艮文的保留字段或扩展字段中;  a generating module, configured to generate a response message, and carry the first message identifier in a reserved field or an extended field of the response message;
发送模块, 用于将所述应答报文发送给第一设备。  And a sending module, configured to send the response message to the first device.
PCT/CN2012/079243 2011-11-29 2012-07-27 Method and device for identifying response message WO2013078873A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110387521.3 2011-11-29
CN201110387521.3A CN102404152B (en) 2011-11-29 2011-11-29 Method and equipment for identifying response messages

Publications (1)

Publication Number Publication Date
WO2013078873A1 true WO2013078873A1 (en) 2013-06-06

Family

ID=45885967

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/079243 WO2013078873A1 (en) 2011-11-29 2012-07-27 Method and device for identifying response message

Country Status (2)

Country Link
CN (1) CN102404152B (en)
WO (1) WO2013078873A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016123892A1 (en) * 2015-02-06 2016-08-11 中兴通讯股份有限公司 Packet loss determination processing, determination method, and apparatus

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404152B (en) * 2011-11-29 2014-06-04 华为技术有限公司 Method and equipment for identifying response messages
CN106027329A (en) * 2016-05-16 2016-10-12 乐视控股(北京)有限公司 Push service testing method and device
CN108156050A (en) * 2017-11-28 2018-06-12 盛科网络(苏州)有限公司 Seamless bidirectional forwarding detection (BFD) method and device
CN112565295A (en) * 2020-12-24 2021-03-26 中国电子科技集团公司第二十研究所 Instruction response optimization method based on sequential coding

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533108A (en) * 2003-03-21 2004-09-29 ��Ϊ�������޹�˾ Method for realizing dynamic gateway load sharing and backup
CN101425891A (en) * 2008-12-09 2009-05-06 中兴通讯股份有限公司 Time synchronization method, system and customer terminal
CN101507317A (en) * 2006-06-20 2009-08-12 株式会社Ntt都科摩 Wireless communication device and wireless communication method used for mobile communication system
CN101686199A (en) * 2009-07-20 2010-03-31 中兴通讯股份有限公司 Method, device and system for processing control message in Ethernet protection system
CN102404152A (en) * 2011-11-29 2012-04-04 华为技术有限公司 Method and equipment for identifying response messages

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7225382B2 (en) * 2004-05-04 2007-05-29 Telefonakiebolaget Lm Ericsson (Publ) Incremental redundancy operation in a wireless communication network
CN101582756B (en) * 2008-05-14 2012-05-09 北京中电华大电子设计有限责任公司 Method for realizing immediate block reply mechanism of wireless local area network
CN102186221B (en) * 2011-04-25 2013-11-20 北京星网锐捷网络技术有限公司 Method and device for updating routing table item

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1533108A (en) * 2003-03-21 2004-09-29 ��Ϊ�������޹�˾ Method for realizing dynamic gateway load sharing and backup
CN101507317A (en) * 2006-06-20 2009-08-12 株式会社Ntt都科摩 Wireless communication device and wireless communication method used for mobile communication system
CN101425891A (en) * 2008-12-09 2009-05-06 中兴通讯股份有限公司 Time synchronization method, system and customer terminal
CN101686199A (en) * 2009-07-20 2010-03-31 中兴通讯股份有限公司 Method, device and system for processing control message in Ethernet protection system
CN102404152A (en) * 2011-11-29 2012-04-04 华为技术有限公司 Method and equipment for identifying response messages

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016123892A1 (en) * 2015-02-06 2016-08-11 中兴通讯股份有限公司 Packet loss determination processing, determination method, and apparatus
CN105991357A (en) * 2015-02-06 2016-10-05 中兴通讯股份有限公司 Packet loss determination processing and determining methods and packet loss determination processing and determining devices

Also Published As

Publication number Publication date
CN102404152B (en) 2014-06-04
CN102404152A (en) 2012-04-04

Similar Documents

Publication Publication Date Title
WO2018210213A1 (en) Method and device for implementing ioam packaging and storage medium
EP3139560B1 (en) Packet processing method, device and computer storage medium
WO2019033857A1 (en) Packet control method and network device
WO2023283902A1 (en) Message transmission method and apparatus
CN102273136B (en) Method and apparatus for detecting multi-service performance in tunnel
US11272396B2 (en) Frame aggregation method, network setting frame sending method, and device
WO2018210225A1 (en) Method and device for automatically implementing ioam encapsulation, and storage medium
US9515919B2 (en) Method and apparatus for protection switching in packet transport system
WO2016078312A1 (en) Single board testing method and device
WO2013078873A1 (en) Method and device for identifying response message
US20140140206A1 (en) System and Method for Credit-Based Link Level Flow Control
CN110381071B (en) Message transmission method and device and sender equipment
US20150036510A1 (en) Method and device for measuring ethernet performance
US20180048582A1 (en) Flow control of network device
WO2021088813A1 (en) Packet encapsulating method and apparatus, and packet decapsulating method and apparatus
WO2016082456A1 (en) Board, board management method and system, and storage medium
US20230300051A1 (en) In-band Edge-to-Edge Round-Trip Time Measurement
WO2020104005A1 (en) Signalling of dejittering buffer capabilities for tsn integration
US11171860B2 (en) Method for obtaining target transmission route, related device, and system
EP4030810A1 (en) Method and device for confirming in-situ flow information telemetry capability
WO2022247462A1 (en) Traffic simulation method for digital twin network and digital twin network
WO2022048466A1 (en) Operation administration and maintenance (oam) packet processing method and device
WO2019015487A1 (en) Data retransmission method, rlc entity and mac entity
WO2019134607A1 (en) Information processing method and device, communication apparatus, and computer readable storage medium
WO2016202025A1 (en) Trap message processing method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12854468

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12854468

Country of ref document: EP

Kind code of ref document: A1