CN107370654B - Pseudo wire data message encapsulation and decapsulation methods and related devices - Google Patents

Pseudo wire data message encapsulation and decapsulation methods and related devices Download PDF

Info

Publication number
CN107370654B
CN107370654B CN201610310741.9A CN201610310741A CN107370654B CN 107370654 B CN107370654 B CN 107370654B CN 201610310741 A CN201610310741 A CN 201610310741A CN 107370654 B CN107370654 B CN 107370654B
Authority
CN
China
Prior art keywords
field
header
specific information
data message
message
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.)
Active
Application number
CN201610310741.9A
Other languages
Chinese (zh)
Other versions
CN107370654A (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610310741.9A priority Critical patent/CN107370654B/en
Priority to PCT/CN2017/079348 priority patent/WO2017193732A1/en
Publication of CN107370654A publication Critical patent/CN107370654A/en
Application granted granted Critical
Publication of CN107370654B publication Critical patent/CN107370654B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • 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

Abstract

The embodiment of the invention discloses a method and a related device for encapsulating and decapsulating a pseudo wire data message.A set PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, each field is respectively used for carrying the content of a specified type, and the fields in the PW message header are used for carrying various required information for defining and identifying the service type realized by the PW data message, so that the unified and flexible definition of the message encapsulation of various types of PWs can be realized, and the expansibility is strong. By setting the content in the PW message header for the PW data message sent to the receiving device, the sending device can encapsulate the PW message header in the PW data message, so that the receiving device can identify the general information and the specific information carried in the PW data message, and determine the PW service type implemented by the PW data message.

Description

Pseudo wire data message encapsulation and decapsulation methods and related devices
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and a related apparatus for encapsulating and decapsulating a pseudo wire data packet.
Background
The Pseudo Wire (PW) or Pseudo Wire end-to-end Emulation (PWE 3) is a two-layer bearer technology for emulating non-IP services in an Internet Protocol (IP)/Multi-Protocol Label Switching (MPLS) network, and interconnection between a non-IP network and an IP/MPLS network can be realized by the Pseudo Wire technology or various non-IP services can be borne by the fused IP/MPLS network, thereby realizing sharing of network resources and reducing the cost of network deployment and operation and maintenance. The PW or PWE3 may be implemented based on an IP or MPLS Tunnel technology, and specifically, a PW label (english: label) is added to a label stack of an IP/MPLS Tunnel Encapsulation (english: IP/MPLS Tunnel Encapsulation), and then a non-IP service Payload (for example, Payload) is encapsulated in a packet, so as to form a PW data packet that can implement non-IP service transmission in an IP/MPLS network. As shown in the PW datagram format of fig. 1, a PW label is set between IP/MPLS tunnel encapsulation and Payload.
Because different types of services have different attributes and requirements, in order to be able to simulate the features of different types of services as much as possible in an IP/MPLS network, it is necessary to correspondingly carry some relevant information required for processing different PW types. Conventionally, the related information is generally carried by a PW Control Word (english: Control Word), and in a PW data packet, the PW Control Word is generally placed before Payload and after PW label, for example, the format of the PW data packet shown in fig. 1.
The current problems are that control words of different PW types have no unified format definition, the definitions of some fields in the control words of different PW types conflict, and the control words cannot identify the PW types, so that a receiving end cannot determine the service types of pseudo wires and the formats of the control words directly through the PW control words, the PW types must be specified through pre-configuration or negotiation between the sending end and the receiving end, otherwise, the control words cannot be analyzed correctly, and the method is very inflexible, poor in expansibility and not beneficial to the continuous popularization and development of the PW technology.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present invention provide a method and a related apparatus for encapsulating and decapsulating a pseudo wire data packet, which provide a uniform and flexible definition mode for setting a PW packet header, and have strong extensibility.
In a first aspect, an embodiment of the present invention provides a method for encapsulating a pseudo wire data packet, where the method includes:
a sending device sets a PW message header for a PW data message, wherein the PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, the content in the identifier field is used for identifying that the PW data message is the PW data message with the PW message header, the content in the PW type irrelevant information field comprises general information irrelevant to the PW service type realized by the PW data message, the content in the PW type field is used for identifying the PW service type realized by the PW data message, and the length of occupied bytes of the first PW specific information field is fixed and is used for carrying specific information of the PW service type realized by the PW data message;
and the sending equipment encapsulates the PW message header in the PW data message and sends the encapsulated PW data message to the receiving equipment.
Optionally, by encapsulating the PW data packet, a field in which the PW packet header is located is encapsulated between a field in which the PW label is located and a field in which the service payload is located.
Optionally, the PW packet header further includes a second PW specific information field, where the length of bytes occupied by the second PW specific information field is variable, and the second PW specific information field is used to carry a specific part in specific information of a PW service type implemented by the PW data packet, where the specific part is information that cannot be carried by the first PW specific information field.
Optionally, the PW header further includes a flag bit field, where content in the flag bit field is used to identify whether the PW header includes the second PW specific information field.
In a second aspect, an embodiment of the present invention provides a device for encapsulating a pseudo wire data packet, where the device includes:
the device comprises a setting unit and a processing unit, wherein the setting unit is used for setting a PW (pseudo wire) message header for a PW data message, the PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, the content in the identifier field is used for identifying that the PW data message is the PW data message with the PW message header, the content in the PW type irrelevant information field comprises general information irrelevant to the PW service type realized by the PW data message, the content in the PW type field is used for identifying the PW service type realized by the PW data message, and the length of occupied bytes of the first PW specific information field is fixed and is used for carrying the specific information of the PW service type realized by the PW data message;
and the encapsulating and sending unit is used for encapsulating the PW message header in the PW data message and sending the encapsulated PW data message to receiving equipment.
Optionally, the PW data packet is encapsulated by the encapsulating and sending unit, and a field where the PW packet header is located is encapsulated between a field where the PW label is located and a field where the service payload is located.
Optionally, the PW packet header further includes a second PW specific information field, where the length of bytes occupied by the second PW specific information field is variable, and the second PW specific information field is used to carry a specific part in specific information of a PW service type implemented by the PW data packet, where the specific part is information that cannot be carried by the first PW specific information field.
Optionally, the PW header further includes a flag bit field, where content in the flag bit field is used to identify whether the PW header includes the second PW specific information field.
In a third aspect, an embodiment of the present invention provides a method for decapsulating a pseudo wire data packet, where the method includes:
the receiving equipment acquires a data message sent by the sending equipment;
the receiving device decapsulates the data message, and determines that the data message is a PW data message carrying a PW message header of a pseudo wire PW through identifying the content in an identifier field, wherein the PW message header comprises the identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field;
the analyzing, by the receiving device, the PW header according to the format of the PW header specifically includes:
the receiving device determines general information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, determines the PW service type realized by the PW data message by analyzing the content in the PW type field, and determines the specific information of the PW service type realized by the PW data message by analyzing the first PW specific information field.
Optionally, the PW header further includes a second PW specific information field, where the length of bytes occupied by the second PW specific information field is variable, and the receiving device analyzes the PW header according to the format of the PW header, further including:
and the receiving equipment determines a specific part in the specific information of the PW service type realized by the PW data message by analyzing the content in the specific information field of the second PW, wherein the specific part is information which cannot be carried by the specific information field of the first PW.
Optionally, the PW header further includes a flag bit field, and the receiving device analyzes the PW header according to the format of the PW header, further including:
and the receiving equipment determines whether the PW message header comprises the specific information field of the second PW or not by analyzing the content in the flag bit field.
In a fourth aspect, an embodiment of the present invention provides a decapsulating device for a pseudo wire data packet, where the decapsulating device includes:
a receiving unit, configured to obtain a data packet sent by a sending device;
a decapsulating unit, configured to decapsulate the data packet, and determine, by identifying content in an identifier field, that the data packet is a PW data packet carrying a pseudo wire PW packet header, where the PW packet header includes the identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field;
an analyzing unit, configured to analyze the PW packet header according to the format of the PW packet header, specifically including:
determining general information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, determining the PW service type realized by the PW data message by analyzing the content in the PW type field, and determining the specific information of the PW service type realized by the PW data message by analyzing the first PW specific information field.
Optionally, the PW packet header further includes a second PW specific information field, where the length of the byte occupied by the second PW specific information field is variable, and the parsing unit is further configured to determine, through parsing content in the second PW specific information field, a specific part in the specific information of the PW service type implemented by the PW data packet, where the specific part is information that cannot be carried by the first PW specific information field.
Optionally, the PW header further includes a flag bit field, and the parsing unit is further configured to determine whether the PW header includes the second PW specific information field by parsing content in the flag bit field.
In a fifth aspect, an embodiment of the present invention provides a processing system for a pseudo wire data packet, where the processing system includes a sending device and a receiving device:
the sending device is used for setting a PW (pseudo wire) message header for a PW data message, wherein the PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, the content in the identifier field is used for identifying that the PW data message is the PW data message with the PW message header, the content in the PW type irrelevant information field comprises general information irrelevant to the PW service type realized by the PW data message, the content in the PW type field is used for identifying the PW service type realized by the PW data message, and the length of occupied bytes of the first PW specific information field is fixed and is used for carrying the specific information of the PW service type realized by the PW data message; encapsulating the PW message header in the PW data message, and sending the encapsulated PW data message to a receiving device;
the receiving device is used for acquiring the data message sent by the sending device; decapsulating the data packet, and determining that the data packet is the PW data packet carrying the PW packet header by identifying the content in the identifier field; analyzing the PW message header according to the format of the PW message header specifically comprises: determining general information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, determining the PW service type realized by the PW data message by analyzing the content in the PW type field, and determining the specific information of the PW service type realized by the PW data message by analyzing the first PW specific information field.
According to the technical scheme, the set PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, each field is used for carrying the content of the specified type, and the fields in the PW message header are used for carrying various required information for defining and identifying the service type realized by the PW data message, so that the uniform and flexible definition of the message encapsulation of various types of PWs can be realized, and the expansibility is strong. By setting the content in the PW message header for the PW data message sent to the receiving device, the sending device can encapsulate the PW message header in the PW data message, so that the receiving device can identify the general information and the specific information carried in the PW data message, and determine the PW service type implemented by the PW data message.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a PW data packet format;
fig. 2 is a schematic diagram of a PW header format according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for encapsulating a pseudo wire data packet according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a format of a PW data packet according to an embodiment of the present invention;
fig. 5 is a flowchart of a method for decapsulating a pseudo wire data packet according to an embodiment of the present invention;
fig. 6 is a device structure diagram of a pseudo wire data packet encapsulation device according to an embodiment of the present invention;
fig. 7 is a device structure diagram of a pseudo wire data packet decapsulation device according to an embodiment of the present invention;
fig. 8 is a system structure diagram of a system for processing a pseudo wire data packet according to an embodiment of the present invention;
fig. 9 is a schematic hardware structure diagram of a sending device according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a hardware structure of a receiving device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the continuous development of IP networks, more types of services have a need to be interconnected with an IP network, or need to be migrated to an IP/MPLS network, for example, a radio forwarding (frontaul) service, a Smart Grid (Smart Grid) service, a professional Audio/Video (Pro-Audio/Video) service, etc. are carried over the IP/MPLS network. Carrying these new services in an IP/MPLS network may be achieved by extending the PW technology, for which new PW service types may need to be defined, with different PW service types having different attributes and processing requirements.
The conventional method is to use PW control words to carry related information for processing certain PW traffic, for example, information for preventing disorder, control and alarm information, etc. can be carried.
However, the current problem is that control words of different PW types do not have uniform format definitions, the definitions of some fields in the control words of different PW types conflict, and the control words themselves cannot identify the PW type, so that the receiving end cannot directly determine the service type of the pseudo wire and the format of the control words through the PW control words, and must specify the PW type through pre-configuration or negotiation between the sending end and the receiving end, otherwise, the control words cannot be correctly analyzed, which is very inflexible, poor in expansibility, and not beneficial to the continued popularization and development of the PW technology.
The inventor finds that the traditional PW control word has a fixed occupied byte length of only 4 bytes, and has limited portable content and poor expansibility. For some new functions and new PW services, there is insufficient space to carry the required information. Therefore, even if the format definition mode of related information carried by the PW control word is unified, the processing requirements of more and more PW service types at present are difficult to meet.
Therefore, the embodiment of the invention provides a method and a related device for encapsulating and decapsulating a pseudo wire data message, wherein a set PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, each field is respectively used for carrying the content of a specified type, and the fields in the PW message header are used for carrying various required information for defining and identifying the service type realized by the PW data message, so that a uniform message header encapsulation mode is defined for various PW service types, and the method and the related device can also carry specific information of a specific PW type and have strong expansibility. By setting the content in the PW message header for the PW data message sent to the receiving device, the sending device can encapsulate the PW message header in the PW data message, so that the receiving device can identify the general information and the specific information carried in the PW data message, and determine the PW service type implemented by the PW data message.
In the PW header (english: Generic PW header) in the embodiment of the present invention, each field for carrying a specified type content is explicitly defined, so as to carry required information capable of covering a currently occurring and possibly occurring PW service type, thereby achieving an effect of uniformly defining the PW header.
In this embodiment of the present invention, the PW header may include an identifier (First neighbor) field, a PW Type Independent Information (PW-Type Independent Information) field, a PW Type (PW-Type) field, and a First PW-specific Information (PW-specific Information) field.
The identifier field is located at the forefront of the PW header, which may also be referred to as the first nibble or the first 4 bits, for example, the "XXXX" part at the forefront in the PW header format shown in fig. 2. The content in the identifier field is used to identify that the PW data packet is a PW data packet with a PW packet header, that is, when a receiving device receives a data packet, if the data packet has the identifier field, the receiving device can distinguish the data packet from other data packets such as other IPv4, IPv6, a packet with a PW control word, and the like through the identification function of the identifier field, so that the receiving device can recognize that the data packet is the PW data packet with the PW packet header provided in the embodiment of the present invention. For example, the value of the identifier field may be set to 2 or 3, which is used to identify that the PW data packet carries a PW packet header.
The contents in the PW type-independent information field include general information that is independent of the PW service type implemented by the PW data packet, i.e., information that is general to various types of PW services. The PW type-independent information field may at least include an Operation, Administration and Maintenance (OAM) field, a Quality of Service (QoS) field, a sequence number (sequence number) field, and a Flow Identifier (Flow Identifier) field, and the PW type-independent information field including these fields may be set at the front of the PW header format, for example, the format and the arrangement order of the first two rows in the PW header format shown in fig. 2. The contents carried in the OAM field may be used to indicate what OAM-related processing, such as message statistics, is performed on the PW data message. The content carried in the QoS field may be used to indicate the quality of service required by the PW data packet. The contents carried in the sequence number field can be used for preventing service messages in the PW data message from being out of order. The contents carried in the flow identification field can be used to identify the data flow to which the PW data packet belongs.
The contents in the PW type field are mainly used to identify the PW service type implemented by the PW data packet.
It should be noted that, in general, different PW traffic types may also include information specific to the PW traffic type, and may include, for example, control information, status information, alarm information, and the like. In this embodiment of the present invention, the PW header may also carry such information through a defined field, where the defined field includes a PW specific information field.
The content type and the occupied byte length carried in the first PW specific information field are preset and are used for carrying specific information of PW service types realized by the PW data message. The format of the PW specific information field can be a group of bit zone bits with specific meanings, and other formats can be defined according to specific PW types.
In this embodiment of the present invention, the first PW specific information field basically defines what may be carried in currently common PW service type specific information. If all the information in the specific information of the PW service type implemented by the PW data packet is defined in the first PW specific information field, then all the specific information of the PW service type may be carried by the first PW specific information field. If some of the specific information of a certain PW traffic type is not predefined in the first PW specific information field, then this part of the specific information of the PW traffic type cannot be carried by the first PW specific information field, or it can be understood that there is not enough reserved position in the first PW specific information field to carry this information. Optionally, the part of information may be carried by other fields provided by the embodiment of the present invention. In this case, the first PW specific information field may carry only a part of specific information of a PW traffic type.
If some information in the specific information of the PW service type is not predefined in the first PW specific information field, optionally, the PW packet header may further include a second PW specific information field (english: PW-type specific Variables), where the length of the occupied byte of the second PW specific information field is variable, and the second PW specific information field is used to carry a specific part in the specific information of the PW service type implemented by the PW data packet, where the specific part is information that cannot be carried by the first PW specific information field.
For example, the specific information included in the specific information may be the information that is not defined in the first PW specific information field. And the special information field of the second PW can realize high expansibility and prepare new information in a specific PW service type which possibly appears.
In order to facilitate that a receiving device can definitely set the second PW specific information field in the PW packet header when analyzing a packet, optionally, the PW packet header may further include a flag bit field, where content in the flag bit field is used to identify whether the PW packet header includes the second PW specific information field. For example, when the content in the flag bit field is set to 1, the PW header is identified to include the second PW specific information field, and when the content in the flag bit field is set to 0, the PW header is identified to not include the second PW specific information field. The position of the flag bit field in the PW header may be as shown in fig. 2, where in fig. 2, the flag bit field is specifically a "V" portion.
Next, the PW header is encapsulated and decapsulated in the PW data packet.
The process of encapsulating a PW data packet with a PW header is shown in fig. 3.
101: and the sending equipment sets a PW message header for the PW data message.
For example, the sending device and the receiving device in the embodiment of the present invention may be network devices, and in an IP/MPLS network, the sending device and the receiving device may be network-side Edge (english: Provider Edge, abbreviated as PE) devices. The sending device and the receiving device can determine whether to use the encapsulation mode of the PW message header through modes such as pre-negotiation and the like, namely whether to carry the PW message header in the PW data message.
The contents in the PW message header are directly related to the PW service realized by the PW data message.
102: and the sending equipment encapsulates the PW message header in the PW data message and sends the encapsulated PW data message to the receiving equipment.
The encapsulation method may be that the sending device adds a PW label and external tunnel encapsulation before adding the set PW packet header to the service payload field. In this encapsulation manner, a field where the PW header is located may be encapsulated between a field where the PW label is located and a field where the service payload is located, for example, a format of the encapsulated PW data packet may be as shown in fig. 4.
The process of decapsulating a PW data packet with a PW header is shown in fig. 5.
201: the receiving equipment acquires the data message sent by the sending equipment.
202: and the receiving equipment de-encapsulates the data message, and determines that the data message is a PW data message carrying a PW message header through identifying the content in the identifier field, wherein the PW message header comprises the identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field.
For example, after removing tunnel encapsulation and a PW label outside the encapsulated data packet by decapsulating, the receiving device may determine, through the content of the identifier, that the data packet is a PW data packet carrying a PW packet header, and may perform data analysis on the PW packet header according to a format type of the PW data packet and an analysis mode of the PW packet header.
203: the analyzing, by the receiving device, the PW header according to the format of the PW header specifically includes:
and the receiving equipment determines the universal information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, and determines the PW service type realized by the PW data message and the format of the first PW specific information field by analyzing the content in the PW type field. And determining the specific information of the PW service type realized by the PW data message by analyzing the specific information field of the first PW.
For example, the receiving device may clearly perform what OAM related processing, such as message statistics, on the PW data message by analyzing the content carried in the OAM field. By analyzing the content carried in the QoS field, the service quality required by the PW data message can be clarified. By analyzing the content carried in the sequence number field, the service messages out of order in the PW data message can be rearranged. By analyzing the content carried in the flow identification field, the data flow to which the PW data packet belongs can be determined.
If the PW packet header further includes a second PW specific information field with a variable byte length, the analyzing, by the receiving device, the PW packet header according to the format of the PW packet header may further include:
and the receiving equipment further analyzes the content in the second PW specific information field to determine a specific part in the specific information of the PW service type realized by the PW data message, wherein the specific part is information which cannot be carried by the first PW specific information field.
Optionally, the PW header further includes a flag bit field, and the receiving device analyzes the PW header according to the format of the PW header, further including:
and the receiving equipment determines whether the PW message header comprises the specific information field of the second PW or not by analyzing the content in the flag bit field.
For example, through the identification of the flag bit field, the receiving device can be made to specify the field to be parsed and the content that may be carried. The accuracy and the efficiency of the receiving equipment for analyzing the PW data message carrying the PW message header are improved.
It can be seen that the set PW message header includes an identifier field, a PW type irrelevant information field, a PW type field, and a first PW specific information field, where each field is used to carry a content of a specified type, and the fields in the PW message header are used to carry various required information for defining and identifying the service type implemented by the PW data message, so that a uniform packet header encapsulation manner is defined for various PW service types, and the PW message header can also carry specific information of a specific PW type, and has very strong extensibility. By setting the content in the PW message header for the PW data message sent to the receiving device, the sending device can encapsulate the PW message header in the PW data message, so that the receiving device can identify the general information and the specific information carried in the PW data message, and determine the PW service type implemented by the PW data message.
Next, a pseudo wire data packet encapsulation apparatus provided in an embodiment of the present invention is described, where the encapsulation apparatus may be a network device in a network, configured to send the PW data packet. Referring to fig. 6, the packaging apparatus 600 may include a setting unit 601 and a packaging and sending unit 602:
the setting unit 601 is configured to set a PW packet header for a PW data packet, where the PW packet header includes an identifier field, a PW type-independent information field, a PW type field, and a first PW specific information field, where content in the identifier field is used to identify the PW data packet is a PW data packet with the PW packet header, content in the PW type-independent information field includes general information that is not related to a PW service type implemented by the PW data packet, content in the PW type field is used to identify a PW service type implemented by the PW data packet, and a byte length occupied by the first PW specific information field is fixed and is used to carry specific information of the PW service type implemented by the PW data packet.
The encapsulating and sending unit 602 is configured to encapsulate the PW packet header in the PW data packet, and send the encapsulated PW data packet to a receiving device.
Optionally, the PW data packet is encapsulated by the encapsulating and sending unit, and a field where the PW packet header is located is encapsulated between a field where the PW label is located and a field where the service payload is located.
Optionally, the PW packet header further includes a second PW specific information field, where the length of bytes occupied by the second PW specific information field is variable, and the second PW specific information field is used to carry a specific part in specific information of a PW service type implemented by the PW data packet, where the specific part is information that cannot be carried by the first PW specific information field.
Optionally, the PW header further includes a flag bit field, where content in the flag bit field is used to identify whether the PW header includes the second PW specific information field.
Next, a decapsulation device for a pseudo wire data packet according to an embodiment of the present invention is described, where the decapsulation device may be a network device in a network, configured to receive the PW data packet. Referring to fig. 7, the decapsulating apparatus 700 may include a receiving unit 701, a decapsulating unit 702, and an parsing unit 703:
a receiving unit 701, configured to obtain a data packet sent by a sending device.
A decapsulating unit 702, configured to decapsulate the data packet, and determine, by identifying content in the identifier field, that the data packet is a PW data packet carrying a pseudo wire PW packet header, where the PW packet header includes the identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field.
The analyzing unit 703 is configured to analyze the PW packet header according to the format of the PW packet header, and specifically includes:
determining general information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, determining the PW service type realized by the PW data message by analyzing the content in the PW type field, and determining the specific information of the PW service type realized by the PW data message by analyzing the first PW specific information field.
Optionally, the PW packet header further includes a second PW specific information field, where the length of the byte occupied by the second PW specific information field is variable, and the parsing unit is further configured to determine, through parsing content in the second PW specific information field, a specific part in the specific information of the PW service type implemented by the PW data packet, where the specific part is information that cannot be carried by the first PW specific information field.
Optionally, the PW header further includes a flag bit field, and the parsing unit is further configured to determine whether the PW header includes the second PW specific information field by parsing content in the flag bit field.
Fig. 8 is a system structure diagram of a pseudo wire data packet processing system according to an embodiment of the present invention, where the processing system 800 includes a sending device 801 and a receiving device 802:
the sending device is used for setting a PW (pseudo wire) message header for a PW data message, wherein the PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, the content in the identifier field is used for identifying that the PW data message is the PW data message with the PW message header, the content in the PW type irrelevant information field comprises general information irrelevant to the PW service type realized by the PW data message, the content in the PW type field is used for identifying the PW service type realized by the PW data message, and the length of occupied bytes of the first PW specific information field is fixed and is used for carrying the specific information of the PW service type realized by the PW data message; encapsulating the PW message header in the PW data message, and sending the encapsulated PW data message to a receiving device;
the receiving device is used for acquiring the data message sent by the sending device; decapsulating the data packet, and determining that the data packet is the PW data packet carrying the PW packet header by identifying the content in the identifier field; analyzing the PW message header according to the format of the PW message header specifically comprises: determining general information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, determining the PW service type realized by the PW data message by analyzing the content in the PW type field, and determining the specific information of the PW service type realized by the PW data message by analyzing the first PW specific information field.
According to the embodiments, the set PW message header includes an identifier field, a PW type irrelevant information field, a PW type field, and a first PW specific information field, each field is used to carry the content of the specified type, and the fields in the PW message header are used to carry various required information for defining and identifying the service type implemented by the PW data message, so that uniform and flexible definition of the message encapsulation of various types of PWs can be achieved, and the extensibility is strong. By setting the content in the PW message header for the PW data message sent to the receiving device, the sending device can encapsulate the PW message header in the PW data message, so that the receiving device can identify the general information and the specific information carried in the PW data message, and determine the PW service type implemented by the PW data message.
Referring to fig. 9, fig. 9 is a schematic diagram of a hardware structure of a sending device according to an embodiment of the present invention, where the sending device 900 includes a memory 901 and a transmitter 902, and a processor 903 connected to the memory 901 and the transmitter 902, where the memory 901 is configured to store a set of program instructions, and the processor 903 is configured to call the program instructions stored in the memory 901 to perform the following operations:
setting a PW (pseudo wire) message header for a PW (pseudo wire) data message, wherein the PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, the content in the identifier field is used for identifying that the PW data message is the PW data message with the PW message header, the content in the PW type irrelevant information field comprises general information irrelevant to the PW service type realized by the PW data message, the content in the PW type field is used for identifying the PW service type realized by the PW data message, and the length of occupied bytes of the first PW specific information field is fixed and is used for carrying specific information of the PW service type realized by the PW data message;
triggering the sender 902 to encapsulate the PW packet header in the PW data packet, and sending the encapsulated PW data packet to a receiving device.
Alternatively, the processor 903 may be a Central Processing Unit (CPU), the Memory 901 may be a Random Access Memory (RAM) type internal Memory, and the transmitter 902 may include a common physical interface, which may be an Ethernet (Ethernet) interface or an Asynchronous Transfer Mode (ATM) interface. The processor 903, transmitter 902, and memory 901 may be integrated into one or more separate circuits or hardware, such as: application Specific Integrated Circuit (ASIC).
Referring to fig. 10, fig. 10 is a schematic diagram of a hardware structure of a receiving device according to an embodiment of the present invention, where the receiving device 1000 includes a memory 1001 and a receiver 1002, and a processor 1003 respectively connected to the memory 1001 and the receiver 1002, where the memory 1001 is used to store a set of program instructions, and the processor 1003 is used to call the program instructions stored in the memory 1001 to perform the following operations:
triggering the receiver 1002 to acquire a data message sent by sending equipment;
decapsulating the data packet, and determining that the data packet is a PW data packet carrying a PW packet header of a pseudo wire PW by identifying content in an identifier field, wherein the PW packet header comprises the identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field;
analyzing the PW message header according to the format of the PW message header specifically comprises:
determining general information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, determining the PW service type realized by the PW data message by analyzing the content in the PW type field, and determining the specific information of the PW service type realized by the PW data message by analyzing the first PW specific information field.
Alternatively, the processor 1003 may be a CPU, the memory 1001 may be an internal memory of a RAM type, and the receiver 1002 may include a common physical interface, which may be an Ethernet interface or an ATM interface. The processor 1003, receiver 1002, and memory 1001 may be integrated into one or more separate circuits or hardware, such as: an ASIC.
The "first" of the first PW specific information field mentioned in the embodiments of the present invention is used only for name identification, and does not represent the first in sequence. The rule applies equally to "second".
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium may be at least one of the following media: various media that can store program codes, such as read-only memory (ROM), RAM, magnetic disk, or optical disk.
It should be noted that, in the present specification, all the embodiments are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (15)

1. A method for encapsulating a pseudo wire data packet is characterized in that the method comprises the following steps:
a sending device sets a PW message header for a PW data message, wherein the PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, the content in the identifier field is used for identifying that the PW data message is the PW data message with the PW message header, the content in the PW type irrelevant information field comprises general information irrelevant to the PW service type realized by the PW data message, the content in the PW type field is used for identifying the PW service type realized by the PW data message, and the length of occupied bytes of the first PW specific information field is fixed and is used for carrying specific information of the PW service type realized by the PW data message;
and the sending equipment encapsulates the PW message header in the PW data message and sends the encapsulated PW data message to the receiving equipment.
2. The method according to claim 1, wherein a field in which the PW header is located is encapsulated between a field in which a PW label is located and a field in which the service payload is located by encapsulating the PW data packet.
3. The method according to claim 1 or 2, wherein the PW packet header further includes a second PW specific information field, where the length of bytes occupied by the second PW specific information field is variable, and the second PW specific information field is used to carry a specific part in the specific information of the PW service type implemented by the PW data packet, where the specific part is information that cannot be carried by the first PW specific information field.
4. The method of claim 3, wherein the PW packet header further comprises a flag bit field, and wherein contents of the flag bit field are used to identify whether the second PW specific information field is included in the PW packet header.
5. An apparatus for encapsulating a pseudo wire data packet, the apparatus comprising:
the device comprises a setting unit and a processing unit, wherein the setting unit is used for setting a PW (pseudo wire) message header for a PW data message, the PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, the content in the identifier field is used for identifying that the PW data message is the PW data message with the PW message header, the content in the PW type irrelevant information field comprises general information irrelevant to the PW service type realized by the PW data message, the content in the PW type field is used for identifying the PW service type realized by the PW data message, and the length of occupied bytes of the first PW specific information field is fixed and is used for carrying the specific information of the PW service type realized by the PW data message;
and the encapsulating and sending unit is used for encapsulating the PW message header in the PW data message and sending the encapsulated PW data message to receiving equipment.
6. The encapsulation apparatus according to claim 5, wherein the PW data packet is encapsulated by the encapsulating and sending unit, and a field in which the PW header is located is encapsulated between a field in which a PW label is located and a field in which the service payload is located.
7. The encapsulation device according to claim 5 or 6, wherein the PW packet header further includes a second PW specific information field, where a byte length occupied by the second PW specific information field is variable, and is used to carry a specific portion in the specific information of the PW service type implemented by the PW data packet, where the specific portion is information that cannot be carried by the first PW specific information field.
8. The encapsulation apparatus according to claim 7, wherein the PW packet header further includes a flag bit field, and contents of the flag bit field are used to identify whether the second PW specific information field is included in the PW packet header.
9. A method for decapsulating a pseudo wire data packet is characterized by comprising the following steps:
the receiving equipment acquires a data message sent by the sending equipment;
the receiving device decapsulates the data message, and determines that the data message is a PW data message carrying a PW message header of a pseudo wire PW through identifying the content in an identifier field, wherein the PW message header comprises the identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field;
the analyzing, by the receiving device, the PW header according to the format of the PW header specifically includes:
the receiving device determines general information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, determines the PW service type realized by the PW data message by analyzing the content in the PW type field, and determines the specific information of the PW service type realized by the PW data message by analyzing the first PW specific information field.
10. The method according to claim 9, wherein the PW header further includes a second PW specific information field, the length of bytes occupied by the second PW specific information field is variable, and the receiving device analyzes the PW header according to the format of the PW header, further comprising:
and the receiving equipment determines a specific part in the specific information of the PW service type realized by the PW data message by analyzing the content in the specific information field of the second PW, wherein the specific part is information which cannot be carried by the specific information field of the first PW.
11. The method according to claim 10, wherein the PW header further includes a flag bit field, and wherein the receiving device parses the PW header according to a format of the PW header, further comprising:
and the receiving equipment determines whether the PW message header comprises the specific information field of the second PW or not by analyzing the content in the flag bit field.
12. A de-encapsulation device of a pseudo wire data packet, the de-encapsulation device comprising:
a receiving unit, configured to obtain a data packet sent by a sending device;
a decapsulating unit, configured to decapsulate the data packet, and determine, by identifying content in an identifier field, that the data packet is a PW data packet carrying a pseudo wire PW packet header, where the PW packet header includes the identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field;
an analyzing unit, configured to analyze the PW packet header according to the format of the PW packet header, specifically including:
determining general information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, determining the PW service type realized by the PW data message by analyzing the content in the PW type field, and determining the specific information of the PW service type realized by the PW data message by analyzing the first PW specific information field.
13. The decapsulating device according to claim 12, wherein the PW packet header further includes a second PW specific information field, where a byte length occupied by the second PW specific information field is variable, and the parsing unit is further configured to determine, by parsing content in the second PW specific information field, a specific portion in specific information of a PW service type implemented by the PW data packet, where the specific portion is information that cannot be carried by the first PW specific information field.
14. The decapsulating device according to claim 13, wherein the PW header further includes a flag bit field, and wherein the parsing unit is further configured to determine whether the PW header includes the second PW specific information field by parsing contents in the flag bit field.
15. A processing system of a pseudo wire data message, the processing system comprising a sending device and a receiving device:
the sending device is used for setting a PW (pseudo wire) message header for a PW data message, wherein the PW message header comprises an identifier field, a PW type irrelevant information field, a PW type field and a first PW specific information field, the content in the identifier field is used for identifying that the PW data message is the PW data message with the PW message header, the content in the PW type irrelevant information field comprises general information irrelevant to the PW service type realized by the PW data message, the content in the PW type field is used for identifying the PW service type realized by the PW data message, and the length of occupied bytes of the first PW specific information field is fixed and is used for carrying the specific information of the PW service type realized by the PW data message; encapsulating the PW message header in the PW data message, and sending the encapsulated PW data message to a receiving device;
the receiving device is used for acquiring the data message sent by the sending device; decapsulating the data packet, and determining that the data packet is the PW data packet carrying the PW packet header by identifying the content in the identifier field; analyzing the PW message header according to the format of the PW message header specifically comprises: determining general information irrelevant to the PW service type realized by the PW data message by analyzing the content in the PW type irrelevant information field, determining the PW service type realized by the PW data message by analyzing the content in the PW type field, and determining the specific information of the PW service type realized by the PW data message by analyzing the first PW specific information field.
CN201610310741.9A 2016-05-11 2016-05-11 Pseudo wire data message encapsulation and decapsulation methods and related devices Active CN107370654B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610310741.9A CN107370654B (en) 2016-05-11 2016-05-11 Pseudo wire data message encapsulation and decapsulation methods and related devices
PCT/CN2017/079348 WO2017193732A1 (en) 2016-05-11 2017-04-01 Method for encapsulating and decapsulating pseudo-wire data message, and relevant apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610310741.9A CN107370654B (en) 2016-05-11 2016-05-11 Pseudo wire data message encapsulation and decapsulation methods and related devices

Publications (2)

Publication Number Publication Date
CN107370654A CN107370654A (en) 2017-11-21
CN107370654B true CN107370654B (en) 2019-12-24

Family

ID=60266202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610310741.9A Active CN107370654B (en) 2016-05-11 2016-05-11 Pseudo wire data message encapsulation and decapsulation methods and related devices

Country Status (2)

Country Link
CN (1) CN107370654B (en)
WO (1) WO2017193732A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995468A (en) * 2018-01-03 2019-07-09 凌群电脑股份有限公司 The variable information composing method of high-effect data length and its system
CN110611625B (en) 2018-11-27 2020-11-06 新华三技术有限公司 Network equipment and logic device applied to same
CN112448918B (en) * 2019-08-29 2023-06-09 华为技术有限公司 Message transmission method and device and computer storage medium
CN111917735A (en) * 2020-07-12 2020-11-10 中信银行股份有限公司 Communication message generation and processing method and device and electronic equipment
CN113542374B (en) * 2021-06-30 2022-04-12 北京宇信科技集团股份有限公司 Message processing method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572651A (en) * 2008-04-30 2009-11-04 华为技术有限公司 Method and device for message transfer
CN101610263A (en) * 2009-06-23 2009-12-23 中兴通讯股份有限公司 The E1 service edge is to edge pseudo-line simulation encapsulation, de-encapsulation method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010088080A (en) * 2008-10-03 2010-04-15 Fujitsu Ltd Communication apparatus and communication method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572651A (en) * 2008-04-30 2009-11-04 华为技术有限公司 Method and device for message transfer
CN101610263A (en) * 2009-06-23 2009-12-23 中兴通讯股份有限公司 The E1 service edge is to edge pseudo-line simulation encapsulation, de-encapsulation method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RFC4447 Pseudowire Setup and Maintenance Using the Label Distribution Protocol (LDP);L. Martini等;《RFC》;20060430;全文 *

Also Published As

Publication number Publication date
CN107370654A (en) 2017-11-21
WO2017193732A1 (en) 2017-11-16

Similar Documents

Publication Publication Date Title
CN107370654B (en) Pseudo wire data message encapsulation and decapsulation methods and related devices
EP3958521A1 (en) Method and apparatus for providing service for service flow
CN109688057A (en) The message forwarding method and device of section route network based on IPV6
JP5345942B2 (en) Ethernet OAM in intermediate nodes of PBT network
CN108964943B (en) Method and device for realizing IOAM packaging
WO2017054576A1 (en) Unicast tunnel building method, apparatus and system
US11700148B2 (en) Packet transmission method and device, and computer storage medium
CN105024985A (en) Message processing method and apparatus
CN108737127B (en) Information notification method and device
US20220191138A1 (en) Method for Making Host Network Performance Requirement Programmable, Device, and System
EP4057576A1 (en) Packet encapsulating method and apparatus, and packet decapsulating method and apparatus
CN109526030A (en) Processing method, device and the equipment of message
EP4274123A1 (en) Packet encapsulation and de-encapsulation method and device, storage medium, and electronic device
CN108075991B (en) Message forwarding method and device
CN112769738A (en) DetNet data packet processing method and device
CN111277426B (en) IOAM information processing method and device
CN111917786A (en) GRE tunnel-based data packet fragmentation method and data packet recombination method
WO2021254454A1 (en) Bier oam detection method, and device and system
EP3913865A1 (en) Message decapsulation method and device, message encapsulation method and device, electronic device, and storage medium
EP4340303A1 (en) Data forwarding method and apparatus, storage medium, and electronic apparatus
WO2023024755A1 (en) Mpls packet encapsulation method and apparatus, and storage medium and electronic apparatus
WO2024041064A1 (en) Quic packet transmission method and related device
CN112511988B (en) Message forwarding method, device, system, network device and storage medium
KR100908843B1 (en) How to Configure a Forwarding Table in a Routing System
CN117527667A (en) Service function chain processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant