Detailed Description
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the following description, references to the terms "first \ second \ third, etc." or module a, module B, module C, etc. are used solely to distinguish between similar objects or different embodiments and are not intended to imply a particular ordering with respect to the objects, it being understood that where permissible any particular ordering or sequence may be interchanged to enable embodiments of the invention described herein to be practiced otherwise than as shown or described herein.
In the following description, reference to reference numerals indicating steps, such as S110, S120 … …, etc., does not necessarily indicate that the steps are performed in this order, and the order of the preceding and following steps may be interchanged or performed simultaneously, where permissible.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
The embodiment of the invention is mainly used for the time sensitive network TSN and simply introduces related terms.
TSN (Time Sensitive Networking, Time Sensitive network) refers to a set of "sub-standards" established based on specific application requirements under the IEEE802.1 standard framework, and aims to establish a "universal" Time Sensitive mechanism for an ethernet protocol to ensure Time certainty of network data transmission. Since the TSN is a protocol standard under IEEE802.1, the TSN is a protocol standard regarding the second layer in the ethernet communication protocol model, that is, the data link layer (more specifically, the MAC layer). The main technical contents related to the TSN standard include:
802.1CB, a standard for reliable stream replication and frame erasure, is directed to stream replication and frame erasure to improve network reliability. The standard ensures that copies of critical flows can be transmitted in the network with non-intersecting paths and that only packets that arrive at the destination first are retained, thereby achieving seamless redundancy.
The 802.1QCI is a standard for filtering and monitoring flows, also called a flow control standard, and is used for preventing a receiving node from being affected by a traffic overload condition (the traffic overload condition may be caused by software errors on an endpoint or a switch), and the flow control can also be used for blocking malicious network attacks.
ACL (Access Control Lists) is a packet filtering based Access Control technique that can filter packets on an interface, allow them to pass or drop according to set conditions. The access control list is widely applied to routers and three-layer switches, and by means of the access control list, the access of users to the network can be effectively controlled, so that the network security is guaranteed to the greatest extent.
802.1 flow and 802.1 frame, the 802.1 frame with the same source MAC and destination MAC belongs to the same 802.1 flow, and has the same flow ID.
The 802.1CB frame is an 802.1 frame with an 802.1CB protocol mark, the 802.1CB protocol mark is an 802.1CB frame sequence number, and the 802.1CB frames with the same 802.1CB frame sequence number but not the first arriving 802.1CB frame are redundant 802.1CB frames.
Embodiments of an apparatus for implementing the 802.1CB protocol according to the present invention are described below with reference to fig. 1 to 3.
First embodiment of device for realizing 802.1CB protocol
Fig. 1 shows a first structure of an apparatus implementing the 802.1CB protocol, which includes a message forwarding subsystem 100, a queue management subsystem 200, a message editing subsystem 300, and an entry configuration subsystem 400.
The message forwarding subsystem 100, the queue management subsystem 200, and the message editing subsystem 300 are specific subsystems for the apparatus to implement the 802.1CB protocol, and the entry configuration subsystem 400 is based on entries of each 802.1 frame of the apparatus in the 802.1CB network, where the entries are used to control the operations of the message forwarding subsystem 100, the queue management subsystem 200, or the message editing subsystem 300, so as to implement the functions of the 802.1CB protocol.
The following description of the individual subsystems is continued with reference to fig. 1.
An entry configuration subsystem 400 configured to configure, in a forwarding control table of the apparatus, an entry indexed by a Key of an 802.1 frame based on a location of the apparatus in an 802.1CB network, the entry including a stream ID of the 802.1 frame and an 802.1CB frame flag, the 802.1CB frame flag including one or more of the following flags: a starting point mark, an end point mark, a frame elimination enabling mark and a protocol mark starting mark; the Key includes at least the combination of the VLAN ID of the first 802.1 frame and the source MAC or the destination MAC.
Wherein, when the device is a start point node of the 802.1CB network, the start point flag and the end point flag of the entry are set to 1 and 0, respectively.
When the device is an intermediate node of the 802.1CB network, both the start point marker and the end point marker of the entry are set to 0.
When the device is an end point node of the 802.1CB network, the start point marker and the end point marker of the entry are set to 0 and 1, respectively.
When the device has a plurality of nodes in the 802.1CB network in the following order and the device receives the first 802.1 frame of the plurality of nodes from the 802.1CB network, the frame erasure enabling flag of the entry is set to 1, and the frame erasure enabling flag is set to 0 in other cases.
When the device starts, the protocol flag start flag of the entry is set to 1, otherwise it is set to 0.
Illustratively, the present embodiment sets each flag to 1, indicating that the flag is valid; set to 0 indicates that the flag is invalid.
The packet forwarding subsystem 100 includes a flow identification module 110, a frame marker determination module 120, a frame elimination module 130, and a forwarding module 140.
The stream identification module 110 is configured to determine a stream ID of the first 802.1 frame based on the Key of the first 802.1 frame.
When the apparatus is an intermediate node or a destination node of the 802.1CB network, each of the first 802.1 frames already contains an 802.1 frame of the 802.1CB frame number, which may be denoted as an 802.1CB frame; when the device is a starting point node of an 802.1CB network, each of the first 802.1 frames does not include the 802.1CB frame number and is a standard 802.1 frame. Whether a standard 802.1 frame or an 802.1CB frame is received, it is collectively referred to herein as a first 802.1 frame.
Optionally, the Key at least includes a combination of the VLAN ID of the first 802.1 frame and a source MAC or a combination of a destination MAC, and one or more of the following: including source IP, destination IP, source Port and destination Port
Illustratively, the flow identification module 110 queries a preconfigured forwarding control table based on the Key of the first 802.1 frame to obtain its flow ID.
Accordingly, the flow ID determined by the above modules can be used not only in the 802.1CB protocol related flow, but also in the 802.1QCI protocol related flow, so that the apparatus can not only process the 802.1CB protocol operation, but also perform the 802.1QCI flow control operation.
The frame marker determining module 120 is configured to query the forwarding control table for the relevant marker in the entry corresponding to the Key of the first 802.1 frame based on the Key of the first 802.1 frame, and determine the relevant marker as the relevant marker in the 802.1CB frame markers of the first 802.1 frame. The frame flag determining module 120 is further configured to set a protocol flag start flag in the 802.1CB frame flag.
Wherein, the start marker, the end marker, the frame elimination enable marker and the protocol marker start marker of the related marker in the table entry are respectively determined as corresponding markers in the 802.1CB frame markers of the first 802.1 frame. The protocol flag start flag is also denoted as a sequence number start flag, and in this embodiment, the protocol flag start flag and the sequence number start flag have the same meaning, and the sequence number start flag is used for facilitating understanding.
Wherein the start marker, the end marker, and the frame erasure enabling marker in the entry corresponding to the flow ID are configured differently based on the location of the device in the 802.1CB network, and therefore the start marker, the end marker, the sequence number start marker, and the frame erasure enabling marker of the 802.1CB frame marker of the first 802.1 frame are also determined based on the location of the device in the 802.1CB network.
When the device is a starting point node of the 802.1CB network, the starting point of the first 802.1CB frame is marked as 1, and the end point is marked as 0; the starting mark of the sequence number when the device is started is 1, and the starting mark of the sequence number is 0 under other conditions.
When the device is an end point node of an 802.1CB network, the start point of the first 802.1CB frame is marked as 0, and the end point is marked as 1.
When the device is an intermediate node of an 802.1CB network, the start point of the first 802.1CB frame is marked as 0, and the end point is marked as 0.
When the device has a plurality of nodes in the 802.1CB network, and the device receives a first 802.1 frame of the plurality of nodes from the 802.1CB network, a frame erasure enabling flag of the first 802.1CB frame is set to 1, and other situations are set to 0.
When the device starts, the protocol flag start flag of the first 802.1CB frame is set to 1, and otherwise is set to 0.
The frame elimination module 130 is configured to delete a second 802.1 frame in the first 802.1 frame when the frame elimination enable flag is 1, where the second 802.1 frame is a non-first-arrived frame in the first 802.1 frame with the same stream ID and the same frame number.
Wherein the frame cancellation enable flag is invalid when the apparatus is a starting node of the 802.1CB network or the apparatus receives a first 802.1 frame of only one node. The apparatus is configured to enable a frame erasure enabling flag when receiving a first 802.1 frame of a plurality of nodes from the 802.1CB network, where the first 802.1 frame is an 802.1CB frame.
Wherein the frame elimination module 130 reserves the first arrived frame of the first 802.1 frame with the same stream ID and the same 802.1CB frame number, and deletes the first 802.1 frame with the same stream ID and the same 802.1CB frame number except the first arrived frame.
The forwarding module 140 is configured to determine a forwarding port and port control information of the first 802.1 frame based on the destination MAC address of the first 802.1 frame, and exchange the first 802.1 frame and the port control information to the forwarding port.
The forwarding module 140 determines the forwarding port of the first 802.1 frame based on the relationship table between the forwarding port of the switch and the destination MAC address, switches the first 802.1 frame to the forwarding port, and sends port control information of the forwarding port to the message editing subsystem 300. Because the module selects the forwarding port based on the relationship table between the forwarding port of the switch and the destination MAC address, the forwarding port determination method of the ordinary L2 switch is used, and only one forwarding port can be queried. This module may replace the subsequent stream replication module 220 when the apparatus has only one preceding neighbor.
An application specific example of this module is also for forwarding the first 802.1 frame from one of the devices to another device when a plurality of the devices are stacked.
Wherein the forwarding module 140 may operate on both 802.1 standard frames and 802.1CB frames.
The queue management subsystem 200 includes a QCI flow control module 210, a flow replication module 220, and a frame sequence number generation module 230.
The QCI flow control module 210 is configured to determine flow control information of the first 802.1 frame based on the ID of the first 802.1 frame, and perform flow control on the flow control information.
And inquiring a flow index table configured in advance based on the ID of the first 802.1 frame, and determining QCI flow control information of the first 802.1 frame, wherein the QCI flow control information comprises whether queuing is allowed in the overload condition, whether resources of other flows are allowed to be preempted, and the like. And the flow index table records the flow ID and the corresponding QCI flow control information and forwarding port of the flow ID.
The QCI flow control module 210 may act on both 802.1 standard frames and 802.1CB frames.
Therefore, the QCI flow control module 210 realizes synchronous flow control in the device of the 802.1CB protocol.
The flow copying module 220 is configured to determine forwarding ports and port control information of the forwarding ports based on the flow ID of the first 802.1 frame, copy the first 802.1 frame to the forwarding ports, and send the port control information to the message editing subsystem 300.
When the device has a plurality of preamble adjacent nodes, the module queries the stream index table configured in advance based on the ID of the first 802.1CB frame to obtain the forwarding ports and the port control information, and performs a corresponding number of copies when there are a plurality of forwarding ports.
Wherein the stream copy module 220 is disabled when the end point is marked as 1 or the preamble neighbor node has only 1 node.
Wherein the stream replication module 220 may operate on both 802.1 standard frames and 802.1CB frames.
The frame number generating module 230 is configured to generate a tag of an 802.1CB protocol of the first 802.1 frame based on the 802.1CB frame tag, where the tag of the 802.1CB protocol includes an 802.1CB frame number, and in this embodiment, the tag of the 802.1CB protocol only includes the 802.1CB frame number, and the two are identical in meaning, and for convenience of understanding, the 802.1CB frame number is used in this embodiment to replace the tag of the 802.1CB protocol.
The frame sequence number generating module 230 generates an 802.1CB frame sequence number for the 802.1 standard frame, where the first 802.B frame is an 802.1CB frame.
Wherein, when the starting point of the first 802.b frame is marked as 1, that is, the apparatus is a starting point node, the frame sequence number generation module sets the frame sequence number of the first 802.1CB frame, of which the sequence number is marked as 1, to be 0; for the first 802.1CB frame with the sequence number start flag of 0, its frame sequence number is incremented by 1.
The message editing subsystem 300 includes a frame editing first module 310, a frame editing second module 320, and a port adaptation module 330.
The frame editing first module 310 is configured to insert an 802.1CB frame sequence number for the first 802.1 frame, so that the first 802.1CB frame is suitable for being sent to nodes of other 802.1CB protocols.
When the starting point of the first 802.1 frame is marked as 1, the first 802.1 frame is an 802.1 standard frame, the frame editing first module 310 inserts an 802.1CB frame number into the frame as a mark for supporting an 802.1CB protocol, and the first 802.1 frame is an 802.1CB frame.
The frame editing second module 320 is configured to delete the 802.1CB frame number from the first 802.1CB frame, so that the first 802.1CB frame is suitable for being sent to other nodes not in the 802.1CB protocol.
When the end point is marked as 1, the first 802.1 frame is an 802.1CB frame, the frame editing second module 320 deletes the 802.1CB protocol mark of the first 802.1 frame, and the first 802.1 frame is an 802.1CB standard frame, so that the end point can be conveniently sent to other nodes not in the 802.1CB protocol in the 802.1 standard frame format.
In an actual network, the frame editing first module 310 and the frame editing second module 320 are in an alternative relationship, and the two modules may be combined together to form a frame editing module.
The port adaptation module 330 is configured to adapt to the first 802.1 frame, and the adapted forwarding port sends the adapted frame to the outside.
Wherein the port adaptation at least comprises adaptation of VLAN ID, transmission priority and the like.
The table entry configuration and the operation of each module corresponding to the embodiment of the apparatus based on the actual usage scenario are described below.
When the apparatus is a start node of the 802.1CB network and there is more than one preamble neighbor, the entry for the flow ID of the first 802.1 frame is configured to: the start point is marked 1, the end point is marked 0, and the frame erasure enable is marked 0. Since the serial number enable flag is set to 1 only when the device is enabled, and is set to 0 in other cases, the same setting is performed in the following description, and the description of setting the serial number enable flag is omitted hereinafter for brevity.
And determining the related 802.1CB frame mark of the first 802.1 frame based on the entry of the flow ID, so that the working conditions of each module are as follows:
the flow identification module 110 and the framing marker determination module 120 of the message forwarding subsystem 100 operate.
QCI flow control module 210, flow replication module 220 and frame sequence number generation module 230 of queue management subsystem 200 work.
The frame editing first module 310 and the port adaptation module 330 of the message editing subsystem 300 work.
The working sequence of the modules is as follows:
the flow identification module 110 → the frame mark determination module 120 → the QCI flow control module 210 → the flow copy module 220 → the frame sequence number generation module 230 → the first module for frame editing 310 → the port adaptation module 330.
When the apparatus is a start node of the 802.1CB network and has only one preamble neighbor, the entry for the flow ID of the first 802.1 frame is configured to: the start point is marked 1, the end point is marked 0, and the frame erasure enable is marked 0.
And determining the relevant frame mark of the first 802.1 frame based on the entry of the flow ID, so that the working conditions of each module are as follows:
the flow identification module 110, the framing marker determination module 120 and the forwarding module 140 of the message forwarding subsystem 100 operate.
QCI flow control module 210 and frame sequence number generation module 230 of queue management subsystem 200;
the frame editing first module 310 and the port adaptation module 330 of the message editing subsystem 300 work.
The working sequence of the modules is as follows:
the flow identification module 110 → the frame mark determination module 120 → the forwarding module 140 → the QCI flow control module 210 → the frame sequence number generation module 230 → the first module for frame editing 310 → the port adaptation module 330.
When the apparatus is an intermediate node of the 802.1CB network and there is one successor neighbor and a plurality of successor neighbors, the entry for the flow ID of the first 802.1 frame is configured to: the start point is marked 0, the end point is marked 0, and the frame erasure enable is marked 0.
And determining the related 802.1CB frame mark of the first 802.1 frame based on the entry of the flow ID, so that the working conditions of each module are as follows:
the flow identification module 110 and the frame marker determination module 120 of the packet forwarding subsystem 100 operate;
QCI flow control module 210, flow replication module 220 of queue management subsystem 200;
the port adaptation module 330 of the message editing subsystem 300 works.
The working sequence of the modules is as follows:
flow identification module 110 → frame mark determination module 120 → QCI flow control module 210 → flow replication module 220 → port adaptation module 330.
When the apparatus is an intermediate starting point of the 802.1CB network and there are a plurality of neighboring successor nodes and a plurality of neighboring prologue nodes, the entry for the flow ID of the first 802.1 frame is configured to: the start point is marked 0, the end point is marked 0, and the frame erasure enable is marked 1.
And determining the related 802.1CB frame mark of the first 802.1 frame based on the entry of the flow ID, so that the working conditions of each module are as follows:
the flow identification module 110, the frame marker determination module 120 and the frame elimination module 130 of the packet forwarding subsystem 100 operate
QCI flow control module 210, flow replication module 220 of queue management subsystem 200 work;
the port adaptation module 330 of the message editing subsystem 300 works.
The working sequence of the modules is as follows:
the flow identification module 110 → the frame mark determination module 120 → the frame elimination module 130 → the QCI flow control module 210 → the flow replication module 220 → the port adaptation module 330.
When the apparatus is an intermediate node of the 802.1CB network and there are a plurality of neighboring successor nodes and one neighboring predecessor node, the entry for the flow ID of the first 802.1 frame is configured to: the start point is marked 0, the end point is marked 0, and the frame erasure enable is marked 1.
And determining the related 802.1CB frame mark of the first 802.1 frame based on the entry of the flow ID, so that the working conditions of each module are as follows:
the flow identification module 110, the frame mark determination module 120, the frame elimination module 130 and the forwarding module 140 of the message forwarding subsystem 100 operate;
QCI flow control module 210 of queue management subsystem 200;
the port adaptation module 330 of the message editing subsystem 300 works.
The working sequence of the modules is as follows:
flow identification module 110 → frame mark determination module 120 → frame elimination module 130 → forwarding module 140 → QCI flow control module 210 → port adaptation module 330.
When the apparatus is a destination node of the 802.1CB network and there are a plurality of neighboring subsequent nodes, the entry for the flow ID of the first 802.1 frame is configured to: the start point is marked 0, the end point is marked 1, and the frame erasure enable is marked 1.
And determining the related 802.1CB frame mark of the first 802.1 frame based on the entry of the flow ID, so that the working conditions of each module are as follows:
the flow identification module 110, the frame marker determination module 120, the frame elimination module 130 and the forwarding module 140 of the message forwarding subsystem 100 operate;
QCI flow control module 210 of queue management subsystem 200;
the frame editing second module 320 and the port adaptation module 330 of the message editing subsystem 300 work.
The working sequence of the modules is as follows:
the flow identification module 110 → the frame mark determination module 120 → the frame elimination module 130 → the forwarding module 140 → the QCI flow control module 210 → the second module for frame editing 320 → the port adaptation module 330.
When the apparatus is a destination node of the 802.1CB network and there is a neighboring subsequent node, the entry for the flow ID of the first 802.1 frame is configured to: the start point is marked 0, the end point is marked 1, and the frame erasure enable is marked 0.
And determining the related 802.1CB frame mark of the first 802.1 frame based on the entry of the flow ID, so that the working conditions of each module are as follows:
flow identification module 110, frame marker determination module 120 and forwarding module 140 of the message forwarding subsystem 100 operate
QCI flow control module 210 of queue management subsystem 200;
the frame editing second module 320 and the port adaptation module 330 of the message editing subsystem 300 work.
The working sequence of the modules is as follows:
flow identification module 110 → frame mark determination module 120 → forwarding module 140 → QCI flow control module 210 → second module for frame editing 320 → port adaptation module 330.
Therefore, based on the fact that the device flexibly configures the table entry of the flow ID of the first 802.1 frame, the work of each module of the device is controlled and enabled, and the complexity of implementation and maintenance of the device is reduced.
In summary, an embodiment of an apparatus for implementing an 802.1CB protocol is based on a modularized function setting, and achieves both flow identification, frame elimination, and flow replication of an 802.1CB and flow control of an 802.1QCI on one apparatus; and flexible configuration table items based on the node positions of the device are supported, so that the work of each module is controlled, and the complexity of realizing and maintaining the device is reduced compared with the mode that all modules work together in one device.
[ second embodiment of an apparatus for implementing 802.1CB protocol ]
A second device embodiment for realizing the 802.1CB protocol inherits all the structures of the first device embodiment and adds a proxy function related module.
Fig. 2A shows a network structure of a second application of an apparatus embodiment for implementing an 802.1CB protocol, where nodes of the network structure include a System B (System B), a Relay System c (Relay System c), a Relay System d (Relay System d), a Relay System e (Relay System e), a Relay System f (Relay System f), and a System G (System G), where the System B is composed of a System B1(End System B1) and a Relay System B2(System B2), and the System G is composed of a Relay System G2(Relay System G2) and a System G1(End System G1).
The relay system B2, the relay system C, the relay system D, the relay system E, the relay system F, and the relay system G2 are devices of the present embodiment that support the 802.1CB protocol. System B1 and system G1 do not support the 802.1CB protocol. To implement seamless redundant data transmission from system B1 to system G21, a proxy is set, relay system B2 is a proxy for system B1, and relay G2 is a proxy for system G1.
Fig. 2B shows a structure of a second embodiment of an apparatus for implementing the 802.1CB protocol. With respect to the first embodiment of the device, the following changes are made:
in some practical scenarios, the table entry configuration subsystem 400 is enhanced, and a MAC replacement enable flag is added to the table entry configured in the configuration module 410.
In some practical scenarios the message forwarding sub-system 100 adds a DMAC replacement module 150 and enhances the framing marker determination module 120.
The queue management subsystem 200 adds a DMAC information determination module 240 in some practical scenarios.
In some practical scenarios the message editing subsystem 300 adds a DMAC information replacement module 340.
The functions and advantages of the other modules are the same as those of the first embodiment of the device, and the newly added module and the enhanced module are mainly explained.
When G2 acts as a proxy for the 802.1CB protocol of G1 in fig. 2A, G2 typically has a MAC address replacement function, and the device is enhanced as follows.
The message forwarding subsystem 100 adds a DMAC replacement module 150, configured to replace a destination MAC address of the first 802.1 frame with a MAC address of a second destination node when the device is a destination node of the 802.1CB network and is a proxy node of an 802.1CB protocol of an external second destination node.
Illustratively, the relay system G2 of fig. 2A is a proxy node of the system G1, and G1 is the second destination node. When the relay system G2 has the MAC replacement function, the MAC address replacement is carried out on the relay system G2, and the destination MAC address of the first 802.1 frame is replaced by the MAC address of the system G1 so as to continue data forwarding.
When G2 acts as a proxy for the 802.1CB protocol of G1 as in fig. 2A, G2 does not have a MAC address replacement function, and subsequent nodes such as E and F of G2 are usually selected for MAC address replacement, and the apparatus is enhanced as follows.
The configuration module 410 adds a configured MAC replacement enabling flag, and when the device is an intermediate node of the 802.1CB network, and the 802.1CB network is a proxy node of an 802.1CB protocol of an external second destination node and does not have a MAC replacement function, adds the configured MAC replacement enabling flag in an entry corresponding to the flow ID of the first 802.1 frame.
For example, fig. 2A illustrates that the relay system G2 is a proxy node of the system G1, and G1 is the second destination node, but the relay system G2 does not have the MAC replacement function, and if the MAC replacement is completed in the relay systems E and F, the configured MAC replacement enable flag is added to the entry corresponding to the flow ID of the first 802.1 frame of the relay systems E and F.
The frame marker determining module 120 is further configured to query the forwarding control table for the MAC replacement enabling marker in the entry corresponding to the Key of the first 802.1 frame based on the Key of the first 802.1 frame, and determine the MAC replacement enabling marker as the MAC replacement enabling marker of the first 802.1 frame.
For example, fig. 2A illustrates that the relay system G2 is a proxy node of the system G1, G1 is the second destination node, but the relay system G2 does not have the MAC replacement function, and when the relay systems E and F complete MAC replacement, the frame marker determining module 120 of the relay system E queries the MAC replacement enabling marker in the entry corresponding to the flow ID from the forwarding control table of the relay system E based on the flow ID of the first 802.1 frame, and determines the MAC replacement enabling marker as the MAC replacement enabling marker of the first 802.1 frame. The relay system F also performs the same operation.
The DMAC information determining module 240 is configured to determine DMAC information reaching the second destination MAC based on the stream ID of the first 802.1 frame when the MAC replacement enable flag is 1; the DMAC information at least includes the second destination MAC address, transmission packet priority, and VLAN to reach the second destination MAC.
Illustratively, in fig. 2A, the relay system G2 is a proxy node of the system G1, G1 is the second destination node, but the relay system G2 does not have the MAC replacement function, and if the MAC replacement is completed in the relay systems E and F, the DMAC information determination module 240 of the relay system E queries the DMAC table to determine the DMAC information of the system G1 at the MAC replacement enable flag of 1 in the relay node E based on the flow ID of the first 802.1 frame. The relay system F also performs the same operation.
The DMAC information replacement module 340 is configured to replace corresponding information in the first 802.1CB frame with the DMAC information when the MAC replacement enable flag is 1.
Illustratively, the relay system G2 in fig. 2A is a proxy node of the system G1, and G1 is the second destination node, but the relay system G2 has no MAC replacement function, and when the relay systems E and F complete MAC replacement, the DMAC information replacement module 320 replaces the DMAC information of the first 802.1 frame when the relay node E has the MAC replacement enable flag of 1.
Next, taking fig. 2A as an example, the operation enabling situation of each module of the second embodiment of the apparatus based on the actual usage scenario is described. Since the relay system B2, the relay system C, the relay system D, the relay system E, the relay system F, and the relay system G2 are 802.1CB protocol-related modules, i.e., nodes of an 802.1CB network, the module configuration of these nodes will be described below.
Relay system B2 is the starting node of the 802.1CB network, and there are 2 adjacent preamble nodes, namely relay systems C and D, and the entry of the flow ID of the first 802.1 frame is configured to: the start point is marked 1, the end point is marked 0, and the frame erasure enable is marked 0.
And determining the related 802.1CB frame mark of the first 802.1 frame based on the entry of the flow ID, so that the working conditions of each module are as follows:
the flow identification module 110 and the frame marker determination module 120 of the packet forwarding subsystem 100 operate;
QCI flow control module 210, flow replication module 220 and frame sequence number generation module 230 of queue management subsystem 200 work;
the frame editing first module 310 and the port adaptation module 330 of the message editing subsystem 300 work.
The working sequence of the modules is as follows:
the flow identification module 110 → the frame mark determination module 120 → the QCI flow control module 210 → the flow copy module 220 → the frame sequence number generation module 230 → the first module for frame editing 310 → the port adaptation module 330.
The relay system C is an intermediate node of the 802.1CB network, and has one adjacent subsequent node and 2 adjacent preceding nodes, and the entry of the flow ID of the first 802.1 frame is configured to: the start point is marked 0, the end point is marked 0, and the frame erasure enable is marked 0.
Determining the related 802.1CB frame marker of the first 802.1 frame of the relay system C based on the entry of the flow ID, thereby enabling the working conditions of the modules as follows:
the flow identification module 110 and the frame marker determination module 120 of the packet forwarding subsystem 100 operate;
QCI flow control module 210 and flow replication module 220 of queue management subsystem 200 work;
the port adaptation module 330 of the message editing subsystem 300 works.
The working sequence of the modules is as follows:
flow identification module 110 → frame mark determination module 120 → QCI flow control module 210 → flow replication module 220 → port adaptation module 330.
The relay system D is an intermediate node of the 802.1CB network, and has one adjacent subsequent node and 1 adjacent preceding node, and the entry of the flow ID of the first 802.1 frame is configured to: the start point is marked 0, the end point is marked 0, and the frame erasure enable is marked 0.
Determining the related 802.1CB frame marker of the first 802.1 frame of the relay system D based on the entry of the flow ID, thereby enabling the working conditions of the modules as follows:
the flow identification module 110 and the frame mark determination module 120 of the packet forwarding subsystem 100 operate as the forwarding module 140;
QCI flow control module 210 of queue management subsystem 200;
the port adaptation module 330 of the message editing subsystem 300 works.
The working sequence of the modules is as follows:
flow identification module 110 → frame mark determination module 120 → forwarding module 140 → QCI flow control module 210 → port adaptation module 330.
The relay system E, the relay system F, and the relay system G2 are configured in two cases, i.e., G2 has a MAC replacement function and does not have a MAC replacement function.
Relay system E is an intermediate node of said 802.1CB network, having one neighboring successor node and 1 neighboring preamble node, and preamble node relay system G2 has MAC replacement function, relay system E is an intermediate node of said 802.1CB network, having one neighboring successor node and 1 neighboring preamble node, and the entry of said flow ID of said first 802.1 frame is configured to: the start point is marked 0, the end point is marked 0, and the frame erasure enable is marked 0.
Determining the related 802.1CB frame marker of the first 802.1 frame of the relay system E based on the entry of the flow ID, thereby enabling the working conditions of the modules as follows:
the flow identification module 110 and the frame mark determination module 120 of the packet forwarding subsystem 100 operate as the forwarding module 140;
QCI flow control module 210 of queue management subsystem 200;
the port adaptation module 330 of the message editing subsystem 300 works.
The working sequence of the modules is as follows:
flow identification module 110 → frame mark determination module 120 → forwarding module 140 → QCI flow control module 210 → port adaptation module 330.
Relay system E is an intermediate node of the 802.1CB network, and has one adjacent successor node and 1 adjacent prologue node, and prologue node relay system G2 does not have MAC replacement function, because G2 does not have MAC replacement function, relay system E needs to configure MAC replacement function, and the entry of the flow ID of the first 802.1 frame is configured as: the start point is marked as 0, the end point is marked as 0, the frame removal enable is marked as 0, and the MAC replacement enable is marked as 1.
Determining the related 802.1CB frame marker of the first 802.1 frame of the relay system E based on the entry of the flow ID, thereby enabling the working conditions of the modules as follows:
the module configuration is as follows:
the flow identification module 110, the frame marker determination module 120 and the forwarding module 140 of the message forwarding subsystem 100 operate;
the QCI flow control module 210 and the DMAC information determination module 240 of the queue management subsystem 200 operate;
the port adaptation module 330 and the DMAC information replacement module 340 of the message editing subsystem 300 operate.
The working sequence of the modules is as follows:
the flow identification module 110 → the frame mark determination module 120 → the forwarding module 140 → the QCI flow control module 210 → the DMAC information determination module 240 → the port adaptation module 330 → the DMAC information replacement module 340.
Relay system F is an intermediate node of an 802.1CB network of TSNs and has 2 adjacent successor nodes and one adjacent predecessor node, and a predecessor relay system G2 has MAC replacement functionality, the entry for the flow ID of the first 802.1 frame is configured to: the start point is marked 0, the end point is marked 0, and the frame erasure enable is marked 1.
Determining the related 802.1CB frame marker of the first 802.1 frame of the relay system F based on the entry of the flow ID, thereby enabling the working conditions of the modules as follows:
the flow identification module 110, the frame mark determination module 120, the frame elimination module 130 and the forwarding module 140 of the message forwarding subsystem 100 operate;
QCI flow control module 210 of queue management subsystem 200;
the port adaptation module 330 of the message editing subsystem 300 works.
The working sequence of the modules is as follows:
flow identification module 110 → frame mark determination module 120 → frame elimination module 130 → forwarding module 140 → QCI flow control module 210 → port adaptation module 330.
Relay system F is an intermediate node of an 802.1CB network of TSNs and has 2 adjacent successor nodes and one adjacent predecessor node, and the predecessor relay system G2 does not have MAC replacement function, because G2 does not have MAC replacement function, relay system E needs to configure MAC replacement function, and the entry of the flow ID of the first 802.1 frame is configured as: the start point is marked as 0, the end point is marked as 0, the frame removal enable is marked as 1, and the MAC replacement enable is marked as 1.
Determining the related 802.1CB frame marker of the first 802.1 frame of the relay system F based on the entry of the flow ID, thereby enabling the working conditions of the modules as follows:
the flow identification module 110, the frame marker determination module 120, the frame elimination module 130 and the forwarding module 140 of the message forwarding subsystem 100 operate;
the QCI flow control module 210 and the DMAC information determination module 240 of the queue management subsystem 200 operate;
the port adaptation module 330 and the DMAC information replacement module 340 of the message editing subsystem 300 operate.
The working sequence of the modules is as follows:
the flow identification module 110 → the frame mark determination module 120 → the frame elimination module 130 → the forwarding module 140 → the QCI flow control module 210 → the DMAC information determination module 240 → the port adaptation module 330 → the DMAC information replacement module 340.
When the relay system G2 is a destination node of an 802.1CB network of a TSN, and has 2 adjacent subsequent nodes and a MAC replacement function, the entry of the stream ID of the first 802.1 frame is configured to: the start point is marked 0, the end point is marked 1, and the frame erasure enable is marked 1.
Determining the relevant 802.1CB frame marker of the first 802.1 frame of the relay system G2 based on the entry of the flow ID, thereby enabling the operation of each module as follows:
the flow identification module 110, the frame marker determination module 120, the frame elimination module 130, the forwarding module 140, and the DMAC replacement module 150 of the message forwarding subsystem 100 operate;
QCI flow control module 210 of queue management subsystem 200;
the frame editing second module 320 and the port adaptation module 330 of the message editing subsystem 300 work.
The working sequence of the modules is as follows:
the flow identification module 110 → the frame mark determination module 120 → the frame elimination module 130 → the DMAC replacement module 150 → the forwarding module 140 → the QCI flow control module 210 → the frame editing second module 320 → the port adaptation module 330.
The relay system G2 is a terminal node of an 802.1CB network of the TSN, and has 2 adjacent subsequent nodes and no MAC replacement function, where the MAC replacement function is performed in the relay systems E and F, and the entry of the flow ID of the first 802.1 frame is configured as: the start point is marked as 0, the end point is marked as 1, the frame removal enable is marked as 1, and the MAC replacement enable is marked as 1.
Determining the relevant 802.1CB frame flag of the first 802.1 frame of the relay system G2 based on the entry of the flow ID, thereby enabling the operation of each module as follows:
the flow identification module 110, the frame marker determination module 120, the frame elimination module 130 and the forwarding module 140 of the message forwarding subsystem 100 operate;
the QCI flow control module 210 and the DMAC information determination module 240 of the queue management subsystem 200 operate;
the frame edit second module 320, the port adaptation module 330 and the DMAC information replacement module 340 of the message edit subsystem 300 operate.
The working sequence of the modules is as follows: the flow identification module 110 → the frame mark determination module 120 → the frame elimination module 130 → the forwarding module 140 → the QCI flow control module 210 → the DMAC information determination module 240 → the frame editing second module 320 → the port adaptation module 330 → the DMAC information replacement module 340.
The apparatus of this embodiment may also be used in a stacked manner, so as to expand the switching capability of the 802.1CB protocol, each front-end apparatus in each stacked apparatus configures the forwarding module 140, and each module of the back-end apparatus is configured based on the scene according to the above-mentioned scene module.
In summary, the second embodiment of the apparatus for implementing the 802.1CB protocol is based on the modularized function setting, and realizes the flow identification, frame elimination, flow duplication, 802.1QCI flow control and 802.1CB proxy functions of the 802.1CB on one apparatus; and flexible configuration table items based on the node positions of the device are supported, so that the work of each module is controlled, and the complexity of realizing and maintaining the device is reduced compared with the mode that all modules work together in one device.
Second detailed implementation manner of embodiment of apparatus for implementing 802.1CB protocol
Fig. 3 shows a structure of a device according to a second embodiment of the device implementing the 802.1CB protocol.
The embodiment also includes the table entry configuration system 400, because in the embodiment, the detailed description of the control signals between the subsystems is focused on, and the configuration system 400 is not shown in fig. 3.
The embodiment divides the packet forwarding subsystem 100 into an ACL module 100A, a forwarding module 100B, and a control encapsulation module 100C based on the exchange of control signals, and divides the queue management subsystem 200 into an enqueue management module 200A and a dequeue management module 200B.
The ACL module 100A includes a flow identification module 110, a frame marker determination module 120, a frame removal module 130, a DMAC replacement module 150, the forwarding module 100B includes a forwarding module 140, and the control encapsulation module 100C includes a newly added frame marker first encapsulation module 160. In addition to the adding of the frame mark first encapsulation module 160, other module descriptions refer to the first device embodiment or the second device embodiment.
The frame tag first encapsulation module 160 is used to encapsulate stream _ hdl, frm _ repl _ ori, frm _ elim _ term, seq _ strt, and alt _ en in a frame tag first control block, which is passed to the queue management subsystem 200.
The frame mark first control block corresponds to the first 802.1 frame one to one, stream _ hdl is the stream ID, frm _ repl _ ori is the start point mark, frm _ elim _ term is the end point mark, seq _ strt is the sequence number start mark, and alt _ en is the MAC replacement enable mark alt _ en.
The frame mark first encapsulation module 160 is a module that is necessary for any actual scene, and is behind other modules listed in the message forwarding subsystem 100 in the embodiment of the present invention.
The enqueue management module 200A includes a QCI flow control module 210, a flow replication module 220, and a frame mark first decapsulation module 250, and the dequeue management module 200B includes a frame sequence number generation module 230, a DMAC information determination module 240, a frame mark second encapsulation module 260, and a frame mark third encapsulation module 270.
The frame tag first decapsulating module 250 is configured to decapsulate the stream _ hdl, frm _ repl _ ori, and seq _ strt from the frame tag first control block, and pass them to the dequeue management module 200B for the frame number generation module 230 and the DMAC information determination module 240.
The frame mark first decapsulation module 250 is a necessary module for any actual scene, and is located before other modules listed in the queue management subsystem module 200 according to the embodiment of the present invention.
The frame mark second encapsulating module 260 is configured to encapsulate the 802.1CB frame sequence number of the first 802.1 frame, the stream _ hdl, and the frm _ repl _ ori and frm _ elim _ term in the 802.1CB frame mark into a frame mark second control block when the frm _ repl _ ori of the first 802.1 frame is 1, so as to transmit the frame mark second control block to the message editing subsystem 300.
The frame mark third encapsulating module 270 is configured to encapsulate the DMAC information with stream _ hdl and frm _ repl _ ori and frm _ elim _ term in the 802.1CB frame mark in a frame mark second control block when alt _ en of the first 802.1 frame is 1, so as to transmit the DMAC information to the message editing subsystem 300.
In the actual scene, frm _ repl _ ori and alt _ en are not set to 1 at the same time, and the framing mark second encapsulation module 260 and the framing mark third encapsulation module 270 are alternative modules.
The framing mark second encapsulation module 260 or the framing mark third encapsulation module 270 operates after the other modules listed in the queue management subsystem module 200 according to the embodiment of the present invention. The framing mark second encapsulation module 260 is enabled for operation with the frame number generation module 230 and the framing mark third encapsulation module 270 is enabled for operation with the DMAC information determination module 240.
The message editing subsystem 300 adds a frame tag second decapsulation module 350.
The frame mark second decapsulating module 350 is configured to parse the stream _ hdl, frm _ repl _ ori, frm _ elim _ term, and alt _ en of the first 802.1 frame from the received frame mark second control block; the module is further configured to parse the 802.1CB frame number from the frame marker second control block when frm _ repl _ ori is 1, and send the 802.1CB frame number, frm _ repl _ ori, and stream _ hdl to the frame editing first module 310; and is further configured to send frm _ elim _ term and stream _ hdl to the frame editing second module 320 when frm _ elim _ term is 1; and is further configured to parse the DMAC information from the frame marker second control block and send the DMAC information and alt _ en to the DMAC information replacement module 340 when alt _ en is 1.
The frame mark second decapsulation module 350 is a module that is necessary for any actual scene and is located before other modules listed in the message editing subsystem module 300 according to the embodiment of the present invention.
In this embodiment, the working scenario of each module refers to the second embodiment of the apparatus, and is not described in detail here.
In addition, fig. 3 only shows the processing parts of the 802.1CB protocol function, the flow control function, and the proxy function of the apparatus, and in an actual usage scenario, the apparatus further includes a frame receiving interface and a frame sending interface in this embodiment.
The frame receiving interface is configured to receive the first 802.1 frame from an adjacent subsequent node, where the received first 802.1 frame is an 802.1CB frame when the subsequent node is a node of the 802.1CB network, and the received first 802.1 frame is an 802.1 standard frame when the subsequent node is an external node of the 802.1CB network.
The frame sending interface is configured to send the first 802.1 frame to an adjacent preamble node, where the preamble node is a node of the 802.1CB network and the preamble node is an 802.1CB frame, and the preamble node is an external node of the 802.1CB network and the preamble node is an 802.1 standard frame.
In summary, the second embodiment of the apparatus for implementing the 802.1CB protocol transfers various control information based on the modularized function setting and based on the unified control block, and also considers the functions of implementing the flow identification, frame elimination, flow replication, QCI flow control, and 802.1CB proxy of the 802.1CB, and the interfaces between the subsystems are simpler, thereby further reducing the implementation and maintenance complexity of the apparatus.
[ one implementation example of a chip for implementing 802.1CB protocol ]
The invention also provides an embodiment of a chip for realizing the 802.1CB protocol, which is provided with the modules in the embodiment of the device for realizing the 802.1CB protocol. The functions of realizing the flow identification, the frame elimination, the flow duplication, the QCI flow control and the 802.1CB proxy of the 802.1CB are considered on one chip, the table entry flexibly configured based on the node position of the device is supported, various actual use scenes are adapted, and the complexity of realizing and maintaining the chip is reduced.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in more detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention.