WO2017193732A1 - Method for encapsulating and decapsulating pseudo-wire data message, and relevant apparatus - Google Patents

Method for encapsulating and decapsulating pseudo-wire data message, and relevant apparatus Download PDF

Info

Publication number
WO2017193732A1
WO2017193732A1 PCT/CN2017/079348 CN2017079348W WO2017193732A1 WO 2017193732 A1 WO2017193732 A1 WO 2017193732A1 CN 2017079348 W CN2017079348 W CN 2017079348W WO 2017193732 A1 WO2017193732 A1 WO 2017193732A1
Authority
WO
WIPO (PCT)
Prior art keywords
field
data packet
type
packet
packet header
Prior art date
Application number
PCT/CN2017/079348
Other languages
French (fr)
Chinese (zh)
Inventor
董杰
陈国义
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2017193732A1 publication Critical patent/WO2017193732A1/en

Links

Images

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

Definitions

  • the present invention relates to the field of data processing, and in particular, to a method, a decapsulation method, and a related apparatus for a pseudowire data message.
  • Pseudo Wire (English: Pseudo Wire, abbreviation: PW) or Pseudo Wire Edge-to-Edge Emulation (PWE3) is an Internet Protocol (English: Internet Protocol, abbreviation: IP) / Multi-Protocol Label Switching (English: Multi-Protocol Label Switching, abbreviation: MPLS) network Layer 2 bearer technology for simulating non-IP services.
  • IP Internet Protocol
  • MPLS Multi-Protocol Label Switching
  • the PW or PWE3 can be implemented based on the IP or MPLS tunneling technology.
  • the PW label (English: label) is added to the label stack of the IP/MPLS tunnel encapsulation (IP/MPLS Tunnel Encapsulation), and the non-IP service is added.
  • the payload (for example, Payload) is encapsulated into the packet to form a PW data packet that can be transmitted based on the non-IP service in the IP/MPLS network.
  • the PW label format is set between IP/MPLS Tunnel Encapsulation and Payload.
  • the PW control word (English: Control Word) is generally used to carry the above related information.
  • the PW control word is generally placed before the Payload, and after the PW label, for example, the PW data packet shown in FIG. The format.
  • control word of different PW types there is no uniform format definition for control words of different PW types.
  • the definition of some fields in control words of different PW types conflicts, and the control word itself cannot identify the type of PW, so that the receiving end cannot directly pass the PW control word.
  • the type of the PW must be negotiated by the pre-configuration or the sender and the receiver. Otherwise, the control word cannot be parsed correctly. This method is very inflexible and has poor scalability, which is not conducive to PW. The continued promotion and development of technology.
  • the embodiment of the present invention provides a method for encapsulating and decapsulating a pseudowire data packet, and a related device, and provides a unified and flexible definition manner to set a PW packet header, which has strong scalability.
  • an embodiment of the present invention provides a method for encapsulating a pseudowire data packet, where the method includes:
  • the sending device sets a PW packet header for the 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 the content in the identifier field is used.
  • the PW data packet is a PW data packet with a PW packet header, and the content in the PW type-independent information field includes general information that is independent of the PW service type implemented by the PW data packet.
  • the content in the PW type field is used to identify the PW
  • the PW service type implemented by the data packet, where the first PW-specific information field has a fixed byte length, and is used to carry the unique information of the PW service type implemented by the PW data packet;
  • the sending device encapsulates the PW packet header in the PW data packet, and sends the encapsulated PW data packet to the receiving device.
  • the PW packet header is encapsulated between a field where the PW tag is located and a field where the service payload is located, by encapsulating the PW data packet.
  • the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable length of a byte, and is used to carry the PW service type of the PW data packet.
  • the second PW-specific information field has a variable length of a byte, and is used to carry the PW service type of the PW data packet.
  • a specific portion of the unique information the specific portion being information that cannot be carried by the first PW-specific information field.
  • the PW packet header further includes a flag bit field, where the content in the flag bit field is used to identify whether the second PW-specific information field is included in the PW packet header.
  • an embodiment of the present invention provides a device for packaging a pseudowire data packet, where the encapsulating device includes:
  • a setting unit configured to set a PW packet header for the pseudowire 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 the identifier
  • the content in the field is used to identify that the PW data packet is a PW data packet with a PW packet header, and the content in the PW type-independent information field is not related to the PW service type implemented by the PW data packet.
  • the content in the PW type field is used to identify the PW service type implemented by the PW data packet
  • the first PW-specific information field has a fixed byte length and is used to carry the PW data.
  • the encapsulating and transmitting unit is configured to encapsulate the PW packet header in the PW data packet, and send the encapsulated PW data packet to the receiving device.
  • the PW data packet is encapsulated by the encapsulating and sending unit, and the field of the PW packet header is encapsulated between a field where the PW tag is located and a field where the service payload is located.
  • the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable length of a byte, and is used to carry the PW service type of the PW data packet.
  • the second PW-specific information field has a variable length of a byte, and is used to carry the PW service type of the PW data packet.
  • a specific portion of the unique information the specific portion being information that cannot be carried by the first PW-specific information field.
  • the PW packet header further includes a flag bit field, where the content in the flag bit field is used to identify whether the second PW-specific information field is included in the PW packet header.
  • an embodiment of the present invention provides a method for decapsulating a pseudowire data packet, where the method includes:
  • the receiving device decapsulates the data packet, and determines that the data packet is a PW data packet carrying a pseudowire PW packet header by using the content in the identifier field, 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;
  • the receiving device parses the PW packet header according to the format of the PW packet header, and specifically includes:
  • the receiving device determines, by parsing the content in the PW type-independent information field, general information that is not related to the PW service type implemented by the PW data packet, and determines the content in the PW type field to determine the
  • the PW service type implemented by the PW data packet is analyzed by the first PW-specific information field to determine the unique information of the PW service type implemented by the PW data packet.
  • the PW packet header further includes a second PW-specific information field, where the length of the second PW-specific information field is variable, and the receiving device parses the format according to the format of the PW packet header.
  • the PW header header also includes:
  • the receiving device determines, by parsing the content in the second PW-specific information field, a specific part in the unique information of the PW service type implemented by the PW data packet, where the specific part is not available by the first part. Information carried in the PW-specific information field.
  • the PW packet header further includes a flag bit field
  • the receiving device parses the PW packet header according to the format of the PW packet header, and further includes:
  • the receiving device determines whether the PW packet header includes the second PW-specific information field by parsing the content in the flag bit field.
  • an embodiment of the present invention provides a decapsulation apparatus for a pseudowire data packet, where the decapsulation apparatus includes:
  • a receiving unit configured to acquire a data packet sent by the sending device
  • a decapsulating unit configured to decapsulate the data packet, and determine, by identifying the content in the identifier field, the data packet is a PW data packet carrying a pseudowire PW packet header, where the PW packet header Include the identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field;
  • the parsing unit is configured to parse the PW packet header according to the format of the PW packet header, and specifically includes:
  • Determining the general information irrelevant to the PW service type implemented by the PW data packet by parsing the content in the PW type-independent information field, and determining the PW data packet by parsing the content in the PW type field The PW service type that is implemented, by parsing the first PW-specific information field, determines the unique information of the PW service type implemented by the PW data packet.
  • the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable byte length, and the parsing unit is further configured to analyze the second PW-specific
  • the content in the information field determines a specific part of the unique information of the PW service type implemented by the PW data message, and the specific part is information that cannot be carried by the first PW-specific information field.
  • the PW packet header further includes a flag bit field
  • the parsing unit is further configured to determine, by parsing the content in the flag bit field, whether the PW packet header includes the second PW-specific Information field.
  • an embodiment of the present invention provides a processing system for a pseudowire data packet, where the processing system includes a sending device and a receiving device:
  • the sending device is configured to set a PW packet header for the pseudowire 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 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, and the content in the PW type-independent information field includes the PW service implemented by the PW data packet.
  • Type-independent general information the content in the PW type field is used to identify the PW service type implemented by the PW data packet, and the first PW-specific information field has a fixed byte length and is used to carry the
  • the PW data packet is configured to be specific to the PW service type; the PW packet header is encapsulated in the PW data packet, and the encapsulated PW data packet is sent to the receiving device;
  • the receiving device is configured to obtain a data packet sent by the sending device, decapsulate the data packet, and determine that the data packet carries the PW packet header by identifying content in the identifier field. Parsing the PW data packet according to the format of the PW packet header, and specifically: determining, by parsing the content in the PW type irrelevant information field, the PW data packet Defining the PW service type-independent general information, and determining the PW service type implemented by the PW data packet by parsing the content in the PW type field, and determining the first PW-specific information field to determine the The unique information of the PW service type implemented by the PW data packet.
  • the set PW packet header includes an identifier field and a PW type irrelevant information field.
  • the PW type field and the first PW-specific information field where each field is used to carry the content of the specified type, and the fields in the PW packet header are used to carry various types of services for defining and identifying the PW data packet.
  • the required information so that the packet encapsulation of various types of PWs can be uniformly and flexibly defined, and the scalability is strong.
  • the sending device may encapsulate the PW packet header in the PW data packet, so that the receiving device can identify the PW data by setting the content in the PW packet header to the PW data packet sent to the receiving device.
  • the general information and the unique information carried in the packet, and the PW service type implemented by the PW data packet is determined.
  • 1 is a schematic diagram of a format of a PW data packet
  • FIG. 2 is a schematic diagram of a format of a PW packet header according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for encapsulating a pseudowire 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 disclosure
  • FIG. 5 is a flowchart of a method for decapsulating a pseudowire data packet according to an embodiment of the present invention
  • FIG. 6 is a structural diagram of an apparatus for a pseudowire data packet encapsulating apparatus according to an embodiment of the present invention.
  • FIG. 7 is a structural diagram of an apparatus for decapsulating a pseudowire data packet according to an embodiment of the present invention.
  • FIG. 8 is a system structural diagram of a system for processing a pseudowire data packet according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of hardware of a sending device according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of hardware of a receiving device according to an embodiment of the present invention.
  • IP/MPLS networks such as carrying wireless forwards (English: Fronthaul) services over IP/MPLS networks, smart grids. (English: Smart Grid) business or professional audio/video (English: Pro-Audio/Video) business.
  • the new PW service can be used to carry these new services in the IP/MPLS network. For this reason, a new PW service type may be defined. Different PW service types have different attributes and processing requirements.
  • the traditional method is to use the PW control word to carry related information for processing a certain PW service, for example, it can carry information to prevent out-of-order, transfer control and alarm information, and the like.
  • control word is used to determine the service type of the pseudowire and the format of the control word.
  • the type of the PW must be negotiated by the pre-configuration or the sender and the receiver. Otherwise, the control word cannot be parsed correctly. This method is very inflexible and expands. Poor performance is not conducive to the continued promotion and development of PW technology.
  • the inventors have found that the conventional PW control word occupies a fixed byte length of only 4 bytes, which is capable of carrying limited content and poor scalability. For some new features and new PW services, there is not enough space to carry the information needed. Therefore, even if the unified PW control word carries the format definition method of related information, it is difficult to meet the processing requirements of more and more PW service types.
  • the embodiment of the present invention provides a method for encapsulating and decapsulating a pseudowire data packet, and a related device.
  • the set PW packet header includes an identifier field, a PW type independent information field, a PW type field, and a first The PW-specific information field, where each field is used to carry the specified type of content, and the fields in the PW packet header are used to carry various required information for defining and identifying the service type implemented by the PW data packet, thereby A unified packet header encapsulation mode is defined for various PW service types, and unique information of a specific PW type can be carried, and has strong scalability.
  • the sending device may encapsulate the PW packet header in the PW data packet, so that the receiving device can identify the PW data by setting the content in the PW packet header to the PW data packet sent to the receiving device.
  • the general information and the unique information carried in the packet, and the PW service type implemented by the PW data packet is determined.
  • each field for carrying a specified type of content is explicitly defined, so as to carry a PW service type that can present and may appear.
  • the PW packet header may include an identifier (English: First Nibble) field, a PW type-independent information (English: PW-Type Independent Information) field, and a PW type (English: PW-Type) field. And the first PW-specific information (English: PW-specific Information) field.
  • the identifier field is located at the forefront of the PW packet header, and the field may be referred to as the first nibble or the first 4 bits, for example, the frontmost "XXXX" portion of the PW packet header format shown in FIG.
  • 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 the receiving device receives a data packet, if the data packet is received, With the identifier field, the receiving device can distinguish the data packet from other IPv4, IPv6 packets, PW control words, and other data packets by using the identifier function of the identifier field.
  • the receiving device can identify that the data packet is the PW data packet carrying the PW packet header provided in the embodiment of the present invention.
  • the identifier field may be set to 2 or 3, and the PW data packet carries the PW packet header.
  • the content in the PW type-independent information field includes general information that is independent of the PW service type implemented by the PW data packet, that is, information common to various types of PW services.
  • the PW type-independent information field may include at least an Operation Administration and Maintenance (OAM) field, a Quality of Service (QoS: QoS) field, and a sequence number (English: Sequence Number).
  • OAM Operation Administration and Maintenance
  • QoS Quality of Service
  • sequence number English: Sequence Number
  • a field and a flow identifier English: Flow Identifier
  • the PW type-independent information field including the fields may be set in the front part of the PW packet header format, for example, in the packet header format shown in FIG. The format and order of the two lines.
  • the content carried in the OAM field may be used to indicate which OAM-related processing, such as packet statistics, is performed on the PW data packet.
  • the content carried in the QoS field may be used to indicate the quality of service required by the PW data packet.
  • the content carried in the sequence number field can be used to prevent the service packets from being out of order in the PW data packet.
  • the content carried in the flow identifier field can be used to identify the data flow to which the PW data packet belongs.
  • the content in the PW type field is mainly used to identify the PW service type implemented by the PW data packet.
  • the different PW service types may also include information specific to the PW service type, and may include, for example, control information, status information, and alarm information.
  • the PW packet header may also carry such information through a defined field, including a PW-specific information field.
  • the content type and the length of the Bytes carried in the first PW-specific information field are preset, and are used to carry the unique information of the PW service type implemented by the PW data packet.
  • the format of the PW-specific information field may be a set of bit flag bits with a specific meaning, or other formats may be defined according to a specific PW type.
  • the first PW-specific information field basically defines content that may be carried in the specific information of each PW service type that is currently common. If all the information in the unique information of the PW service type implemented by the PW data packet is already defined in the first PW-specific information field, all the PW service types may be carried by the first PW-specific information field. Unique information. If some information in the unique information of a certain PW service type is not predefined in the first PW-specific information field, the part of the information specific to the PW service type cannot be carried by the first PW-specific information field. Or, it can be understood that there is not enough reserved location in the first PW-specific information field to carry the information. Optionally, the part of the 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 the unique information of the PW service type.
  • the PW packet header may further include a second PW-specific information field.
  • PW-Type Specific Variables the second PW-specific information field has a variable byte length, and is used to carry a specific part of the PW service type-specific information that is implemented by the PW data packet, where the specific part is Information that cannot be carried by the first PW-specific information field.
  • the specific information included in the information may be the information that is not defined in the first PW-specific information field.
  • the second PW-specific information field Through the second PW-specific information field, high scalability can be achieved, and new information in a specific PW service type that may appear is prepared.
  • the PW packet header may further include a flag bit field, and the flag bit may be included in the PW packet header.
  • the content in the field is used to identify whether the second PW-specific information field is included in the PW packet header. For example, when the content of the flag bit field is set to 1, the PW packet header includes the second PW-specific information field, and when set to 0, the PW packet header does not include the second PW-specific header. Information field.
  • the location of the flag bit field in the PW packet header may be as shown in FIG. 2. In FIG. 2, the flag bit field is specifically a "V" portion.
  • the PW packet header is encapsulated and decapsulated in the PW data packet.
  • the sending device sets a PW packet header for the PW data packet.
  • the sending device and the receiving device in the embodiment of the present invention may be network devices.
  • the sending device and the receiving device may be network edge (English: Provider Edge, abbreviation: PE) device.
  • PE Provider Edge
  • the sending device and the receiving device may determine whether to use the encapsulation mode of the PW packet header, that is, whether the PW packet header is carried in the PW data packet.
  • the content in the PW packet header is directly related to the PW service implemented by the PW data packet.
  • Step 102 The sending device encapsulates the PW packet header in the PW data packet, and sends the encapsulated PW data packet to the receiving device.
  • the encapsulation mode may be that the set PW packet header is added before the service payload field, and the sending device adds a PW label and an external tunnel encapsulation.
  • the field of the PW packet header may be encapsulated between the field where the PW tag is located and the field where the service payload is located.
  • the format of the encapsulated PW data packet may be as shown in FIG. 4 . Show.
  • the receiving device acquires a data packet sent by the sending device.
  • the receiving device decapsulates the data packet, and determines, by using the content in the identifier field, that the data packet is a PW data packet carrying a PW packet header, where the PW packet header includes a The identifier field, the PW type-independent information field, the PW type field, and the first PW-specific information field.
  • the receiving device removes the tunnel encapsulation and the PW label outside the encapsulated data packet
  • the data packet can be determined to be a PW packet by using the content of the identifier.
  • the PW data packet of the header can be parsed according to the format of the PW packet, and the PW packet header can be parsed according to the parsing manner of the PW packet header.
  • the receiving device parses the PW packet header according to the format of the PW packet header, and specifically includes:
  • the receiving device determines, by parsing the content in the PW type-independent information field, general information that is not related to the PW service type implemented by the PW data packet, and determines the content in the PW type field to determine the The PW service type implemented by the PW data packet and the format of the first PW-specific information field.
  • the specific information of the PW service type implemented by the PW data packet is determined by parsing the first PW-specific information field.
  • the receiving device can perform explicit OAM-related processing, such as packet statistics, on the PW data packet by analyzing the content carried in the OAM field.
  • OAM-related processing such as packet statistics
  • the quality of service required by the PW data packet can be clarified.
  • the out-of-order service packets in the PW data packet can be rearranged.
  • the data stream to which the PW data packet belongs can be clarified by parsing the content carried in the flow identifier field.
  • the receiving device may further include: the parsing the PW packet header according to the format of the PW packet header:
  • the receiving device determines, by further parsing the content in the second PW-specific information field, a specific part in the unique information of the PW service type implemented by the PW data packet, where the specific part is unable to be Information carried by a PW-specific information field.
  • the PW packet header further includes a flag bit field
  • the receiving device parses the PW packet header according to the format of the PW packet header, and further includes:
  • the receiving device determines whether the PW packet header includes the second PW-specific information field by parsing the content in 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 efficiency of the PW data packet carrying the PW packet header are improved by the receiving device.
  • the set 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 each field is used to carry content of a specified type, and the PW message is used.
  • the fields in the header carry various required information for defining and identifying the service type of the PW data packet, so that a unified packet header encapsulation mode is defined for various PW service types, and a specific PW type can be carried.
  • Unique letter Interest and has a strong scalability.
  • the sending device may encapsulate the PW packet header in the PW data packet, so that the receiving device can identify the PW data by setting the content in the PW packet header to the PW data packet sent to the receiving device.
  • the general information and the unique information carried in the packet, and the PW service type implemented by the PW data packet is determined.
  • the encapsulating device may be a network device in the network for transmitting the PW data packet.
  • the packaging device 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 the 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 the identifier
  • the content of the PW data packet is a PW data packet with a PW packet header
  • the content in the PW type-independent information field includes a PW service type implemented by the PW data packet.
  • the unrelated general information, the content in the PW type field is used to identify the PW service type implemented by the PW data packet
  • the first PW-specific information field has a fixed byte length and is used to carry the PW.
  • the unique information of the PW service type implemented by the data message is configured to set a PW packet header for the 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
  • the encapsulating and transmitting unit 602 is configured to encapsulate the PW packet header in the PW data packet, and send the encapsulated PW data packet to the receiving device.
  • the PW data packet is encapsulated by the encapsulating and sending unit, and the field of the PW packet header is encapsulated between a field where the PW tag is located and a field where the service payload is located.
  • the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable length of a byte, and is used to carry the PW service type of the PW data packet.
  • the second PW-specific information field has a variable length of a byte, and is used to carry the PW service type of the PW data packet.
  • a specific portion of the unique information the specific portion being information that cannot be carried by the first PW-specific information field.
  • the PW packet header further includes a flag bit field, where the content in the flag bit field is used to identify whether the second PW-specific information field is included in the PW packet header.
  • the decapsulation apparatus may be a network device in the network for receiving the PW data packet.
  • the decapsulation apparatus 700 may include a receiving unit 701, a decapsulation unit 702, and a parsing unit 703:
  • the receiving unit 701 is configured to acquire a data packet sent by the sending device.
  • the decapsulating unit 702 is configured to decapsulate the data packet, and determine that the data packet is a PW data packet carrying a pseudowire PW packet header by using the content in the identifier field, the PW packet
  • the header includes the identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field.
  • the parsing unit 703 is configured to parse the PW packet header according to the format of the PW packet header, and specifically includes:
  • Determining the general information irrelevant to the PW service type implemented by the PW data packet by parsing the content in the PW type-independent information field, and determining the PW data packet by parsing the content in the PW type field The PW service type that is implemented, by parsing the first PW-specific information field, determines the unique information of the PW service type implemented by the PW data packet.
  • the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable byte length, and the parsing unit is further configured to analyze the second PW-specific
  • the content in the information field determines a specific part of the unique information of the PW service type implemented by the PW data message, and the specific part is information that cannot be carried by the first PW-specific information field.
  • the PW packet header further includes a flag bit field, where the parsing unit is further configured to parse the flag.
  • the content in the bit field determines whether the PW packet header includes the second PW-specific information field.
  • FIG. 8 is a system structural diagram of a pseudowire data packet processing system according to an embodiment of the present invention.
  • the processing system 800 includes a sending device 801 and a receiving device 802:
  • the sending device is configured to set a PW packet header for the pseudowire 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 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, and the content in the PW type-independent information field includes the PW service implemented by the PW data packet.
  • Type-independent general information the content in the PW type field is used to identify the PW service type implemented by the PW data packet, and the first PW-specific information field has a fixed byte length and is used to carry the
  • the PW data packet is configured to be specific to the PW service type; the PW packet header is encapsulated in the PW data packet, and the encapsulated PW data packet is sent to the receiving device;
  • the receiving device is configured to obtain a data packet sent by the sending device, decapsulate the data packet, and determine that the data packet carries the PW packet header by identifying content in the identifier field. Parsing the PW data packet according to the format of the PW packet header, and specifically: determining, by parsing the content in the PW type irrelevant information field, the PW data packet Defining the PW service type-independent general information, and determining the PW service type implemented by the PW data packet by parsing the content in the PW type field, and determining the first PW-specific information field to determine the The unique information of the PW service type implemented by the PW data packet.
  • the set PW header includes an identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field, where each field is used to carry the specified type of content, respectively.
  • These fields in the PW packet header carry various required information for defining and identifying the service type of the PW data packet, so that the packet encapsulation of various types of PWs can be uniformly and flexibly defined and expanded. Strong.
  • the sending device may encapsulate the PW packet header in the PW data packet, so that the receiving device can identify the PW data by setting the content in the PW packet header to the PW data packet sent to the receiving device.
  • the general information and the unique information carried in the packet, and the PW service type implemented by the PW data packet is determined.
  • FIG. 9 is a schematic diagram of a hardware structure of a sending device according to an embodiment of the present invention.
  • the sending device 900 includes a memory 901 and a transmitter 902, and is respectively connected to the memory 901 and the transmitter 902.
  • the processor 903 is configured to store a set of program instructions, and the processor 903 is configured to invoke the program instructions stored by the memory 901 to perform the following operations:
  • the PW data packet is a PW data packet with a PW packet header
  • the content in the PW type-independent information field includes general information that is independent of the PW service type implemented by the PW data packet
  • the PW The content in the type field is used to identify the PW service type that is implemented by the PW data packet
  • the first PW-specific information field has a fixed byte length, and is used to carry the PW service type that is implemented by the PW data packet.
  • the transmitter 902 is configured to encapsulate the PW packet header in the PW data packet, and send the encapsulated PW data packet to the receiving device.
  • the processor 903 may be a central processing unit (CPU), and the memory 901 may be a random access memory (RAM) type internal storage.
  • the transmitter and the 902 may include a common physical interface, and the physical interface may be an Ethernet interface or an Asynchronous Transfer Mode (ATM) interface.
  • the processor 903, the transmitter 902, and the memory 901 may be integrated into one or more independent circuits or hardware, such as an Application Specific Integrated Circuit (ASIC).
  • ASIC Application Specific Integrated Circuit
  • FIG. 10 is a schematic diagram of a hardware structure of a receiving device, where the receiving device 1000 includes a memory 1001 and a receiver 1002, and is respectively connected to the memory 1001 and the receiver 1002.
  • the processor 1003 is configured to store a set of program instructions, and the processor 1003 is configured to invoke the program instructions stored by the memory 1001 to perform the following operations:
  • Parsing the PW packet header according to the format of the PW packet header includes:
  • Determining the general information irrelevant to the PW service type implemented by the PW data packet by parsing the content in the PW type-independent information field, and determining the PW data packet by parsing the content in the PW type field The PW service type that is implemented, by parsing the first PW-specific information field, determines the unique information of the PW service type implemented by the PW data packet.
  • the processor 1003 may be a CPU
  • the memory 1001 may be a RAM type internal memory
  • the receiver 1002 may include a common physical interface, and the physical interface may be an Ethernet interface or an ATM interface.
  • the processor 1003, the receiver 1002, and the memory 1001 can 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 embodiment of the present invention is only used for the name identification, and does not represent the first in the order. The same rule applies to the "second".

