WO2013023509A1 - 一种报文收发方法、装置和系统 - Google Patents

一种报文收发方法、装置和系统 Download PDF

Info

Publication number
WO2013023509A1
WO2013023509A1 PCT/CN2012/078595 CN2012078595W WO2013023509A1 WO 2013023509 A1 WO2013023509 A1 WO 2013023509A1 CN 2012078595 W CN2012078595 W CN 2012078595W WO 2013023509 A1 WO2013023509 A1 WO 2013023509A1
Authority
WO
WIPO (PCT)
Prior art keywords
control word
packet
current
message
current packet
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2012/078595
Other languages
English (en)
French (fr)
Inventor
周佳
钱勇
王宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to EP12823380.6A priority Critical patent/EP2736202B1/en
Publication of WO2013023509A1 publication Critical patent/WO2013023509A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/68Pseudowire emulation, e.g. IETF WG PWE3

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a packet receiving and transmitting method, apparatus, and system. Background technique
  • MPLS Multi-Protocol Label Switching
  • An edge device of the MPLS PSN Packet Switched Network
  • the intermediate device only performs label forwarding.
  • the payload in the packet is not modified in the MPLS forwarding process, and the payload is a public access MAC (Multiple Access Channel), a public network (Virtual Local Area Network), and The part of the tag, and the payload may be some random value.
  • the RFC (Request For Comment) 4385 proposes the concept of a control word.
  • the control word is 4 bytes inserted after the bottom label of the stack, including the type of the message type (4). Bit), tag field (4 bits), slice field (2 bits), length field (6 bits), and sequence number field (16 bits) are used to prevent the random payload from being mismatched into an IP packet, thus causing the error to go. ECMP processing flow.
  • Some of the fields included in this control word also have the following features:
  • FIG. 2 it is a schematic diagram of an application scenario in which a packet is transmitted in the related art, and multiple PWs carried in the same tunnel between two terminals, such as PW1, PW2, and PW3, may be required to carry the control word encapsulation of PW1 and PW3. Mode, and PW2 does not need to be turned on. In this case, if you use a control word based on global on and off, you cannot meet both of the above requirements.
  • the processing error will be caused.
  • the following is the MPLS PSN scenario: If the peer device is enabled with the control word, the local device receives the MPLS packet carrying control. If the control word is not enabled on the local device, the control word in the packet will not be recognized, and the payload will be used as the payload part of the packet, causing the forwarding error. Otherwise, it is sent from the local device to the pair. The packet of the end device does not carry the control word information, and the peer device has the control word enabled. The peer end will treat the 4 bytes of the PW label in the past MPLS packet as the control word. Summary of the invention
  • the embodiment of the invention provides a packet sending and receiving method, device and system, which can select a control word to be turned on or off according to a specific scenario, and correspondingly process the packet according to whether the control word is carried, thereby reducing the error handling of the packet. Probability.
  • the embodiment of the invention provides a method for sending a message, including:
  • the step of adding the control word to the current message includes: adding a corresponding control word to the current message according to the type of the current message.
  • An embodiment of the present invention provides a packet receiving method, including:
  • the current message is processed according to the type of the current message.
  • the step of processing the current packet according to the type of the current packet includes: deleting, according to the type of the control word carried in the current packet, when the current packet is a data packet, deleting Transmitting the processed data message after the control word;
  • the method further includes: determining, according to the control word identifier in the index label attribute table, that the current packet does not carry the control word, and directly forwards the current packet.
  • An embodiment of the present invention provides a packet sending apparatus, including: an obtaining module and a first processing module, where
  • the obtaining module is configured to: obtain the export encapsulation table information corresponding to the pseudowire PW label; the first processing module is configured to: determine, according to the control word identifier in the egress encapsulation table information, that the control packet is added to the current packet Adding the control word to the current message and transmitting.
  • the first processing module is further configured to: add the corresponding control word to the current message according to the type of the current message when the control word is added to the current message.
  • An embodiment of the present invention provides a packet receiving apparatus, including: a parsing module, a searching module, and a second processing module, where
  • the parsing module is configured to: parse the received current packet
  • the searching module is configured to: search for a corresponding index label attribute table according to the pseudo-line PW label information of the current packet obtained by the parsing;
  • the second processing module is configured to: after determining that the current packet carries a control word according to the control word identifier in the index label attribute table, processing the current packet according to the type of the current packet.
  • the second processing module is further configured to: determine, according to the type of the control word that is carried in the current packet, that the current packet is a data packet, The data packet is processed according to the type of the control word carried in the current packet, and when the current packet is a detection packet, the detection packet is processed.
  • the second processing module is further configured to: after determining that the current packet does not carry the control word, directly forward the current packet.
  • the embodiment of the present invention provides a packet sending and receiving system, including: a packet sending end and a message receiving end;
  • the packet sending end is configured to: obtain the egress encapsulation table information corresponding to the pseudowire PW label; and after determining to add the control word to the current packet according to the control word identifier in the egress encapsulation table information, in the current packet Adding the control word and sending it;
  • the packet receiving end is configured to: parse the received current packet; and search for a corresponding index label attribute table according to the pseudowire PW label information of the current packet obtained by parsing; according to the index label attribute table
  • the control word identifier determines that the current message carries the control word, and processes the current message according to the type of the current message.
  • An embodiment of the present invention provides a method, a device, and a system for sending and receiving a message, which are used to obtain an egress package table information corresponding to a PW label of a pseudowire; and determine, according to the control word identifier in the egress package table information, a current message After the control word is added, the control word is added and sent in the current text; the received current message is parsed; and the corresponding index label attribute table is searched according to the PW label information of the current line obtained by the parsing; The control word identifier in the index label attribute table determines that the current packet carries the control word, and processes the current packet according to the type of the current packet.
  • the method, device, and system for sending and receiving a message according to the embodiment of the present invention use a control word identifier bit corresponding to a PW label at a packet sending end, and determine whether to add a control word to the packet according to a specific situation; According to whether the packet carries the control word, the corresponding processing is performed, so that the control word can be turned on or off according to the specific scenario, and the probability of packet error processing is reduced.
  • FIG. 2 is a schematic diagram of an application scenario of transmitting a packet in the related art
  • FIG. 3 is a schematic diagram of a message receiving and receiving system in an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a method for sending a packet according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a packet receiving method according to an embodiment of the present invention
  • 6 is a schematic flowchart of a method for sending a message according to another embodiment of the present invention
  • FIG. 7 is a schematic flowchart of a packet receiving method according to another embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a message sending apparatus according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a message receiving apparatus according to an embodiment of the present invention. Preferred embodiment of the invention
  • the embodiment of the present invention provides a schematic diagram of a packet receiving and receiving system, as shown in FIG. 3, including: " ⁇ text sending end 301 and ⁇ text receiving end 302;
  • the packet sending end 301 is configured to: obtain the egress encapsulation table information corresponding to the pseudowire PW label; and after determining to add the control word to the current packet according to the control word identifier in the egress encapsulation table information, in the current report The control word is added and sent in the text;
  • the packet receiving end 302 is configured to: parse the received current packet; and search for a corresponding index label attribute table according to the pseudowire PW label information of the current packet obtained by parsing; according to the index label attribute table
  • the control word identifies that after the current message carries the control word, the current message is processed according to the type of the current message.
  • FIG. 4 it is a schematic flowchart of a packet sending method according to an embodiment of the present invention, which includes the following steps.
  • Step 401 Obtain an export encapsulation table information corresponding to the pseudowire PW label.
  • Step 402 After adding a control word to the current packet according to the control word identifier in the egress encapsulation table information, add a control word to the current packet and send the control word.
  • the egress encapsulation table information corresponding to the PW label of the pseudowire is obtained, where each PW has a unique PW label, and the PW label can be used to find the PW corresponding.
  • the information of the control encapsulation table includes information such as a control word identifier. If the control word identifier value is 1, it indicates that the PW transmitted packet needs to be encapsulated by the control word; if the control word identifier value is 0, the PW transmission is indicated. Messages do not need to be controlled Word package.
  • the corresponding control word is added to the current packet according to the type of the current packet. For example, when the current packet is a data packet, the data packet is added to the data packet.
  • a 4-byte control word and the first 4 bit values of the control word are 0.
  • a 4-byte control word is added to the detection>3 ⁇ 4 text, and the control word is before The four bit values are 1.
  • FIG. 1 For the specific structure of the control word, please refer to FIG. 1 , and details are not described herein again.
  • FIG. 5 it is a schematic flowchart of a packet receiving method according to an embodiment of the present invention, which includes the following steps.
  • Step 501 Parse the received current packet.
  • Step 502 Search for a corresponding index label attribute table according to the pseudo line PW label information of the current packet obtained by the parsing.
  • Step 503 Determine, according to the control word identifier in the index label attribute table, the current packet carrying the control word, and process the current packet according to the current packet type.
  • the packet receiving end parses the current packet, and searches for the corresponding index label attribute table according to the pseudowire PW label information obtained by the parsing; according to the index label attribute table
  • the control word identifier determines whether the current message carries the control word. For example, if the value of the control word identifier is 1, it indicates that the current packet carries a control word; if the value of the control word identifier is 0, it indicates that the current packet does not carry a control word.
  • the index label attribute table can be obtained in a local storage device, and the correspondence between the label and the PW label information needs to be established in advance.
  • the current packet is directly forwarded. If the current packet carries the control word, the current packet needs to be processed according to the current packet type. For example, according to the type of the control word carried in the current packet, when the current packet is determined as a data packet, the control is deleted. After the word is forwarded, the processed data packet is forwarded. According to the type of the control word carried in the current packet, when the current packet is detected as a detection packet, the detection packet is processed. The manner in which the data packet is forwarded and the manner in which the packet is processed does not affect the implementation of the technical solution provided by the embodiment of the present invention.
  • the control word identifier bit corresponding to the PW label is used at the packet sending end, and the control word is added to the packet according to the specific situation; According to whether the message carries the control word for corresponding processing, this can Selecting the control word on or off according to the specific scenario reduces the probability of packet mishandling.
  • the method provided by the technical solution of the present invention is described in detail below by using specific embodiments, as shown in the following figure.
  • Step 601 The packet sending end obtains the export encapsulation table information corresponding to the pseudowire PW label.
  • Step 602 Determine, according to the control word identifier in the egress package table information, whether to perform control word encapsulation for the current packet; if yes, go to step 603; if no, go to step 606.
  • Step 603 Determine the type of the current packet, if it is a data packet, perform step 604; if it is a detection packet, perform step 605; specifically, determine the type of the current packet according to the value of the packet type identifier bit, Or judge the type of the current message according to other identifiers or information.
  • Step 604 Add a 4-byte control word to the data packet, and the first 4 bit values of the control word are 0, and then perform step 606.
  • Step 605 Add a 4-byte control word to the detection message, and the first 4 bit values of the control word are 1.
  • Step 606 Send the current packet to the packet receiving end.
  • the above steps 601-606 are specific processes for sending the message to the sending end of the message.
  • the receiving end receives the current message, as shown in FIG. 7, the following steps are specifically performed.
  • Step 701 After receiving the packet, parse the pseudowire PW tag information carried in the current packet.
  • Step 702 Search for a corresponding index label attribute table according to the pseudo-line PW label information obtained by the parsing; the index label attribute table may be obtained in a local storage device, and the correspondence between the PW label information and the PW label information needs to be established in advance.
  • Step 703 Determine, according to the value of the control word identifier bit in the index tag attribute table, whether the current message carries the control word; if the control word is carried, perform step 704; if the control word is not carried, execute step 707.
  • Step 704 Determine the type of the current packet. If the packet is a detection packet, go to step 705. If the data is a packet, go to step 706.
  • Step 705 Perform corresponding processing on the detection packet.
  • Step 706 Delete the control word in the current data packet.
  • Step 707 Forward the current text.
  • the control word identifier bit corresponding to the PW label is used at the packet sending end, and the control word is added to the packet according to the specific situation; According to whether the packet carries the control word, the corresponding processing is performed, so that the control word can be turned on or off according to the specific scenario, and the probability of packet error processing is reduced.
  • an embodiment of the present invention further provides a message sending apparatus, as shown in FIG. 8, comprising: an obtaining module 801 and a first processing module 802.
  • the obtaining module 801 is configured to: obtain the egress encapsulation table information corresponding to the pseudowire PW label; the first processing module 802 is configured to: determine, according to the control word identifier in the egress encapsulation table information, that the current encapsulation is added After the word is controlled, the control word is added to the current text and sent.
  • the first processing module 802 is further configured to: add the corresponding control word to the current message according to the type of the current message when the control word is added to the current message.
  • an embodiment of the present invention further provides a message receiving apparatus, as shown in FIG. 9, including: a parsing module 901, a searching module 902, and a second processing module 903.
  • the parsing module 901 is configured to: parse the received current packet
  • the searching module 902 is configured to: search for a corresponding index label attribute table according to the pseudo line PW label information of the current packet obtained by the parsing;
  • the second processing module 903 is configured to: after determining that the current packet carries a control word according to the control word identifier in the index label attribute table, processing the current text according to the type of the current packet.
  • the second processing module 903 is further configured to: when determining that the current packet is a data packet, deleting the control word and forwarding the processed data packet according to the type of the control word carried in the current packet; And determining, according to the type of the control word carried in the current packet, that the current packet is a detection packet, and processing the detection packet.
  • the second processing module 903 is further configured to: when the current packet does not carry the control word, directly forward the current packet.
  • the message receiving and receiving method and the device provided by the embodiment of the present invention are used.
  • the control word identifier bit corresponding to the PW label is used to determine whether to add a control word to the packet according to the specific situation; at the receiving end of the packet, according to whether the packet carries the control word for corresponding processing, The control word can be turned on or off according to the specific scene, which reduces the 4 rate of packet error processing.
  • embodiments of the present invention can be a method, system, or computer program product. Therefore, the technical solutions of the present invention can be implemented in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the technical solution of the present invention can be applied to one or more computer program products implemented on a computer usable storage medium (including but not limited to a disk storage, a CD-ROM, an optical storage, etc.) in which computer usable program code is included. form.
  • a computer usable storage medium including but not limited to a disk storage, a CD-ROM, an optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the method, device, and system for sending and receiving a message according to the embodiment of the present invention can select whether to enable or disable the control word according to a specific scenario, thereby reducing the probability of packet error processing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种报文收发方法、装置和系统,该方法包括:获取伪线PW标签对应的出口封装表信息;根据出口封装表信息中的控制字标识,确定为当前报文添加控制字后,在当前报文中添加控制字并发送;解析接收的当前报文;根据解析获得的当前报文的伪线PW标签信息,查找对应的索引标签属性表;根据索引标签属性表中的控制字标识,确定当前报文携带控制字后,根据当前报文的类型对当前报文进行处理。使用该报文收发的方法、装置和系统,可以根据具体场景选择控制字的开启或关闭,降低了报文误处理的概率。

Description

一种报文收发方法、 装置和系统
技术领域
本发明涉及通信领域技术, 尤其涉及一种报文收发方法、 装置和系统。 背景技术
MPLS ( Multi-Protocol Label Switching, 多协议标签交换技术)是一种基 于标签封装和转发的技术, 它结合了 IP网络强大的三层路由功能和传统二层 网络高效的转发机制, 从而大大提高了转发效率。 MPLS 的 PSN ( Packet Switched Network, 包交换网络)的边缘设备, 对数据报文进行标签封装和解 封装并转发到最终的用户设备, 中间设备只是进行标签转发。 由于在 MPLS 转发过程中,并不修改报文中的净荷,该净荷为除公网 MAC ( Multiple Access Channel, 多址接入信道)、 公网 VLAN ( Virtual Local Area Network, 虚拟局 域网)和标签的部分,而该净荷可能是一些随机值, 当开启 ECMP ( Equal-Cost Multipath Routing , 等价多路径)功能时, 某些同一 PW ( Pseudowire , 伪线) 上的 IP ( Internet Protocol, 因特网协议)报文有可能因随机值满足了 ECMP 条件而切换到其他转发路径。
针对上述问题, RFC ( Request For Comment认证请求) 4385就提出了控 制字的概念, 如图 1所示, 该控制字为在栈底标签后插入的 4字节, 包括才艮 文类型位(4比特) 、 标记字段(4比特) 、 分片字段(2比特) 、 长度字段 ( 6比特 )和序列号字段( 16比特 )用来避免随机净荷被错误匹配为 IP报文, 从而误走了 ECMP的处理流程。该控制字中包含的一些字段还具有以下功能:
1、 用于区分数据报文(控制字前 4比特为 0000 )和检测报文(控制字 前 4比特为 0001 )
2、 用于检查是否有报文丟弃(控制字中的序列号 sequence number字段, 也可由用户自定义功能)
3、 用于标记是否是分片包(控制字中的分片 fragment字段, 也可由用户 自定义功能) 但是, 目前设备通常釆用基于全局开启和关闭的控制字功能, 无法根据 具体的场景来选择是否使能或关闭控制字。 如图 2所示, 为有关技术中传输 报文的应用场景示意图, 两个终端之间同一隧道下承载的多条 PW, 如 PW1、 PW2、 PW3 , 有可能 PW1和 PW3需要携带控制字的封装模式, 而 PW2不需 要开启。 这种情况下, 如果釆用基于全局开启和关闭的控制字, 无法做到同 时满足上述两种需求。 另外, 在与其它设备对接时, 若两边控制字模式不统 一, 会造成处理上的错误, 假设存在如下 MPLS PSN场景: 若对端设备开启 控制字, 本端设备接收到的 MPLS报文携带控制字字段, 本端设备未开启控 制字的情况下, 不会识别报文中的控制字, 而误将其作为报文携带的净荷部 分, 导致转发错误; 反之, 从本端设备发送到对端设备的报文, 未携带控制 字信息,而对端设备又开启了控制字,这样对端就会将本端发送过去的 MPLS 报文中 PW标签后的 4字节误当成控制字处理。 发明内容
本发明实施例提供了一种报文收发方法、 装置和系统, 可以根据具体场 景选择控制字的开启或关闭,并根据是否携带控制字对报文进行相应的处理, 降低了报文误处理的概率。
本发明实施例提供了一种报文发送的方法, 包括:
获取伪线 PW标签对应的出口封装表信息;
根据所述出口封装表信息中的控制字标识, 确定为当前报文添加控制字 后, 在所述当前报文中添加所述控制字并发送。
在所述当前报文中添加所述控制字的步骤包括: 根据所述当前报文的类 型, 对所述当前才艮文添加相应的所述控制字。
本发明实施例提供了一种报文接收方法, 包括:
解析接收的当前报文;
根据解析获得的所述当前报文的伪线 PW标签信息, 查找对应的索引标 签属性表;
根据所述索引标签属性表中的控制字标识, 确定所述当前报文携带控制 字后, 根据所述当前报文的类型对所述当前报文进行处理。
根据所述当前报文的类型对所述当前报文进行处理的步骤包括: 根据所述当前报文携带的所述控制字的所述类型, 确定所述当前报文为 数据报文时, 删除所述控制字后转发处理后的所述数据报文;
根据所述当前报文携带的所述控制字的所述类型, 确定所述当前报文为 检测报文时, 对所述检测报文进行处理。
所述方法还包括: 根据所述索引标签属性表中的所述控制字标识, 确定 所述当前报文未携带所述控制字后, 对所述当前报文直接进行转发。
本发明实施例提供了一种报文发送装置, 包括: 获取模块和第一处理模 块, 其中,
所述获取模块设置成: 获取伪线 PW标签对应的出口封装表信息; 所述第一处理模块设置成: 根据所述出口封装表信息中的控制字标识, 确定为当前报文添加控制字后, 在所述当前报文中添加所述控制字并发送。
所述第一处理模块还设置成: 在所述当前报文中添加所述控制字时, 根 据所述当前报文的类型, 对所述当前报文添加相应的所述控制字。 本发明实施例提供了一种报文接收装置, 包括: 解析模块, 查找模块和 第二处理模块, 其中,
所述解析模块设置成: 解析接收的当前报文;
所述查找模块设置成: 根据解析获得的所述当前报文的伪线 PW标签信 息, 查找对应的索引标签属性表;
所述第二处理模块设置成: 根据所述索引标签属性表中的控制字标识, 确定所述当前报文携带控制字后, 根据所述当前报文的类型对所述当前报文 进行处理。
所述第二处理模块还设置成: 根据所述当前报文携带的所述控制字的所 述类型, 确定所述当前报文为数据报文时, 删除所述控制字后转发处理后的 所述数据报文; 根据所述当前报文携带的所述控制字的所述类型, 确定所述 当前报文为检测报文时, 对所述检测报文进行处理。 所述第二处理模块还设置成: 确定所述当前报文未携带所述控制字后, 对所述当前报文直接进行转发。
相应的, 本发明实施例提供了一种报文收发系统, 包括: 报文发送端和 报文接收端; 其中,
所述报文发送端设置成: 获取伪线 PW标签对应的出口封装表信息; 根 据所述出口封装表信息中的控制字标识, 确定为当前报文添加控制字后, 在 所述当前报文中添加所述控制字并发送;
所述报文接收端设置成: 解析接收的所述当前报文; 根据解析获得的所 述当前报文的伪线 PW标签信息, 查找对应的索引标签属性表; 根据所述索 引标签属性表中的所述控制字标识, 确定所述当前才艮文携带所述控制字后, 根据所述当前报文的类型对所述当前报文进行处理。
本发明实施例提供了一种报文收发方法、装置和系统,用于获取伪线 PW 标签对应的出口封装表信息; 根据所述出口封装表信息中的控制字标识, 确 定为当前才艮文添加控制字后, 在所述当前 文中添加控制字并发送; 解析接 收的当前报文; 根据解析获得的所述当前报文的伪线 PW标签信息, 查找对 应的索引标签属性表; 根据所述索引标签属性表中的控制字标识, 确定所述 当前报文携带控制字后,根据所述当前报文的类型对所述当前报文进行处理。 使用本发明实施例提供的报文收发的方法、 装置和系统, 在报文发送端通过 PW标签对应的控制字标识位, 根据具体情况确定是否为报文添加控制字; 在报文接收端, 根据报文是否携带控制字进行相应的处理, 这样可以根据具 体场景选择控制字的开启或关闭, 降低了报文误处理的概率。 附图概述
图 1为相关技术中控制字的结构示意图;
图 2为相关技术中传输报文的应用场景示意图;
图 3为本发明实施例中报文收发系统的示意图;
图 4为本发明实施例中报文发送方法流程示意图;
图 5为本发明实施例中报文接收方法流程示意图; 图 6为本发明另一实施例中报文发送方法流程示意图;
图 7为本发明另一实施例中报文接收方法流程示意图;
图 8为本发明实施例中报文发送装置示意图;
图 9为本发明实施例中报文接收装置示意图。 本发明的较佳实施方式
下面结合各个附图对本发明实施例技术方案的主要实现原理、 具体实施 方式及其对应能够达到的有益效果进行详细地阐述。
为了解决相关技术存在的问题, 本发明实施例提供了一种报文收发系统 的示意图, 如图 3所示, 包括: "^文发送端 301和 ^艮文接收端 302;
其中, 报文发送端 301设置成: 获取伪线 PW标签对应的出口封装表信 息; 根据所述出口封装表信息中的控制字标识, 确定为当前报文添加控制字 后, 在所述当前报文中添加所述控制字并发送;
报文接收端 302设置成: 解析接收的所述当前报文; 根据解析获得的所 述当前报文的伪线 PW标签信息, 查找对应的索引标签属性表; 根据所述索 引标签属性表中的所述控制字标识 , 确定所述当前报文携带所述控制字后 , 根据所述当前报文的类型对所述当前报文进行处理。
下面分别对 ^艮文发送端 301和 ^艮文接收端 302处理 ^艮文的过程进行详细 说明。 如图 4所示, 为本发明实施例提供的报文发送方法流程示意图, 包括 以下步骤。
步骤 401、 获取伪线 PW标签对应的出口封装表信息。
步骤 402、 根据出口封装表信息中的控制字标识, 确定为当前报文添加 控制字后, 在当前报文中添加控制字并发送。
具体的, 通过伪线 PW发送当前^艮文时, 先获取该伪线 PW标签对应的 出口封装表信息, 其中, 每条 PW均具有唯一的 PW标签, 通过该 PW标签 即可查找到 PW对应的出口封装表信息。 该出口封装表信息中包括控制字标 识等信息, 若该控制字标识值为 1 , 则说明该 PW传输的报文需要进行控制 字封装; 若该控制字标识值为 0, 则说明该 PW传输的报文不需要进行控制 字封装。 确定为当前报文添加控制字后, 根据当前报文的类型, 对当前报文 添加相应的控制字, 例如判断当前报文为数据报文时, 在该数据报文中添加
4字节的控制字, 且该控制字的前 4个比特值为 0; 判断当前报文为检测报文 时, 在该检测 >¾文中添加 4字节的控制字, 且该控制字的前 4个比特值为 1。 控制字的具体结构请参见图 1 , 在此不再赘述。
如图 5所示, 为本发明实施例提供的报文接收方法流程示意图, 包括以 下步骤。
步骤 501、 解析接收的当前报文。
步骤 502、 根据解析获得的当前报文的伪线 PW标签信息, 查找对应的 索引标签属性表。
步骤 503、 根据索引标签属性表中的控制字标识, 确定当前报文携带控 制字后, 根据当前报文的类型对当前报文进行处理。
具体的, 报文接收端通过伪线 PW接收到当前报文后, 对其进行解析, 根据解析获得的该伪线 PW标签信息, 查找对应的索引标签属性表; 根据该 索引标签属性表中的控制字标识, 判断当前报文是否携带控制字。 例如, 该 控制字标识的值为 1时, 表明该当前报文携带控制字; 该控制字标识的值为 0 时, 表明该当前报文未携带控制字。 其中, 该索引标签属性表可以在本地 的存储设备中获得, 其与 PW标签信息的对应关系需要预先进行建立。
判断结果为当前报文未携带控制字时, 对当前报文直接进行转发。 判断 结果为当前报文携带控制字时, 需要根据当前报文的类型对当前报文进行处 理, 例如根据当前报文携带的控制字的类型, 确定当前报文为数据报文时, 删除该控制字后, 转发处理后的数据报文; 根据当前报文携带的控制字的类 型, 确定当前报文为检测报文时, 对该检测报文进行处理。 数据报文的转发 方式以及对检测报文的处理方式并不影响本发明实施例提供的技术方案的实 现。
通过上述描述, 可以看出, 使用本发明实施例提供的方法, 在报文发送 端通过 PW标签对应的控制字标识位, 根据具体情况确定是否为报文添加控 制字; 在报文接收端, 根据报文是否携带控制字进行相应的处理, 这样可以 根据具体场景选择控制字的开启或关闭, 降低了报文误处理的概率。 下面通过具体实施例对本发明技术方案提供的方法进行详细说明, 如图
6所示, 发送 文时, 具体包括以下步骤。
步骤 601、 报文发送端获取伪线 PW标签对应的出口封装表信息。
步骤 602、 根据出口封装表信息中的控制字标识, 判断是否为当前报文 进行控制字封装; 若是, 执行步骤 603; 若否, 则执行步骤 606。
步骤 603、 判断当前报文的类型, 若为数据报文, 执行步骤 604; 若为检 测报文, 执行步骤 605; 具体的, 可以根据报文类型标识位的值判断该当前 报文的类型, 或者根据其他标识或信息判断当前报文的类型。
步骤 604、 在该数据报文中添加 4字节的控制字, 且该控制字的前 4个 比特值为 0, 再执行步骤 606。
步骤 605、 在该检测报文中添加 4字节的控制字, 且该控制字的前 4个 比特值为 1。
步骤 606、 向报文接收端发送当前报文。
上述步骤 601-606为^艮文发送端发送 ^艮文的具体过程, 文接收端接收 当前报文时, 如图 7所示, 具体执行以下步骤。
步骤 701、 接收报文后, 解析当前报文携带的伪线 PW标签信息。
步骤 702、 根据解析获得的伪线 PW标签信息, 查找对应的索引标签属 性表; 该索引标签属性表可以在本地的存储设备中获得, 其与 PW标签信息 的对应关系需要预先进行建立。
步骤 703、 根据该索引标签属性表中的控制字标识位的值, 判断当前报 文是否携带控制字; 若携带控制字, 执行步骤 704; 若未携带控制字, 则执 行步骤 707。
步骤 704、 判断当前报文的类型, 若为检测报文, 执行步骤 705; 若为数 据^艮文, 执行步骤 706。
步骤 705、 对该检测报文进行相应处理。
步骤 706、 删除当前数据报文中的控制字。 步骤 707、 对当前 文进行转发。
通过上述描述, 可以看出, 使用本发明实施例提供的方法, 在报文发送 端通过 PW标签对应的控制字标识位, 根据具体情况确定是否为报文添加控 制字; 在报文接收端, 根据报文是否携带控制字进行相应的处理, 这样可以 根据具体场景选择控制字的开启或关闭, 降低了报文误处理的概率。
基于同一发明构思, 本发明实施例还提供了一种报文发送装置, 如图 8 所示, 包括: 获取模块 801和第一处理模块 802。
所述获取模块 801设置成: 获取伪线 PW标签对应的出口封装表信息; 所述第一处理模块 802设置成: 根据所述出口封装表信息中的控制字标 识, 确定为当前才艮文添加控制字后, 在所述当前 文中添加所述控制字并发 送。
较佳的, 所述第一处理模块 802还设置成: 在当前报文中添加所述控制 字时, 根据所述当前报文的类型, 对所述当前报文添加相应的所述控制字。
基于同一发明构思, 本发明实施例还提供了一种报文接收装置, 如图 9 所示, 包括: 解析模块 901 , 查找模块 902和第二处理模块 903。
所述解析模块 901设置成: 解析接收的当前报文;
所述查找模块 902设置成: 根据解析获得的所述当前报文的伪线 PW标 签信息, 查找对应的索引标签属性表;
所述第二处理模块 903设置成: 根据所述索引标签属性表中的控制字标 识, 确定所述当前报文携带控制字后, 根据所述当前报文的类型对所述当前 文进行处理。
较佳的, 所述第二处理模块 903还设置成: 根据当前报文携带的控制字 的类型, 确定当前报文为数据报文时, 删除所述控制字后转发处理后的数据 报文; 根据当前报文携带的控制字的类型, 确定当前报文为检测报文时, 对 所述检测^艮文进行处理。
较佳的, 所述第二处理模块 903还设置成: 确定所述当前报文未携带控 制字时, 对所述当前报文直接进行转发。
通过上述描述, 可以看出, 使用本发明实施例提供的报文收发方法、 装 置和系统, 在报文发送端通过 PW标签对应的控制字标识位, 根据具体情况 确定是否为报文添加控制字; 在报文接收端, 根据报文是否携带控制字进行 相应的处理, 这样可以根据具体场景选择控制字的开启或关闭, 降低了报文 误处理的 4既率。
本领域内的技术人员应明白, 本发明的实施例可为方法、 系统、 或计算 机程序产品。 因此, 本发明技术方案中可釆用完全硬件实施例、 完全软件实 施例、 或结合软件和硬件方面的实施例的形式。 而且, 本发明技术方案中可 釆用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质 (包括但不限于磁盘存储器、 CD-ROM、 光学存储器等)上实施的计算机程 序产品的形式。
本发明技术方案是参照根据本发明实施例的方法、 设备(系统) 、 和计 算机程序产品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令 实现流程图和 /或方框图中的每一流程和 /或方框、 以及流程图和 /或方框 图中的流程和 /或方框的结合。 可提供这些计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个 机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生 用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中 指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设 备以特定方式工作的计算机可读存储器中, 使得存储在该计算机可读存储器 中的指令产生包括指令装置的制造品, 该指令装置实现在流程图一个流程或 多个流程和 /或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的 处理, 从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图 一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的步 骤。
尽管已描述了本发明的优选实施例, 但本领域内的技术人员一旦得知了 基本创造性概念, 则可对这些实施例作出另外的变更和修改。 所以, 所附权 利要求意欲解释为包括优选实施例以及落入本发明保护范围的所有变更和修 改。
脱离本发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明 权利要求及其等同技术的范围之内, 则本发明保护范围也意图包含这些改动 和变型在内。
工业实用性
使用本发明实施例提供的报文收发的方法、 装置和系统, 可以根据具体 场景选择控制字的开启或关闭, 降低了报文误处理的概率。

