WO2019047840A1 - 转发报文的方法及装置 - Google Patents

转发报文的方法及装置 Download PDF

Info

Publication number
WO2019047840A1
WO2019047840A1 PCT/CN2018/104083 CN2018104083W WO2019047840A1 WO 2019047840 A1 WO2019047840 A1 WO 2019047840A1 CN 2018104083 W CN2018104083 W CN 2018104083W WO 2019047840 A1 WO2019047840 A1 WO 2019047840A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
burst
target
port
field
Prior art date
Application number
PCT/CN2018/104083
Other languages
English (en)
French (fr)
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 华为技术有限公司
Priority to EP18854357.3A priority Critical patent/EP3672167B1/en
Publication of WO2019047840A1 publication Critical patent/WO2019047840A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/121Shortest path evaluation by minimising delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present application relates to the field of communications, and in particular, to a method and an apparatus for forwarding a message.
  • packet forwarding devices such as Internet Protocol (IP) routers, Multi-Protocol Label Switching (MPLS) switches, and Ethernet switches, need to forward packets based on packets when receiving packets.
  • IP Internet Protocol
  • MPLS Multi-Protocol Label Switching
  • the information is searched to determine the egress port of the packet, where the forwarding information may be a destination IP address, a media access control (MAC) address, or an MPLS label.
  • the packet forwarding device's ability to perform packet-by-message lookup and forwarding of all packets is mainly reflected in the number of packet processing per unit time (Packet Per Second). As the current network bandwidth requirements and throughput requirements continue to increase, improving the packet processing capability of packet forwarding devices per unit time has become an important challenge for packet forwarding devices.
  • the packet forwarding device receives the packet and performs packet-by-message lookup and forwarding of all the packets, the packet needs to be queued for the look-up table and forwarding service, so that the packet forwarding delay is checked. And the impact of time-consuming steps such as queuing.
  • the packet forwarding device can be used as a sender device or a receiver device.
  • the transmitting device can connect a plurality of consecutive packets belonging to the same service flow into a burst data unit through a specially designed packet gap. Thereafter, the transmitting device can add a burst data unit header in an Ethernet format at the forefront of the burst data unit, and send the burst data unit with the burst data unit header to the receiving end device.
  • the receiving end device After receiving the burst data unit, the receiving end device parses the burst data unit header of the burst data unit, and performs table lookup forwarding according to the forwarding information in the burst data unit header of the burst data unit. To a lesser extent, the number of table lookups is reduced, the demand for the system is reduced, and the forwarding rate is increased.
  • the bandwidth of the physical port of the packet forwarding device can be divided into multiple time slots, and the bandwidth of each time slot is fixed.
  • the packet forwarding device may form one or more time slots into a rigid pipe according to the bandwidth of the service flow.
  • the packet of the service flow can be sent through the rigid pipeline.
  • the transmitting end device needs to buffer a plurality of consecutive packets belonging to the same service, and then, according to the buffered multiple packets, the burst data unit header is generated. Thereby forming a burst data unit and transmitting.
  • the source device it is necessary to have a large storage space to buffer burst data units.
  • the device forwards the burst data units one by one, the device needs to cache the bursty data units of the large particles and wait for the forwarding process. In fact, the packet processing pressure is converted into the buffer pressure on the packet forwarding device, and the granularity is large. Burst data unit buffer queuing increases the queuing delay of business data and increases the uncertainty of delay.
  • the second method When the second method is used to divide the bandwidth of the physical port into multiple time slots, when a rigid pipe composed of multiple time slots carries a service flow, on the one hand, since the bandwidth of the rigid pipe is fixed, the service flow is The adaptability of the bandwidth is poor. On the other hand, since one traffic flow corresponds to a rigid pipe, the number of service flows and the number of rigid pipes are the same, which will result in a large number of rigid pipe cross-connections in the packet forwarding device as the core node, and the packet forwarding device is difficult to cope with. The network faces an expansion bottleneck.
  • the embodiment of the present invention provides a method and an apparatus for forwarding a message, which can be used to solve the problem that the buffer burst data unit causes the buffer pressure caused by the packet forwarding device and the queue delay caused by the packet burst data unit, and the rigid pipeline to the service flow.
  • the first aspect provides a method for forwarding a message, where the method includes:
  • the port information of the egress port is determined and stored when the first packet of the burst sequence is sent, where the burst sequence refers to a sequence consisting of multiple packets belonging to the same service flow;
  • the target packet is sent by the egress port corresponding to the obtained port information.
  • the target message is a follow-up message or a first message of the burst sequence. If the target message is a follow-up packet of the burst sequence, the target message is sent through the outbound port of the burst sequence. The following message is determined because the egress port of the burst sequence is determined when the first packet of the burst sequence is sent. Therefore, when the target packet is sent, the egress port of the burst sequence can be directly sent. The target packet does not need to perform complex routing lookup or other forwarding lookup operations according to the forwarding information carried in the target packet, which speeds up the forwarding rate and reduces the forwarding delay.
  • the target packet when the target field of the target packet carries the first feature value, the target packet is the first packet of the burst sequence, and the target field of the target packet carries the second feature value.
  • the target message is a follow message of the burst sequence;
  • the target packet When the first eigenvalue is carried in the frame gap adjacent to the target packet before the target packet, the target packet is the first packet of the burst sequence, when the target is in the target When the second eigenvalue is carried in the frame gap that is adjacent to the target packet, the target packet is the following packet of the burst sequence.
  • the target message when the target field of the target packet carries different feature values, the target message is classified as the first message or the following message of the burst sequence, so that when the target message is determined to be a burst sequence, When the message is followed, the following message can be directly sent through the outbound port of the burst sequence, which avoids the traditional lookup table of the lookup routing table, speeds up the forwarding rate, and reduces the forwarding delay.
  • the obtaining port information for sending the outbound port of the burst sequence includes:
  • the target message further includes a feature field
  • the feature field is used as a burst identifier of the burst sequence, and the burst identifier is obtained from a correspondence between the stored burst identifier and port information.
  • Corresponding port information where the feature field is used to uniquely identify a burst sequence to which the message field of the feature field belongs;
  • the obtained port information is determined as port information for transmitting an out port of the burst sequence.
  • the feature packet when the target field of the target packet carries the feature value, the feature packet may also be carried in the target packet, and the feature field may be used to distinguish which burst sequence the target packet belongs to. Text.
  • the target message is a follow message and carries a feature field
  • the feature field can be used as a burst identifier of the burst sequence to which the target message belongs, so that the burst sequence is obtained according to the burst identifier.
  • Port information for the port That is, by carrying the feature field in the target message, it is possible to implement a case where one port supports multiple burst sequences at the same time.
  • the method further includes:
  • the outbound port of the target packet may be determined according to the forwarding information carried in the target packet.
  • the feature field of the target packet is used as the burst identifier of the burst sequence to which the target packet belongs, and the burst identifier and the port information of the outbound port are correspondingly stored, so that the subsequently arrived and the target packet belong to The following packet of the same burst sequence can directly search for the corresponding port information according to the burst identifier, and forward the packet according to the outbound port corresponding to the port information.
  • the target packet when the target field of the target packet carries the third eigenvalue, the target packet is the first packet of the burst sequence, and the third eigenvalue is used to indicate the target packet. And is a first packet of the burst sequence, and indicates that the correspondence between the stored burst identifier and the port information is updated;
  • the method further includes:
  • the target message further includes a feature field
  • the feature field is used as a burst identifier of the burst sequence, and the burst identifier is in a correspondence between the burst identifier and port information.
  • the corresponding port information is replaced with the port information of the outbound port of the target packet.
  • the number of bits of the feature field is limited, which means that the number of burst identifiers represented by the feature field is also limited.
  • the target field of the target packet carries the third feature value, it indicates that the burst identifier represented by the feature field carried by the target packet is currently being occupied by other burst sequences.
  • the three eigenvalues update the port information corresponding to the burst identifier carried in the target packet in the currently stored correspondence relationship by using the port information of the outbound port of the target packet.
  • the third eigenvalue may be used to indicate that the target packet is the first packet of the burst sequence, and may be used to indicate that the corresponding record in the stored correspondence is refreshed. In this way, multiplexing of a limited number of burst identifiers can be implemented, and the number of records in the storage correspondence can be reduced, thereby shortening the time for finding the port, increasing the forwarding rate, and reducing the forwarding delay.
  • the method further includes:
  • the burst identifier of the burst sequence in the correspondence between the burst identifier and the port information is deleted and the The record of the port information of the outgoing port of the burst sequence.
  • the feature field is represented by modifying a specific field in the target packet to represent the burst identifier, and the number of the burst identifier is limited. Therefore, if a burst identifier is long by a burst sequence Time occupancy, then, subsequent bursts of other bursts of packets may be available without burst identification. Based on this, the burst identifier of the packet carrying the burst identifier may not be deleted in the preset duration, so that the burst identifier is released, so that the subsequent packet can be recycled again.
  • the target field is any one of the preambles, or the target field is any one of the frame start delimiters, or the target field is any one of the frame check fields.
  • the feature field is not the same field as the target field; wherein the feature field is modified by using any one of the preambles, or the feature field is set for the frame Any field in the delimiter is modified, or the feature field is modified by modifying any field of the frame check field.
  • a second aspect provides a method for forwarding a message, where the method includes:
  • the target packet is sent by the egress port corresponding to the obtained port information.
  • a series of packets having the same forwarding port may be configured with the same burst identifier, and the packet forwarding device may directly determine the egress port of the target packet according to the burst identifier carried in the packet.
  • the number of burst identifiers is limited. Therefore, the packet forwarding device determines the egress port of the target packet according to the burst identifier, and can effectively avoid the operation of searching for a complicated routing table or other traditional forwarding table, thereby improving the packet forwarding device.
  • the throughput efficiency reduces the forwarding delay.
  • the feature field is used as a burst identifier of the burst sequence to which the target packet belongs, and the corresponding relationship between the stored burst identifier and the port information is obtained.
  • the outbound port corresponding to the obtained port information is determined as the port information of the outbound port of the burst sequence.
  • the packet forwarding device may store a correspondence between the burst identifier and the port information, where the correspondence is shared for the packets on all the ingress ports of the packet forwarding device.
  • the packets on each ingress port of the packet forwarding device have an independent correspondence, so that the packets on different ingress ports can use the same burst identifier.
  • the outbound port of the burst sequence to which the target packet belongs may be determined by using the ingress port of the target packet and the burst identifier. That is, the port information corresponding to the ingress port information and the burst identifier of the target packet may be obtained from the correspondence between the ingress port information, the burst identifier, and the egress port information.
  • a third aspect provides an apparatus for forwarding a message, the apparatus having a function of implementing a method behavior of forwarding a message in the foregoing first aspect.
  • the device includes at least one module, and the at least one module is configured to implement the method for forwarding a message provided by the foregoing first aspect.
  • a fourth aspect provides a device for forwarding a message, the device having a function of implementing a method for forwarding a message in the foregoing second aspect, the device comprising at least one module, where the at least one module is configured to implement the foregoing The method of forwarding messages provided by the two aspects.
  • an apparatus for forwarding a message includes a processor and a memory, where the memory is configured to store a device that supports forwarding of the packet, and performs the forwarding of the packet provided by the first aspect.
  • the processor is configured to execute a program stored in the memory.
  • the operating device of the storage device may further include a communication bus for establishing a connection between the processor and the memory.
  • the sixth aspect provides an apparatus for forwarding a message, where the apparatus includes a processor and a memory, where the memory is used to store a device that supports forwarding of the packet, and performs the forwarding of the packet provided by the second aspect.
  • the processor is configured to execute a program stored in the memory.
  • the operating device of the storage device may further include a communication bus for establishing a connection between the processor and the memory.
  • a computer readable storage medium having instructions stored thereon that, when executed on a computer, cause the computer to perform the method of forwarding a message as described in the first aspect above.
  • a computer readable storage medium having instructions stored thereon that, when executed on a computer, cause the computer to perform the method of forwarding a message as described in the second aspect above.
  • a computer program product comprising instructions, when executed on a computer, causes the computer to perform the method of forwarding a message as described in the first aspect above.
  • a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of forwarding a message as described in the second aspect above.
  • the technical effects obtained by the third aspect, the fifth aspect, the seventh aspect, and the ninth aspect are similar to those obtained by the corresponding technical means in the first aspect, and the fourth aspect, the sixth aspect, the eighth aspect, and the The technical effects obtained by the ten aspects are similar to those obtained by the corresponding technical means in the second aspect, and will not be further described herein.
  • the packet forwarding device can determine whether the target packet is a follow-up packet or a first packet of the burst sequence, if the target packet is a burst sequence.
  • the following message the following message is sent through the outbound port of the burst sequence, since the port information of the outbound port of the burst sequence is determined and stored when the first message of the burst sequence is sent,
  • the corresponding egress port can be directly determined according to the stored port information to send the target packet, and the complicated routing table search is not performed again according to the forwarding information carried in the target packet.
  • Other forwarding table lookup actions speed up the forwarding rate and reduce the forwarding delay.
  • FIG. 1 is a system structural diagram of a method for forwarding a message according to an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a network device according to an embodiment of the present application.
  • FIG. 3A is a schematic diagram of marking a message according to an embodiment of the present application.
  • FIG. 3B is a schematic diagram of a coding block using 64/66b coding according to an embodiment of the present application.
  • 3C is a flowchart of a method for forwarding a message according to an embodiment of the present application.
  • FIG. 4 is a flowchart of another method for forwarding a message according to an embodiment of the present application.
  • FIG. 5A is a schematic diagram of a plurality of burst sequences sharing a logical port according to an embodiment of the present application
  • FIG. 5B is a schematic diagram of another multiple burst sequence shared by one embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an apparatus for forwarding a message according to an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of another apparatus for forwarding a message according to an embodiment of the present disclosure.
  • FIG. 1 is a system architecture diagram of a method for forwarding a message according to an embodiment of the present application.
  • the system includes user equipment 101, packet forwarding devices 102-103, and user equipment 104.
  • the user equipment 101 can communicate with the packet forwarding device 102
  • the packet forwarding device 102 can communicate with the packet forwarding device 103
  • the packet forwarding device 103 can communicate with the user equipment 104.
  • the user equipment 101 may send a packet to the packet forwarding device 102, and after receiving the packet, the packet forwarding device 102 may process the packet, and forward the processed packet to the packet forwarding device 103, and group the packet.
  • the forwarding device 103 receives the packet, and after processing the packet, forwards the packet to the user device 104.
  • the user equipment 101 and the user equipment 104 may be a personal computer, a desktop computer, a server, or the like having an Ethernet interface.
  • the packet forwarding devices 102 and 103 may be, for example, an IP router, an MPLS switch, an Ethernet switch, an Ethernet router, or other routers integrated with the above-described switch or router functions.
  • FIG. 1 is only an exemplary architecture diagram.
  • other multiple user equipments may be included in the system.
  • a plurality of packet forwarding devices other than the packet forwarding devices 102 and 103 may also be included in the system.
  • the embodiment of the present application does not specifically limit the number of user equipments and the number of packet forwarding devices in the system.
  • the user equipment 101 in the system architecture described above may be the upstream device of the packet forwarding device in the following embodiments, that is, the user equipment 101 may mark the target packet.
  • the packet forwarding device 102 can also serve as the upstream device of the packet forwarding device 103, that is, the packet forwarding device 102 can also mark the target message.
  • the packet forwarding device in the following embodiments may be any of the packet forwarding devices in the system architecture shown in FIG. 1.
  • FIG. 2 is a schematic structural diagram of a network device according to an embodiment of the present application.
  • the packet forwarding device in FIG. 1 can be implemented by the network device shown in FIG. 2.
  • the network device includes at least one processor 201, a communication bus 202, a memory 203, and at least one communication interface 204.
  • the processor 201 can be a Network Processing Unit (CPU), a Central Processing Unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or an A plurality of integrated circuits for controlling the execution of the program of the present application.
  • CPU Network Processing Unit
  • CPU Central Processing Unit
  • ASIC application-specific integrated circuit
  • Communication bus 202 can include a path for communicating information between the components described above.
  • the memory 203 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), or other information that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Type of dynamic storage device or Electro Scientific Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, optical disc Storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and capable of being Any other medium accessed by the computer, but is not limited thereto.
  • Memory 203 may be present independently and coupled to processor 201 via communication bus 202.
  • the memory 203 can also be integrated with the processor 201.
  • the communication interface 204 uses devices such as any transceiver for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), and the like.
  • devices such as any transceiver for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), and the like.
  • RAN Radio Access Network
  • WLAN Wireless Local Area Networks
  • processor 201 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG.
  • the network device can include multiple processors, such as processor 201 and processor 205 shown in FIG. Each of these processors can be a single-CPU processor or a multi-core processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data, such as computer program instructions.
  • the memory 203 is used to store program code for executing the solution of the present application, and is controlled by the processor 201 for execution.
  • the processor 201 is configured to execute the program code 206 stored in the memory 203.
  • One or more software modules may be included in program code 206.
  • the network device can implement the forwarding message in the embodiment shown in FIG. 3A-3C, FIG. 4 or FIG. 5A-5B below through the processor 201 and one or more software modules in the program code 206 in the memory 203. Methods.
  • the packet forwarding device identifies and forwards the packet by marking the packet by the upstream device. Therefore, how the packet forwarding device compares the packet according to the tag information is introduced. Before forwarding, the process of marking packets on the upstream device of the packet forwarding device is introduced.
  • the upstream device of the packet forwarding device may mark multiple packets belonging to the same service flow, and send the marked multiple packets, where the multiple packets form a burst sequence. And by the marking of the upstream device, the packet forwarding device can distinguish the first message and the following message in the burst sequence.
  • the upstream device of the packet forwarding device may be a user device, and the system architecture shown in FIG. 1 is taken as an example.
  • the upstream device may be the user device 101. Of course, it can also be another packet forwarding device that can communicate with the current packet forwarding device.
  • the target packet can be re-marked again by the following method. That is, in the embodiment of the present application, the marking of the packet may be performed by the user equipment that sends the packet, or by the packet forwarding device that forwards the packet, and the marking of the packet may be in the packet. The transmission process is only performed once, or it can be re-marked multiple times by multiple different devices.
  • the upstream device of the packet forwarding device may mark the target field of each packet, or may mark the field adjacent to each packet and located in the frame gap before each packet.
  • the frame gaps may be used as an extension of the message subsequent to and adjacent to the frame, thereby distinguishing the first message and the following message of the burst sequence.
  • the upstream device of the packet forwarding device may further modify a specific field except the target field in each packet to obtain a feature field. In this case, the target field is used to indicate whether the packet is a burst.
  • the sequenced message and the message are the first message or the following message of the burst sequence, and the feature field is used to further indicate the burst sequence to which the message belongs, thereby distinguishing the messages belonging to different burst sequences.
  • an out port is supported to support the transmission of multiple burst sequences.
  • the upstream device of the packet forwarding device may not mark the packet, but process the packet according to the processing manner of the traditional packet, and send the processed packet to the current packet.
  • the packet forwarding device in this case, the upstream device may notify the receiving by carrying a second feature value in the target field of the following message.
  • the packet forwarding device of the packet is a follow-up packet.
  • the original value of the target field of the first packet can also be regarded as the first feature value.
  • the identification of the first message depends on the following message adjacent thereto, and for convenience of explanation, the marking method may be referred to as an implicit marking method.
  • the upstream device may also carry a first feature value or a third feature value in the target field of the first packet, and explicitly mark the packet as the first packet in an explicit manner, and corresponding to the subsequent packet.
  • the target field carries another second feature value different from the first message feature value, so that the subsequent message is a follow message.
  • the following message may not be adjacent to the first message, that is to say, in this case, other traditional independent messages may be interspersed between the first message and the following message of the first message. .
  • the target field may be any field in the preamble of the packet, or may be any field in the Start of Frame Delimiter (SFD), or may be any field in the frame check field.
  • SFD Start of Frame Delimiter
  • FIG. 3A is a schematic diagram of a packet marking, which is exemplarily shown in the embodiment of the present application.
  • no marking may be performed for the first packet 001, and after the first packet 001 and The first message 001 adjacent to the message 002 may carry a new feature value different from the traditional frame start delimiter value in the field of the traditional frame start delimiter of the message 002, that is, the message 002
  • the value of the field in which the frame start delimiter is located is modified to a new feature value different from the traditional frame start delimiter value.
  • the field of the traditional frame start delimiter of the message 002 is the target field.
  • the modified new feature value different from the frame start delimiter value may be referred to as the frame start delimiter of the burst following message, thereby marking the message 002 as the previous report adjacent thereto.
  • the message 001 follows the message, and the following multiple following messages adjacent to the message 002 will form a burst sequence with the messages 001 and 002, where the message 001 is the first message of the burst sequence.
  • the message 002 and the plurality of following messages adjacent thereto are the following messages of the burst sequence. That is, the following message and the first message are marked with distinct feature value marks in the target field.
  • the specific method of carrying a new feature value in the field where the frame start delimiter of the message 002 is located may be to modify some bits in the traditional frame start delimiter value in the target field, or It is to modify multiple bits.
  • the binary value of the traditional frame start delimiter of the unmodified Ethernet message is 0b10101011, as shown in the upper figure of FIG. 3A, the inverse of the last four bits of the traditional frame start delimiter value is modified. Is 0b10100100.
  • all the bits of the traditional frame start delimiter value may be inverted, and the frame start delimiter value of the modified following message is obtained as binary 0b01010100.
  • FIG. 3A is only an example of a mark given in the embodiment of the present application.
  • the traditional frame start delimiter value of the field where the traditional frame start delimiter of the message is located can be modified by the above method.
  • the byte of the 7 bytes included in the preamble may be modified as the target field by using the foregoing method, or the frame gap field before the message may be modified to implement whether the packet belongs to the burst sequence.
  • the tag and specifically the tag that follows the message or the first message.
  • the upstream device uses a new target field feature value.
  • the first message is marked on the target field of the message, and another different new target field feature value is used to mark the target field of the message, and the message field may be agreed to be excluded from the target field.
  • the other specific field is used as a feature field, and the feature field is used to carry a burst identifier (Burst ID) of one of the n burst sequences to which the message belongs, so as to distinguish the newspapers belonging to different burst sequences.
  • the character field may be a field that does not carry specific information in the packet and only carries limited tag information.
  • the message will be identified by the two feature values of [Followed Message Target Field Feature Value, Burst ID], which is the following message and which burst sequence of the n burst sequences. It should be noted that, since each message needs to identify whether the message is the first message or the following message and which burst sequence the message belongs to by using two feature values, the target carrying the two feature values is required.
  • the field and feature fields will be different fields, and in order to perform the region with the legacy message, the value of [target field, feature field] needs to be distinguished from the original value of [target field, feature field] in the legacy message.
  • the feature field may be a field consisting of any or all of the 6 bytes 48 bits after the preamble of the message.
  • the [target field, feature field] may be part or all of a total of 56 bits of 6 bytes of 48 bits after the preamble of the message and a conventional frame delimiter field (1 byte and 8 bits).
  • the field is selected as the field where the non-traditional frame start delimiter is located, and some or all of the fields of the field where the traditional frame start delimiter is located may be used as the feature field.
  • the upstream device may follow the packet marking of the last byte of the 7 bytes included in the preamble of the packet to indicate that the message is to follow.
  • the frame start delimiter in the message may be modified to obtain a feature field, and the feature field is used as a burst identifier to indicate a burst sequence to which the message belongs.
  • the frame start delimiter of the message may be modified to a burst follow message frame start delimiter according to an agreement to indicate that the message is a follow message, and the last of the 7 bytes included in the preamble A byte is modified to obtain a feature field, and the feature field is used as a burst identifier to indicate a burst sequence to which the message belongs.
  • the number of bits included in the feature field limits the burst sequence supported by the egress port of the upstream device for sending the packet. Number. For example, if the appointment feature field contains 4 bits, then the feature field of 4 bits can represent 16 different values, 0-15, and the 16 different values can be used as 16 simultaneously different bursts. The identity of the sequence. That is, 16 parallel burst sequences can be supported by the 16 burst identifiers. The upstream device and its downstream packet devices need to agree and allocate some or all of the 16 burst identities to mark up to 16 simultaneously valid burst sequences.
  • the upstream and downstream devices can only assign the previous bursts to other burst sequences.
  • One of the 16 burst identifiers is reassigned to this new burst sequence.
  • An implementation manner of recovering and reallocating the burst indication may be: carrying a burst identifier that needs to be requested to be recovered in the feature field in the first packet of the new burst sequence, so that the first packet is received.
  • the downstream packet forwarding device determines the forwarding process and the egress port for the new burst sequence based on the first message of the new burst sequence, and the subsequent burst identifier will be used by the new burst sequence.
  • the upstream device may wait for a burst sequence corresponding to the 16 burst identifiers to be sent and release the burst identifier, and then allocate the released burst identifier to the new burst sequence.
  • a timeout mechanism can be introduced, that is, after the packet of the burst sequence corresponding to the burst identifier is not transmitted between the upstream and downstream devices, the packet is recovered. Send a logo.
  • the allocation of the burst identifier can also be statically configured between the upstream and downstream devices, and is valid for a long time until the reconfiguration convention. At this time, the timeout mechanism is not used, and the corresponding header is not used to update the corresponding burst of the burst identifier. Forwarded processing and outgoing ports.
  • the upstream device may use a specified number of bits in the feature field as the check information bits.
  • the first 7 bits can be used as the burst identifier and the last bit can be used as the check information bit.
  • the value of the check information bit can be obtained by a parity check method. For example, when the number of the first 7 bits is 1 is an odd number, the last bit takes 1; For even numbers, the last bit takes 0.
  • the first 4 bits can be used as the burst identifier and the last 4 bits can be used as the check information bits.
  • the value of the check information bits of the last 4 bits can be calculated by using the CRC-4 cyclic redundancy check algorithm x4+x+1.
  • the packet forwarding device of the downstream device when the verification of the burst identity fails, the packet is processed according to the manner of processing the traditional packet, that is, the packet is queued according to the forwarding information carried in the packet. Check the forwarding table and other forwarding tables for forwarding.
  • the upstream device may further mark and distinguish the manner in which the link table pointer is carried in the feature field of the following message, and the pointer is used to indicate that the current message belongs to the same burst sequence. The number of other messages in the interval between the previous messages.
  • the downstream packet forwarding device can determine the next following packet of the burst sequence according to the pointer carried by the packet when receiving the first packet of any burst sequence or any following packet. And then sending the next following message by determining the next following message egress port.
  • all the feature fields of the packet belonging to the burst sequence in the same port may carry a current message sequence number, a previous message sequence number, and a next message sequence.
  • the sequence number is incremented by one in the count of messages accompanying the burst sequence.
  • a series of bursts of a specific burst sequence can be determined by a series of linked list pointers of [previous message sequence number, current message sequence number, and next message sequence number].
  • the sequence numbers are..., 4, 5, 6, 7, 8, 9, 10, ..., wherein the messages 4, 7, 10 belong to the same burst sequence.
  • the feature field of the packet 7 indicates that the previous packet of the burst sequence to which it belongs is the packet of the fourth packet, and the next packet is the packet of the number 10.
  • 5,6,8,9,... are messages of other burst sequences, for example, when the four messages belong to the same burst sequence, the possible flags can be [2, 5, 6], [5, 6, 8], [6, 8, 9], [8, 9, 12]. If each sequence number is defined as one byte, the feature field requires three bytes. The serial number is repeated from 0 to 255 weeks. Other marking methods are not exhaustive here.
  • Ethernet packet transmission is widely used in 64/66b encoding blocks.
  • Flexible Ethernet (FlexE) technology is based on 64/66b encoding blocks.
  • the physical interface Time Division Multiplexing (TDM) is divided into several logical ports with fixed bandwidth. Further, by introducing a cross-connect technology to these logical ports having a fixed bandwidth, a logical port spanning multiple network nodes can be obtained. Therefore, when the message is processed in the form of a coding block, the upstream device can also perform the above various forms of marking by using the coding block, thereby reducing the coding and decoding process of the packet forwarding device, effectively reducing complexity and forwarding delay.
  • the upstream device marks the preamble of the message, the frame start delimiter, or the frame gap in front of the packet (including the above-mentioned carrying various corresponding feature values or pointers, etc.), in the form of expression.
  • the above may be directly reflected in the marking of the target field and the feature field as described above.
  • it may also be embodied as a preamble, a frame start delimiter or a frame when using a 64/66b encoded port.
  • the target field and/or the feature field in the coding block corresponding to the gap are marked, and the downstream forwarding device can directly identify on the coding block.
  • the identification based on the decoded byte bit field and the identification based on the field in the code block are equivalent, including 64/66b code blocks or other code blocks, such as 8/10b, 128/130b, 512/514b, etc.
  • An encoded n/mb code block where n represents the number of payload bits in each code block, m represents the total number of bits per code block, n, m are positive integers, m > n.
  • the specific code block in the form of coding is not limited in this application.
  • FIG. 3B it is a schematic diagram of a coding block using 64/66b coding provided by an embodiment of the present application.
  • the left figure of FIG. 3B shows a message in a byte form, wherein the first 7 bytes are preambles, the preamble is followed by a frame start delimiter, and then the valid data information of the message is followed. Such as destination address, source address, message content and other information.
  • Dn is used to represent one byte.
  • the right diagram of Figure 3B is the corresponding 64/66b coded block.
  • the first byte of the preamble is replaced with the /S/ character used to characterize the start, every 8 bytes.
  • a group performs 64/66b encoding, each 8 bytes is encoded into one coding block, and a total of several 64/66b coding blocks are obtained.
  • the 7-byte preamble and the 1-byte frame start delimiter are 8 bytes in total. Encoding block.
  • the upstream device can be the last 6 bytes corresponding to the above preamble ( In the figure, it is represented by hexadecimal 0x55. Any part of 48 bits or 7th byte, that is, the byte corresponding to the frame start delimiter (8 bits, represented by hexadecimal 0x5d) A burst flag is performed to identify whether the message is the first message or the following message of the burst sequence.
  • the upstream device and the downstream device may agree that the last byte of the coding block where the frame start delimiter is located, that is, the original frame start delimiter field, performs burst marking to identify that the message is the first report of the burst sequence.
  • the text is followed by a message, and in the same code block, the last byte field of the preamble carries a burst identifier to distinguish packets of different burst sequences.
  • the upstream device can agree with the downstream device to perform the burst identification on the last byte of the coding block corresponding to the preamble, that is, the last byte field of the preamble, to identify that the packet is a follow message or a first report.
  • the burst identifier is carried in the last byte of the coding block corresponding to the field where the original frame start delimiter is located, to distinguish the packets of different burst sequences.
  • the next packet forwarding device adjacent to the upstream device can negotiate the communication with the upstream device to specify the manner in which the upstream device specifically marks the packet. Therefore, when the upstream device marks the When the packet is sent to the next packet forwarding device, the next packet forwarding device can identify and forward the received packet according to the negotiation mode.
  • the downstream packet forwarding device can forward the packet forwarding device to the downstream destination packet.
  • the method of transmitting a message provided in the illustrated embodiment forwards the target message. That is, after marking the target field and the feature field of the message by the above-described tagging method, the tagged report can be identified and forwarded by the relevant steps introduced in the embodiment described in FIG. 3C. Text.
  • FIG. 3C is a flowchart of a method for forwarding a packet according to an embodiment of the present disclosure. The method may be used in the packet forwarding device shown in FIG. 1 . Referring to FIG. 3C , the method includes:
  • Step 301 Determine whether the target message to be sent is the first message or the following message of the burst sequence.
  • the distinction between the first message and the following message of the burst sequence is implemented by marking the target field or the frame gap, and for the first message carrying the repeated use burst identifier, The target field of the first message is marked differently than the other first message. Therefore, for the above cases, the packet forwarding device can determine whether the target packet is the first packet or the following packet of the burst sequence in different manners.
  • the burst sequence refers to a sequence consisting of multiple packets belonging to the same service flow. The plurality of messages have the same network forwarding behavior.
  • the target field of the target packet carries the first feature value
  • determining that the target packet is the first packet of the burst sequence when the target field of the target packet carries the first packet
  • the target message is determined to be a follow message of the burst sequence.
  • the first feature value may be the original value of the target field, or may be a negotiated feature value specifically used to indicate that the message is the first message.
  • the second eigenvalue may be any value different from the original value of the target field and the first eigenvalue. Of course, it may also be a negotiated feature value specifically used to indicate that the message is a follow message.
  • the eigenvalues of the first eigenvalue and the second eigenvalue may be related to the foregoing description of the target field of the packet, which is not described in the embodiment of the present application.
  • the target packet if the outbound port of the upstream device that sends the target packet supports only one burst sequence, the target packet carries only the first feature value or the second feature value, thereby distinguishing the current one. The first message and the following message of this burst sequence. If the outbound port for sending the target packet supports the sending of multiple burst sequences, the target packet carries the first feature value or the second feature value, and may also carry the feature field. The feature field is obtained by modifying a field other than the target field in the target packet, where the feature field is a burst identifier of the burst sequence to which the target packet belongs.
  • the burst identifier that has not been released before is used.
  • the text is distinguished from other first messages.
  • the first message carries the third feature value and the feature field.
  • the target packet may also be determined as The first message of the burst sequence.
  • the upstream device may be tagged before the frame gap of the target message.
  • the target packet when the first feature value is carried in the frame gap adjacent to the target packet received before the target packet, the target packet is determined to be the first packet of the burst sequence, when When the second eigenvalue is carried in the frame gap of the target packet and adjacent to the target packet, the target packet is determined to be a follow-up packet of the burst sequence.
  • the upstream device may mark the packet by using the corresponding encoded byte in the coding block by the target field and the feature field, that is, the target field may correspond to the coding block.
  • the encoded byte carries the first eigenvalue or the second eigenvalue or the third eigenvalue, and the burst identifier is carried by the corresponding encoded byte in the encoding block by the trait field.
  • the first feature value and the third feature value are used to identify the feature value of the message as the first message, and the second feature value is used to identify the feature value of the message as the following message.
  • the packet forwarding device can detect whether there is a corresponding flag on the 64/66b coded block to determine whether the target message is a follow message or a first message.
  • the packet forwarding device may verify the value of the check information bit, if the verification The eigenvalue carried in the target field of the target packet is used to determine whether the target packet is the first packet or the following packet of the burst sequence. If the verification fails, the routing table is forwarded according to the traditional packet processing mode.
  • the target packet may be sent in step 302.
  • the destination packet may be sent through steps 303 and 304.
  • Step 302 When the target packet is the first packet, the outbound port of the target packet is determined based on the forwarding information carried in the target packet, and the target packet is sent through the determined egress port.
  • the packet forwarding device may be configured according to the target packet.
  • the carried forwarding information determines an egress port for sending the target packet, and sends the target packet through the determined egress port.
  • the forwarding information may be a forwarding address or a label carried in the target packet.
  • the forwarding information may be a destination IP address, a MAC address, a source address and a destination address in an Ethernet packet, or an MPLS label. Wait.
  • the packet forwarding device may determine, according to the forwarding information carried in the target packet, the outbound port of the target packet by searching a routing table or an MPLS forwarding table according to the manner of processing the traditional packet.
  • the packet forwarding device determines the egress port of the target packet, since the target packet is the first packet, it is not necessary to find a route for the subsequent packet that needs to be sent in the same burst sequence as the first packet.
  • the table can be forwarded, and the packet forwarding device can store the port information of the outbound port of the target packet.
  • the inbound port for receiving the target message only supports one burst sequence.
  • the packet forwarding device may store the port information of the outbound port of the target packet, so that the received packet following the target packet can be directly forwarded through the outbound port of the target packet.
  • the target field of the target message carries the first feature value, and the target message further includes the feature field, it indicates that the ingress port for receiving the target message can support multiple burst sequences.
  • the upstream device is sufficient for the burst identifier, the burst identifier assigned to the packets sent by all the outbound ports is not repeated, that is, the burst identifier in the upstream device is All the outbound ports are shared.
  • the packet forwarding device can use the feature field of the target packet as the burst identifier of the burst sequence to which the target packet belongs, and the outbound port of the target packet is the burst to which the target packet belongs.
  • the outbound port of the sequence is then stored in the correspondence between the burst identifier and the port information corresponding to the burst identifier and the port information of the outbound port.
  • the corresponding relationship is shared for all the ingress ports of the packet forwarding device, that is, regardless of which ingress port the packet to be sent is received from, it can directly according to the characteristics in the packet.
  • the field searches for the corresponding relationship to obtain corresponding port information.
  • the upstream device has a total of 16 burst identifiers, and all the outbound ports of the upstream device share the 16 burst identifiers, so that the upstream device allocates burst identifier 1 for a burst sequence on the outbound port 1, at 16
  • the burst ID 1 will no longer be assigned to other burst sequences until the burst IDs have been assigned.
  • the packet forwarding device receives the first message of the burst sequence, since the burst identifier of each burst sequence is not repeated, it is not necessary to store the ingress port of each burst sequence, but Each burst sequence can be distinguished only by storing the burst identifier and the corresponding egress port.
  • each egress port may have 16 burst identifiers for use, since the packet forwarding device is from a different ingress port The received packet may carry the same burst identifier. Therefore, the packet forwarding device may establish an independent correspondence for each ingress port.
  • the packet forwarding device may use the feature field of the target packet as the burst identifier of the burst sequence to which the target packet belongs, and use the outbound port of the target packet as the egress port of the burst sequence to which the packet belongs, and then use
  • the port information of the ingress port that receives the target packet, the burst identifier, and the port information of the egress port are correspondingly stored in the correspondence between the ingress port information, the burst identifier, and the egress port information. In this way, when the forwarding port of a packet to be sent is obtained, the inbound port is received from the ingress port, and the burst identifier and the outbound port information corresponding to the ingress port information are correspondingly searched.
  • the feature field of the target message may be used as the burst identifier of the burst sequence to which the target message belongs.
  • the third eigenvalue of the target packet is that the burst identifier is a burst identifier that is used by other burst sequences before the target packet, that is, the correspondence stored in the packet forwarding device is currently included.
  • the port information corresponding to the burst identifier is the port information of the outbound port of the other burst sequence in which the burst identifier is being used.
  • the packet forwarding device may update the port information corresponding to the currently stored burst identifier by using the port information of the outbound port of the target packet according to the third feature value. Specifically, the packet forwarding device may first determine an egress port of the target packet according to the forwarding information carried in the target packet, and use an egress port of the target packet as an egress port of the burst sequence to which the target packet belongs, and then The packet forwarding device may replace the port information corresponding to the burst identifier in the correspondence between the stored burst identifier and the port information with the port information of the outbound port of the target packet.
  • the packet forwarding device may perform correspondence between the stored ingress port information, the burst identifier, and the egress port information.
  • the outbound port information corresponding to the inbound port information and the burst identifier of the target packet is replaced with the port information of the outbound port of the target packet.
  • the first feature value and the third feature value may be used to indicate that the target packet is the first packet.
  • the first feature value may also be used to indicate The packet forwarding device creates a corresponding record between the burst identifier and the port information of the burst sequence
  • the third feature value can be used to indicate the port in the record of the existing burst identifier and port information by the packet forwarding device. The information is updated.
  • Step 303 When the target packet is a follow-up packet of the burst sequence, obtain the port information of the egress port for sending the burst sequence, and send the target packet by using the egress port corresponding to the obtained port information.
  • the target field of the target packet When the target field of the target packet carries the second feature value or the frame gap before the target packet carries the second feature value, and the target packet does not include the feature field, it is used to receive the target packet.
  • the ingress port only supports one burst sequence.
  • the packet forwarding device can obtain the port information of the outbound port of the first packet received on the inbound port, and the outbound port of the first packet is the first packet and the destination packet. The outgoing port of the burst sequence.
  • the packet forwarding device may directly send the target packet through an egress port of the previous packet received on the ingress port.
  • the packet forwarding device when a port supports a burst sequence, since the packet forwarding device can forward the following message to the previous message or the latest one, the packet forwarding device does not need to be cached. Multiple messages to construct burst headers can better accommodate the needs of low-latency networks.
  • the burst sequence when a port supports only one burst sequence, the burst sequence can be interrupted by other burst sequences at any time. For example, a first message is followed by three following messages. If the third message following the message is a message belonging to another service flow, the message can be used as the first message of the next burst sequence. At this point, the current burst sequence is also interrupted.
  • the packet forwarding device may also process the target packet to be sent according to the traditional packet, such as a routing table, that is, The method provided by the embodiment of the present application is also compatible with the old device in the network.
  • the target field of the target packet carries the second feature value or the frame gap before the target packet carries the second feature value
  • the target message further includes the feature field, indicating that the target object is used to receive the target
  • the ingress port of the message supports multiple burst sequences.
  • the packet forwarding device may use the feature field as the burst identifier of the burst sequence to which the target message belongs, and obtain an egress port for transmitting the burst sequence according to the burst identifier.
  • the destination packet is sent from the ingress port.
  • the received packet forwarding device may determine, according to the feature field of the target packet, the corresponding identifier of the burst identifier of the burst sequence to which the target packet belongs according to the feature field of the target packet. Port information. That is, the packet forwarding device can directly obtain the port information corresponding to the burst identifier from the correspondence between the stored burst identifier and the port information.
  • the correspondence between the stored burst identifier and the port information is a feature field carried by the first packet and a port of the first packet outbound port when the packet forwarding device receives the first packet of each burst sequence. Information is stored for storage.
  • each ingress port in the packet forwarding device determines the target packet.
  • the corresponding port is searched for by the ingress port, and the port information of the egress port corresponding to the burst identifier of the burst sequence to which the target packet belongs is searched for. That is, in this case, the packet forwarding device may obtain the ingress port information and the burst identifier of the target packet from the correspondence between the stored ingress port information, the burst identifier, and the egress port information. Corresponding outgoing port information.
  • the correspondence between the stored inbound port information, the burst identifier, and the outbound port information is that when the packet forwarding device receives the first packet of the multiple burst sequences, it will be used to receive each of the first packets.
  • the port information of the ingress port, the burst identifier carried in each first packet, and the port information of the egress port for sending each first packet are stored correspondingly.
  • the packet forwarding device may send the target packet according to the egress port corresponding to the obtained port information.
  • the packet forwarding device may further clear the feature value and/or the feature field carried in the target packet, and then re-mark the packet. Then, the re-marked packet is sent through the obtained egress port.
  • the current packet forwarding device is equivalent to the aforementioned upstream device.
  • Step 304 When there is no packet carrying the burst identifier of the burst sequence within the preset duration, delete the burst identifier of the burst sequence and the burst in the correspondence between the burst identifier and the port information. The record of the port information of the outgoing port of the sequence.
  • the feature field is represented by modifying a specific field in the target message to represent the burst identifier, and the number of the burst identifier is limited. Therefore, if a burst identifier is occupied by a burst sequence for a long time. Then, subsequent bursts of other bursts may have no burst identifier available. Based on this, after the target message is the first message and the corresponding relationship is established according to the target message, or when the target message is the following message, the target is sent through the outbound port corresponding to the port information in the stored correspondence.
  • the packet forwarding device can delete the correspondence between the burst identifier and the port information.
  • the packet forwarding device may determine whether the target packet is a follow-up packet or a first packet of the burst sequence, and if the target packet is a follow-up packet of the burst sequence, the burst sequence is output.
  • the port sends the following message, because the port information of the outbound port of the burst sequence is determined and stored when the first message of the burst sequence is sent, therefore, when the target message is sent, the port can be directly
  • the stored outbound port information is sent to the target packet, and the complex routing lookup table or other forwarding table lookup operations are not performed again according to the forwarding information carried in the target packet, which speeds up the forwarding rate and reduces the forwarding delay.
  • the packets belonging to different burst sequences can be distinguished by carrying the burst identifier in the target packet, so that for one port, multiple burst sequences can be simultaneously supported. send.
  • the packet forwarding device may establish a correspondence between the burst identifier and the port information according to the burst identifier in the first packet and the port information of the outbound port of the first packet.
  • the corresponding port information can be directly obtained from the corresponding relationship, and sent according to the egress port corresponding to the port information.
  • the number of burst identifiers is limited, the number of records in the correspondence between the burst identifier and the port information will be much smaller than the number of entries in the traditional routing table or other forwarding table, that is, packet forwarding.
  • the device searches for the operation of the egress port following the packet through the corresponding relationship, and is more simple and convenient than searching for the forwarding table such as the routing table according to the forwarding information of the following packet. This also means that the method provided by the embodiment of the present application can effectively improve the efficiency and throughput efficiency of the packet forwarding device, and the forwarding delay can be effectively reduced.
  • a case where a port supports multiple burst sequences can be realized by dividing a bandwidth of a physical port into a plurality of time slots, but since the bandwidth of the divided time slots is fixed, Therefore, when a burst sequence cannot occupy all the time slots, the remaining bandwidth of the time slot will be wasted, and the burst identifier is set when the packet is sent by the method of sending a message provided by the present application. It is possible to enable one port to support multiple burst sequences at the same time. At the same time, since there is no fixed slot division, there is no such problem that the bandwidth is wasted. That is, the method for sending a message provided by the present application can better adapt to the bandwidth requirement of different services while reducing the forwarding delay.
  • the upstream device may mark the packet to distinguish the first packet from the following packet, and may carry the feature field in the packet as the burst identifier of the burst sequence to which the packet belongs to distinguish different burst sequences.
  • the downstream packet forwarding device can establish a correspondence according to the burst identifier of the first packet in real time.
  • a correspondence table between a static burst identifier and port information may be configured in the upstream device and the packet forwarding device, and the packet forwarding device may use the configured burst identifier and port information. The correspondence between the ports is used to determine the outbound port of the target packet carrying the burst identifier. Specifically, the implementation will be described next with FIG. 4.
  • FIG. 4 is a flowchart of a method for forwarding a packet according to an embodiment of the present disclosure. As shown in FIG. 4, the method may be used in the packet forwarding device shown in FIG. 1, and the method includes the following steps:
  • Step 401 Acquire, according to the burst identifier carried in the target packet to be sent, the port information of the outbound port of the burst sequence to which the target packet belongs, and the burst sequence refers to a sequence consisting of multiple packets belonging to the same service flow. .
  • the upstream device of the packet forwarding device configures a burst identifier for the target packet according to the correspondence between the configured burst identifier and the port information.
  • the packet forwarding device may obtain, according to the burst identifier of the target packet, the port information corresponding to the burst identifier from the correspondence between the stored pre-configured burst identifier and the port information.
  • the packet forwarding device may obtain the ingress port information of the target packet from the correspondence between the stored pre-configured ingress port information, the burst identifier, and the egress port information based on the burst identifier of the target packet.
  • Port information corresponding to the burst ID may be obtained from the correspondence between the stored pre-configured ingress port information, the burst identifier, and the egress port information based on the burst identifier of the target packet.
  • the packet forwarding device may be configured with a correspondence between the burst identifier and the port information for determining the outbound port of the target packet, and of course, the packet forwarding device may also be configured.
  • the port ID of the outbound port corresponds to the burst identifier. That is, the packet forwarding device may first determine the egress port of the target packet according to the burst identifier carried in the target packet when the target packet is received, and then the packet forwarding device may be the report on each egress port. The message is replaced by a burst identifier, and the replaced burst identifier is a burst identifier pre-configured for the outbound port.
  • the burst identifier may be a feature field obtained by modifying a certain field in the target packet, for example, the feature field may be obtained by modifying any field in the preamble of the target packet, or The feature field may be modified by modifying any of the fields in the frame start delimiter, or the feature field may be modified by modifying any field of the frame check field.
  • Step 402 Send the target packet by using the egress port corresponding to the obtained port information.
  • a series of packets having the same forwarding port may be configured with the same burst identifier, and the packet forwarding device may directly determine the egress port of the target packet according to the burst identifier carried in the packet.
  • the number of burst identifiers is limited. Therefore, the packet forwarding device determines the egress port of the target packet according to the burst identifier, and can effectively avoid the operation of searching for a complicated routing table or other traditional forwarding table, thereby improving the packet forwarding device.
  • the throughput efficiency reduces the forwarding delay.
  • the port mentioned in the embodiment of the present application may be a physical port or a logical port.
  • the sending of at least one burst sequence can be supported on each physical port.
  • the upstream device may be in a downstream packet forwarding device at the upstream device performing packet marking. The packet is marked on the physical outbound port of the packet.
  • the downstream packet forwarding device may re-mark the packet on the forwarding port after determining the forwarding port of the packet, so that the downstream packet forwarding device of the packet forwarding device further forwards according to the label according to the agreement until When receiving the packet, the last packet forwarding device can no longer mark the packet when forwarding, but directly deliver the traditional form packet to the user equipment.
  • Burst identification can be introduced when the transmission of multiple burst sequences can be supported on each physical port.
  • the packets of each service flow are agreed and allocated between the upstream and downstream devices of different physical ports. Therefore, the service flows corresponding to the same burst sequence are marked on each physical interface when traversing the network. Burst IDs may or may not be the same.
  • FIG. 5A is a schematic diagram of a plurality of burst sequences sharing a logical port according to an embodiment of the present application.
  • the A device can perform burst marking and sending of the packet, and after receiving the packet, the B device forwards the packet to the D device through the logical port, and the D device receives the packet.
  • the packet can be forwarded and processed according to the burst sequence message by the method in the foregoing embodiment.
  • the logical port is a network tunnel/pipe that spans the C device, and the C node cross-connects the tunnel/pipe. That is, during the transmission of the message, the C device does not exchange and forward the burst message.
  • the A device can perform burst marking and sending on the received packet, where the A device can send the burst sequence packet through the logical port, where the logical port is a traversal.
  • the network tunnel/pipe of the B, C, and D devices of the intermediate node the packet of the burst sequence arrives at the E device through the network tunnel/pipe, and the E device receives the packet and passes the burst sequence introduced in the foregoing embodiment.
  • the packet is forwarded to the user equipment through the physical egress port.
  • the E device delivers the packet to the user equipment, the E device does not mark the packet at the physical egress port.
  • the B, C, and D devices do not forward and process the burst sequence packets during the transmission of the packets.
  • the A device can receive packets from different user devices, and the packets can arrive through different physical ports. Of course, they can also come from the same user device and reach through the same physical port.
  • the E device delivers the packet to the user equipment
  • the E device can deliver the packet to a user equipment through a physical port, or deliver the packet to different user equipment through different physical ports.
  • a user equipment sends a packet of two service flows to the device A.
  • the E device can send the packets of the two service flows to the two user devices.
  • burst identifier by introducing a burst identifier, multiple burst sequences can be transmitted through one logical port, so that the number of pipeline crossovers at the core node caused by one service flow corresponding to one rigid pipeline in the related art can be solved.
  • the huge problem has improved the forwarding efficiency of the device and also increased the scalability of the device.
  • an embodiment of the present application provides an apparatus 600 for forwarding a message, where the apparatus 600 includes:
  • the obtaining module 601 is configured to perform step 303 in the foregoing embodiment
  • the sending module 602 is configured to perform step 304 in the foregoing embodiment.
  • the target packet when the target field of the target packet carries the first eigenvalue, the target packet is the first packet of the burst sequence, and when the target field of the target packet carries the second eigenvalue, the target packet is determined to be a burst. Send a sequence of follow-up messages; or,
  • the target packet is the first packet of the burst sequence, and is adjacent to the target packet before the target packet.
  • the target message is a follow message of the burst sequence.
  • the obtaining module 602 is specifically configured to:
  • the feature field is used as the burst identifier of the burst sequence, and the port information corresponding to the burst identifier is obtained from the correspondence between the stored burst identifier and the port information, and the feature field is used.
  • the burst sequence to which the message in which the feature field is uniquely identified belongs;
  • the obtained port information is determined as port information for transmitting the outbound port of the burst sequence.
  • the device 600 further includes:
  • a determining module configured to determine, according to forwarding information carried in the target packet, an outbound port of the target packet when the target packet is the first packet of the burst sequence and the target packet further includes the feature field;
  • a storage module configured to use the feature field as a burst identifier of the burst sequence, and store the burst identifier of the burst sequence and the port information of the outbound port of the target packet in a correspondence between the burst identifier and the port information. in.
  • the target packet when the target field of the target packet carries the third eigenvalue, the target packet is the first packet of the burst sequence, and the third eigenvalue is used to indicate that the target packet is the first packet of the burst sequence and the indication is Updating the correspondence between the stored burst identifier and the egress port;
  • the device is also used to:
  • the target message further includes the feature field
  • the feature field is used as the burst identifier of the burst sequence, and the port information corresponding to the burst identifier in the correspondence between the burst identifier and the port information is replaced with the target packet.
  • Port information of the outgoing port is used as the burst identifier of the burst sequence, and the port information corresponding to the burst identifier in the correspondence between the burst identifier and the port information is replaced with the target packet.
  • the device 600 further includes:
  • the deleting module is configured to delete the burst identifier and the burst sequence of the burst sequence in the correspondence between the burst identifier and the port information when there is no packet carrying the burst identifier of the burst sequence within the preset duration The record of the port information of the outgoing port.
  • the target field is any one of the preambles, or the target field is any one of the frame start delimiters, or the target field is any one of the frame check fields.
  • the feature field is not the same field as the target field; wherein the feature field is modified by using any field in the preamble, or the feature field is modified by using any field in the frame start delimiter, or The feature field is modified by modifying any field of the frame check field.
  • the packet forwarding device may determine whether the target packet is a follow-up packet of the burst sequence or the first packet, and if the target packet is a follow-up packet of the burst sequence, obtain the The outbound port of the burst sequence sends the following message, because the outbound port of the burst sequence is determined and stored when the first packet of the burst sequence is sent, therefore, when the target packet is sent, The destination packet is directly sent according to the stored egress port, and the complicated routing lookup or the other forwarding table lookup operation is not performed again according to the forwarding information carried in the target packet, which speeds up the forwarding rate and reduces the forwarding delay.
  • an embodiment of the present application provides an apparatus 600 for forwarding a message, where the apparatus 600 includes:
  • the obtaining module 701 is configured to perform step 401 in the foregoing embodiment
  • the sending module 702 is configured to perform step 402 in the foregoing embodiment.
  • the obtaining module 701 is specifically configured to:
  • the feature field is used as the burst identifier of the burst sequence to which the target packet belongs, and the port information corresponding to the burst identifier is obtained from the correspondence between the stored burst identifier and the port information. Or obtaining the port information corresponding to the ingress port information of the target packet and the burst identifier from the correspondence between the stored inbound port information, the burst identifier, and the outbound port information;
  • the obtained port information is determined as the port information of the outbound port of the burst sequence.
  • a series of packets having the same forwarding port may be configured with the same burst identifier, and the packet forwarding device may directly determine the egress port of the target packet according to the burst identifier carried in the packet.
  • the number of burst identifiers is limited. Therefore, the packet forwarding device determines the egress port of the target packet according to the burst identifier, and can effectively avoid the operation of searching for a complicated routing table or other traditional forwarding table, thereby improving the packet forwarding device.
  • the throughput efficiency reduces the forwarding delay.
  • the device for forwarding a packet when the device for forwarding a packet is forwarded by the foregoing embodiment, only the division of each functional module is used for example. In an actual application, the function may be allocated by different functional modules according to requirements. Completion, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for forwarding a packet and the method for forwarding a packet are provided in the same manner. The specific implementation process is not described here.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)). )Wait.
  • a magnetic medium for example, a floppy disk, a hard disk, a magnetic tape
  • an optical medium for example, a digital versatile disc (DVD)
  • DVD digital versatile disc
  • SSD solid state disk
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

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