Landscapes

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

Abstract

Disclosed are a method for encapsulating and decapsulating a pseudo-wire data message, and a relevant apparatus. 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, wherein each field is respectively used for carrying a designated type of content, and these fields in the PW message header carry various information required for defining and identifying a service type realized by a PW data message, so that various types of PW messages can be encapsulated uniformly and defined flexibly, and the expansibility is strong. By setting the content in a PW message header for a PW data message sent to a receiving device, a sending device can encapsulate the PW message header in the PW data message so that the receiving device can identify general information and specific information carried in the PW data message, and determines a PW service type realized by the PW data message.

Description

一种伪线数据报文的封装、解封装方法和相关装置Method for encapsulating and decapsulating pseudowire data message and related device
本申请要求于2016年05月11日提交中国专利局、申请号为201610310741.9、发明名称为“一种伪线数据报文的封装、解封装方法和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to the Chinese Patent Application filed on May 11, 2016, the Chinese Patent Application No. 201610310741.9, entitled "PACKING, DEBAGING METHOD AND RELATED APPARATUS FOR A PRIMARY DATA DATA MESSAGE", The entire contents are incorporated herein by reference.
技术领域Technical field
本发明涉及数据处理领域,特别是涉及一种伪线数据报文的封装、解封装方法和相关装置。The present invention relates to the field of data processing, and in particular, to a method, a decapsulation method, and a related apparatus for a pseudowire data message.
背景技术Background technique
伪线(英文:Pseudo Wire,缩写:PW)或伪线端到端仿真(英文:Pseudo Wire Edge-to-Edge Emulation,缩写:PWE3)是一种在互联网协议(英文:Internet Protocol,缩写:IP)/多协议标签交换(英文:Multi-Protocol Label Switching,缩写:MPLS)网络中仿真非IP业务的二层承载技术,通过伪线技术可以实现非IP网络与IP/MPLS网络之间的互连,或者基于融合的IP/MPLS网络承载各种非IP业务,从而实现网络资源的共享,降低网络部署和运维的成本。PW或PWE3可以基于IP或MPLS隧道技术实现,具体的,通过在IP/MPLS隧道封装(英文:IP/MPLS Tunnel Encapsulation)的标签栈中加入PW标签(英文:label),再将非IP的业务净荷(例如Payload)封装到报文中,形成可以实现基于IP/MPLS网络中的非IP业务传输的PW数据报文。如图1所示的PW数据报文的格式,PW label设置在IP/MPLS Tunnel Encapsulation和Payload之间。Pseudo Wire (English: Pseudo Wire, abbreviation: PW) or Pseudo Wire Edge-to-Edge Emulation (PWE3) is an Internet Protocol (English: Internet Protocol, abbreviation: IP) / Multi-Protocol Label Switching (English: Multi-Protocol Label Switching, abbreviation: MPLS) network Layer 2 bearer technology for simulating non-IP services. The interconnection between non-IP networks and IP/MPLS networks can be realized through pseudowire technology. Or, based on the fused IP/MPLS network, carries various non-IP services, thereby sharing network resources and reducing the cost of network deployment and operation and maintenance. The PW or PWE3 can be implemented based on the IP or MPLS tunneling technology. Specifically, the PW label (English: label) is added to the label stack of the IP/MPLS tunnel encapsulation (IP/MPLS Tunnel Encapsulation), and the non-IP service is added. The payload (for example, Payload) is encapsulated into the packet to form a PW data packet that can be transmitted based on the non-IP service in the IP/MPLS network. As shown in Figure 1, the PW label format is set between IP/MPLS Tunnel Encapsulation and Payload.
由于不同类型的业务有不同的属性和需求,为了能够在IP/MPLS网络尽量模拟不同类型业务的特征,需要对应携带用于处理不同PW类型所需要的一些相关信息。传统方式中一般通过PW控制字(英文:Control Word)来携带上述的相关信息,在PW数据报文中,PW控制字一般放在Payload之前,PW label之后,例如图1所示PW数据报文的格式。Because different types of services have different attributes and requirements, in order to be able to simulate the characteristics of different types of services on the IP/MPLS network, it is necessary to carry some relevant information needed to process different PW types. In the conventional mode, the PW control word (English: Control Word) is generally used to carry the above related information. In the PW data message, the PW control word is generally placed before the Payload, and after the PW label, for example, the PW data packet shown in FIG. The format.
目前的问题是,不同PW类型的控制字没有统一的格式定义,不同PW类型的控制字中一些字段的定义存在冲突,且控制字自身不能标识PW的类型,使得接收端无法直接通过PW控制字来确定伪线的业务类型和控制字的格式,必须通过预先配置或者发送端与接收端协商指定PW的类型,否则就无法正确解析控制字,这种方式很不灵活,扩展性差,不利于PW技术的继续推广和发展。The current problem is that there is no uniform format definition for control words of different PW types. The definition of some fields in control words of different PW types conflicts, and the control word itself cannot identify the type of PW, so that the receiving end cannot directly pass the PW control word. To determine the service type of the pseudowire and the format of the control word, the type of the PW must be negotiated by the pre-configuration or the sender and the receiver. Otherwise, the control word cannot be parsed correctly. This method is very inflexible and has poor scalability, which is not conducive to PW. The continued promotion and development of technology.
发明内容Summary of the invention
为了解决上述技术问题,本发明实施例提供了一种伪线数据报文的封装、解封装方法和相关装置,提供了统一、灵活的定义方式设置PW报文头,扩展性强。In order to solve the above technical problem, the embodiment of the present invention provides a method for encapsulating and decapsulating a pseudowire data packet, and a related device, and provides a unified and flexible definition manner to set a PW packet header, which has strong scalability.
第一方面,本发明实施例提供了一种伪线数据报文的封装方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for encapsulating a pseudowire data packet, where the method includes:
发送设备为PW数据报文设置PW报文头,所述PW报文头包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,所述标识符字段中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,所述PW类型字段中的内容用于标识所述PW 数据报文所实现的PW业务类型,所述第一PW特有信息字段所占用字节长度固定,用于携带所述PW数据报文所实现PW业务类型的特有信息;The sending device sets a PW packet header for the 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 the content in the identifier field is used. The PW data packet is a PW data packet with a PW packet header, and the content in the PW type-independent information field includes general information that is independent of the PW service type implemented by the PW data packet. The content in the PW type field is used to identify the PW The PW service type implemented by the data packet, where the first PW-specific information field has a fixed byte length, and is used to carry the unique information of the PW service type implemented by the PW data packet;
所述发送设备将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文。The sending device encapsulates the PW packet header in the PW data packet, and sends the encapsulated PW data packet to the receiving device.
可选的,通过封装所述PW数据报文,所述PW报文头所在字段封装在PW标签所在字段和所述业务净荷所在字段之间。Optionally, the PW packet header is encapsulated between a field where the PW tag is located and a field where the service payload is located, by encapsulating the PW data packet.
可选的,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,用于携带所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。Optionally, the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable length of a byte, and is used to carry the PW service type of the PW data packet. A specific portion of the unique information, the specific portion being information that cannot be carried by the first PW-specific information field.
可选的,所述PW报文头还包括标志位字段,所述标志位字段中的内容用于标识所述PW报文头中是否包括所述第二PW特有信息字段。Optionally, the PW packet header further includes a flag bit field, where the content in the flag bit field is used to identify whether the second PW-specific information field is included in the PW packet header.
第二方面,本发明实施例提供了一种伪线数据报文的封装装置,所述封装装置包括:In a second aspect, an embodiment of the present invention provides a device for packaging a pseudowire data packet, where the encapsulating device includes:
设置单元,用于为伪线PW数据报文设置PW报文头,所述PW报文头包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,所述标识符字段中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,所述PW类型字段中的内容用于标识所述PW数据报文所实现的PW业务类型,所述第一PW特有信息字段所占用字节长度固定,用于携带所述PW数据报文所实现PW业务类型的特有信息;a setting unit, configured to set a PW packet header for the pseudowire 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 the identifier The content in the field is used to identify that the PW data packet is a PW data packet with a PW packet header, and the content in the PW type-independent information field is not related to the PW service type implemented by the PW data packet. General information, the content in the PW type field is used to identify the PW service type implemented by the PW data packet, and the first PW-specific information field has a fixed byte length and is used to carry the PW data. The unique information of the PW service type realized by the message;
封装及发送单元,用于将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文。The encapsulating and transmitting unit is configured to encapsulate the PW packet header in the PW data packet, and send the encapsulated PW data packet to the receiving device.
可选的,通过所述封装及发送单元封装所述PW数据报文,所述PW报文头所在字段封装在PW标签所在字段和所述业务净荷所在字段之间。Optionally, the PW data packet is encapsulated by the encapsulating and sending unit, and the field of the PW packet header is encapsulated between a field where the PW tag is located and a field where the service payload is located.
可选的,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,用于携带所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。Optionally, the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable length of a byte, and is used to carry the PW service type of the PW data packet. A specific portion of the unique information, the specific portion being information that cannot be carried by the first PW-specific information field.
可选的,所述PW报文头还包括标志位字段,所述标志位字段中的内容用于标识所述PW报文头中是否包括所述第二PW特有信息字段。Optionally, the PW packet header further includes a flag bit field, where the content in the flag bit field is used to identify whether the second PW-specific information field is included in the PW packet header.
第三方面,本发明实施例提供了一种伪线数据报文的解封装方法,所述方法包括:In a third aspect, an embodiment of the present invention provides a method for decapsulating a pseudowire data packet, where the method includes:
接收设备获取发送设备发送的数据报文;Receiving, by the receiving device, a data packet sent by the sending device;
所述接收设备将所述数据报文解封装,通过识别标识符字段中的内容确定所述数据报文为携带了伪线PW报文头的PW数据报文,所述PW报文头包括所述标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段;The receiving device decapsulates the data packet, and determines that the data packet is a PW data packet carrying a pseudowire PW packet header by using the content in the identifier field, 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;
所述接收设备根据所述PW报文头的格式解析所述PW报文头,具体包括:The receiving device parses the PW packet header according to the format of the PW packet header, and specifically includes:
所述接收设备通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。The receiving device determines, by parsing the content in the PW type-independent information field, general information that is not related to the PW service type implemented by the PW data packet, and determines the content in the PW type field to determine the The PW service type implemented by the PW data packet is analyzed by the first PW-specific information field to determine the unique information of the PW service type implemented by the PW data packet.
可选的,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,所述接收设备根据所述PW报文头的格式解析所述PW报文头,还包括: Optionally, the PW packet header further includes a second PW-specific information field, where the length of the second PW-specific information field is variable, and the receiving device parses the format according to the format of the PW packet header. The PW header header also includes:
所述接收设备通过解析所述第二PW特有信息字段中的内容,确定出所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。The receiving device determines, by parsing the content in the second PW-specific information field, a specific part in the unique information of the PW service type implemented by the PW data packet, where the specific part is not available by the first part. Information carried in the PW-specific information field.
可选的,所述PW报文头还包括标志位字段,所述接收设备根据所述PW报文头的格式解析所述PW报文头,还包括:Optionally, the PW packet header further includes a flag bit field, and the receiving device parses the PW packet header according to the format of the PW packet header, and further includes:
所述接收设备通过解析所述标志位字段中的内容,确定出所述PW报文头是否包括所述第二PW特有信息字段。The receiving device determines whether the PW packet header includes the second PW-specific information field by parsing the content in the flag bit field.
第四方面,本发明实施例提供一种伪线数据报文的解封装装置,所述解封装装置包括:In a fourth aspect, an embodiment of the present invention provides a decapsulation apparatus for a pseudowire data packet, where the decapsulation apparatus includes:
接收单元,用于获取发送设备发送的数据报文;a receiving unit, configured to acquire a data packet sent by the sending device;
解封装单元,用于将所述数据报文解封装,通过识别标识符字段中的内容确定所述数据报文为携带了伪线PW报文头的PW数据报文,所述PW报文头包括所述标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段;a decapsulating unit, configured to decapsulate the data packet, and determine, by identifying the content in the identifier field, the data packet is a PW data packet carrying a pseudowire PW packet header, where the PW packet header Include the identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field;
解析单元,用于根据所述PW报文头的格式解析所述PW报文头,具体包括:The parsing unit is configured to parse the PW packet header according to the format of the PW packet header, and specifically includes:
通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。Determining the general information irrelevant to the PW service type implemented by the PW data packet by parsing the content in the PW type-independent information field, and determining the PW data packet by parsing the content in the PW type field The PW service type that is implemented, by parsing the first PW-specific information field, determines the unique information of the PW service type implemented by the PW data packet.
可选的,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,所述解析单元还用于通过解析所述第二PW特有信息字段中的内容,确定出所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。Optionally, the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable byte length, and the parsing unit is further configured to analyze the second PW-specific The content in the information field determines a specific part of the unique information of the PW service type implemented by the PW data message, and the specific part is information that cannot be carried by the first PW-specific information field.
可选的,所述PW报文头还包括标志位字段,所述解析单元还用于通过解析所述标志位字段中的内容,确定出所述PW报文头是否包括所述第二PW特有信息字段。Optionally, the PW packet header further includes a flag bit field, and the parsing unit is further configured to determine, by parsing the content in the flag bit field, whether the PW packet header includes the second PW-specific Information field.
第五方面,本发明实施例提供了一种伪线数据报文的处理***,所述处理***包括发送设备和接收设备:In a fifth aspect, an embodiment of the present invention provides a processing system for a pseudowire data packet, where the processing system includes a sending device and a receiving device:
所述发送设备,用于为伪线PW数据报文设置PW报文头,所述PW报文头包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,所述标识符字段中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,所述PW类型字段中的内容用于标识所述PW数据报文所实现的PW业务类型,所述第一PW特有信息字段所占用字节长度固定,用于携带所述PW数据报文所实现PW业务类型的特有信息;将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文;The sending device is configured to set a PW packet header for the pseudowire 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 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, and the content in the PW type-independent information field includes the PW service implemented by the PW data packet. Type-independent general information, the content in the PW type field is used to identify the PW service type implemented by the PW data packet, and the first PW-specific information field has a fixed byte length and is used to carry the The PW data packet is configured to be specific to the PW service type; the PW packet header is encapsulated in the PW data packet, and the encapsulated PW data packet is sent to the receiving device;
所述接收设备,用于获取发送设备发送的数据报文;将所述数据报文解封装,通过识别所述标识符字段中的内容确定所述数据报文为携带了所述PW报文头的所述PW数据报文;根据所述PW报文头的格式解析所述PW报文头,具体包括:通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。The receiving device is configured to obtain a data packet sent by the sending device, decapsulate the data packet, and determine that the data packet carries the PW packet header by identifying content in the identifier field. Parsing the PW data packet according to the format of the PW packet header, and specifically: determining, by parsing the content in the PW type irrelevant information field, the PW data packet Defining the PW service type-independent general information, and determining the PW service type implemented by the PW data packet by parsing the content in the PW type field, and determining the first PW-specific information field to determine the The unique information of the PW service type implemented by the PW data packet.
由上述技术方案可以看出,设置的PW报文头中包括标识符字段、PW类型无关信息字段、 PW类型字段和第一PW特有信息字段,各个字段分别用于携带指定类型的内容,使用所述PW报文头中的这些字段携带用于定义、标识PW数据报文所实现业务类型的各种所需信息,从而可以实现对各种类型PW的报文封装统一、灵活的定义,扩展性强。通过针对发向接收设备的PW数据报文设置所述PW报文头中的内容,发送设备可以在所述PW数据报文中封装所述PW报文头,以便接收设备可以识别所述PW数据报文携带的通用信息和特有信息,并确定所述PW数据报文所实现的PW业务类型。It can be seen from the foregoing technical solution that the set PW packet header includes an identifier field and a PW type irrelevant information field. The PW type field and the first PW-specific information field, where each field is used to carry the content of the specified type, and the fields in the PW packet header are used to carry various types of services for defining and identifying the PW data packet. The required information, so that the packet encapsulation of various types of PWs can be uniformly and flexibly defined, and the scalability is strong. The sending device may encapsulate the PW packet header in the PW data packet, so that the receiving device can identify the PW data by setting the content in the PW packet header to the PW data packet sent to the receiving device. The general information and the unique information carried in the packet, and the PW service type implemented by the PW data packet is determined.
附图说明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 embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图1为一种PW数据报文的格式示意图;1 is a schematic diagram of a format of a PW data packet;
图2为本发明实施例提供的一种PW报文头的格式示意图;2 is a schematic diagram of a format of a PW packet header according to an embodiment of the present invention;
图3为本发明实施例提供的一种伪线数据报文封装方法的方法流程图;3 is a flowchart of a method for encapsulating a pseudowire data packet according to an embodiment of the present invention;
图4为本发明实施例提供的一种PW数据报文的格式示意图;FIG. 4 is a schematic diagram of a format of a PW data packet according to an embodiment of the present disclosure;
图5为本发明实施例提供的一种伪线数据报文解封装方法的方法流程图;FIG. 5 is a flowchart of a method for decapsulating a pseudowire data packet according to an embodiment of the present invention;
图6为本发明实施例提供的一种伪线数据报文封装装置的装置结构图;FIG. 6 is a structural diagram of an apparatus for a pseudowire data packet encapsulating apparatus according to an embodiment of the present invention;
图7为本发明实施例提供的一种伪线数据报文解封装装置的装置结构图;FIG. 7 is a structural diagram of an apparatus for decapsulating a pseudowire data packet according to an embodiment of the present invention;
图8为本发明实施例提供的一种伪线数据报文的处理***的***结构图;FIG. 8 is a system structural diagram of a system for processing a pseudowire data packet according to an embodiment of the present invention;
图9为本发明实施例提供的一种发送设备的硬件结构示意图;FIG. 9 is a schematic structural diagram of hardware of a sending device according to an embodiment of the present disclosure;
图10为本发明实施例提供的一种接收设备的硬件结构示意图。FIG. 10 is a schematic structural diagram of hardware of a receiving device according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
随着IP网络的不断发展,更多类型的业务存在与IP网络互连的需求,或者需要迁移到IP/MPLS网络上,例如通过IP/MPLS网络承载无线前传(英文:Fronthaul)业务,智能电网(英文:Smart Grid)业务或是专业音/视频(英文:Pro-Audio/Video)业务等。可以通过扩展PW技术实现在IP/MPLS网络中承载这些新业务,为此可能需要定义新的PW业务类型,不同的PW业务类型有着不同的属性和处理要求。With the continuous development of IP networks, more types of services need to be interconnected with IP networks, or need to be migrated to IP/MPLS networks, such as carrying wireless forwards (English: Fronthaul) services over IP/MPLS networks, smart grids. (English: Smart Grid) business or professional audio/video (English: Pro-Audio/Video) business. The new PW service can be used to carry these new services in the IP/MPLS network. For this reason, a new PW service type may be defined. Different PW service types have different attributes and processing requirements.
传统的方式是使用PW控制字来携带用于处理某种PW业务的相关信息,例如可以携带防止乱序的信息,传递控制和告警信息等。The traditional method is to use the PW control word to carry related information for processing a certain PW service, for example, it can carry information to prevent out-of-order, transfer control and alarm information, and the like.
然而,目前的问题是,不同PW类型的控制字没有统一的格式定义,不同PW类型的控制字中一些字段的定义存在冲突,且控制字自身不能标识PW的类型,使得接收端无法直接通过PW控制字来确定伪线的业务类型和控制字的格式,必须通过预先配置或者发送端与接收端协商指定PW的类型,否则就无法正确解析控制字,这种方式很不灵活,扩展 性差,不利于PW技术的继续推广和发展。However, the current problem is that there is no uniform format definition for the control words of different PW types. The definition of some fields in the control words of different PW types conflicts, and the control word itself cannot identify the type of the PW, so that the receiving end cannot directly pass the PW. The control word is used to determine the service type of the pseudowire and the format of the control word. The type of the PW must be negotiated by the pre-configuration or the sender and the receiver. Otherwise, the control word cannot be parsed correctly. This method is very inflexible and expands. Poor performance is not conducive to the continued promotion and development of PW technology.
而且发明人发现,传统的PW控制字所占用字节长度固定,仅为4个字节,能够携带的内容有限,扩展性差。对于一些新的功能和新的PW业务来说,缺少足够的空间携带所需要的信息。故即使统一PW控制字携带相关信息的格式定义方式,也难以满足目前越来越多的PW业务类型的处理需求。Moreover, the inventors have found that the conventional PW control word occupies a fixed byte length of only 4 bytes, which is capable of carrying limited content and poor scalability. For some new features and new PW services, there is not enough space to carry the information needed. Therefore, even if the unified PW control word carries the format definition method of related information, it is difficult to meet the processing requirements of more and more PW service types.
为此,本发明实施例提供了一种伪线数据报文的封装、解封装方法和相关装置,设置的PW报文头中包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,各个字段分别用于携带指定类型的内容,使用所述PW报文头中的这些字段携带用于定义、标识PW数据报文所实现业务类型的各种所需信息,从而既为各种PW业务类型定义了统一的报文头封装方式,又能够携带特定PW类型的特有信息,且具备很强的扩展性。通过针对发向接收设备的PW数据报文设置所述PW报文头中的内容,发送设备可以在所述PW数据报文中封装所述PW报文头,以便接收设备可以识别所述PW数据报文携带的通用信息和特有信息,并确定所述PW数据报文所实现的PW业务类型。To this end, the embodiment of the present invention provides a method for encapsulating and decapsulating a pseudowire data packet, and a related device. The set PW packet header includes an identifier field, a PW type independent information field, a PW type field, and a first The PW-specific information field, where each field is used to carry the specified type of content, and the fields in the PW packet header are used to carry various required information for defining and identifying the service type implemented by the PW data packet, thereby A unified packet header encapsulation mode is defined for various PW service types, and unique information of a specific PW type can be carried, and has strong scalability. The sending device may encapsulate the PW packet header in the PW data packet, so that the receiving device can identify the PW data by setting the content in the PW packet header to the PW data packet sent to the receiving device. The general information and the unique information carried in the packet, and the PW service type implemented by the PW data packet is determined.
在本发明实施例中所述的PW报文头(英文:Generic PW header)中,明确定义了分别用于携带指定类型内容的各个字段,以便携带能够涵盖目前出现的以及可能出现的PW业务类型的所需信息,从而达到统一定义PW报文头的效果。In the PW header (English: Generic PW header) described in the embodiment of the present invention, each field for carrying a specified type of content is explicitly defined, so as to carry a PW service type that can present and may appear. The required information to achieve the effect of uniformly defining the PW header.
在本发明实施例中,所述PW报文头可以包括标识符(英文:First Nibble)字段、PW类型无关信息(英文:PW-Type Independent Information)字段、PW类型(英文:PW-Type)字段和第一PW特有信息(英文:PW-specific Information)字段。In the embodiment of the present invention, the PW packet header may include an identifier (English: First Nibble) field, a PW type-independent information (English: PW-Type Independent Information) field, and a PW type (English: PW-Type) field. And the first PW-specific information (English: PW-specific Information) field.
其中,所述标识符字段位于所述PW报文头的最前部,该字段又可以称为前半字节或者前4bit,例如图2所示PW报文头格式中最前部的“XXXX”部分。所述标识符字段中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,也就是说,当接收设备接收到一个数据报文时,若这个数据报文带有所述标识符字段,那么接收设备通过所述标识符字段的标识功能,可以将这个数据报文与其他IPv4、IPv6报文,带PW控制字的报文等其他数据报文区分开,使得接收设备可以识别出这个数据报文为本发明实施例中提供的这类携带PW报文头的PW数据报文。例如可以将所述标识符字段的取值设置为2或3,用于标识PW数据报文携带了PW报文头。The identifier field is located at the forefront of the PW packet header, and the field may be referred to as the first nibble or the first 4 bits, for example, the frontmost "XXXX" portion of the PW packet header format shown in FIG. 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 the receiving device receives a data packet, if the data packet is received, With the identifier field, the receiving device can distinguish the data packet from other IPv4, IPv6 packets, PW control words, and other data packets by using the identifier function of the identifier field. The receiving device can identify that the data packet is the PW data packet carrying the PW packet header provided in the embodiment of the present invention. For example, the identifier field may be set to 2 or 3, and the PW data packet carries the PW packet header.
所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,即对各种类型的PW业务都通用的信息。所述PW类型无关信息字段中可以至少包括操作管理维护(英文:Operation Administration and Maintenance,缩写:OAM)字段、服务质量(英文:Quality of Service,缩写:QoS)字段、序列号(英文:Sequence Number)字段和流标识(英文:Flow Identifier)字段,包括这些字段的所述PW类型无关信息字段可以设置在所述PW报文头格式中的前部,例如图2所示报文头格式中前两行的格式、排列顺序。通过所述OAM字段中携带的内容,可以用于指示对所述PW数据报文进行何种OAM相关的处理,例如报文统计等。通过所述QoS字段中携带的内容,可以用于指示所述PW数据报文所要求的服务质量。通过所述序列号字段中携带的内容,可以用于防止所述PW数据报文中的业务报文乱序。通过所述流标识字段中携带的内容,可以用于标识所述PW数据报文所属的数据流。The content in the PW type-independent information field includes general information that is independent of the PW service type implemented by the PW data packet, that is, information common to various types of PW services. The PW type-independent information field may include at least an Operation Administration and Maintenance (OAM) field, a Quality of Service (QoS: QoS) field, and a sequence number (English: Sequence Number). a field and a flow identifier (English: Flow Identifier) field, the PW type-independent information field including the fields may be set in the front part of the PW packet header format, for example, in the packet header format shown in FIG. The format and order of the two lines. The content carried in the OAM field may be used to indicate which OAM-related processing, such as packet statistics, is performed on the PW data packet. The content carried in the QoS field may be used to indicate the quality of service required by the PW data packet. The content carried in the sequence number field can be used to prevent the service packets from being out of order in the PW data packet. The content carried in the flow identifier field can be used to identify the data flow to which the PW data packet belongs.
所述PW类型字段中的内容主要用于标识所述PW数据报文所实现的PW业务类型。 The content in the PW type field is mainly used to identify the PW service type implemented by the PW data packet.
需要注意的是,通常不同的PW业务类型还会包括该PW业务类型所特有的信息,例如可以包括控制信息、状态信息、告警信息等。在本发明实施例中,所述PW报文头还可以通过已定义的字段来携带这类信息,其中包括PW特有信息字段。It should be noted that the different PW service types may also include information specific to the PW service type, and may include, for example, control information, status information, and alarm information. In the embodiment of the present invention, the PW packet header may also carry such information through a defined field, including a PW-specific information field.
所述第一PW特有信息字段中所携带的内容类型和所占字节长度是预先设置好的,用于携带所述PW数据报文所实现PW业务类型的特有信息。所述PW特有信息字段的格式可以是一组带有特定含义的bit标志位,也可以根据特定PW类型定义其他格式。The content type and the length of the Bytes carried in the first PW-specific information field are preset, and are used to carry the unique information of the PW service type implemented by the PW data packet. The format of the PW-specific information field may be a set of bit flag bits with a specific meaning, or other formats may be defined according to a specific PW type.
在本发明实施例中,所述第一PW特有信息字段基本上定义了目前常见的各个PW业务类型特有信息中可能携带的内容。若所述PW数据报文所实现PW业务类型的特有信息中的全部信息已经定义在所述第一PW特有信息字段中,那么就可以由所述第一PW特有信息字段携带PW业务类型的全部特有信息。若某种PW业务类型的特有信息中有一些信息未在所述第一PW特有信息字段中预先定义,那么PW业务类型的特有信息的这部分信息将不能由所述第一PW特有信息字段携带,或者可以理解为,第一PW特有信息字段中没有足够的预留位置来携带该信息。可选的,这部分信息可以由本发明实施例提供的其他字段来携带。在这种情况下,所述第一PW特有信息字段可以仅携带PW业务类型的特有信息的一部分。In the embodiment of the present invention, the first PW-specific information field basically defines content that may be carried in the specific information of each PW service type that is currently common. If all the information in the unique information of the PW service type implemented by the PW data packet is already defined in the first PW-specific information field, all the PW service types may be carried by the first PW-specific information field. Unique information. If some information in the unique information of a certain PW service type is not predefined in the first PW-specific information field, the part of the information specific to the PW service type cannot be carried by the first PW-specific information field. Or, it can be understood that there is not enough reserved location in the first PW-specific information field to carry the information. Optionally, the part of the 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 the unique information of the PW service type.
若出现PW业务类型的特有信息中有一些信息未在所述第一PW特有信息字段中预先定义的情况,可选的,所述PW报文头还可以包括第二PW特有信息字段(英文:PW-Type Specific Variables),所述第二PW特有信息字段所占用字节长度可变,用于携带所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。If the information of the PW service type is not pre-defined in the first PW-specific information field, the PW packet header may further include a second PW-specific information field. PW-Type Specific Variables), the second PW-specific information field has a variable byte length, and is used to carry a specific part of the PW service type-specific information that is implemented by the PW data packet, where the specific part is Information that cannot be carried by the first PW-specific information field.
举例说明,这里所述的特定信息中包括的可以为上述未在所述第一PW特有信息字段中定义的信息。通过所述第二PW特有信息字段,可以实现高扩展性,对可能出现的特定PW业务类型中的新信息做好准备。For example, the specific information included in the information may be the information that is not defined in the first PW-specific information field. Through the second PW-specific information field, high scalability can be achieved, and new information in a specific PW service type that may appear is prepared.
为了方便接收设备在解析报文时能够明确所述PW报文头中设置了所述第二PW特有信息字段,可选的,所述PW报文头还可以包括标志位字段,所述标志位字段中的内容用于标识所述PW报文头中是否包括了所述第二PW特有信息字段。例如将所述标志位字段中内容设置为1时标识所述PW报文头包括了所述第二PW特有信息字段,设置为0时标识所述PW报文头未包括所述第二PW特有信息字段。所述标志位字段在所述PW报文头中的位置可以如图2所示,在图2中,所述标志位字段具体为“V”部分。The PW packet header may further include a flag bit field, and the flag bit may be included in the PW packet header. The content in the field is used to identify whether the second PW-specific information field is included in the PW packet header. For example, when the content of the flag bit field is set to 1, the PW packet header includes the second PW-specific information field, and when set to 0, the PW packet header does not include the second PW-specific header. Information field. The location of the flag bit field in the PW packet header may be as shown in FIG. 2. In FIG. 2, the flag bit field is specifically a "V" portion.
接下来对在PW数据报文中封装、解封装所述PW报文头进行说明。Next, the PW packet header is encapsulated and decapsulated in the PW data packet.
封装带有PW报文头的PW数据报文的过程如图3所示。The process of encapsulating a PW data packet with a PW packet header is shown in FIG. 3.
101:发送设备为PW数据报文设置PW报文头。101: The sending device sets a PW packet header for the PW data packet.
举例说明,本发明实施例中所述的发送设备和接收设备可以为网络设备,在IP/MPLS网络中,所述发送设备和接收设备可以为网络侧边缘(英文:Provider Edge,缩写:PE)设备。所述发送设备和接收设备可以通过事先协商等方式确定是否使用PW报文头的封装方式,即是否在PW数据报文中携带PW报文头。For example, the sending device and the receiving device in the embodiment of the present invention may be network devices. In the IP/MPLS network, the sending device and the receiving device may be network edge (English: Provider Edge, abbreviation: PE) device. The sending device and the receiving device may determine whether to use the encapsulation mode of the PW packet header, that is, whether the PW packet header is carried in the PW data packet.
所述PW报文头中的内容与所述PW数据报文所实现的PW业务直接相关。The content in the PW packet header is directly related to the PW service implemented by the PW data packet.
102:所述发送设备将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文。 Step 102: The sending device encapsulates the PW packet header in the PW data packet, and sends the encapsulated PW data packet to the receiving device.
封装方式可以是将设置好的所述PW报文头添加在业务净荷字段之前,所述发送设备再添加PW标签和外部的隧道封装。在这种封装方式中,所述PW报文头所在字段可以封装在PW标签所在字段和所述业务净荷所在字段之间,例如封装后的所述PW数据报文的格式可以如图4所示。The encapsulation mode may be that the set PW packet header is added before the service payload field, and the sending device adds a PW label and an external tunnel encapsulation. In this encapsulation mode, the field of the PW packet header may be encapsulated between the field where the PW tag is located and the field where the service payload is located. For example, the format of the encapsulated PW data packet may be as shown in FIG. 4 . Show.
解封装带有PW报文头的PW数据报文的过程如图5所示。The process of decapsulating a PW data packet with a PW packet header is shown in FIG. 5.
201:接收设备获取发送设备发送的数据报文。201: The receiving device acquires a data packet sent by the sending device.
202:所述接收设备将所述数据报文解封装,通过识别标识符字段中的内容确定所述数据报文为携带了PW报文头的PW数据报文,所述PW报文头包括所述标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段。202: The receiving device decapsulates the data packet, and determines, by using the content in the identifier field, that the data packet is a PW data packet carrying a PW packet header, where the PW packet header includes a The identifier field, the PW type-independent information field, the PW type field, and the first PW-specific information field.
举例说明,所述接收设备通过解封装,去除封装后的所述数据报文外部的隧道封装和PW标签后,可以通过所述标识符的内容确定所述数据报文为一种携带有PW报文头的PW数据报文,根据所述PW数据报文的格式类型,可以依据PW报文头的解析方式对所述PW报文头进行数据解析。For example, after the decapsulation, the receiving device removes the tunnel encapsulation and the PW label outside the encapsulated data packet, the data packet can be determined to be a PW packet by using the content of the identifier. The PW data packet of the header can be parsed according to the format of the PW packet, and the PW packet header can be parsed according to the parsing manner of the PW packet header.
203:所述接收设备根据所述PW报文头的格式解析所述PW报文头,具体包括:203: The receiving device parses the PW packet header according to the format of the PW packet header, and specifically includes:
所述接收设备通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,以及第一PW特有信息字段的格式。通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。The receiving device determines, by parsing the content in the PW type-independent information field, general information that is not related to the PW service type implemented by the PW data packet, and determines the content in the PW type field to determine the The PW service type implemented by the PW data packet and the format of the first PW-specific information field. The specific information of the PW service type implemented by the PW data packet is determined by parsing the first PW-specific information field.
举例说明,所述接收设备通过解析所述OAM字段中携带的内容,可以明确对所述PW数据报文进行何种OAM相关的处理,例如报文统计等。通过解析所述QoS字段中携带的内容,可以明确所述PW数据报文所要求的服务质量。通过解析所述序列号字段中携带的内容,可以对所述PW数据报文中的乱序的业务报文进行重排。通过解析所述流标识字段中携带的内容,可以明确所述PW数据报文所属的数据流。For example, the receiving device can perform explicit OAM-related processing, such as packet statistics, on the PW data packet by analyzing the content carried in the OAM field. By parsing the content carried in the QoS field, the quality of service required by the PW data packet can be clarified. By parsing the content carried in the sequence number field, the out-of-order service packets in the PW data packet can be rearranged. The data stream to which the PW data packet belongs can be clarified by parsing the content carried in the flow identifier field.
若所述PW报文头还包括占用字节长度可变的第二PW特有信息字段,所述接收设备根据所述PW报文头的格式解析所述PW报文头还可以包括:If the PW packet header further includes a second PW-specific information field that has a variable byte length, the receiving device may further include: the parsing the PW packet header according to the format of the PW packet header:
所述接收设备通过进一步解析所述第二PW特有信息字段中的内容,确定出所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。The receiving device determines, by further parsing the content in the second PW-specific information field, a specific part in the unique information of the PW service type implemented by the PW data packet, where the specific part is unable to be Information carried by a PW-specific information field.
可选的,所述PW报文头还包括标志位字段,所述接收设备根据所述PW报文头的格式解析所述PW报文头,还包括:Optionally, the PW packet header further includes a flag bit field, and the receiving device parses the PW packet header according to the format of the PW packet header, and further includes:
所述接收设备通过解析所述标志位字段中的内容,确定出所述PW报文头是否包括所述第二PW特有信息字段。The receiving device determines whether the PW packet header includes the second PW-specific information field by parsing the content in the flag bit field.
举例说明,通过标志位字段的标识,可以让所述接收设备明确所需解析的字段以及可能携带的内容。提高了所述接收设备对解析携带PW报文头的PW数据报文的准确性和效率。For example, by the identifier 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 efficiency of the PW data packet carrying the PW packet header are improved by the receiving device.
可以看出,设置的PW报文头中包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,各个字段分别用于携带指定类型的内容,使用所述PW报文头中的这些字段携带用于定义、标识PW数据报文所实现业务类型的各种所需信息,从而既为各种PW业务类型定义了统一的报文头封装方式,又能够携带特定PW类型的特有信 息,且具备很强的扩展性。通过针对发向接收设备的PW数据报文设置所述PW报文头中的内容,发送设备可以在所述PW数据报文中封装所述PW报文头,以便接收设备可以识别所述PW数据报文携带的通用信息和特有信息,并确定所述PW数据报文所实现的PW业务类型。It can be seen that the set 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 each field is used to carry content of a specified type, and the PW message is used. The fields in the header carry various required information for defining and identifying the service type of the PW data packet, so that a unified packet header encapsulation mode is defined for various PW service types, and a specific PW type can be carried. Unique letter Interest, and has a strong scalability. The sending device may encapsulate the PW packet header in the PW data packet, so that the receiving device can identify the PW data by setting the content in the PW packet header to the PW data packet sent to the receiving device. The general information and the unique information carried in the packet, and the PW service type implemented by the PW data packet is determined.
接下来说明本发明实施例提供的一种伪线数据报文的封装装置,所述封装装置可以为网络中的用于发送所述PW数据报文的网络设备。请参见图6所示,所述封装装置600可以包括设置单元601和封装及发送单元602:Next, a device for encapsulating a pseudowire data packet according to an embodiment of the present invention is described. The encapsulating device may be a network device in the network for transmitting the PW data packet. Referring to FIG. 6, the packaging device 600 may include a setting unit 601 and a packaging and sending unit 602:
所述设置单元601,用于为PW数据报文设置PW报文头,所述PW报文头包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,所述标识符字段中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,所述PW类型字段中的内容用于标识所述PW数据报文所实现的PW业务类型,所述第一PW特有信息字段所占用字节长度固定,用于携带所述PW数据报文所实现PW业务类型的特有信息。The setting unit 601 is configured to set a PW packet header for the 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 the identifier The content of the PW data packet is a PW data packet with a PW packet header, and the content in the PW type-independent information field includes a PW service type implemented by the PW data packet. The unrelated general information, the content in the PW type field is used to identify the PW service type implemented by the PW data packet, and the first PW-specific information field has a fixed byte length and is used to carry the PW. The unique information of the PW service type implemented by the data message.
所述封装及发送单元602,用于将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文。The encapsulating and transmitting unit 602 is configured to encapsulate the PW packet header in the PW data packet, and send the encapsulated PW data packet to the receiving device.
可选的,通过所述封装及发送单元封装所述PW数据报文,所述PW报文头所在字段封装在PW标签所在字段和所述业务净荷所在字段之间。Optionally, the PW data packet is encapsulated by the encapsulating and sending unit, and the field of the PW packet header is encapsulated between a field where the PW tag is located and a field where the service payload is located.
可选的,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,用于携带所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。Optionally, the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable length of a byte, and is used to carry the PW service type of the PW data packet. A specific portion of the unique information, the specific portion being information that cannot be carried by the first PW-specific information field.
可选的,所述PW报文头还包括标志位字段,所述标志位字段中的内容用于标识所述PW报文头中是否包括所述第二PW特有信息字段。Optionally, the PW packet header further includes a flag bit field, where the content in the flag bit field is used to identify whether the second PW-specific information field is included in the PW packet header.
接下来说明本发明实施例提供的一种伪线数据报文的解封装装置,所述解封装装置可以为网络中的用于接收所述PW数据报文的网络设备。请参见图7所示,所述解封装装置700可以包括接收单元701、解封装单元702和解析单元703:Next, a decapsulation apparatus for a pseudowire data packet according to an embodiment of the present invention is described. The decapsulation apparatus may be a network device in the network for receiving the PW data packet. Referring to FIG. 7, the decapsulation apparatus 700 may include a receiving unit 701, a decapsulation unit 702, and a parsing unit 703:
接收单元701,用于获取发送设备发送的数据报文。The receiving unit 701 is configured to acquire a data packet sent by the sending device.
解封装单元702,用于将所述数据报文解封装,通过识别标识符字段中的内容确定所述数据报文为携带了伪线PW报文头的PW数据报文,所述PW报文头包括所述标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段。The decapsulating unit 702 is configured to decapsulate the data packet, and determine that the data packet is a PW data packet carrying a pseudowire PW packet header by using the content in the identifier field, the PW packet The header includes the identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field.
解析单元703,用于根据所述PW报文头的格式解析所述PW报文头,具体包括:The parsing unit 703 is configured to parse the PW packet header according to the format of the PW packet header, and specifically includes:
通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。Determining the general information irrelevant to the PW service type implemented by the PW data packet by parsing the content in the PW type-independent information field, and determining the PW data packet by parsing the content in the PW type field The PW service type that is implemented, by parsing the first PW-specific information field, determines the unique information of the PW service type implemented by the PW data packet.
可选的,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,所述解析单元还用于通过解析所述第二PW特有信息字段中的内容,确定出所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。Optionally, the PW packet header further includes a second PW-specific information field, where the second PW-specific information field has a variable byte length, and the parsing unit is further configured to analyze the second PW-specific The content in the information field determines a specific part of the unique information of the PW service type implemented by the PW data message, and the specific part is information that cannot be carried by the first PW-specific information field.
可选的,所述PW报文头还包括标志位字段,所述解析单元还用于通过解析所述标志 位字段中的内容,确定出所述PW报文头是否包括所述第二PW特有信息字段。Optionally, the PW packet header further includes a flag bit field, where the parsing unit is further configured to parse the flag. The content in the bit field determines whether the PW packet header includes the second PW-specific information field.
图8为本发明实施例提供的一种伪线数据报文处理***的***结构图,所述处理***800包括发送设备801和接收设备802:FIG. 8 is a system structural diagram of a pseudowire data packet processing system according to an embodiment of the present invention. The processing system 800 includes a sending device 801 and a receiving device 802:
所述发送设备,用于为伪线PW数据报文设置PW报文头,所述PW报文头包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,所述标识符字段中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,所述PW类型字段中的内容用于标识所述PW数据报文所实现的PW业务类型,所述第一PW特有信息字段所占用字节长度固定,用于携带所述PW数据报文所实现PW业务类型的特有信息;将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文;The sending device is configured to set a PW packet header for the pseudowire 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 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, and the content in the PW type-independent information field includes the PW service implemented by the PW data packet. Type-independent general information, the content in the PW type field is used to identify the PW service type implemented by the PW data packet, and the first PW-specific information field has a fixed byte length and is used to carry the The PW data packet is configured to be specific to the PW service type; the PW packet header is encapsulated in the PW data packet, and the encapsulated PW data packet is sent to the receiving device;
所述接收设备,用于获取发送设备发送的数据报文;将所述数据报文解封装,通过识别所述标识符字段中的内容确定所述数据报文为携带了所述PW报文头的所述PW数据报文;根据所述PW报文头的格式解析所述PW报文头,具体包括:通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。The receiving device is configured to obtain a data packet sent by the sending device, decapsulate the data packet, and determine that the data packet carries the PW packet header by identifying content in the identifier field. Parsing the PW data packet according to the format of the PW packet header, and specifically: determining, by parsing the content in the PW type irrelevant information field, the PW data packet Defining the PW service type-independent general information, and determining the PW service type implemented by the PW data packet by parsing the content in the PW type field, and determining the first PW-specific information field to determine the The unique information of the PW service type implemented by the PW data packet.
根据上述实施例可以看出,设置的PW报文头中包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,各个字段分别用于携带指定类型的内容,使用所述PW报文头中的这些字段携带用于定义、标识PW数据报文所实现业务类型的各种所需信息,从而可以实现对各种类型PW的报文封装统一、灵活的定义,扩展性强。通过针对发向接收设备的PW数据报文设置所述PW报文头中的内容,发送设备可以在所述PW数据报文中封装所述PW报文头,以便接收设备可以识别所述PW数据报文携带的通用信息和特有信息,并确定所述PW数据报文所实现的PW业务类型。According to the foregoing embodiment, the set PW header includes an identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field, where each field is used to carry the specified type of content, respectively. These fields in the PW packet header carry various required information for defining and identifying the service type of the PW data packet, so that the packet encapsulation of various types of PWs can be uniformly and flexibly defined and expanded. Strong. The sending device may encapsulate the PW packet header in the PW data packet, so that the receiving device can identify the PW data by setting the content in the PW packet header to the PW data packet sent to the receiving device. The general information and the unique information carried in the packet, and the PW service type implemented by the PW data packet is determined.
参阅图9,图9为本发明实施例提供的一种发送设备的硬件结构示意图,所述发送设备900包括存储器901和发送器902,以及分别与所述存储器901和所述发送器902连接的处理器903,所述存储器901用于存储一组程序指令,所述处理器903用于调用所述存储器901存储的程序指令执行如下操作: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. The sending device 900 includes a memory 901 and a transmitter 902, and is respectively connected to the memory 901 and the transmitter 902. The processor 903 is configured to store a set of program instructions, and the processor 903 is configured to invoke the program instructions stored by the memory 901 to perform the following operations:
为PW数据报文设置PW报文头,所述PW报文头包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,所述标识符字段中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,所述PW类型字段中的内容用于标识所述PW数据报文所实现的PW业务类型,所述第一PW特有信息字段所占用字节长度固定,用于携带所述PW数据报文所实现PW业务类型的特有信息;Setting a PW packet header for the 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 the content in the identifier field is used to identify The PW data packet is a PW data packet with a PW packet header, and the content in the PW type-independent information field includes general information that is independent of the PW service type implemented by the PW data packet, and the PW The content in the type field is used to identify the PW service type that is implemented by the PW data packet, and the first PW-specific information field has a fixed byte length, and is used to carry the PW service type that is implemented by the PW data packet. Unique information;
触发所述发送器902将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文。The transmitter 902 is configured to encapsulate the PW packet header in the PW data packet, and send the encapsulated PW data packet to the receiving device.
可选地,所述处理器903可以为中央处理器(Central Processing Unit,CPU),所述存储器901可以为随机存取存储器(Random Access Memory,RAM)类型的内部存储 器和所述发送器902可以包含普通物理接口,所述物理接口可以为以太(Ethernet)接口或异步传输模式(Asynchronous Transfer Mode,ATM)接口。所述处理器903、发送器902和存储器901可以集成为一个或多个独立的电路或硬件,如:专用集成电路(Application Specific Integrated Circuit,ASIC)。Optionally, the processor 903 may be a central processing unit (CPU), and the memory 901 may be a random access memory (RAM) type internal storage. The transmitter and the 902 may include a common physical interface, and the physical interface may be an Ethernet interface or an Asynchronous Transfer Mode (ATM) interface. The processor 903, the transmitter 902, and the memory 901 may be integrated into one or more independent circuits or hardware, such as an Application Specific Integrated Circuit (ASIC).
参阅图10,图10为本发明实施例提供的一种接收设备的硬件结构示意图,所述接收设备1000包括存储器1001和接收器1002,以及分别与所述存储器1001和所述接收器1002连接的处理器1003,所述存储器1001用于存储一组程序指令,所述处理器1003用于调用所述存储器1001存储的程序指令执行如下操作:10 is a schematic diagram of a hardware structure of a receiving device, where the receiving device 1000 includes a memory 1001 and a receiver 1002, and is respectively connected to the memory 1001 and the receiver 1002. The processor 1003 is configured to store a set of program instructions, and the processor 1003 is configured to invoke the program instructions stored by the memory 1001 to perform the following operations:
触发所述接收器1002获取发送设备发送的数据报文;Triggering the receiver 1002 to obtain a data packet sent by the sending device;
将所述数据报文解封装,通过识别标识符字段中的内容确定所述数据报文为携带了伪线PW报文头的PW数据报文,所述PW报文头包括所述标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段;Decapsulating the data packet, and determining that the data packet is a PW data packet carrying a pseudowire PW packet header by using the content in the identifier field, 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;
根据所述PW报文头的格式解析所述PW报文头,具体包括:Parsing the PW packet header according to the format of the PW packet header includes:
通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。Determining the general information irrelevant to the PW service type implemented by the PW data packet by parsing the content in the PW type-independent information field, and determining the PW data packet by parsing the content in the PW type field The PW service type that is implemented, by parsing the first PW-specific information field, determines the unique information of the PW service type implemented by the PW data packet.
可选地,所述处理器1003可以为CPU,所述存储器1001可以为RAM类型的内部存储器,所述接收器1002可以包含普通物理接口,所述物理接口可以为Ethernet接口或ATM接口。所述处理器1003、接收器1002和存储器1001可以集成为一个或多个独立的电路或硬件,如:ASIC。Optionally, the processor 1003 may be a CPU, the memory 1001 may be a RAM type internal memory, and the receiver 1002 may include a common physical interface, and the physical interface may be an Ethernet interface or an ATM interface. The processor 1003, the receiver 1002, and the memory 1001 can be integrated into one or more separate circuits or hardware, such as an ASIC.
本发明实施例中提到的第一PW特有信息字段的“第一”只是用来做名字标识,并不代表顺序上的第一。该规则同样适用于“第二”。The "first" of the first PW-specific information field mentioned in the embodiment of the present invention is only used for the name identification, and does not represent the first in the order. The same rule applies to the "second".
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质可以是下述介质中的至少一种:只读存储器(英文:read-only memory,缩写:ROM)、RAM、磁碟或者光盘等各种可以存储程序代码的介质。It can be understood by those skilled in the art that all or part of the steps of implementing the foregoing method embodiments may be performed by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium may be at least one of the following: a read-only memory (English: read-only memory, abbreviation: ROM), a RAM, a magnetic disk, or an optical disk, etc., may be stored. The medium of the program code.
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于设备及***实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及***实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。It is to be noted that the various embodiments in the present specification are described in a progressive manner, and the same similar parts between the various embodiments may be referred to each other, and each embodiment focuses on different embodiments from other embodiments. At the office. In particular, for the device and the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The apparatus and system embodiments described above are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without any creative effort.
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。 The above is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or within the technical scope disclosed by the present invention. Alternatives are intended to be covered by the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims (15)

  1. 一种伪线数据报文的封装方法,其特征在于,所述方法包括:A method for encapsulating a pseudowire data packet, the method comprising:
    发送设备为伪线PW数据报文设置PW报文头,所述PW报文头包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,所述标识符字段中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,所述PW类型字段中的内容用于标识所述PW数据报文所实现的PW业务类型,所述第一PW特有信息字段所占用字节长度固定,用于携带所述PW数据报文所实现PW业务类型的特有信息;The sending device sets a PW packet header for the pseudowire 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 the identifier field The content is used to identify that the PW data packet is a PW data packet with a PW packet header, and the content in the PW type-independent information field includes general information that is independent of the PW service type implemented by the PW data packet. The content in the PW type field is used to identify the PW service type that is implemented by the PW data packet, where the first PW-specific information field has a fixed byte length, and is used to carry the PW data packet. Implement unique information about the type of PW service;
    所述发送设备将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文。The sending device encapsulates the PW packet header in the PW data packet, and sends the encapsulated PW data packet to the receiving device.
  2. 根据权利要求1所述的方法,其特征在于,通过封装所述PW数据报文,所述PW报文头所在字段封装在PW标签所在字段和所述业务净荷所在字段之间。The method according to claim 1, wherein the field of the PW packet header is encapsulated between a field where the PW tag is located and a field where the service payload is located by encapsulating the PW data packet.
  3. 根据权利要求1或2所述的方法,其特征在于,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,用于携带所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。The method according to claim 1 or 2, wherein the PW packet header further includes a second PW-specific information field, and the second PW-specific information field has a variable byte length for carrying A specific part of the unique information of the PW service type implemented by the PW data message, where the specific part is information that cannot be carried by the first PW-specific information field.
  4. 根据权利要求3所述的方法,其特征在于,所述PW报文头还包括标志位字段,所述标志位字段中的内容用于标识所述PW报文头中是否包括所述第二PW特有信息字段。The method according to claim 3, wherein the PW packet header further includes a flag bit field, and the content in the flag bit field is used to identify whether the second PW is included in the PW packet header. Unique information field.
  5. 一种伪线数据报文的封装装置,其特征在于,所述封装装置包括:A device for packaging a pseudowire data message, characterized in that the package device comprises:
    设置单元,用于为伪线PW数据报文设置PW报文头,所述PW报文头包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,所述标识符字段中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,所述PW类型字段中的内容用于标识所述PW数据报文所实现的PW业务类型,所述第一PW特有信息字段所占用字节长度固定,用于携带所述PW数据报文所实现PW业务类型的特有信息;a setting unit, configured to set a PW packet header for the pseudowire 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 the identifier The content in the field is used to identify that the PW data packet is a PW data packet with a PW packet header, and the content in the PW type-independent information field is not related to the PW service type implemented by the PW data packet. General information, the content in the PW type field is used to identify the PW service type implemented by the PW data packet, and the first PW-specific information field has a fixed byte length and is used to carry the PW data. The unique information of the PW service type realized by the message;
    封装及发送单元,用于将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文。The encapsulating and transmitting unit is configured to encapsulate the PW packet header in the PW data packet, and send the encapsulated PW data packet to the receiving device.
  6. 根据权利要求5所述的封装装置,其特征在于,通过所述封装及发送单元封装所述PW数据报文,所述PW报文头所在字段封装在PW标签所在字段和所述业务净荷所在字段之间。The encapsulating apparatus according to claim 5, wherein the PW data packet is encapsulated by the encapsulating and transmitting unit, and the field of the PW packet header is encapsulated in a field where the PW tag is located and the service payload is located. Between fields.
  7. 根据权利要求5或6所述的封装装置,其特征在于,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,用于携带所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。The encapsulating apparatus according to claim 5 or 6, wherein the PW packet header further includes a second PW-specific information field, and the second PW-specific information field has a variable byte length for carrying The PW data packet implements a specific part of the unique information of the PW service type, and the specific part is information that cannot be carried by the first PW-specific information field.
  8. 根据权利要求7所述的封装装置,其特征在于,所述PW报文头还包括标志位字段,所述标志位字段中的内容用于标识所述PW报文头中是否包括所述第二PW特有信息字段。The encapsulating apparatus according to claim 7, wherein the PW packet header further includes a flag bit field, and the content in the flag bit field is used to identify whether the second part is included in the PW packet header. PW specific information field.
  9. 一种伪线数据报文的解封装方法,其特征在于,所述方法包括:A method for decapsulating a pseudowire data packet, the method comprising:
    接收设备获取发送设备发送的数据报文; Receiving, by the receiving device, a data packet sent by the sending device;
    所述接收设备将所述数据报文解封装,通过识别标识符字段中的内容确定所述数据报文为携带了伪线PW报文头的PW数据报文,所述PW报文头包括所述标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段;The receiving device decapsulates the data packet, and determines that the data packet is a PW data packet carrying a pseudowire PW packet header by using the content in the identifier field, 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;
    所述接收设备根据所述PW报文头的格式解析所述PW报文头,具体包括:The receiving device parses the PW packet header according to the format of the PW packet header, and specifically includes:
    所述接收设备通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。The receiving device determines, by parsing the content in the PW type-independent information field, general information that is not related to the PW service type implemented by the PW data packet, and determines the content in the PW type field to determine the The PW service type implemented by the PW data packet is analyzed by the first PW-specific information field to determine the unique information of the PW service type implemented by the PW data packet.
  10. 根据权利要求9所述的方法,其特征在于,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,所述接收设备根据所述PW报文头的格式解析所述PW报文头,还包括:The method according to claim 9, wherein the PW header further includes a second PW-specific information field, and the second PW-specific information field has a variable byte length, and the receiving device is configured according to the The format of the PW packet header parses the PW packet header, and further includes:
    所述接收设备通过解析所述第二PW特有信息字段中的内容,确定出所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。The receiving device determines, by parsing the content in the second PW-specific information field, a specific part in the unique information of the PW service type implemented by the PW data packet, where the specific part is not available by the first part. Information carried in the PW-specific information field.
  11. 根据权利要求10所述的方法,其特征在于,所述PW报文头还包括标志位字段,所述接收设备根据所述PW报文头的格式解析所述PW报文头,还包括:The method according to claim 10, wherein the PW packet header further includes a flag bit field, and the receiving device parses the PW packet header according to the format of the PW packet header, and further includes:
    所述接收设备通过解析所述标志位字段中的内容,确定出所述PW报文头是否包括所述第二PW特有信息字段。The receiving device determines whether the PW packet header includes the second PW-specific information field by parsing the content in the flag bit field.
  12. 一种伪线数据报文的解封装装置,其特征在于,所述解封装装置包括:A decapsulation device for a pseudowire data packet, characterized in that the decapsulation device comprises:
    接收单元,用于获取发送设备发送的数据报文;a receiving unit, configured to acquire a data packet sent by the sending device;
    解封装单元,用于将所述数据报文解封装,通过识别标识符字段中的内容确定所述数据报文为携带了伪线PW报文头的PW数据报文,所述PW报文头包括所述标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段;a decapsulating unit, configured to decapsulate the data packet, and determine, by identifying the content in the identifier field, the data packet is a PW data packet carrying a pseudowire PW packet header, where the PW packet header Include the identifier field, a PW type-independent information field, a PW type field, and a first PW-specific information field;
    解析单元,用于根据所述PW报文头的格式解析所述PW报文头,具体包括:The parsing unit is configured to parse the PW packet header according to the format of the PW packet header, and specifically includes:
    通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。Determining the general information irrelevant to the PW service type implemented by the PW data packet by parsing the content in the PW type-independent information field, and determining the PW data packet by parsing the content in the PW type field The PW service type that is implemented, by parsing the first PW-specific information field, determines the unique information of the PW service type implemented by the PW data packet.
  13. 根据权利要求12所述的解封装装置,其特征在于,所述PW报文头还包括第二PW特有信息字段,所述第二PW特有信息字段所占用字节长度可变,所述解析单元还用于通过解析所述第二PW特有信息字段中的内容,确定出所述PW数据报文所实现PW业务类型的特有信息中的特定部分,所述特定部分为无法由所述第一PW特有信息字段携带的信息。The decapsulation apparatus according to claim 12, wherein the PW packet header further includes a second PW-specific information field, and the second PW-specific information field has a variable byte length, and the parsing unit And determining, by parsing the content in the second PW-specific information field, a specific part in the unique information of the PW service type implemented by the PW data packet, where the specific part is not available by the first PW Information carried by the unique information field.
  14. 根据权利要求13所述的解封装装置,其特征在于,所述PW报文头还包括标志位字段,所述解析单元还用于通过解析所述标志位字段中的内容,确定出所述PW报文头是否包括所述第二PW特有信息字段。The decapsulation apparatus according to claim 13, wherein the PW header further includes a flag bit field, and the parsing unit is further configured to determine the PW by parsing content in the flag bit field Whether the header includes the second PW-specific information field.
  15. 一种伪线数据报文的处理***,其特征在于,所述处理***包括发送设备和接收设备:A processing system for a pseudowire data packet, characterized in that the processing system comprises a transmitting device and a receiving device:
    所述发送设备,用于为伪线PW数据报文设置PW报文头,所述PW报文头包括标识符字段、PW类型无关信息字段、PW类型字段和第一PW特有信息字段,所述标识符字段 中的内容用于标识所述PW数据报文为带有PW报文头的PW数据报文,所述PW类型无关信息字段中的内容包括与所述PW数据报文所实现PW业务类型无关的通用信息,所述PW类型字段中的内容用于标识所述PW数据报文所实现的PW业务类型,所述第一PW特有信息字段所占用字节长度固定,用于携带所述PW数据报文所实现PW业务类型的特有信息;将所述PW报文头封装在所述PW数据报文中,并向接收设备发送封装后的所述PW数据报文;The sending device is configured to set a PW packet header for the pseudowire 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 Identifier field The content of the PW data packet is a PW data packet with a PW packet header, and the content in the PW type-independent information field is not related to the PW service type implemented by the PW data packet. General information, the content in the PW type field is used to identify the type of the PW service that is implemented by the PW data packet, and the first PW-specific information field has a fixed byte length and is used to carry the PW datagram. Encapsulating the specific information of the PW service type; the PW packet header is encapsulated in the PW data packet, and the encapsulated PW data packet is sent to the receiving device;
    所述接收设备,用于获取发送设备发送的数据报文;将所述数据报文解封装,通过识别所述标识符字段中的内容确定所述数据报文为携带了所述PW报文头的所述PW数据报文;根据所述PW报文头的格式解析所述PW报文头,具体包括:通过解析所述PW类型无关信息字段中的内容确定出与所述PW数据报文所实现PW业务类型无关的通用信息,通过解析所述PW类型字段中的内容,确定出所述PW数据报文所实现的PW业务类型,通过解析所述第一PW特有信息字段,确定出所述PW数据报文所实现PW业务类型的特有信息。 The receiving device is configured to obtain a data packet sent by the sending device, decapsulate the data packet, and determine that the data packet carries the PW packet header by identifying content in the identifier field. Parsing the PW data packet according to the format of the PW packet header, and specifically: determining, by parsing the content in the PW type irrelevant information field, the PW data packet Defining the PW service type-independent general information, and determining the PW service type implemented by the PW data packet by parsing the content in the PW type field, and determining the first PW-specific information field to determine the The unique information of the PW service type implemented by the PW data packet.