Claims

1、 一种 文发送方法, 包括:
获取伪线 PW标签对应的出口封装表信息;
根据所述出口封装表信息中的控制字标识, 确定为当前报文添加控制字 后, 在所述当前报文中添加所述控制字并发送。
2、 如权利要求 1所述的方法, 其中, 在所述当前报文中添加所述控制字 的步骤包括: 根据所述当前报文的类型, 对所述当前报文添加相应的所述控 制字。
3、 一种报文接收方法, 包括:
解析接收的当前报文;
根据解析获得的所述当前报文的伪线 PW标签信息, 查找对应的索引标 签属性表;
根据所述索引标签属性表中的控制字标识, 确定所述当前报文携带控制 字后, 根据所述当前报文的类型对所述当前报文进行处理。
4、 如权利要求 3所述的方法, 其中, 根据所述当前报文的类型对所述当 前报文进行处理的步骤包括:
根据所述当前报文携带的所述控制字的所述类型, 确定所述当前报文为 数据报文时, 删除所述控制字后转发处理后的所述数据报文;
根据所述当前报文携带的所述控制字的所述类型, 确定所述当前报文为 检测报文时, 对所述检测报文进行处理。
5、 如权利要求 3所述的方法, 还包括: 根据所述索引标签属性表中的所 述控制字标识, 确定所述当前报文未携带所述控制字后, 对所述当前报文直 接进行转发。
6、 一种报文发送装置, 包括: 获取模块和第一处理模块, 其中, 所述获取模块设置成: 获取伪线 PW标签对应的出口封装表信息; 所述第一处理模块设置成: 根据所述出口封装表信息中的控制字标识, 确定为当前报文添加控制字后, 在所述当前报文中添加所述控制字并发送。
7、 如权利要求 6所述的装置, 其中, 所述第一处理模块还设置成: 在所 述当前报文中添加所述控制字时, 根据所述当前报文的类型, 对所述当前报 文添加相应的所述控制字。
8、 一种报文接收装置, 包括: 解析模块, 查找模块和第二处理模块, 其 中,
所述解析模块设置成: 解析接收的当前报文;
所述查找模块设置成: 根据解析获得的所述当前报文的伪线 PW标签信 息, 查找对应的索引标签属性表;
所述第二处理模块设置成: 根据所述索引标签属性表中的控制字标识, 确定所述当前报文携带控制字后, 根据所述当前报文的类型对所述当前报文 进行处理。
9、 如权利要求 8所述的装置, 其中, 所述第二处理模块还设置成: 根据 所述当前报文携带的所述控制字的所述类型, 确定所述当前报文为数据报文 时, 删除所述控制字后转发处理后的所述数据报文; 根据所述当前报文携带 的所述控制字的所述类型, 确定所述当前报文为检测报文时, 对所述检测报 文进行处理。
10、 如权利要求 8所述的装置, 其中, 所述第二处理模块还设置成: 确 定所述当前报文未携带所述控制字后, 对所述当前报文直接进行转发。
11、 一种报文收发系统, 包括: 报文发送端和报文接收端; 其中, 所述报文发送端设置成: 获取伪线 PW标签对应的出口封装表信息; 根 据所述出口封装表信息中的控制字标识, 确定为当前报文添加控制字后, 在 所述当前报文中添加所述控制字并发送;
所述报文接收端设置成: 解析接收的所述当前报文; 根据解析获得的所 述当前报文的伪线 PW标签信息, 查找对应的索引标签属性表; 根据所述索 引标签属性表中的所述控制字标识 , 确定所述当前报文携带所述控制字后 , 根据所述当前报文的类型对所述当前报文进行处理。
PCT/CN2012/078595 2011-08-18 2012-07-13 一种报文收发方法、装置和系统 Ceased WO2013023509A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP12823380.6A EP2736202B1 (en) 2011-08-18 2012-07-13 Message receiving and sending method, device, and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110237474.4A CN102263700B (zh) 2011-08-18 2011-08-18 一种报文收发方法、装置和系统
CN201110237474.4 2011-08-18

