Disclosure of Invention
The embodiment of the invention provides a method for sending and receiving control network information and a node, wherein a first node carries a neighbor direction in the control network information and sends the control network information to a second node having a neighbor relation with the first node, so that the purpose that the first node provides accurate control network information to the second node adjacent to the first node when the ISIS is used as a control protocol in the train Ethernet is achieved.
In a first aspect, an embodiment of the present invention provides a method for controlling a network information sending method, including:
a first node generates control network information, wherein the control network information carries a subtype length value TLV, and the sub TLV indicates the neighbor direction of the first node and a second node;
and the first node sends the control network information to a second node, wherein the second node is a neighbor node of the first node.
In a feasible implementation manner, the control network information is carried in a sub TLV domain newly added to a hello message from an intermediate system to an intermediate system ISIS;
the first node generating control network information, including:
the first node adds a sub TLV domain in a protocol data unit PDU corresponding to the hello message;
the first node sets the sub-TLV in the sub-TLV domain;
the first node sending the control network information to a second node, including:
and the first node sends the hello message to the second node.
In a feasible implementation manner, the control network information is carried in a sub TLV field newly added to a link state data packet LSP from the intermediate system to the intermediate system ISIS;
the first node generating control network information, including:
the first node adds a sub TLV domain in a protocol data unit PDU corresponding to the LSP;
the first node sets the sub-TLV in the sub-TLV domain;
the first node sending the control network information to a second node, including:
the first node sends the LSP to the second node.
In a possible implementation manner, the first node and the second node respectively have a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions;
the first node sending the control network information to a second node, including:
the first node sends the control network information to a second direction port of the second node through the first direction port;
or,
and the first node sends the control network information to a first direction port of the second node through the second direction port.
In a second aspect, an embodiment of the present invention provides a method for receiving control network information, including:
a second node receives control network information sent by a first node, wherein the control network information is generated by the first node, the control network information carries a subtype length value TLV, the sub TLV indicates the neighbor direction of the first node and the second node, and the second node is a neighbor node of the first node;
the second node processes the control network information.
In a feasible implementation manner, the control network information is carried in a sub TLV domain newly added to a hello message from an intermediate system to an intermediate system ISIS;
the second node receives the control network information sent by the first node, and the control network information comprises:
and the second node receives the hello message sent by the first node, and a sub TLV (threshold Length value) domain is added in a Protocol Data Unit (PDU) corresponding to the hello message and is arranged in the sub TLV domain.
In a feasible implementation manner, the control network information is carried in a sub TLV field newly added to a link state data packet LSP from the intermediate system to the intermediate system ISIS;
the second node receives the control network information sent by the first node, and the control network information comprises:
and the second node receives the LSP sent by the first node, and a sub-TLV domain is added in a protocol data unit PDU (protocol data unit) corresponding to the LSP and is arranged in the sub-TLV domain.
In a possible implementation manner, the first node and the second node respectively have a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions;
the second node receives the control network information sent by the first node, and the control network information comprises:
the second node receives the control network information sent by the first node through a first direction port of the first node through a second direction port of the second node;
the second node processing the control network information, including:
the second node judges whether the neighbor direction is consistent with the second direction or not, and if so, the control network information is stored in a neighbor information table; otherwise, the control network information is not stored.
In a possible implementation manner, the first node and the second node respectively have a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions;
the second node receives the control network information sent by the first node, and the control network information comprises:
the second node receives the control network information sent by the first node through a second direction port of the first node through a first direction port of the second node;
the second node storing the control network information, including:
the second node judges whether the neighbor direction is consistent with the first direction or not, and if so, the control network information is stored in a neighbor information table; otherwise, the control network information is not stored.
In a third aspect, an embodiment of the present invention provides a node, where the node is a first node, and the first node includes:
the processing module is used for generating control network information, wherein the control network information carries subtype length value TLV, and the sub TLV indicates the neighbor direction of the first node and the second node;
and the sending module is used for sending the control network information to a second node, wherein the second node is a neighbor node of the first node.
In a feasible implementation manner, the control network information is carried in a sub TLV domain newly added to a hello message from an intermediate system to an intermediate system ISIS;
the processing module is specifically configured to add a sub-TLV field in a protocol data unit PDU corresponding to the hello packet, and set the sub-TLV in the sub-TLV field;
the sending module is specifically configured to send the hello packet to the second node.
In a feasible implementation manner, the control network information is carried in a sub TLV field newly added to a link state data packet LSP from the intermediate system to the intermediate system ISIS;
the processing module is specifically configured to add a sub-TLV field in a protocol data unit PDU corresponding to the LSP, and set the sub-TLV in the sub-TLV field;
the sending module is specifically configured to send the LSP to the second node.
In a possible implementation manner, the first node and the second node respectively have a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions;
the sending module is specifically configured to send the control network information to a second direction port of the second node through the first direction port;
or,
the sending module is specifically configured to send the control network information to the first direction port of the second node through the second direction port.
In a fourth aspect, an embodiment of the present invention provides a node, where the node is a second node, and the second node includes:
a receiving module, configured to receive control network information sent by a first node, where the control network information is generated by the first node, the control network information carries a subtype length value TLV, the sub-TLV indicates a neighbor direction of the first node and a second node, and the second node is a neighbor node of the first node;
and the processing module is used for processing the control network information.
In a feasible implementation manner, the control network information is carried in a sub TLV domain newly added to a hello message from an intermediate system to an intermediate system ISIS;
the receiving module is specifically configured to receive the hello packet sent by the first node, where a sub-TLV field is added to a protocol data unit PDU corresponding to the hello packet, and the sub-TLV is set in the sub-TLV field.
In a feasible implementation manner, the control network information is carried in a sub TLV field newly added to a link state data packet LSP from the intermediate system to the intermediate system ISIS;
the receiving module is specifically configured to receive the LSP sent by the first node, where a sub-TLV field is added to a protocol data unit PDU corresponding to the LSP, and the sub-TLV is set in the sub-TLV field.
In a possible implementation manner, the first node and the second node respectively have a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions;
the receiving module is specifically configured to receive, through a second direction port of the second node, the control network information sent by the first node through a first direction port of the first node;
the processing module is specifically configured to determine whether the neighbor direction is consistent with the second direction, and if so, store the control network information in a neighbor information table; otherwise, the control network information is not stored.
In a possible implementation manner, the first node and the second node respectively have a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions;
the receiving module is specifically configured to receive, through a first direction port of the second node, the control network information sent by the first node through a second direction port of the first node;
the processing module is specifically configured to determine whether the neighbor direction is consistent with the first direction, and if so, store the control network information in a neighbor information table; otherwise, the control network information is not stored.
The embodiment of the invention provides a method for sending and receiving control network information and a node. In the process, the first node carries the neighbor direction in the control network information and sends the control network information to the second node having the neighbor relation with the first node, so that the purpose that the first node provides accurate control network information for the second node adjacent to the first node when the ISIS is used as a control protocol in the train Ethernet is achieved.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a signaling diagram of a first embodiment of a method for sending control network information according to the present invention, and this embodiment describes the method for sending control network information in detail from the perspective of interaction between a first node and a second node. Specifically, the present embodiment includes:
101. the first node generates control network information.
In the embodiment of the present invention, the first node and the second node are two nodes having a neighbor relation in the ISIS, that is, the first node and the second node are neighbor nodes each other. When the Train Ethernet uses ISIS as a control protocol, the first Node and the second Node are Ethernet Train Backbone Network nodes (ETBN) in the Train Ethernet. In this step, a first node, that is, a first ETBN generates control network information carrying a subtype Length Value (TLV), where the TLV indicates a neighbor direction of the first node and a second node, and the neighbor direction indicates a relative direction of the first node and the second node, for example, the first node is located in a left direction of the second node; as another example, the first node is located in a directional orientation with the second node, and so on.
102. The first node sends the control network information to a second node.
After generating the control network information carrying the sub-TLV, the first node sends the control network information to the neighboring node, i.e. the second node.
103. The second node processes the control network information.
In this step, after receiving the control network information, the second node matches the neighbor direction in the control network information with the direction corresponding to the direction port, and determines whether to store or not to store the control network information according to the matching result.
According to the method for sending the control network information provided by the embodiment of the invention, the first node generates the control network information carrying the TLV and sends the control network information to the neighbor node of the first node, namely the second node. In the process, the first node carries the neighbor direction in the control network information and sends the control network information to the second node having the neighbor relation with the first node, so that the purpose that the first node provides accurate control network information for the second node adjacent to the first node when the ISIS is used as a control protocol in the train Ethernet is achieved.
Fig. 2 is a diagram illustrating a scenario for controlling a network information sending method according to the present invention. Referring to fig. 2, in the embodiment of the present invention, ETBN1, ETBN2 and ETBN3 exist, and ETBN1 to ETBN3 are equivalent to IS in ISIS. For the ETBN2, the neighbor nodes are ETBN1 and ETBN 2. Each ETBN is connected to a plurality of terminals (ED), which are devices on the train, such as devices for controlling doors, devices for controlling air conditioners, devices for controlling lights, and the like. The ETBN acquires neighbor node control network information and provides the information to the terminal connected to itself. The first node and the second node are respectively provided with a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions.
Specifically, taking the ETBN2 as the first node and the ETBN1 and ETBN3 as the second node in fig. 2 as an example, the ETBN2, ETBN1 and ETBN3 respectively havefirst direction ports 1, 2, 3 and 4, and thefirst direction ports 1, 2, 3 and 4 are hereinafter referred to as left direction ports, and the left direction ports correspond to the left direction; the ETBN2, ETBN1 and ETBN3 havesecond direction ports 5, 6, 7 and 8, respectively, and thesecond direction ports 5, 6, 7 and 8 will be referred to as right direction ports, which correspond to the right direction. ETBN2 arrives at the left node ETBN1 through left port 1 and the right node ETBN3 through right port 8.
After the second node receives the control network information sent by the first node, the neighbor direction carried by the control network information is matched with the direction of the second node relative to the first node, namely the direction corresponding to the port of the first node sending the control network information, and whether the control network information is stored or not is determined according to the matching result.
In the matching process, when the second node receives the control network information sent by the first node through the first direction port of the first node through the second direction port of the second node, the second node judges whether the neighbor direction is consistent with the second direction, if so, the control network information is stored in a neighbor information table; otherwise, the control network information is not stored. For example, taking the ETBN2 as the first node and the ETBN1 as the second node in fig. 2 as an example, when the ETBN2 sends the control network information to the ETBN1, specifically, the ETBN2 sends the control network information to the ETBN1 through the physical link actually existing between the ETBN2 and the ETBN1, that is, the ETBN2 sends the control network information to the ETBN1 through the first direction port (the direction port 1 has a physical link with the second direction port 8 of the ETBN 1), then the ETBN1 receives the control network information through the second direction port 8, and the direction corresponding to the first direction port of the ETBN2 is the left direction. At this time, as for ETBN1, ETBN1 does not know whether ETBN2 is located in its first direction or second direction, if the neighbor direction in the control network information received from the second direction port indicates the left direction (issued from the first direction port of ETBN 2), ETBN1 saves the control network information in the neighbor information table and further in the LSDB, and if the neighbor direction in the control network information received from the second direction port indicates the right direction (issued from the second direction port of ETBN 2), ETBN1 does not save the control network information.
In the matching process, when the second node receives the control network information sent by the first node through a second direction port of the first node through a first direction port of the second node, the second node judges whether the neighbor direction is consistent with the first direction, and if so, the control network information is stored in a neighbor information table; otherwise, the control network information is not stored. For example, taking the ETBN2 as the first node and the ETBN3 as the second node in fig. 2 as an example, when the ETBN2 sends the control network information to the ETBN3, specifically, the ETBN2 sends the control network information to the ETBN3 through the physical link actually existing between the ETBN2 and the ETBN3, that is, the ETBN2 sends the control network information to the ETBN3 through the second direction port (the direction port 8 has a physical link with the first direction port 1 of the ETBN 3), and then the ETBN3 receives the control network information through the first direction port 1. And the second direction port of ETBN2 corresponds to the right direction. At this time, as for ETBN3, ETBN3 does not know whether ETBN2 is located in its first direction or second direction, if the neighbor direction in the control network information received from the first direction port indicates the right direction (issued from the second direction port of ETBN 2), ETBN3 saves the control network information in the neighbor information table and further in the LSDB, and if the neighbor direction in the control network information received from the first direction port indicates the left direction (issued from the first direction port of ETBN 2), ETBN3 does not save the control network information.
The control network information transmission method according to the present invention will be described in detail below, taking the ETBN2 as the first node and the ETBN1 and ETBN3 as the second node in fig. 2 as examples.
In a feasible implementation manner, the control network information is specifically a hello packet of the ISIS. At this time, the first node adds a sub TLV field to a Protocol Data Unit (PDU) corresponding to the hello packet, and sets the sub TLV in the sub TLV field.
In the implementation manner, a Multi-Topology-aware port Capability (Multi-Topology-aware Capability) is added to TRILL, and a Hello (Intermediate System-to-Intermediate System Hello) message from an Intermediate System to the Intermediate System is improved, that is, a sub TLV domain is added to a PDU corresponding to the Hello message, and a TLV indicating a neighbor direction of a first node and a second node is set in the sub TLV domain. Specifically, referring to fig. 3 and fig. 4, fig. 3 is a schematic diagram of a TLV after Trill extends ISIS in the control information sending method of the present invention, and fig. 4 is a schematic diagram of setting a sub-TLV in a sub-TLV domain of the TLV shown in fig. 3 in the control information sending method of the present invention.
Referring to fig. 3, the format of the PDU in the TLV field after Trill extended ISIS includes:
type (Type), indicating TLV Type, set to MT-PORT-CAP, in 143 format;
length, the number of bytes contained in the value field, including the Length of the sub-TLVs carried by the TLV, wherein the number of sub-TLVs carried by the TLV may be multiple;
reserved bits (Reserve, R), which are generally 4 bits, are set to zero when transmitted and ignored when received;
topology Identifier domain (Topology Identifier): typically 12 bits, to identify the topology being declared. When set to zero, it means that this field is used to represent basic topology information;
sub-TLV fields (sub-TLVs): for setting the sub-TLV, the format of the sub-TLV can be referred to as Request comments (RFC) 5035.
Referring to fig. 4, the sub-TLV format set in the sub-TLV field of fig. 3 includes:
type (Type): indicates the type of sub-TLV;
length (Length): the number of bytes contained in the value field;
sender identity (Sender Nickname): an identification of the sender ETBN;
sending port direction: sender Left.
After receiving the hello message sent in the first stage, the second node compares the direction of the input port with the neighbor direction in the sub TLV to confirm, and stores the new neighbor direction, namely the sub TLV, into a neighbor information table when confirming that no configuration error exists, so as to generate neighbor information of the second node, and the neighbor information of each node generates a link state database.
In another possible implementation, the control network information is a Link State Packet (LSP) of the ISIS. At this time, the first node adds a sub-TLV field to a Protocol Data Unit (PDU) corresponding to the LSP, and sets the sub-TLV in the sub-TLV field.
In this implementation, an extended IS reachability (extended IS accessibility) sub TLV IS added to TRILL, the sub TLV IS used to replace a neighbor TLV from an intermediate system to the intermediate system, and IS set in a PDU corresponding to an LSP, that IS, a sub TLV field IS added to the PDU corresponding to the LSP, and a TLV indicating a neighbor direction of a first node and a second node IS set in the sub TLV field. Specifically, referring to fig. 5 and fig. 6, fig. 5 is another schematic diagram of a TLV after Trill extends ISIS in the control information sending method of the present invention, and fig. 6 is a schematic diagram of setting a sub-TLV in a sub-TLV domain of the TLV shown in fig. 5 in the control information sending method of the present invention.
Referring to fig. 5, the format of the PDU in the TLV field after Trill extended ISIS includes:
type (Type), indicating TLV Type, set to extended IS availability, in 22 format;
length, the number of bytes contained in the value field, including the Length of the sub-TLVs carried by the TLV, wherein the number of sub-TLVs carried by the TLV may be multiple;
system identification (System ID): a system identification number that typically includes six bytes and a virtual node number of one byte;
default metric value (default metric): typically three bytes;
sub TLV length (length of sub-TLVs): the sub-TLV length of one byte is 0-244;
sub-TLV fields (sub-TLVs): for setting the sub-TLV (sub-TLV field is not shown in fig. 5).
Referring to fig. 6, the sub-TLV format set in the sub-TLV field of fig. 5 includes:
type (Type): indicates the type of the new sub-TLV;
length (Length): the number of bytes contained in the value field;
sending port direction: sender Left.
FIG. 7 is a schematic structural diagram of a first node according to the present invention. The first node provided in this embodiment may implement each step of the method applied to the first node in the present invention, and a specific implementation process is not described herein again. Specifically, the first node provided in this embodiment includes:
aprocessing module 11, configured to generate control network information, where the control network information carries a subtype length value TLV, and the sub-TLV indicates a neighbor direction of the first node and a second node;
a sending module 12, configured to send the control network information to a second node, where the second node is a neighboring node of the first node.
The first node provided by the embodiment of the invention generates the control network information carrying the sub-TLV and sends the control network information to the neighbor node of the first node, namely the second node. In the process, the first node carries the neighbor direction in the control network information and sends the control network information to the second node having the neighbor relation with the first node, so that the purpose that the first node provides accurate control network information for the second node adjacent to the first node when the ISIS is used as a control protocol in the train Ethernet is achieved.
Optionally, in an embodiment of the present invention, the control network information is carried in a sub TLV field newly added to a hello packet from an intermediate system to an intermediate system ISIS;
theprocessing module 11 is specifically configured to add a sub-TLV field in a protocol data unit PDU corresponding to the hello packet, and set the sub-TLV in the sub-TLV field;
the sending module 12 is specifically configured to send the hello packet to the second node.
Optionally, in an embodiment of the present invention, the control network information is carried in a sub TLV field newly added to a link state data packet LSP from the intermediate system to the intermediate system ISIS;
theprocessing module 11 is specifically configured to add a sub-TLV field in a protocol data unit PDU corresponding to the LSP, and set the sub-TLV in the sub-TLV field;
the sending module 12 is specifically configured to send the LSP to the second node.
Optionally, in an embodiment of the present invention, the first node and the second node respectively have a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions;
the sending module 12 is specifically configured to send the control network information to a second direction port of the second node through the first direction port;
or,
the sending module 12 is specifically configured to send the control network information to the first direction port of the second node through the second direction port.
Fig. 8 is a schematic structural diagram of a second node according to the present invention. The second node provided in this embodiment may implement each step of the method applied to the second node in the present invention, and a specific implementation process is not described herein again. Specifically, the second node provided in this embodiment includes:
a receiving module 21, configured to receive control network information sent by a first node, where the control network information is generated by the first node, the control network information carries a subtype length value TLV, the sub-TLV indicates a neighbor direction of the first node and a second node, and the second node is a neighbor node of the first node;
and theprocessing module 22 is used for processing the control network information.
In the second node provided by the embodiment of the invention, the first node generates control network information carrying the TLV and sends the control network information to a neighbor node of the first node, namely the second node; accordingly, the second node receives the control network information. In the process, the first node carries the neighbor direction in the control network information and sends the control network information to the second node having the neighbor relation with the first node, so that the purpose that the first node provides accurate control network information for the second node adjacent to the first node when the ISIS is used as a control protocol in the train Ethernet is achieved.
Optionally, in an embodiment of the present invention, the control network information is carried in a sub TLV field newly added to a hello packet from an intermediate system to an intermediate system ISIS;
the receiving module 21 is specifically configured to receive the hello packet sent by the first node, where a sub TLV field is added to a protocol data unit PDU corresponding to the hello packet, and the sub TLV is set in the sub TLV field.
Optionally, in an embodiment of the present invention, the control network information is carried in a sub TLV field newly added to a link state data packet LSP from the intermediate system to the intermediate system ISIS;
the receiving module 21 is specifically configured to receive the LSP sent by the first node, where a sub-TLV field is added to a protocol data unit PDU corresponding to the LSP, and the sub-TLV is set in the sub-TLV field.
Optionally, in an embodiment of the present invention, the first node and the second node respectively have a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions;
the receiving module 21 is specifically configured to receive, through a second direction port of the second node, the control network information sent by the first node through a first direction port of the first node;
theprocessing module 22 is specifically configured to determine whether the neighbor direction is consistent with the second direction, and if so, store the control network information in a neighbor information table; otherwise, the control network information is not stored.
Optionally, in an embodiment of the present invention, the first node and the second node respectively have a first direction port and a second direction port, and a first direction corresponding to the first direction port and a second direction corresponding to the second direction port are opposite directions;
the receiving module 21 is specifically configured to receive, through a first direction port of the second node, the control network information sent by the first node through a second direction port of the first node;
theprocessing module 22 is specifically configured to determine whether the neighbor direction is consistent with the first direction, and if so, store the control network information in a neighbor information table; otherwise, the control network information is not stored.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.