PCT/CN2017/079348 2016-05-11 2017-04-01 Method for encapsulating and decapsulating pseudo-wire data message, and relevant apparatus WO2017193732A1 (en)

Applications Claiming Priority (2)

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

Publications (1)

Publication Number Publication Date
WO2017193732A1 true WO2017193732A1 (en) 2017-11-16

Family

ID=60266202

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079348 WO2017193732A1 (en) 2016-05-11 2017-04-01 Method for encapsulating and decapsulating pseudo-wire data message, and relevant apparatus

Country Status (2)

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448918A (en) * 2019-08-29 2021-03-05 华为技术有限公司 Message transmission method and device and computer storage medium
CN113542374A (en) * 2021-06-30 2021-10-22 北京宇信科技集团股份有限公司 Message processing method and system

Families Citing this family (3)

* 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
CN111917735A (en) * 2020-07-12 2020-11-10 中信银行股份有限公司 Communication message generation and processing method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101610263A (en) * 2009-06-23 2009-12-23 中兴通讯股份有限公司 The E1 service edge is to edge pseudo-line simulation encapsulation, de-encapsulation method and device
US20100085974A1 (en) * 2008-10-03 2010-04-08 Fujitsu Limited Communication device and communication method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572651B (en) * 2008-04-30 2013-06-05 华为技术有限公司 Method and device for message transfer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100085974A1 (en) * 2008-10-03 2010-04-08 Fujitsu Limited Communication device and communication method
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
L. MARTINI, E. ET AL.: "Pseudowire Setup and Maintenance Using the Label Distribution Protocol (LDP", RFC4447, 30 April 2006 (2006-04-30), XP015046298 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448918A (en) * 2019-08-29 2021-03-05 华为技术有限公司 Message transmission method and device and computer storage medium
CN113542374A (en) * 2021-06-30 2021-10-22 北京宇信科技集团股份有限公司 Message processing method and system
CN113542374B (en) * 2021-06-30 2022-04-12 北京宇信科技集团股份有限公司 Message processing method and system