Publications (1)

Publication Number Publication Date
WO2013023509A1 true WO2013023509A1 (zh) 2013-02-21

Family

ID=45010166

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/078595 Ceased WO2013023509A1 (zh) 2011-08-18 2012-07-13 一种报文收发方法、装置和系统

Country Status (3)

Country Link
EP (1) EP2736202B1 (zh)
CN (1) CN102263700B (zh)
WO (1) WO2013023509A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116881246A (zh) * 2023-06-07 2023-10-13 中国工商银行股份有限公司 数据处理方法、装置、存储介质及电子设备

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263700B (zh) * 2011-08-18 2017-02-08 中兴通讯股份有限公司 一种报文收发方法、装置和系统
CN102611631A (zh) * 2012-04-12 2012-07-25 中兴通讯股份有限公司 一种伪线场景下协议报文保护方法、装置及系统
CN102945579B (zh) * 2012-11-19 2015-04-15 深圳市新国都技术股份有限公司 一种pos机交易中心基于tlv格式的数据获取方法
CN105791145B (zh) * 2014-12-18 2019-10-25 南京中兴新软件有限责任公司 基于等价多路径ecmp的报文传输方法及装置
EP3692688B1 (en) * 2018-06-28 2025-03-26 Huawei Technologies Co., Ltd. Device, method and system for sending or receiving packets including control information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262424A (zh) * 2008-04-18 2008-09-10 华为技术有限公司 转发mpls报文的方法、设备及mpls通信系统
CN101631069A (zh) * 2008-07-18 2010-01-20 华为技术有限公司 伪线参数协商的方法、系统及设备
CN101924676A (zh) * 2010-08-20 2010-12-22 中兴通讯股份有限公司 一种控制字能力的协商方法及伪线建立设备
CN102263700A (zh) * 2011-08-18 2011-11-30 中兴通讯股份有限公司 一种报文收发方法、装置和系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9124486B2 (en) * 2005-08-26 2015-09-01 RPX Clearinghouse, LLC Method for establishing multi segment pseudowire across domains having different pseudowire signaling protocol
US7860022B2 (en) * 2006-12-21 2010-12-28 Verizon Patent And Licensing Inc. Multifunctional control channel for pseudowire emulation
US7707277B2 (en) * 2007-04-27 2010-04-27 Alcatel Lucent Method and system for configuring pseudowires using dynamic host configuration protocol (DHCP) messages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262424A (zh) * 2008-04-18 2008-09-10 华为技术有限公司 转发mpls报文的方法、设备及mpls通信系统
CN101631069A (zh) * 2008-07-18 2010-01-20 华为技术有限公司 伪线参数协商的方法、系统及设备
CN101924676A (zh) * 2010-08-20 2010-12-22 中兴通讯股份有限公司 一种控制字能力的协商方法及伪线建立设备
CN102263700A (zh) * 2011-08-18 2011-11-30 中兴通讯股份有限公司 一种报文收发方法、装置和系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116881246A (zh) * 2023-06-07 2023-10-13 中国工商银行股份有限公司 数据处理方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
CN102263700A (zh) 2011-11-30
CN102263700B (zh) 2017-02-08
EP2736202B1 (en) 2019-01-16
EP2736202A4 (en) 2014-07-09
EP2736202A1 (en) 2014-05-28

Similar Documents

Publication Publication Date Title
US11979322B2 (en) Method and apparatus for providing service for traffic flow
CN102857414B (zh) 一种转发表写入、报文转发方法及装置
CN104509032B (zh) 用于在网络中操作、监管、以及管理(oam)功能的方法、装置和系统
CN104488235B (zh) 报文转发方法和网络设备
CN102130826A (zh) 报文的发送方法和装置
US10791051B2 (en) System and method to bypass the forwarding information base (FIB) for interest packet forwarding in an information-centric networking (ICN) environment
CN104639470A (zh) 流标识封装方法及系统
CN104753789B (zh) 一种转发报文的方法及系统
CN102891803B (zh) 拥塞处理方法及网络设备
US11962491B2 (en) Source routing tunnel ingress protection
EP2736202B1 (en) Message receiving and sending method, device, and system
CN106992915A (zh) 一种报文解封装处理、数据写入方法及装置
CN101572671B (zh) 报文转发方法及转发设备和网络终端设备
WO2023029871A1 (zh) 发送报文的方法、发送报文的控制方法及装置
CN102420772B (zh) 隧道报文收发方法和装置
CN102340446B (zh) VPLS网络中E-tree业务的实现方法及PE设备
EP3767900B1 (en) Method for discovering forwarding path, and related device thereof
CN104205745B (zh) 报文处理的方法与设备
WO2012075832A1 (zh) 转发组播数据报文的方法和提供商边缘设备
CN104869062B (zh) 一种数据包转发方法及设备
CN110235417B (zh) 一种sdn及其报文转发的方法和装置
CN109218176B (zh) 一种报文处理的方法及装置
CN109698781B (zh) 报文转发路径的管理方法和pe设备
WO2017088718A1 (zh) 传输控制报文的方法和装置
CN110535675A (zh) 一种组播快速切换的方法及装置

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: 12823380

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2012823380

Country of ref document: EP