Abstract

本申请公开了一种转发报文的方法及装置,属于通信技术领域。所述方法包括:判断当前待发送的目标报文是突发序列的首报文还是跟随报文;当目标报文为突发序列的跟随报文时,获取用于发送该突发序列的出端口的端口信息;其中,该出端口的端口信息是在发送该突发序列的首报文时确定并存储的,突发序列是指由属于同一业务流的多个报文组成的序列;通过获取的出端口发送目标报文。由于该突发序列的出端口的端口信息是在发送该突发序列的首报文时确定并存储的,因此,当发送该目标报文时,本申请可以直接根据该存储的端口信息所对应的出端口发送该目标报文,不必再根据该目标报文携带的转发信息再次进行复杂的路由查表或者是其他转发查表动作,加快了转发速率,降低转发了延迟。

Description

转发报文的方法及装置
本申请要求于2017年9月7日提交中华人民共和国国家知识产权局、申请号为201710801752.1、申请名称为“转发报文的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,特别涉及一种转发报文的方法及装置。
背景技术
当前,诸如互联网协议(Internet Protocol,IP)路由器、多协议标签交换(Multiple Protocol Label Switching,MPLS)交换机以及以太网交换机等分组转发设备在接收到报文时,均需要根据报文中携带的转发信息进行查表,以此来确定报文的出端口,其中,该转发信息可以为目的IP地址、媒体访问控制(Media Access Control,MAC)地址或MPLS标签等。而分组转发设备对所有报文进行逐报文查表和转发的能力主要体现为单位时间内的分组处理数量(Packet Per Second)。随着当前网络带宽需求和吞吐量需求的不断提升,提高单位时间内分组转发设备的分组处理能力已经成为了分组转发设备面临的重要挑战。另一方面,当分组转发设备接收到报文,对所有报文进行逐报文查表和转发时,报文需要排队等待查表和转发服务,这样,就使得报文的转发延迟受到查表和排队等具有不确定性耗时的步骤的影响。
相关技术中,分组转发设备可以作为发送端设备,也可以作为接收端设备。为了提高单位时间内分组转发设备的分组处理能力,在第一种方法中,发送端设备可以将属于同一业务流的连续的多个报文通过特殊设计的包间隙连接成为一个突发数据单元。之后,发送端设备可以在该突发数据单元的最前面添加以太网格式的突发数据单元头,并将增加了突发数据单元头的突发数据单元发送给接收端设备。当接收端设备接收到该突发数据单元之后,对该突发数据单元的突发数据单元头进行解析,并根据突发数据单元的突发数据单元头中的转发信息进行查表转发,一定程度上减少了查表次数,降低了对系统的需求,提升了转发速率。
在第二种方法中,可以将分组转发设备的物理端口的带宽划分成多个时隙,每个时隙的带宽是固定的。其中,对于某个业务流,分组转发设备可以根据该业务流的带宽将一个或者多个时隙形成一个刚性管道。当接收到该业务流的报文时,即可以通过该刚性管道发送该业务流的报文。
然而,当采用上述第一种方法构造和发送突发数据单元时,发送端设备需要缓存属于同一业务的连续多个报文,之后,才能根据缓存的多个报文生成突发数据单元头,从而组成突发数据单元并进行发送。这样,对于发送端设备而言,即需要具有较大的存储空间来缓存突发数据单元。设备对突发数据单元进行逐个转发的时候,设备需要将大颗粒的突发数据单元进行缓存排队,等待转发处理,实际上将分组处理压力转化成了对分组转发设备 的缓存压力,大粒度的突发数据单元缓存排队,加剧了业务数据的排队延迟以及增加了延迟的不确定性。
当采用上述第二种方法将物理端口的带宽划分为多个时隙,通过多个时隙组成的刚性管道承载一个业务流时,一方面,由于刚性管道的带宽是固定,因此,对业务流的带宽的适应性差。另一方面,由于一条业务流对应一个刚性管道,业务流的数量和刚性管道的数量是一致的,这将导致作为核心节点的分组转发设备中的刚性管道交叉连接数量庞大,分组转发设备难以应付,网络面临扩展性瓶颈。
发明内容
本申请实施例提供了一种转发报文的方法及装置,可以用于解决缓存突发数据单元对分组转发设备造成的缓存压力以及由此引起的排队延迟增加的问题,以及刚性管道对业务流的带宽适应性差和刚性管道交叉连接数量庞大的问题。
第一方面,提供了一种转发报文的方法,该方法包括:
当当前待发送的目标报文为突发序列的跟随报文时,获取用于发送所述突发序列的出端口的端口信息;
其中,所述出端口的端口信息是在发送所述突发序列的首报文时确定并存储的,所述突发序列是指由属于同一业务流的多个报文组成的序列;
通过获取的端口信息所对应的出端口发送所述目标报文。
在本申请实施例中,可以判断目标报文为突发序列的跟随报文还是首报文,如果该目标报文为突发序列的跟随报文,则通过该突发序列的出端口来发送该跟随报文,由于该突发序列的出端口是在发送该突发序列的首报文时确定的,因此,当发送该目标报文时,即可以直接根据该突发序列的出端口发送该目标报文,不必再根据该目标报文携带的转发信息再次进行复杂的路由查表或者是其他转发查表动作,加快了转发速率,降低转发了延迟。
可选地,当所述目标报文的目标字段携带第一特征值时,所述目标报文为所述突发序列的首报文,当所述目标报文的目标字段携带第二特征值时,所述目标报文为所述突发序列的跟随报文;或者,
当在所述目标报文之前接收到与所述目标报文相邻的帧间隙中携带第一特征值时,所述目标报文为所述突发序列的首报文,当在所述目标报文之前且与所述目标报文相邻的帧间隙中携带第二特征值时,所述目标报文为所述突发序列的跟随报文。
在本申请实施例中,可以通过在目标报文的目标字段携带不同的特征值来区分目标报文为突发序列的首报文还是跟随报文,这样,当确定目标报文是突发序列的跟随报文时,即可以直接通过该突发序列的出端口发送该跟随报文,规避了传统的查找路由表等查表操作,加快了转发速率,降低了转发延迟。
可选地,所述获取用于发送所述突发序列的出端口的端口信息,包括:
当所述目标报文还包括特征字段时,将所述特征字段作为所述突发序列的突发标识,并从存储的突发标识与端口信息之间的对应关系中获取所述突发标识对应的端口信息,所述特征字段用于唯一标识所述特征字段所在的报文所属的突发序列;
将获取的端口信息确定为用于发送所述突发序列的出端口的端口信息。
在本申请实施例中,在目标报文的目标字段携带特征值的同时,还可以在目标报文中 携带特征字段,通过该特征字段可以区分该目标报文是属于哪一个突发序列的报文。这样,当该目标报文为跟随报文且携带特征字段时,就可以将该特征字段作为该目标报文所属突发序列的突发标识,从而根据该突发标识获取该突发序列的出端口的端口信息。也即是,通过在目标报文中携带特征字段可以实现一个端口同时支持多个突发序列的情况。
可选地,所述方法还包括:
当所述目标报文为所述突发序列的首报文且所述目标报文还包括特征字段时,基于所述目标报文携带的转发信息确定所述目标报文的出端口;
将所述特征字段作为所述突发序列的突发标识,并将所述突发序列的突发标识和所述目标报文的出端口的端口信息对应存储在突发标识与端口信息之间的对应关系中。
在本申请实施例中,当该目标报文为突发序列的首报文,且该目标报文还包括特征字段时,可以根据该目标报文携带的转发信息确定目标报文的出端口。并且,可以将目标报文的特征字段作为该目标报文所属突发序列的突发标识,并将突发标识和出端口的端口信息进行对应存储,这样,后续到达的和该目标报文属于同一突发序列的跟随报文即可以直接根据突发标识查找对应的端口信息,并根据该端口信息所对应的出端口进行转发。
可选地,当所述目标报文的目标字段携带第三特征值时,所述目标报文为所述突发序列的首报文,所述第三特征值用于指示所述目标报文为所述突发序列的首报文且指示对存储的突发标识与端口信息之间的对应关系进行更新;
所述方法还包括:
基于所述目标报文携带的转发信息确定所述目标报文的出端口;
当所述目标报文还包括特征字段时,将所述特征字段作为所述突发序列的突发标识,并将所述突发标识与端口信息之间的对应关系中所述突发标识所对应的端口信息替换为所述目标报文的出端口的端口信息。
在本申请实施例中,特征字段的位数有限,这也就意味着用该特征字段所表示的突发标识的个数也是有限的。在这种情况下,如果目标报文的目标字段携带第三特征值,则说明该目标报文携带的特征字段所代表的突发标识当前正在被其他突发序列占用,此时,可以根据第三特征值通过该目标报文的出端口的端口信息对当前存储的对应关系中与该目标报文携带的突发标识所对应的端口信息进行更新。其中,该第三特征值一方面可以用于指示该目标报文为突发序列的首报文,另一方面可以用于指示对存储的对应关系中相应地记录进行刷新。这样,可以实现有限数量的突发标识的复用,减少存储的对应关系中的记录数量,进而缩短查找出端口的时间,提高转发速率,降低转发延迟。
可选地,所述方法还包括:
当在预设时长内不存在携带所述突发序列的突发标识的报文时,删除所述突发标识与端口信息之间的对应关系中所述突发序列的突发标识与所述突发序列的出端口的端口信息所在的记录。
在本申请实施例中,通过对目标报文中的特定字段进行修改得到特征字段来代表突发标识,该突发标识的数量是有限的,因此,一个突发标识如果被一个突发序列长时间占用,那么,后续到来的其他突发序列的报文可能会没有突发标识可用。基于此,可以对预设时长内一直都没有接收到携带该突发标识的报文的突发标识进行删除,以此释放该突发标识,以便后续报文可以再次回收使用。
可选地,所述目标字段为前导码中的任一字段、或所述目标字段为帧开始定界符中的任一字段,或所述目标字段为帧校验字段中的任一字段。
可选地,所述特征字段与所述目标字段不是同一字段;其中,所述特征字段是对所述前导码中的任一字段进行修改得到、或所述特征字段是对所述帧开始定界符中的任一字段进行修改得到,或所述特征字段是对所述帧校验字段的任一字段进行修改得到。
第二方面,提供了一种转发报文的方法,所述方法包括:
基于当前待发送的目标报文携带的突发标识,获取所述目标报文所属突发序列的出端口的端口信息,所述突发序列是指由属于同一业务流的多个报文组成的序列;
通过获取的端口信息所对应的出端口发送所述目标报文。
在本申请实施例中,对于具有相同的转发端口的一系列报文可以为其配置相同的突发标识,分组转发设备可以直接根据报文携带的突发标识确定该目标报文的出端口。由于突发标识的数量是有限的,因此,分组转发设备根据该突发标识确定目标报文的出端口,可以有效的规避查找复杂的路由表或其他传统转发表的操作,提升了分组转发设备的吞吐效率,降低了转发延迟。
可选地,所述基于当前待发送的目标报文携带的突发标识,获取所述目标报文所属突发序列的出端口的端口信息,包括:
当所述目标报文包括特征字段时,将所述特征字段作为所述目标报文所属的突发序列的突发标识,并从存储的突发标识与端口信息之间的对应关系中获取所述突发标识对应的出端口的端口信息;或者,从存储的入端口信息、突发标识与出端口信息之间的对应关系中,获取与所述目标报文的入端口信息和所述突发标识相对应的端口信息;
将获取的端口信息所对应的出端口确定为所述突发序列的出端口的端口信息。
在本申请实施例中,分组转发设备中可以存储有突发标识和端口信息之间的对应关系,该对应关系对于分组转发设备的所有入端口上的报文而言是共享的。在另一种可能的实现方式中,分组转发设备中每个入端口上的报文对应有独立的对应关系,这样,不同入端口上的报文可以采用同一个突发标识,在此基础上,则可以通过目标报文的入端口和突发标识共同来确定该目标报文所属的突发序列的出端口。也即是,可以从入端口信息、突发标识和出端口信息之间的对应关系中,获取与该目标报文的入端口信息和突发标识相对应的端口信息。
第三方面,提供了一种转发报文的装置,所述装置具有实现上述第一方面中转发报文的方法行为的功能。所述装置包括至少一个模块,该至少一个模块用于实现上述第一方面所提供的转发报文的方法。
第四方面,提供了一种转发报文的装置,所述装置具有实现上述第二方面中转发报文的方法行为的功能,所述装置包括至少一个模块,该至少一个模块用于实现上述第二方面所提供的转发报文的方法。
第五方面,提供了一种转发报文的装置,所述装置的结构中包括处理器和存储器,所 述存储器用于存储支持转发报文的装置执行上述第一方面所提供的转发报文的方法的程序,以及存储用于实现上述第一方面所提供的转发报文的方法所涉及的数据。所述处理器被配置为用于执行所述存储器中存储的程序。所述存储设备的操作装置还可以包括通信总线,该通信总线用于该处理器与存储器之间建立连接。
第六方面,提供了一种转发报文的装置,所述装置的结构中包括处理器和存储器,所述存储器用于存储支持转发报文的装置执行上述第二方面所提供的转发报文的方法的程序,以及存储用于实现上述第二方面所提供的转发报文的方法所涉及的数据。所述处理器被配置为用于执行所述存储器中存储的程序。所述存储设备的操作装置还可以包括通信总线,该通信总线用于该处理器与存储器之间建立连接。
第七方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面所述的转发报文的方法。
第八方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第二方面所述的转发报文的方法。
第九方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的转发报文的方法。
第十方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第二方面所述的转发报文的方法。
上述第三方面、第五方面、第七方面和第九方面所获得的技术效果与第一方面中对应的技术手段获得的技术效果近似,上述第四方面、第六方面、第八方面和第十方面所获得的技术效果与第二方面中对应的技术手段获得的技术效果近似在这里不再赘述。
本申请提供的技术方案带来的有益效果是:在本申请实施例中,分组转发设备可以判断目标报文为突发序列的跟随报文还是首报文,如果该目标报文为突发序列的跟随报文,则通过该突发序列的出端口来发送该跟随报文,由于该突发序列的出端口的端口信息是在发送该突发序列的首报文时确定并存储的,因此,当发送该目标报文时,即可以直接根据该存储的端口信息确定对应的出端口来发送该目标报文,不必再根据该目标报文携带的转发信息再次进行复杂的路由查表或者是其他转发查表动作,加快了转发速率,降低转发了延迟。
附图说明
图1是本申请实施例提供的一种转发报文的方法的系统结构图;
图2是本申请实施例提供的一种网络设备的结构示意图;
图3A是本申请实施例提供的一种对报文进行标记的示意图;
图3B是本申请实施例示出的一种采用64/66b编码的编码块的示意图;
图3C是本申请实施例提供的一种转发报文的方法的流程图;
图4是本申请实施例提供的另一种转发报文的方法的流程图;
图5A是本申请实施例示出的一种多个突发序列共享一个逻辑端口的示意图;
图5B是本申请实施例示出的另一种多个突发序列共享一个逻辑端口的示意图;
图6是本申请实施例提供的一种转发报文的装置结构示意图;
图7是本申请实施例提供的另一种转发报文的装置结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在对本申请实施例进行详细的解释说明之前,先对本申请实施例涉及的系统架构予以介绍。图1是本申请实施例提供的一种转发报文的方法的系统架构图。如图1所示,该系统中包括用户设备101、分组转发设备102-103以及用户设备104。其中,用户设备101可以与分组转发设备102进行通信,分组转发设备102可以和分组转发设备103进行通信,分组转发设备103可以和用户设备104进行通信。
具体的,用户设备101可以向分组转发设备102发送报文,分组转发设备102在接收到报文之后,可以对该报文进行处理,并将处理之后的报文转发至分组转发设备103,分组转发设备103接收该报文,对该报文进行处理之后,将该报文转发至用户设备104。
需要说明的是,用户设备101和用户设备104可以为具有以太网接口的个人电脑、桌面机、服务器等。分组转发设备102和103可以为诸如IP路由器、MPLS交换机、以太网交换机、以太网路由器或者同时集成有上述交换机或路由器功能的其他路由器等。
可理解的是,图1仅为示例性架构图,在实际应用中,除图1所示的用户设备101和104之外,该系统中可以包括其他的多个用户设备。当然,该系统中还可以包括除分组转发设备102和103之外的多个分组转发设备。具体的,本申请实施例不对该系统中用户设备的数量以及分组转发设备的数量做具体的限定。
另外,还需要说明的是,上述介绍的系统架构中的用户设备101即可以是下文实施例中的分组转发设备的上游设备,也即是,用户设备101可以对目标报文进行标记。当然,分组转发设备102也可以作为分组转发设备103的上游设备,也即是,分组转发设备102也可以对目标报文进行标记。或者,下述实施例中的分组转发设备可以图1所示的系统架构中的任一分组转发设备。
图2是本申请实施例提供的一种网络设备的结构示意图。图1中的分组转发设备可以通过图2所示的网络设备来实现。参见图2,该网络设备包括至少一个处理器201,通信总线202,存储器203以及至少一个通信接口204。
处理器201可以是一个网络处理器(Network Processing Unit,CPU),通用中央处理器(Central Processing Unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。
通信总线202可包括一通路,在上述组件之间传送信息。
存储器203可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的 其它类型的静态存储设备,随机存取存储器(random access memory,RAM))或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器203可以是独立存在,通过通信总线202与处理器201相连接。存储器203也可以和处理器201集成在一起。
通信接口204,使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(Wireless Local Area Networks,WLAN)等。
在具体实现中,作为一种实施例,处理器201可以包括一个或多个CPU,例如图2中所示的CPU0和CPU1。
在具体实现中,作为一种实施例,网络设备可以包括多个处理器,例如图2中所示的处理器201和处理器205。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
其中,存储器203用于存储执行本申请方案的程序代码,并由处理器201来控制执行。处理器201用于执行存储器203中存储的程序代码206。程序代码206中可以包括一个或多个软件模块。该网络设备可以通过处理器201以及存储器203中的程序代码206中的一个或多个软件模块,来实现下文图3A-3C、图4或图5A-5B所示的实施例中的转发报文的方法。
接下来对本申请实施例提供的发送报文的方法进行详细的解释说明。
由于在本申请实施例提供的发送报文的方法中,分组转发设备是通过上游设备对报文的标记来识别报文并进行转发的,因此,在介绍分组转发设备如何根据标记信息对报文进行转发之前,先对分组转发设备的上游设备对报文进行标记的具体过程进行介绍。
在本申请实施例中,分组转发设备的上游设备可以对属于同一业务流的多个报文进行标记,并发送该标记后的多个报文,该多个报文即形成了一个突发序列,而通过上游设备的标记,分组转发设备可以对该突发序列中的首报文和跟随报文进行区分。其中,分组转发设备的上游设备可以为用户设备,以图1所示的系统架构为例,该上游设备可以为用户设备101。当然,也可以为能够与当前的分组转发设备进行通信的其他分组转发设备。当然,当前的分组转发设备通过标记信息确定待发送的目标报文的出端口之后,也可以再次通过下述方法对目标报文进行重新标记。也即是,在本申请实施例中,对报文进行标记既可以由发送报文的用户设备完成,也可以由转发报文的分组转发设备完成,并且,对报文的标记可以在报文的传输过程中只进行一次,也可以通过多个不同的设备重新标记多次。
需要说明的是,分组转发设备的上游设备可以对每个报文的目标字段进行标记,或者,可以对与每个报文相邻的且位于每个报文之前的帧间隙中的字段进行标记,此时,可以将这些帧间隙作为其后面且与其相邻的报文的扩展部分,以此区分突发序列的首报文和跟随报文。进一步地,分组转发设备的上游设备还可以将每个报文中的除目标字段之外的其他 特定字段进行修改,得到特征字段,在这种情况下,目标字段用于指示报文是否为突发序列的报文以及报文是突发序列的首报文还是跟随报文,而特征字段用于进一步的指示报文具体所属的突发序列,以此来区分属于不同突发序列的报文,从而实现一个出端口支持发送多个突发序列的情况。
具体的,对于一个突发序列的首报文,分组转发设备的上游设备可以不对其进行标记,而是按照传统报文的处理方式对其进行处理,并将处理后的报文发送至当前的分组转发设备,在这种情况下,对该首报文之后的若干相邻的跟随报文,该上游设备可以通过在该跟随报文的目标字段中携带一个第二特征值,来通知接收该报文的分组转发设备该报文为跟随报文,此时,该首报文的目标字段的原始取值也可以看做是第一特征值。这里,首报文的识别依赖于与其相邻的跟随报文,为了便于说明,可以将该种标记方式称为隐式标记方式。当然,该上游设备也可以在首报文的目标字段中携带一个第一特征值或第三特征值,以显式标记方式明确标记该报文为首报文,而在后续的跟随报文对应的目标字段中携带另一个不同于首报文特征值的第二特征值,以表示后续的报文为跟随报文。此时,该跟随报文可以不与首报文相邻,也即是说,在这种情况下,该首报文以及首报文的跟随报文之间可以穿插其他的传统的独立报文。进一步地,如果多个突发序列中每个突发序列的首报文和跟随报文的目标字段的特征值都唯一(例如n个突发序列,分别使用不同的n个首报文目标字段特征值和n个跟随报文目标字段特征值,共2n个特征值)时,跟随报文可以不与首报文相邻,也即是说,在这种情况下,该首报文以及首报文的跟随报文之间可以穿插其他突发序列的报文或者是不属于任何突发序列的传统的独立报文。其中,目标字段可以为报文的前导码中任一字段,或者可以为帧开始定界符(Start of Frame Delimiter,SFD)中的任一字段,或者可以为帧校验字段中的任一字段。还需要说明的是,报文的前导码包括7个字节,帧开始定界符为一个字节。
例如,图3A是本申请实施例示例性的示出的一种报文标记示意图,如图3A所示,对于首报文001可以不做任何标记,而对于在该首报文001之后且与该首报文001相邻的跟随报文002,则可以在报文002的传统帧开始定界符所在字段携带一个新的不同于传统帧开始定界符值的特征值,即将报文002的帧开始定界符所在字段的值修改为一个新的不同于传统帧开始定界符值的特征值,在这种情况下,报文002的传统帧开始定界符所在字段即为目标字段。此时可以将修改得到的新的不同于帧开始定界符值的特征值称为突发跟随报文的帧开始定界符,以此来标记该报文002为与其相邻的前一个报文001的跟随报文,而与报文002相邻的之后的多个跟随报文将与报文001和002组成一个突发序列,其中,报文001为该突发序列的首报文,而报文002以及与其相邻的多个跟随报文均是该突发序列的跟随报文。也即是,跟随报文与首报文在目标字段有明显的不同特征值标记区分。具体的,在报文002的帧开始定界符所在字段中携带一个新的特征值的具体做法可以是将目标字段中的传统帧开始定界符值中某几个比特位进行修改,也可以是将多个比特位进行修改。例如,未经修改的以太网报文的传统帧开始定界符的二进制值为0b10101011,如图3A上图所示,将传统帧开始定界符值的最后四个比特位的取反,修改为0b10100100。或者,如图3A中下图所示,可以将传统帧开始定界符值的所有比特位进行取反,得到修改后的跟随报文的帧开始定界符值为二进制0b01010100。
上述图3A仅是本申请实施例给出的一种标记的示例,在实际应用中,不仅可以通过上 述方法对报文的传统帧开始定界符所在字段的传统帧开始定界符值进行修改,还可以通过上述方法将前导码包括的7个字节中的字节作为目标字段进行修改,或者还可以对报文前的帧间隙字段进行修改,以实现对报文是否属于突发序列的标记,以及具体的是跟随报文或者首报文的标记。
进一步地,为了在同一端口内区分报文属于n个不同的突发序列中的哪一个突发序列,同时避免需要使用2n个目标字段特征值,该上游设备在使用一个新的目标字段特征值对报文的目标字段进行首报文标记,并采用另一个不同的新的目标字段特征值对报文的目标字段进行跟随报文标记的同时,还可以约定将报文中除目标字段之外的其他特定字段作为特征字段,并将该特征字段用于携带报文所属的n个突发序列之一的突发标识(Burst Identification,Burst ID),以此来区分属于不同突发序列的报文,其中,该特征字段可以是报文中不携带具体信息,只携带有限的标记信息的字段,例如可以将前导码的后六个字节中的任一字节的全部或者部分修改为携带有突发标识Burst ID的特征字段。具体的,突发标识Burst ID为一个字节时,可以区分n=256个突发序列;突发标识Burst ID为半个字节时,可以区分n=16个突发序列。这样,首报文将由[首报文目标字段特征值,Burst ID]两个特征值来标识该报文为首报文以及该首报文具体属于n个突发序列的哪一个突发序列,跟随报文将由[跟随报文目标字段特征值,Burst ID]两个特征值来标识该报文为跟随报文以及该报文具体属于n个突发序列中的哪一个突发序列。需要说明的是,由于每个报文需要通过两个特征值来标识该报文是首报文还是跟随报文以及该报文属于哪一个突发序列,因此,携带这两个特征值的目标字段和特征字段将是不同的字段,并且,为了与传统报文进行区域,[目标字段,特征字段]的值需要与传统报文中[目标字段,特征字段]的原始值形成区分。例如,如果目标字段为传统帧开始定界符字段,则该特征字段可以是由报文的前导码后6个字节48比特中的任一部分或者全部构成的字段。或者,[目标字段,特征字段]可以是报文的前导码后6个字节48比特和传统帧定界符字段(1个字节8个比特)共56个比特的部分或者全部,如果目标字段选定为非传统帧开始定界符所在字段,则传统帧开始定界符所在字段的部分或者全部字段可以作为特征字段。
例如,对于某一突发序列的跟随报文,上游设备可以按照约定对该报文的前导码包括的7个字节中的最后一个字节进行跟随报文标记,以指示该报文为跟随报文,与此同时,可以将该报文中的帧开始定界符进行修改,得到特征字段,将该特征字段作为突发标识,以指示该报文所属的突发序列。或者,可以按照约定将报文的帧开始定界符修改为突发跟随报文帧开始定界符,以指示该报文为跟随报文,而将前导码包括的7个字节中的最后一个字节进行修改,得到特征字段,将该特征字段作为突发标识,以指示该报文所属的突发序列。
需要说明的是,当通过特征字段来区分报文所属的突发序列时,该特征字段包含的比特位数限制了该上游设备中用于发送报文的某一个出端口所支持突发序列的个数。例如,约定特征字段包含4个比特位,那么,4个比特位的特征字段可以表示16个不同的值,0~15,这16个不同的值最多可以作为16个同时有效的不同的突发序列的标识。也即是,通过该16个突发标识,可以支持16个并行的突发序列。上游设备和其下游的分组设备需要约定和分配好采用16个突发标识的部分或者全部来标记至多16个同时有效的突发序列。如果该16个突发标识分配完之后,还存在新的突发序列需要在上下游设备之间约定突发标记时, 在这种情况下,上下游设备只能将之前分配给其他突发序列的16个突发标识中的某一个回收再分配给这个新的突发序列。
其中,将突发表示进行回收和再分配的一种实现方式可以是在该新的突发序列的首报文中的特征字段上携带需要请求回收的突发标识,以使接收该首报文的下游分组转发设备基于该新的突发序列的首报文确定对该新的突发序列的转发处理和出端口,并且,后续该突发标识将由该新的突发序列使用。或者,上游设备可以等待上述16个突发标识所对应的某个突发序列发送完毕并释放其突发标识之后,再将释放的突发标识分配给新的突发序列。在这种情况下,可以引入超时机制,也即是,当超过预设时间T在上下游两设备之间均无该突发标识所对应的突发序列的报文传输后,即回收该突发标识。最后需要澄清的是,突发标识的分配还可以在上下游设备之间静态配置约定,长久有效直至重新配置约定,此时不使用超时机制,也不使用首报文更新突发标识的对应突发的转发处理和出端口。
进一步地,为了保证突发标识的可靠性,上游设备可以将特征字段中的指定数量的比特位作为校验信息位。例如,对于一个8比特的特征字段,可以将前7比特作为突发标识,而将最后一个比特作为校验信息位。具体的,该校验信息位的取值可以通过奇偶校验的方法得到,例如,前7个比特位中取值为1的个数为奇数时,最后一个比特位取1,反之,如果为偶数,则最后一个比特位取0。再例如,对于一个8比特的特征字段,可以将前4个比特作为突发标识,而将后4个比特作为校验信息位。其中,后4个比特的校验信息位的取值可以通过CRC-4循环冗余校验算式x4+x+1计算得到。而对于下游的分组转发设备而言,当对突发标识校验失败时,该报文将按照处理传统报文的方式进行处理,也即是,根据该报文携带的转发信息缓存排队,通过查路由表等转发表进行转发。
除上述几种对报文进行标记的方法之外,上游设备还可以在跟随报文的特征字段中携带链表指针的方式进行标记和区分,该指针用于指示与当前报文属于同一突发序列的上一报文之间间隔的其他报文数量。对于该种标记方式,下游的分组转发设备在接收到某一突发序列的首报文或者任一跟随报文时,可以根据该报文携带的指针确定该突发序列的下一跟随报文,进而通过确定下一跟随报文出端口以发送所述下一跟随报文。此外还可以在同一端口中所有的属于突发序列的报文的特征字段中携带一个当前报文序号,一个上一报文序号,一个下一报文序列。序号在随突发序列的报文的计数递增加1。此时具体的一个突发序列的系列报文即可以由一系列[上一报文序号,当前报文序号,下一报文序号]的链表指针连接关系确定。例如:属于多个突发序列的多个报文,序列号为…,4,5,6,7,8,9,10,…,其中报文4,7,10,属于同一突发序列,其特征字段即可以分别为[Null,4,7],[4,7,10],[7,10,Null],4号报文的上一报文序号为null=0,即4号报文无上一报文,该4号报文为首报文。7号报文的特征字段分别明确其所属突发序列的上一报文为4号报文,下一报文为10号报文。10号报文[7,10,Null]的下一报文为null=0,即10号报文无下一报文,突发序列结束。5,6,8,9,…为其他突发序列的报文,例如当这四个报文属于同一突发序列时,可能的标记可以为[2,5,6],[5,6,8],[6,8,9],[8,9,12]。若每个序号定义为一个字节,则特征字段需要三个字节。序号从0~255周而复始。其他标记手段这里不一一穷举。
最后需要重点阐明的是,由于在高速的以太网接口中,以太网报文的传输广泛采用64/66b编码块,其中,灵活以太网(Flexible Ethernet,FlexE)技术更是基于64/66b编码块将物理接口时分复用(Time Division Multiplexing,TDM)时分划分了若干个具有固定带 宽的逻辑端口。进一步地通过对这些具有固定带宽的逻辑端口引入交叉连接技术,可以获得一个跨越多个网络节点的逻辑端口。因此,报文以编码块的形式被处理的时候,上游设备还可以通过编码块进行上述各种形式的标记,以此来减少分组转发设备的编码解码处理,有效降低复杂度和转发延迟。也即是,上游设备在报文的前导码、帧开始定界符或者其前面的帧间隙等处进行标记(包括上述的携带相应地特征值或者是指针等各种标记方式),在表现形式上既可以是如上所述的直接体现在对目标字段和特征字段的标记上,当然,也可以体现为在采用64/66b编码的端口上时,直接在前导码、帧开始定界符或者帧间隙所对应的编码块中的目标字段和/或特征字段进行标记,下游转发设备可以直接在编码块上进行识别。即基于解码后的字节比特字段进行标识、基于码块内的字段进行标识是等价的,包括64/66b码块或者其他码块,如8/10b,128/130b、512/514b等不同编码形式的n/mb码块,其中,n表示每个码块中的净荷比特数,m表示每个码块的总比特数,n、m为正整数,m>n。具体的采用何种编码形式的码块,本申请不加以限定。
具体的,如图3B所示,是本申请实施例提供的一种采用64/66b编码的编码块的示意图。图3B的左图中示出的是字节形式的报文,其中,前面7个字节为前导码,前导码之后的为帧开始定界符,再之后的为报文的有效数据信息,如目的地址、源地址、报文内容等信息。图中Dn用于表示一个字节。图3B的右图中是对应的64/66b编码块。如图3B右图中的第一行所示,在进行64/66b编码时,前导码的第一个字节在被替换为用于表征开始的/S/字符后,每8个字节为一组进行64/66b编码,每8个字节被编码为一个编码块,一共得到若干个64/66b编码块,7字节前导码和1字节帧开始定界符共8字节对应一个编码块。除了该编码块的两比特同步头为二进制0b10,首字节编码块类型为二进制0b00011110(十六进制0x78)不应该被修改外,上游设备可以在上述前导码所对应后6个字节(图中用十六进制0x55表示)共48比特中的任一部分或者是第7个字节,即帧开始定界符所对应的字节(8比特,图中用十六进制0x5d表示)进行突发标记,以标识该报文是否为突发序列的首报文或跟随报文。具体地,上游设备和下游设备可以约定在帧开始定界符所在编码块的最后一字节,即原帧开始定界符字段进行突发标记,以标识该报文为突发序列的首报文或者是跟随报文,而在同一码块中,前导码的最后一个字节字段中携带突发标识,以区分不同突发序列的报文。或者,上游设备可以和下游设备约定在前导码所对应编码块的倒数第二字节,即前导码的最后一个字节字段进行突发标识,以标识该报文为跟随报文或者是首报文,而在原帧开始定界符所在字段对应的编码块的最后一字节中携带突发标识,以区分不同突发序列的报文。
需要说明的是,上述仅是本申请实施例给出的一种示例,并不构成对本申请实施例的限定,在实际应用中,不仅可以在前导码和帧开始定界符所对应的编码块上进行标记,还可以在帧间隙所对应的编码块上进行标记,具体的标记方法可以参考上述介绍的方法,原理是相同的,本申请实施例不再赘述。
可选地,与该上游设备相邻的下一个分组转发设备可以通过与该上游设备进行通信协商来约定上游设备具体采用什么样的方式对报文进行标记,因此,当上游设备将标记后的报文发送至下一个分组转发设备时,下一个分组转发设备可以按照协商约定的标记方式对接收到的报文进行识别并和转发。
基于上述描述,由于分组转发设备的上游设备可以对属于同一业务流的多个报文进行标记,因此,下游的分组转发设备对于当前待发送的目标报文,下游的分组转发设备可以通过图3C所示的实施例中提供的发送报文的方法对该目标报文进行转发。也即是,当通过上述所介绍的标记方式对报文的目标字段和特征字段进行标记之后,接下来可以通过图3C所述的实施例中介绍的相关步骤来识别和转发该标记后的报文。
图3C是本申请实施例提供的一种转发报文的方法的流程图,该方法可以用于上述图1所示的分组转发设备中,参见图3C,该方法包括:
步骤301:判断当前待发送的目标报文是突发序列的首报文还是跟随报文。
基于前述描述,对于突发序列的首报文和跟随报文的区分是通过对目标字段或者是帧间隙进行标记来实现的,并且,对于携带有重复使用的突发标识的首报文,该首报文的目标字段的标记方式不同于其他的首报文。因此,针对上述几种情况,分组转发设备可以通过不同的方式来判断该目标报文是突发序列的首报文还是跟随报文。其中,突发序列是指由属于同一业务流的多个报文组成的序列。该多个报文具有相同的网络转发行为。
在一种可选地实现方式中,当该目标报文的目标字段携带第一特征值时,则确定该目标报文为突发序列的首报文,当该目标报文的目标字段携带第二特征值时,则确定该目标报文为突发序列的跟随报文。其中,第一特征值可以是该目标字段的原始取值,也可以是协商好的专门用于指示报文为首报文的一个特征值。第二特征值可以是与目标字段的原始取值和第一特征值不同的任意值,当然,也可以是协商好的专门用于指示报文为跟随报文的一个特征值。具体的,第一特征值和第二特征值可以是什么样的特征值可以参考前述对报文的目标字段进行标记的相关介绍,本申请实施例不再赘述。
需要说明的是,如果上游设备用于发送该目标报文的出端口仅支持一个突发序列时,该目标报文中将仅携带第一特征值或第二特征值,以此来区分当前的这个突发序列的首报文和跟随报文。如果用于发送该目标报文的出端口支持多个突发序列的发送时,此时,该目标报文中不仅会携带有第一特征值或者是第二特征值,还可以携带有特征字段,该特征字段是对该目标报文中除目标字段之外的字段进行修改得到的,该特征字段即为该目标报文所属的突发序列的突发标识。
在另一种可选地实现方式中,由于某些突发序列的首报文可能在上游设备处分配到的是之前使用过还未释放的突发标识,此时,需要对该类首报文和其他的首报文进行区分,此时,该首报文将携带第三特征值和特征字段。在这种情况下,当分组转发设备确定该目标报文的目标字段携带第三特征值,或该目标报文之前的帧间隙中携带第三特征值时,也可以将该目标报文确定为突发序列的首报文。
在另一种可选地实现方式中,上游设备可能在该目标报文的帧间隙之前进行了标记。在这种情况下,当在该目标报文之前接收到的与该目标报文相邻的帧间隙中携带第一特征值时,确定该目标报文为突发序列的首报文,当在该目标报文之前且与该目标报文相邻的帧间隙中携带第二特征值时,则确定该目标报文为突发序列的跟随报文。
在另一种可选地实现方式中,上游设备可能通过该目标字段和特征字段在编码块中对应的编码字节来对报文进行标记,也即是,可以通过目标字段在编码块中对应的编码字节来携带该第一特征值或第二特征值或第三特征值,并且,通过特征字段在编码块中对应的编码字节来携带突发标识。其中,第一特征值和第三特征值均是用于标识报文为首报文的 特征值,而第二特征值则是用于标识报文为跟随报文的特征值。具体可参考前述报文标记过程中的相关介绍,本申请实施例也不再赘述。在这种情况下,分组转发设备可以检测该64/66b编码块上是否存在相应地标记,来确定该目标报文是跟随报文还是首报文。
在另一种可选地实现方式中,当目标报文中包括特征字段,且该特征字段中包括校验信息位时,分组转发设备可以对该校验信息位的取值进行验证,如果验证通过,则可以根据该目标报文的目标字段携带的特征值来判断该目标报文是突发序列的首报文还是跟随报文。如果验证未通过,则按照传统的报文处理方式对该目标报文进行查路由表转发。
当分组转发设备确定目标报文为首报文时,可以通过步骤302发送该目标报文;当确定目标报文为跟随报文时,则可以通过步骤303和304发送该目标报文。
步骤302:当该目标报文为首报文时,基于目标报文携带的转发信息确定目标报文的出端口,并通过确定的出端口发送该目标报文。
当该目标报文的目标字段携带有第一特征值或者第三特征值、或者目标报文之前的帧间隙中携带第一特征值或第三特征值时,分组转发设备可以根据该目标报文携带的转发信息确定用于发送该目标报文的出端口,并通过确定的出端口发送该目标报文。其中,该转发信息可以是目标报文中携带的转发地址或标签之类的信息,例如,该转发信息可以为目的IP地址、MAC地址、以太网报文中的源地址和目的地址或者MPLS标签等。具体的,分组转发设备可以根据目标报文携带的转发信息,按照处理传统报文的方式,通过查找路由表或MPLS转发表等来确定该目标报文的出端口。
进一步地,当分组转发设备确定目标报文的出端口之后,由于该目标报文是首报文,因此,为了后续需要发送的与该首报文属于同一突发序列的报文能够不必查找路由表即可以进行转发,分组转发设备可以将该目标报文的出端口的端口信息进行存储。
其中,如果目标报文的目标字段携带有第一特征值而该目标报文不包括特征字段,此时,则说明用于接收该目标报文的入端口只支持一个突发序列。在这种情况下,分组转发设备可以存储该目标报文的出端口的端口信息,以便在该目标报文之后紧跟着接收到的跟随报文可以通过该目标报文的出端口直接进行转发。
如果目标报文的目标字段携带第一特征值,且该目标报文还包括特征字段,则说明用于接收该目标报文的入端口可以支持多个突发序列。在这种情况下,如果上游设备在突发标识够用的情况下,对于其所有出端口发送的报文分配的突发标识都是不重复的,也即是,上游设备中突发标识对于所有出端口而言是共享的,那么,分组转发设备可以将该目标报文的特征字段作为该目标报文所属突发序列的突发标识,将该目标报文的出端口作为其所属突发序列的出端口,然后将该突发标识和该出端口的端口信息对应存储在突发标识与端口信息之间的对应关系中。在这种情况下,该对应关系对于该分组转发设备的所有入端口是共享的,也即是,无论待发送的报文是从哪个入端口上接收的,均可以直接根据报文中的特征字段查找该对应关系,以获取对应的端口信息。
例如,上游设备一共有16个突发标识,该上游设备的所有出端口共享这16个突发标识,这样,上游设备为出端口1上的某个突发序列分配突发标识1,在16个突发标识未被分配完之前,该突发标识1将不会再被分配给其他的突发序列。在这种情况下,分组转发设备在接收到这些突发序列的首报文时,由于各个突发序列的突发标识并不重复,也就不需要存储各个突发序列的入端口,而是只通过存储突发标识和对应的出端口即可以区分各 个突发序列。
可选地,如果上游设备对于每个出端口,都独立的分配突发标识,例如,每个出端口都可以有16个突发标识供其使用,那么,由于分组转发设备从不同的入端口上接收到的报文可能携带有相同的突发标识,因此,分组转发设备可以针对每个入端口建立一个独立的对应关系。也即是,分组转发设备可以将目标报文的特征字段作为该目标报文所属突发序列的突发标识,将该目标报文的出端口作为其所属突发序列的出端口,然后将用于接收该目标报文的入端口的端口信息、该突发标识和该出端口的端口信息对应存储在入端口信息、突发标识与出端口信息之间的对应关系中。这样,在获取某个待发送的报文的转发出端口时,该待发送的报文是从哪个入端口上接收的,就对应的查找该入端口信息对应的突发标识和出端口信息。
如果目标报文的目标字段携带第三特征值且目标报文包括特征字段,此时,该目标报文的特征字段可以作为该目标报文所属突发序列的突发标识。而由目标报文的第三特征值可知,该突发标识是在该目标报文之前的其他突发序列正在使用的突发标识,也即是,分组转发设备当前存储的对应关系中将包括该突发标识和其对应的端口信息,此时该突发标识所对应的端口信息就是上述正在使用该突发标识的其他突发序列的出端口的端口信息。在这种情况下,分组转发设备可以根据该第三特征值,通过该目标报文的出端口的端口信息对当前存储的该突发标识所对应的端口信息进行更新。具体的,分组转发设备可以首先根据该目标报文携带的转发信息确定该目标报文的出端口,将该目标报文的出端口作为该目标报文所属的突发序列的出端口,然后,分组转发设备可以将存储的突发标识和端口信息之间的对应关系中该突发标识对应的端口信息替换为该目标报文的出端口的端口信息。当然,如果存储的对应关系是入端口信息、突发标识和出端口信息之间的对应关系,那么,分组转发设备则可以将存储的入端口信息、突发标识和出端口信息之间的对应关系中与该目标报文的入端口信息和突发标识对应的出端口信息替换为该目标报文的出端口的端口信息。
需要说明的是,由上述描述可知,在本步骤中,第一特征值和第三特征值均可以用于指示目标报文为首报文,除此之外,第一特征值还可以用于指示分组转发设备创建该突发序列的突发标识和端口信息之间的对应记录,而第三特征值则可以用于指示分组转发设备对已有的该突发标识和端口信息的记录中的端口信息进行更新。
步骤303:当该目标报文为突发序列的跟随报文时,获取用于发送该突发序列的出端口的端口信息,并通过获取的端口信息所对应的出端口发送该目标报文。
其中,当该目标报文的目标字段携带第二特征值或该目标报文之前的帧间隙中携带第二特征值,而该目标报文不包括特征字段时,说明用于接收该目标报文的入端口只支持一个突发序列。在这种情况下,分组转发设备可以获取该入端口上最近一次接收到的首报文的出端口的端口信息,并将该首报文的出端口作为该首报文和该目标报文所属突发序列的出端口。或者,分组转发设备可以直接通过该入端口上接收到的前一个报文的出端口来发送该目标报文。
在本申请实施例中,当一个端口支持一个突发序列时,由于分组转发设备可以将跟随报文跟着前一个报文或者最近的一个首报文进行转发,因此,分组转发设备就不必再缓存多个报文来构造突发头,可以更好的适应低延迟网络的需求。另一方面,在本申请实施例 中,当一个端口只支持一个突发序列时,该突发序列可以随时被其他突发序列中断。例如,一个首报文之后跟随三个跟随报文,如果第三个跟随报文之后的报文是属于其他业务流的报文时,该报文即可以作为下一个突发序列的首报文,此时,当前的突发序列也就中断了。这样,也就避免了一个较长的突发序列长时间占用一个出端口进行发送的问题。并且,在本申请实施例中,如果分组转发设备不支持报文标记和识别时,该分组转发设备也可以将待发送的目标报文按照传统报文进行查路由表等方式进行处理,也即是,本申请实施例提供的方法还可以兼容网络中的老旧设备。
可选地,当该目标报文的目标字段携带第二特征值或该目标报文之前的帧间隙中携带第二特征值,且该目标报文还包括特征字段时,说明用于接收该目标报文的入端口支持多个突发序列。在这种情况下,分组转发设备可以将特征字段作为该目标报文所属突发序列的突发标识,并根据该突发标识获取用于发送该突发序列的出端口。
具体的,在一种可能的实现方式中,如果该分组转发设备中存储的是所有端口共享的突发标识和端口信息之间的对应关系,那么,该目标报文无论是从哪个入端口上接收的,分组转发设备在确定该目标报文包括特征字段时,都可以只根据该目标报文的特征字段,通过该对应关系查找该目标报文所属的突发序列的突发标识所对应的端口信息。也即是,分组转发设备可以直接从存储的突发标识和端口信息之间的对应关系中获取该突发标识对应的端口信息。其中,存储的突发标识和端口信息之间的对应关系是分组转发设备在接收到每个突发序列的首报文时,将首报文携带的特征字段以及首报文的出端口的端口信息进行存储得到的。
在另一种可能的实现方式中,如果分组转发设备中每个入端口均对应有一个独立的对应关系,那么,该目标报文从哪个入端口上接收的,分组转发设备在确定该目标报文包括特征字段之后,就可以通过该入端口查找该对应关系,并从该对应关系中查找该目标报文所属的突发序列的突发标识所对应的出端口的端口信息。也即是,在这种情况下,分组转发设备可以从存储的入端口信息、突发标识和出端口信息三者之间的对应关系中获取与该目标报文的入端口信息和突发标识相对应的出端口信息。其中,存储的入端口信息、突发标识和出端口信息三者之间的对应关系是分组转发设备在接收到多个突发序列的首报文时,将用于接收每个首报文的入端口的端口信息、每个首报文携带的突发标识和用于发送每个首报文的出端口的端口信息对应存储得到的。
当获取到用于发送该突发序列的出端口的端口信息之后,分组转发设备可以根据获取的端口信息所对应的出端口发送该目标报文。可选地,在通过获取的端口信息所对应的出端口发送该目标报文之前,分组转发设备还可以将该目标报文中携带的特征值和/或特征字段进行清除,然后重新标记,之后,再将重新标记的报文通过获取的出端口进行发送。在这种情况下,对于下一个分组转发设备而言,当前的分组转发设备即相当于前述的上游设备。具体的标记的方法则可以参考前述的对报文进行标记的方法。
步骤304:当在预设时长内不存在携带该突发序列的突发标识的报文时,删除突发标识与端口信息之间的对应关系中该突发序列的突发标识与该突发序列的出端口的端口信息所在的记录。
基于前述描述可知,通过对目标报文中的特定字段进行修改得到特征字段来代表突发标识,该突发标识的数量是有限的,因此,一个突发标识如果被一个突发序列长时间占用, 那么,后续到来的其他突发序列的报文可能会没有突发标识可用。基于此,当目标报文为首报文且根据目标报文建立了对应关系之后,或者,当目标报文为跟随报文且通过存储的对应关系中的端口信息所对应的出端口发送了该目标报文之后,如果在预设时长内一直都没有与该目标报文属于同一突发序列的其他待发送报文,也就是说,一直都没有携带该突发序列的突发标识的其他待发送报文,那么,为了解除该突发序列对该突发标识的占用,以便后续需要突发标识的突发序列使用,分组转发设备可以删除突发标识与端口信息之间的对应关系中该突发序列的突发标识与该突发序列的出端口的端口信息所在的记录。
在本申请实施例中,分组转发设备可以判断目标报文为突发序列的跟随报文还是首报文,如果该目标报文为突发序列的跟随报文,则通过该突发序列的出端口来发送该跟随报文,由于该突发序列的出端口的端口信息是在发送该突发序列的首报文时确定并存储的,因此,当发送该目标报文时,即可以直接根据该存储的出端口信息发送该目标报文,不必再根据该目标报文携带的转发信息再次进行复杂的路由查表或者是其他转发查表动作,加快了转发速率,降低转发了延迟。
进一步地,在本申请实施例中,还可以通过在目标报文中携带突发标识来区分属于不同突发序列的报文,这样,对于一个端口,即可以实现同时支持多个突发序列的发送。在这种情况下,对于首报文,分组转发设备则可以根据首报文中的突发标识和首报文的出端口的端口信息建立突发标识和端口信息之间的对应关系,而对于跟随报文,则可以直接从该对应关系中获取对应的端口信息,并根据该端口信息所对应的出端口进行发送。由于突发标识的数量有限,这样,突发标识和端口信息之间的对应关系中的记录数量将远远小于传统的路由表或其他转发表的中的表项数量,也就是说,分组转发设备通过该对应关系查找跟随报文的出端口的操作,相较于根据跟随报文的转发信息查找路由表等转发表的操作,要更加简单便捷。这也就意味着,通过本申请实施例提供的方法可以有效的提升分组转发设备确定出端口的效率、吞吐效率,进而可以有效的降低转发延迟。
还需要说明的是,在相关技术中,通过将物理端口的带宽划分成若干个时隙也可以实现一个端口支持多个突发序列的情况,但是,由于划分的时隙的带宽是固定的,因此,当某个突发序列不能全部占用一个时隙时,该时隙剩余的带宽将会被浪费掉,而通过本申请提供的发送报文的方法发送报文时,通过突发标识的设置,可以使一个端口同时支持多个突发序列,同时,由于并没有固定时隙的划分,也就不存在上述带宽浪费的问题。也即是,通过本申请提供的发送报文的方法在降低转发延迟的同时还可以更好的适应不同业务的带宽需求。
上述实施例中,上游设备可以对报文进行标记以区分首报文和跟随报文,并可以在报文中携带特征字段作为报文所属突发序列的突发标识,以区分不同突发序列的报文。在这种情况下,下游的分组转发设备可以根据首报文的突发标识实时的建立对应关系。在另一种可能的实现方式中,可以在上游设备和分组转发设备中配置一个静态的突发标识和端口信息之间的对应关系表,分组转发设备可以根据该配置的突发标识和端口信息之间的对应关系,来确定携带有突发标识的目标报文的出端口。具体的,接下来将结合图4对该种实现方式进行介绍。
图4是本申请实施例提供的一种转发报文的方法的流程图,如图4所示,该方法可以 用于图1所示的分组转发设备中,该方法包括如下步骤:
步骤401:基于当前待发送的目标报文携带的突发标识,获取目标报文所属突发序列的出端口的端口信息,突发序列是指由属于同一业务流的多个报文组成的序列。
在本申请实施例中,分组转发设备的上游设备会根据配置的突发标识和端口信息之间的对应关系,为该目标报文配置一个突发标识。分组转发设备可以基于该目标报文的突发标识,直接从存储的预先配置的突发标识和端口信息之间的对应关系中获取该突发标识对应的端口信息。或者,分组转发设备可以基于该目标报文的突发标识,从存储的预先配置的入端口信息、突发标识和出端口信息之间的对应关系中获取与该目标报文的入端口信息和突发标识对应的端口信息。
需要说明的是,在本申请实施例中,分组转发设备中可以配置有用于确定目标报文出端口的突发标识和端口信息之间的对应关系,当然,同时还可以配置有该分组转发设备的出端口的端口信息分别对应的突发标识。也就是说,分组转发设备首先可以根据接收到该目标报文时该目标报文上携带的突发标识确定该目标报文的出端口,之后,分组转发设备可以为每个出端口上的报文重新更换一个突发标识进行发送,这个更换的突发标识即是为该出端口预先配置的突发标识。
其中,该突发标识可以是将目标报文中的某个字段进行修改后得到的特征字段,例如,该特征字段可以是对目标报文的前导码中的任一字段进行修改得到、或该特征字段可以是对帧开始定界符中的任一字段进行修改得到,或特征字段可以是对帧校验字段的任一字段进行修改得到。
步骤402:通过获取的端口信息所对应的出端口发送该目标报文。
在本申请实施例中,对于具有相同的转发端口的一系列报文可以为其配置相同的突发标识,分组转发设备可以直接根据报文携带的突发标识确定该目标报文的出端口。由于突发标识的数量是有限的,因此,分组转发设备根据该突发标识确定目标报文的出端口,可以有效的规避查找复杂的路由表或其他传统转发表的操作,提升了分组转发设备的吞吐效率,降低了转发延迟。
需要说明的是,在本申请实施例中提到的端口可以是物理端口,也可以是逻辑端口。具体的,每个物理端口上可以支持至少一个突发序列的发送。结合图3C和图4所示的实施例可知,当每个物理端口上只支持一个突发序列的发送时,在进行报文标记的上游设备处,该上游设备可以在向下游的分组转发设备发送报文的物理出端口上对报文进行标记。而下游的分组转发设备可以在确定报文的转发出端口之后,在该转发出端口上对报文再次进行重新标记,以便该分组转发设备的下游分组转发设备按照约定进一步根据标记进行转发,直到最后一个分组转发设备在接收到该报文时,在转发时可以不再对报文进行标记,而是直接向用户设备交付传统形式的报文。
当每个物理端口上可以支持多个突发序列的发送时,可以引入突发标识。每个业务流的报文在不同的物理端口的上下游设备之间是两两约定和分配的,因此同一个突发序列对应的业务流在穿越网络的时候,在各个物理接口上被标记的突发标识可能相同,也可能不同。
进一步地,多个突发序列不仅可以共享一个物理端口,也可以共享一个逻辑端口,逻 辑端口可以为两个相邻设备之间的某个物理端口包括的多个逻辑端口中的一个,也可以是穿越一个节点或者多个节点的网络隧道或者逻辑连接端口。图5A是本申请实施例示出的一种多个突发序列共享一个逻辑端口的示意图。如图5A所示,A设备可以对报文进行突发的标记和发送,B设备在接收到该报文之后,通过逻辑端口将该报文转发至D设备,D设备在接收到该报文时,可以通过前述实施例中的方法,对报文按照突发序列的报文进行转发和处理。其中,如图5A所示,该逻辑端口即为一个跨越C设备的网络隧道/管道,C节点对隧道/管道进行交叉连接。也即是,在报文的传输过程中,C设备不进行突发报文的交换和转发。
可选地,如图5B所示,A设备可以对接收到的报文进行突发标记和发送,其中,A设备可以通过逻辑端口发送突发序列的报文,该逻辑端口即为一条穿越作为中间节点的B、C、D设备的网络隧道/管道,突发序列的报文通过该网络隧道/管道到达E设备,E设备接收该报文,并通过前述实施例中介绍的对突发序列的报文进行转发的方式,通过物理出端口向用户设备交付该报文。其中,E设备在向用户设备交付该报文时,在物理出端口处不再对报文进行标记。而B、C、D设备在报文的传输过程中则均不对突发序列的报文进行转发和处理。需要指出的是,A设备可以接收来自不同的用户设备的报文,并且,这些报文可以经过不同的物理端口到达,当然,也可以来自相同的用户设备,并通过相同的物理端口到达。而E设备在向用户设备交付报文时,E设备可以通过一个物理端口向一个用户设备交付该报文,也可以通过不同的物理端口向不同的用户设备交付该报文。例如,一个用户设备向A设备发送了两个业务流的报文,当到达E设备处时,E设备可以将两个业务流的报文分别发送给两个用户设备。
在本申请实施例中,通过引入突发标识,多个突发序列可以通过一个逻辑端口来传输,这样,就可以解决相关技术中一个业务流对应一条刚性管道时导致的核心节点处管道交叉数量庞大的问题,提高了设备的转发效率的同时,也提升了设备的扩展性。
参见图6,本申请实施例提供了一种转发报文的装置600,该装置600包括:
获取模块601,用于执行上述实施例中的步骤303;
发送模块602,用于执行上述实施例中的步骤304。
可选地,当目标报文的目标字段携带第一特征值时,目标报文为突发序列的首报文,当目标报文的目标字段携带第二特征值时,确定目标报文为突发序列的跟随报文;或者,
当在目标报文之前接收到与目标报文相邻的帧间隙中携带第一特征值时,目标报文为突发序列的首报文,当在目标报文之前且与目标报文相邻的帧间隙中携带第二特征值时,目标报文为突发序列的跟随报文。
可选地,获取模块602具体用于:
当目标报文还包括特征字段时,将特征字段作为突发序列的突发标识,并从存储的突发标识与端口信息之间的对应关系中获取突发标识对应的端口信息,特征字段用于唯一标识特征字段所在的报文所属的突发序列;
将获取的端口信息确定为用于发送该突发序列的出端口的端口信息。
可选地,该装置600还包括:
确定模块,用于当目标报文为突发序列的首报文且目标报文还包括特征字段时,基于 目标报文携带的转发信息确定目标报文的出端口;
存储模块,用于将特征字段作为突发序列的突发标识,并将突发序列的突发标识和目标报文的出端口的端口信息对应存储在突发标识与端口信息之间的对应关系中。
可选地,当目标报文的目标字段携带第三特征值时,目标报文为突发序列的首报文,第三特征值用于指示目标报文为突发序列的首报文且指示对存储的突发标识与出端口之间的对应关系进行更新;
所述装置还用于:
基于目标报文携带的转发信息确定目标报文的出端口;
当目标报文还包括特征字段时,将特征字段作为突发序列的突发标识,并将突发标识与端口信息之间的对应关系中突发标识所对应的端口信息替换为目标报文的出端口的端口信息。
可选地,该装置600还包括:
删除模块,用于当在预设时长内不存在携带突发序列的突发标识的报文时,删除突发标识与端口信息之间的对应关系中突发序列的突发标识与突发序列的出端口的端口信息所在的记录。
可选地,目标字段为前导码中的任一字段、或目标字段为帧开始定界符中的任一字段,或目标字段为帧校验字段中的任一字段。
可选地,特征字段与目标字段不是同一字段;其中,特征字段是对前导码中的任一字段进行修改得到、或特征字段是对帧开始定界符中的任一字段进行修改得到,或特征字段是对帧校验字段的任一字段进行修改得到。
综上所述,在本申请实施例中,分组转发设备可以判断目标报文为突发序列的跟随报文还是首报文,如果该目标报文为突发序列的跟随报文,则获取该突发序列的出端口来发送该跟随报文,由于该突发序列的出端口是在发送该突发序列的首报文时确定并存储的,因此,当发送该目标报文时,即可以直接根据该存储的出端口发送该目标报文,不必再根据该目标报文携带的转发信息再次进行复杂的路由查表或者是其他转发查表动作,加快了转发速率,降低转发了延迟。
参见图7,本申请实施例提供了一种转发报文的装置600,该装置600包括:
获取模块701,用于执行上述实施例中的步骤401;
发送模块702,用于执行上述实施例中的步骤402。
可选地,获取模块701具体用于:
当目标报文包括特征字段时,将特征字段作为目标报文所属的突发序列的突发标识,并从存储的突发标识与端口信息之间的对应关系中获取突发标识对应的端口信息;或者,从存储的入端口信息、突发标识与出端口信息之间的对应关系中,获取与目标报文的入端口信息和突发标识相对应的端口信息;
将获取的端口信息确定为突发序列的出端口的端口信息。
在本申请实施例中,对于具有相同的转发端口的一系列报文可以为其配置相同的突发标识,分组转发设备可以直接根据报文携带的突发标识确定该目标报文的出端口。由于突发标识的数量是有限的,因此,分组转发设备根据该突发标识确定目标报文的出端口,可 以有效的规避查找复杂的路由表或其他传统转发表的操作,提升了分组转发设备的吞吐效率,降低了转发延迟。
需要说明的是:上述实施例提供的转发报文的装置在转发报文时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的转发报文的装置与转发报文的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如:同轴电缆、光纤、数据用户线(Digital Subscriber Line,DSL))或无线(例如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如:软盘、硬盘、磁带)、光介质(例如:数字通用光盘(Digital Versatile Disc,DVD))、或者半导体介质(例如:固态硬盘(Solid State Disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述为本申请提供的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (22)

  1. 一种转发报文的方法,其特征在于,所述方法包括:
    当当前待发送的目标报文为突发序列的跟随报文时,获取用于发送所述突发序列的出端口的端口信息;
    其中,所述出端口的端口信息是在发送所述突发序列的首报文时确定并存储的,所述突发序列是指由属于同一业务流的多个报文组成的序列;
    通过获取的端口信息所对应的出端口发送所述目标报文。
  2. 如权利要求1所述的方法,其特征在于,当所述目标报文的目标字段携带第一特征值时,所述目标报文为所述突发序列的首报文,当所述目标报文的目标字段携带第二特征值时,所述目标报文为所述突发序列的跟随报文;或者,
    当在所述目标报文之前接收到与所述目标报文相邻的帧间隙中携带第一特征值时,所述目标报文为所述突发序列的首报文,当在所述目标报文之前且与所述目标报文相邻的帧间隙中携带第二特征值时,所述目标报文为所述突发序列的跟随报文。
  3. 如权利要求1或2所述的方法,其特征在于,所述获取用于发送所述突发序列的出端口的端口信息,包括:
    当所述目标报文还包括特征字段时,将所述特征字段作为所述突发序列的突发标识,并从存储的突发标识与端口信息之间的对应关系中获取所述突发标识对应的端口信息,所述特征字段用于唯一标识所述特征字段所在的报文所属的突发序列;
    将获取的端口信息确定为用于发送所述突发序列的出端口的端口信息。
  4. 如权利要求1-3任一所述的方法,其特征在于,所述方法还包括:
    当所述目标报文为所述突发序列的首报文且所述目标报文还包括特征字段时,基于所述目标报文携带的转发信息确定所述目标报文的出端口;
    将所述特征字段作为所述突发序列的突发标识,并将所述突发序列的突发标识和所述目标报文的出端口的端口信息对应存储在突发标识与端口信息之间的对应关系中。
  5. 如权利要求1或3所述的方法,其特征在于,所述当所述目标报文的目标字段携带第三特征值时,所述目标报文为所述突发序列的首报文,所述第三特征值用于指示所述目标报文为所述突发序列的首报文且指示对存储的突发标识与端口信息之间的对应关系进行更新;
    所述方法还包括:
    当所述目标报文为所述突发序列的首报文时,基于所述目标报文携带的转发信息确定所述目标报文的出端口;
    当所述目标报文还包括特征字段时,将所述特征字段作为所述突发序列的突发标识,并将所述突发标识与端口信息之间的对应关系中所述突发标识所对应的端口信息替换为所述目标报文的出端口的端口信息。
  6. 如权利要求3-5任一所述的方法,其特征在于,所述方法还包括:
    当在预设时长内不存在携带所述突发序列的突发标识的报文时,删除所述突发标识与端口信息之间的对应关系中所述突发序列的突发标识与所述突发序列的出端口的端口信息所在的记录。
  7. 如权利要求2或5所述的方法,其特征在于,所述目标字段为前导码中的任一字段、或所述目标字段为帧开始定界符中的任一字段,或所述目标字段为帧校验字段中的任一字段。
  8. 如权利要求3-5任一所述的方法,其特征在于,所述特征字段与目标字段不是同一字段;其中,所述特征字段是对前导码中的任一字段进行修改得到、或所述特征字段是对帧开始定界符中的任一字段进行修改得到,或所述特征字段是对帧校验字段的任一字段进行修改得到。
  9. 一种转发报文的方法,其特征在于,所述方法包括:
    基于当前待发送的目标报文携带的突发标识,获取所述目标报文所属突发序列的出端口的端口信息,所述突发序列是指由属于同一业务流的多个报文组成的序列;
    通过获取的端口信息所对应的出端口发送所述目标报文。
  10. 如权利要求9所述的方法,其特征在于,所述基于当前待发送的目标报文携带的突发标识,获取所述目标报文所属突发序列的出端口的端口信息,包括:
    当所述目标报文包括特征字段时,将所述特征字段作为所述目标报文所属的突发序列的突发标识,并从存储的突发标识与端口信息之间的对应关系中获取所述突发标识对应的端口信息;或者,从存储的入端口信息、突发标识与出端口信息之间的对应关系中,获取与所述目标报文的入端口信息和所述突发标识相对应的端口信息;
    将获取的端口信息确定为所述突发序列的出端口的端口信息。
  11. 如权利要求9或10所述的方法,其特征在于,所述突发序列的出端口为物理端口或逻辑端口。
  12. 一种转发报文的装置,其特征在于,所述装置包括:
    获取模块,用于当当前待发送的目标报文为突发序列的跟随报文时,获取用于发送所述突发序列的出端口的端口信息;
    其中,所述出端口的端口信息是在发送所述突发序列的首报文时确定并存储的,所述突发序列是指由属于同一业务流的多个报文组成的序列;
    发送模块,用于通过获取的端口信息所对应的出端口发送所述目标报文。
  13. 如权利要求12所述的装置,其特征在于,
    当所述目标报文的目标字段携带第一特征值时,所述目标报文为所述突发序列的首报文,当所述目标报文的目标字段携带第二特征值时,所述目标报文为所述突发序列的跟随报文; 或者,
    当在所述目标报文之前接收到与所述目标报文相邻的帧间隙中携带第一特征值时,所述目标报文为所述突发序列的首报文,当在所述目标报文之前且与所述目标报文相邻的帧间隙中携带第二特征值时,所述目标报文为所述突发序列的跟随报文。
  14. 如权利要求12或13所述的装置,其特征在于,所述获取模块具体用于:
    当所述目标报文还包括特征字段时,将所述特征字段作为所述突发序列的突发标识,并从存储的突发标识与端口信息之间的对应关系中获取所述突发标识对应的端口信息,所述特征字段用于唯一标识所述特征字段所在的报文所属的突发序列;
    将获取的端口信息确定为用于发送所述突发序列的出端口的端口信息。
  15. 如权利要求12-14任一所述的装置,其特征在于,所述装置还包括:
    确定模块,用于当所述目标报文为所述突发序列的首报文且所述目标报文还包括特征字段时,基于所述目标报文携带的转发信息确定所述目标报文的出端口;
    存储模块,用于将所述特征字段作为所述突发序列的突发标识,并将所述突发序列的突发标识和所述目标报文的出端口的端口信息对应存储在突发标识与端口信息之间的对应关系中。
  16. 如权利要求12或14所述的装置,其特征在于,
    当所述目标报文的目标字段携带第三特征值时,所述目标报文为所述突发序列的首报文,所述第三特征值用于指示所述目标报文为所述突发序列的首报文且指示对存储的突发标识与端口信息之间的对应关系进行更新;
    所述装置还用于:
    基于所述目标报文携带的转发信息确定所述目标报文的出端口;
    当所述目标报文还包括特征字段时,将所述特征字段作为所述突发序列的突发标识,并将所述突发标识与端口信息之间的对应关系中所述突发标识所对应的端口信息替换为所述目标报文的出端口的端口信息。
  17. 如权利要求14-16任一所述的装置,其特征在于,所述装置还包括:
    删除模块,用于当在预设时长内不存在携带所述突发序列的突发标识的报文时,删除所述突发标识与端口信息之间的对应关系中所述突发序列的突发标识与所述突发序列的出端口的端口信息所在的记录。
  18. 如权利要求13或16所述的装置,其特征在于,所述目标字段为前导码中的任一字段、或所述目标字段为帧开始定界符中的任一字段,或所述目标字段为帧校验字段中的任一字段。
  19. 如权利要求14-16任一所述的装置,其特征在于,所述特征字段与目标字段不是同一字段;其中,所述特征字段是对前导码中的任一字段进行修改得到、或所述特征字段是对 帧开始定界符中的任一字段进行修改得到,或所述特征字段是对帧校验字段的任一字段进行修改得到。
  20. 一种转发报文的装置,其特征在于,所述装置包括:
    获取模块,用于基于当前待发送的目标报文携带的突发标识,获取所述目标报文所属突发序列的出端口的端口信息,所述突发序列是指由属于同一业务流的多个报文组成的序列;
    发送模块,用于通过获取的端口信息所对应的出端口发送所述目标报文。
  21. 如权利要求20所述的装置,其特征在于,所述获取模块具体用于:
    当所述目标报文包括特征字段时,将所述特征字段作为所述目标报文所属的突发序列的突发标识,并从存储的突发标识与端口信息之间的对应关系中获取所述突发标识对应的端口信息;或者,从存储的入端口信息、突发标识与出端口信息之间的对应关系中,获取与所述目标报文的入端口信息和所述突发标识相对应的端口信息;
    将获取的端口信息所对应的出端口确定为所述突发序列的出端口的端口信息。
  22. 如权利要求20或21所述的装置,其特征在于,所述突发序列的出端口为物理端口或逻辑端口。
PCT/CN2018/104083 2017-09-07 2018-09-05 转发报文的方法及装置 WO2019047840A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP18854357.3A EP3672167B1 (en) 2017-09-07 2018-09-05 Packet forwarding method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710801752.1 2017-09-07
CN201710801752.1A CN109474518B (zh) 2017-09-07 2017-09-07 转发报文的方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/809,996 Continuation US11277339B2 (en) 2017-09-07 2020-03-05 Packet forwarding method and apparatus

Publications (1)

Publication Number Publication Date
WO2019047840A1 true WO2019047840A1 (zh) 2019-03-14

Family

ID=65634808

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104083 WO2019047840A1 (zh) 2017-09-07 2018-09-05 转发报文的方法及装置

Country Status (4)

Country Link
US (1) US11277339B2 (zh)
EP (1) EP3672167B1 (zh)
CN (1) CN109474518B (zh)
WO (1) WO2019047840A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110932979B (zh) * 2019-11-26 2022-07-19 锐捷网络股份有限公司 一种快速转发报文的方法和装置
CN111131060B (zh) * 2019-12-23 2023-07-21 瑞斯康达科技发展股份有限公司 突发报文的处理方法、装置、电子设备及计算机存储介质
CN111355672A (zh) * 2020-03-02 2020-06-30 杭州迪普信息技术有限公司 一种报文转发的方法及装置
CN115134299A (zh) * 2021-03-25 2022-09-30 华为技术有限公司 通信方法及装置
CN115174446B (zh) * 2022-07-21 2023-11-03 天翼云科技有限公司 一种网络流量统计的方法、装置及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140044128A1 (en) * 2012-08-07 2014-02-13 Broadcom Corporation Serial replication of multicast packets
CN104506513A (zh) * 2014-12-16 2015-04-08 北京星网锐捷网络技术有限公司 防火墙流表备份方法、防火墙及防火墙系统
CN104734964A (zh) * 2013-12-24 2015-06-24 华为技术有限公司 报文处理方法、节点及系统

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7782873B2 (en) * 2005-08-23 2010-08-24 Slt Logic, Llc Omni-protocol engine for reconfigurable bit-stream processing in high-speed networks
JP2009004855A (ja) * 2007-06-19 2009-01-08 Yokogawa Electric Corp 通信システムおよび通信方法
US7822915B2 (en) * 2007-06-30 2010-10-26 Alcatel-Lucent Usa Inc. Memory controller for packet applications
US9197438B2 (en) * 2009-12-18 2015-11-24 Telefonaktiebolaget L M Ericsson (Publ) Packet forwarding node
US9276870B2 (en) * 2010-07-09 2016-03-01 Telefonaktiebolaget L M Ericsson (Publ) Switching node with load balancing of bursts of packets
CN102098224B (zh) * 2011-02-16 2015-06-03 中兴通讯股份有限公司 数据流负荷分担方法及装置
CN103475537A (zh) * 2013-08-30 2013-12-25 华为技术有限公司 一种报文特征提取方法和装置
US10778584B2 (en) * 2013-11-05 2020-09-15 Cisco Technology, Inc. System and method for multi-path load balancing in network fabrics
US10498654B2 (en) * 2015-12-28 2019-12-03 Amazon Technologies, Inc. Multi-path transport design
CN106789695B (zh) * 2016-11-24 2020-04-03 杭州迪普科技股份有限公司 报文处理方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140044128A1 (en) * 2012-08-07 2014-02-13 Broadcom Corporation Serial replication of multicast packets
CN104734964A (zh) * 2013-12-24 2015-06-24 华为技术有限公司 报文处理方法、节点及系统
CN104506513A (zh) * 2014-12-16 2015-04-08 北京星网锐捷网络技术有限公司 防火墙流表备份方法、防火墙及防火墙系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3672167A4

Also Published As

Publication number Publication date
US20200259745A1 (en) 2020-08-13
US11277339B2 (en) 2022-03-15
CN109474518B (zh) 2021-08-20
EP3672167B1 (en) 2023-08-02
EP3672167A4 (en) 2020-06-24
EP3672167A1 (en) 2020-06-24
CN109474518A (zh) 2019-03-15

Similar Documents

Publication Publication Date Title
WO2019047840A1 (zh) 转发报文的方法及装置
KR100927265B1 (ko) 저장 지역 네트워크에서 전송을 위한 프레임을 캡슐화하기 위한 방법 및 장치
US11258698B2 (en) Multicast forwarding method and related device
EP3573297B1 (en) Packet processing method and apparatus
WO2021043181A1 (zh) 一种数据传输方法及装置
EP1657633A1 (en) Routing and forwarding table management for network processor architectures
KR20150002622A (ko) 동기화된 적응형 인프라(sain)네트워크에서 제어 벡터들을 가지고 라우팅하는 장치 및 방법
US8488489B2 (en) Scalable packet-switch
WO2019076131A1 (zh) 一种灵活以太网报文转发方法及装置
US11902172B2 (en) Device and method for transferring identification and/or data flow control information between devices
WO2019165855A1 (zh) 一种报文传输的方法及装置
CN113225376B (zh) 一种基于fpga的以太网帧与sdn数据帧的适配方法
JP2003348148A (ja) Ipマルチキャスト制御方法およびこれを用いるipマルチキャスト制御システム
WO2021213382A1 (zh) 数据传输的方法和装置
WO2022242775A1 (zh) 一种报文处理的方法、系统和网络设备
WO2024001701A1 (zh) 数据处理方法、装置及系统

Legal Events

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

Ref document number: 18854357

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018854357

Country of ref document: EP

Effective date: 20200316