Also Published As

Publication number Publication date
CN107370654A (en) 2017-11-21
CN107370654B (en) 2019-12-24

Similar Documents

Publication Publication Date Title
US11979322B2 (en) Method and apparatus for providing service for traffic flow
WO2017193732A1 (en) Method for encapsulating and decapsulating pseudo-wire data message, and relevant apparatus
JP5345942B2 (en) Ethernet OAM in intermediate nodes of PBT network
EP3139560B1 (en) Packet processing method, device and computer storage medium
US8681805B2 (en) Method, device and system for interconnecting a multi-protocol label switching network and an ethernet
WO2017054576A1 (en) Unicast tunnel building method, apparatus and system
EP3133797B1 (en) Message forwarding method, system, and relay agent device
WO2018210225A1 (en) Method and device for automatically implementing ioam encapsulation, and storage medium
WO2009012688A1 (en) Method, system and apparatus for forwarding message in three-layer virtual private network
WO2008080315A1 (en) A method, equipment and system for transmitting data
WO2018188663A1 (en) Method and device for information notification
WO2021174943A1 (en) Data forwarding method and apparatus, and device and storage medium
WO2021174958A1 (en) Message forwarding method, device, system, network device and storage medium
WO2021190009A1 (en) Performance measurement method and apparatus, device, and storage medium
WO2021088813A1 (en) Packet encapsulating method and apparatus, and packet decapsulating method and apparatus
CN108075991B (en) Message forwarding method and device
WO2008003218A1 (en) Method, apparatus and system for information transmitting between devices in ethernet
CN110166361A (en) A kind of message forwarding method and device
WO2020134564A1 (en) Ioam information processing method, device, and computer readable storage medium
WO2021254454A1 (en) Bier oam detection method, and device and system
EP3913865B1 (en) Message decapsulation method and device, message encapsulation method and device, electronic device, and storage medium
WO2023231428A1 (en) Ipv4 packet encapsulation method, electronic device, and computer storage medium
WO2022237563A1 (en) Data forwarding method and apparatus, storage medium, and electronic apparatus
WO2024041064A1 (en) Quic packet transmission method and related device
WO2022267875A1 (en) Packet transmission method and related device

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17795350

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17795350

Country of ref document: EP

Kind code of ref document: A1