CN114040262B - Network switch - Google Patents

Network switch Download PDF

Info

Publication number
CN114040262B
CN114040262B CN202111301925.6A CN202111301925A CN114040262B CN 114040262 B CN114040262 B CN 114040262B CN 202111301925 A CN202111301925 A CN 202111301925A CN 114040262 B CN114040262 B CN 114040262B
Authority
CN
China
Prior art keywords
switch
module
data
network
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111301925.6A
Other languages
Chinese (zh)
Other versions
CN114040262A (en
Inventor
刘文龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Sidao Aviation Technology Co ltd
Original Assignee
Xi'an Sidao Aviation Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Sidao Aviation Technology Co ltd filed Critical Xi'an Sidao Aviation Technology Co ltd
Priority to CN202111301925.6A priority Critical patent/CN114040262B/en
Publication of CN114040262A publication Critical patent/CN114040262A/en
Application granted granted Critical
Publication of CN114040262B publication Critical patent/CN114040262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q1/00Details of selecting apparatus or arrangements
    • H04Q1/02Constructional details
    • H04Q1/10Exchange station construction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Landscapes

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

Abstract

The invention discloses a network switch, which comprises an ad hoc network module, a data sequencing module and a plurality of hardware cascade ports; after the hardware cascade port is started, the self-organized network module is configured into a circulation port or a shielding port according to the physical connection relation between the switch and the tree-shaped target network; only one upper-level circulation port in each circulation port is connected with the only father switch, and the other lower-level circulation ports are respectively connected with the son switches; each lower-level circulation port is used for receiving the switching data sent by each sub-switch in parallel; the data sorting module is used for sorting the exchange data received by each lower-level circulation port; the upper circulation port is used for sending the sequenced exchange data to the father switch and receiving the exchange data sent by the father switch; each lower-level flow port is also used for transmitting the switching data received from the parent switch to each child switch in parallel and synchronously. The invention can make the digital system 'more distributed physically' and 'more centralized in information'.

Description

Network switch
Technical Field
The invention belongs to the technical field of information, and particularly relates to a network switch.
Background
The modern digital system is developed in the direction of unmanned, intelligent, complicated and high-speed interconnection, even in a single device/equipment, the number of sub-systems is increased and more complicated, the requirements cannot be met completely by centralized calculation and centralized acquisition control, and the distributed design is a necessary result. Computers, controllers, sensors and the like are more distributed physically, information integration of equipment and sensors is often required in the calculation process of information processing, data of the same sub-system and sub-system need to be repeatedly and crossly transmitted to reliably transmit all data to a certain task function module, the utilization rate of communication bandwidth is seriously influenced, and a series of problems of data scheduling, data transmission time uncertainty and the like are brought. Therefore, a network transmission device is urgently needed to solve the contradiction between the requirement of the digital system for "more physically distributed" and the requirement of "more information centralized".
Disclosure of Invention
In order to solve the technical problems in the prior art, the invention provides a network switch.
The technical problem to be solved by the invention is realized by the following technical scheme:
a network switch comprises an ad hoc network module, a data sorting module and a plurality of hardware cascade ports; wherein the content of the first and second substances,
after any hardware cascade port is started, the self-organizing network module is configured to be a circulation port or a shielding port according to the physical connection relation between the switch and a target network; the network topology of the target network is a tree structure; only one upper-level circulation port in each circulation port is connected with the only father switch in the upper level, and the rest lower-level circulation ports are respectively connected with the sub switches in the lower level;
each lower-level circulation port is used for receiving the switching data sent by each sub-switch in parallel;
the data sorting module is used for sorting the exchange data received by each lower-level circulation port according to a preset sorting rule;
the upper circulation port is used for sending the switching data sequenced by the data sequencing module to a father switch and receiving the switching data sent by the father switch;
each lower-level flow port is further configured to send, in parallel and in synchronization, to each child switch, the switching data received by the upper-level flow port from the parent switch.
Optionally, the target network is constructed by an original physical network; the switches in the physical network may be arbitrarily interconnected.
Optionally, the data sorting module sorts, according to a preset sorting rule, the exchange data received by each of the circulation ports, and includes:
sequencing the exchange data received by each circulation port according to a sequencing rule of priority primary and timestamp secondary of the exchange data;
the exchange data with high priority is arranged in front, the exchange data with low priority is arranged behind, the exchange data with old time stamp is arranged in front, and the exchange data with new time stamp is arranged behind.
Optionally, the ad hoc network module includes: the device comprises a first decision module, a protocol data updating module, a second decision module and a port management module;
in the process of establishing the target network by the physical network:
each hardware cascade port is used for sending protocol data to a neighbor switch in the physical network and receiving the protocol data sent by the neighbor switch by taking a period as a unit until the number of the periods reaches an upper limit; wherein the upper limit is equal to or greater than an expected number of layers of the physical network; the protocol data carries the ID of the data sender, the ID of the root switch identified by the data sender and the hierarchy of the data sender relative to the identified root switch;
the first decision module is used for deciding a new root switch according to the ID of the root switch identified by the switch and the ID of the root switch identified by each neighbor switch in each period; each switch in the physical network is powered on, namely the switch is defaulted to be a root switch;
the protocol data updating module is used for responding to the first decision module to decide a new root switch in each period and updating the hierarchy in the protocol data to be sent to the neighbor switches in the next period and the ID of the root switch;
the second decision module is used for deciding a parent switch of the switch from the neighbor switches according to the IDs and the levels of the neighbor switches when the number of the periods reaches the upper limit and the switch is not the root switch;
the port management module is used for shielding the ports of the switch connected with the switches at the same level when the number of the periods reaches the upper limit and the switch is not a root switch; and the second decision module is also used for shielding the port of the non-father switch in the upper level connected with the switch after the second decision module finishes working.
Optionally, the switch further comprises: a link delay test module; the link delay test module includes: a first sub-module, a second sub-module, and a third sub-module;
the first sub-module is started when the port management module finishes working and the switch is a root switch, and is used for issuing clock synchronization data through each lower-level circulation port;
the second sub-module is started when the port management module finishes working and the switch is a branch switch, and is used for forwarding clock synchronization data to each sub-switch through each lower-level circulation port when the upper-level circulation port receives the clock synchronization data sent by the parent switch, starting timing and feeding back response data to the parent switch through the upper-level circulation port when timing is finished;
and the third sub-module is started when the port management module finishes working and the switch is a root switch or a branch switch, and is used for calculating and recording the actually measured link delay between the switch and the sub-switch according to the time of receiving the response data, the time of sending clock synchronization data to the sub-switch and the time length of timing when any lower-level circulation port receives the response data fed back by the sub-switch.
Optionally, the switch further comprises: a clock synchronization module;
the clock synchronization module is configured to calculate the timestamp of the switching data received by the lower-level circulation port according to a measured link delay between the local switch and the sub-switch, so as to perform clock synchronization with the target network.
Optionally, neither the length of the period nor the duration of the timing is less than 1024 nanoseconds.
Optionally, the length of the period and the duration of the timing are both 2 microseconds.
Optionally, the ID is a MAC address;
the first decision-making module decides a new root switch according to the ID of the root switch recognized by the switch and the ID of the root switch recognized by each neighbor switch, including:
and selecting the switch with the minimum MAC address from the MAC address of the root switch identified by the switch and the MAC address of the root switch identified by each neighbor switch as a new root switch.
Optionally, the calculation method of the measured link delay includes:
Figure BDA0003338650080000041
wherein, t 2 Time t of receiving response data fed back from the sub-switch for the lower port 1 Time of forwarding clock synchronization data to the sub-switch for the subordinate port, T cal Duration of said timing, t delay Is the calculated measured link delay.
The invention has the beneficial effects that:
in the network switch (local switch) provided by the invention, after being started, each hardware cascade port is configured as a circulation port or a shielding port by the ad hoc network module according to the physical connection relation between the local switch and a target network, wherein only one upper circulation port is connected with a unique father switch in a higher level, and the other lower circulation ports are respectively connected with a sub-switch in a lower level. Thus, the network topology of the target network consisting of the switch and other switches of the same type is always in a tree structure. On the basis of the network structure, each lower-level circulation port receives the exchange data sent by each sub-switch in parallel, the data sorting module queues the exchange data received by each lower-level circulation port in parallel, and then the queued exchange data is transmitted upwards through the upper-level circulation port; the upper circulation port can also receive the exchange data issued by the father exchanger, and then sends the exchange data issued by the father exchanger to each sub exchanger in parallel through each lower circulation port. Under the parallel receiving and serial concurrent switching mechanism, switching data in the target network can flow through each switch, and a data transmission mechanism is formed. Therefore, after the terminal equipment is accessed to the target network through the switch, the data of the whole network can be obtained at any position of the target network, the information of the whole network can be integrated without arranging a centralized server or processor, the two requirements of physically more distributed and information more concentrated are met, the contradiction between the two requirements is effectively reconciled, and a better solution is provided for the development of future digital systems in the unmanned, intelligent, complicated and high-speed interconnection direction.
The present invention will be described in further detail with reference to the accompanying drawings.
Drawings
Fig. 1 is a schematic structural diagram of a network switch according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a target network formed using network switches provided by embodiments of the present invention;
FIG. 3 is a data flow diagram illustrating an exemplary exchange of data in a target network;
fig. 4(a) to 4(g) show an exemplary process of constructing a target network with a tree structure by a physical network formed by arbitrary interconnection of network switches provided by the embodiment of the present invention;
fig. 5 is a schematic structural diagram of another network switch provided by an embodiment of the present invention;
FIG. 6 is a functional schematic diagram of a second sub-module of the link delay test module of FIG. 5;
FIG. 7 is a functional schematic diagram of a third sub-module of the link delay test module of FIG. 5;
fig. 8 is a schematic structural diagram of another network switch provided in the embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to specific examples, but the embodiments of the present invention are not limited thereto.
In order to make a digital system "more physically distributed" and "more information centralized", the embodiment of the present invention provides a network switch; referring to fig. 1, a network switch provided in an embodiment of the present invention, that is, the present switch, includes: the device comprises a plurality of hardware cascade ports, an ad hoc network module and a data sequencing module.
It can be understood that, on the premise that the software and the hardware do not conflict, the network switch provided by the embodiment of the present invention further includes a general module and a port, etc. of a conventional switch. For example, in addition to the hardware cascade port, the switch also includes a user port of a conventional switch, i.e., a port for connecting a user terminal device.
In the embodiment of the invention, after any hardware cascade port is started, the self-organizing network module is configured into a circulation port or a shielding port according to the physical connection relation between the switch and a target network; the network topology of the target network is a tree structure. It is understood that the hardware cascading port is a port for connecting other switches, and the hardware cascading port is enabled, that is, the hardware cascading port is plugged in a communication cable to connect with other switches.
Only one upper-level circulation port in each circulation port is connected with the only father switch in the upper layer, and the rest lower-level circulation ports are respectively connected with the son switches in the lower layer. Fig. 2 is a schematic diagram illustrating a target network formed by network switches provided by the embodiment of the present invention; wherein root represents the root switch, the number represents the ID of the switch, the solid line represents that there is physical connection relationship between the switches and the data transmission link is clear, and the dotted line represents that there is physical connection relationship between the switches but the data transmission link is not.
And each lower circulation port is used for receiving the switching data transmitted by each sub-switch in parallel. It should be understood that the parallel receiving means that the receiving of the switching data between the lower circulation ports is not affected, and the lower circulation ports can simultaneously operate to receive the switching data.
And the data sorting module is used for sorting the exchange data received by each lower-level circulation port according to a preset sorting rule.
Wherein, the sorting rule in the data sorting module can be various. For example, in one implementation, the data sorting module may sort the switching data received by each circulation port according to a sorting rule of priority primary and timestamp secondary of the switching data; the exchange data with high priority is arranged in front, the exchange data with low priority is arranged behind, the exchange data with old time stamp is arranged in front, and the exchange data with new time stamp is arranged behind. In another implementation, the data ordering module may order the exchanged data according to only a single criterion of priority or timestamp. In addition, the specific ordering rule may be set according to the requirement of the device accessing the target network, and the embodiment of the present invention is not limited thereto.
And the only upper-level circulation port is used for sending the switching data sequenced by the data sequencing module to the father switch and also used for receiving the switching data sent by the father switch.
Each circulation port is also used for sending the switching data received by the superior circulation port from the parent switch to each child switch in parallel and synchronously.
It can be understood that the upper circulation port sends the sequenced exchange data to the parent switch; the data sorting module in the father switch sorts the exchange data received by each subordinate circulation port of the father switch, the sorted exchange data are upwards sent to the father switch of the father switch through the superior circulation port of the father switch, and the like, finally the exchange data all reach the root switch, the root switch sends the exchange data to each sub switch of the root switch in parallel and synchronously through each subordinate circulation port of the root switch, and the exchange data are sent layer by layer, and finally the exchange data upwards transmitted by any switch in the target network all reach each switch in the target network.
Fig. 3 shows an exemplary data flow diagram for data exchange in a target network. Referring to the gray arrows in fig. 3, the computer a sends data containing image information to the target network through the switch J; this data passes layer by layer as switched data in the target network to the root switch (denoted root in figure 3). Referring to the black arrows in fig. 3, the terminal b sends data containing voice information to the target network through the switch E, and the data reaches the root switch through layer-by-layer transmission as switching data in the target network. Referring to the arrow without the background color in fig. 3, after the root switch sorts the two data, the two data are sent to the switches a and B through the lower-level flow ports of the root switch, and are transmitted layer by layer downward to finally reach each switch in the target network.
In the network switch provided in the embodiment of the present invention, after each hardware cascade port is enabled, each hardware cascade port is configured as a flow port or a shield port by the ad hoc network module according to a physical connection relationship between the switch and the target network, where only one upper flow port is connected to a unique parent switch in a higher hierarchy, and the remaining lower flow ports are respectively connected to a sub switch in a lower hierarchy. Thus, the network topology of the target network consisting of the switch and other switches of the same type is always in a tree structure. On the basis of the network structure, each lower-level circulation port receives the exchange data sent by each sub-switch in parallel, the data sorting module queues the exchange data received by each lower-level circulation port in parallel, and then the queued exchange data is transmitted upwards through the upper-level circulation port; the upper circulation port can also receive the exchange data issued by the father exchanger, and then sends the exchange data issued by the father exchanger to each sub exchanger in parallel through each lower circulation port. Under the parallel receiving and serial concurrent switching mechanism, switching data in the target network can flow through each switch, and a data transmission mechanism is formed. Therefore, after the terminal equipment is accessed to the target network through the switch, the data of the whole network can be obtained at any position of the target network, the information of the whole network can be integrated without arranging a centralized server or processor, the two requirements of physically more distributed and information more concentrated are met, the contradiction between the two requirements is effectively reconciled, and a better solution is provided for the development of future digital systems in the unmanned, intelligent, complicated and high-speed interconnection direction.
In one embodiment, the target network is constructed by an original physical network; the switches in the physical network may be arbitrarily interconnected. It can be understood that, since each switch in the physical network can be configured as a flow port or a shield port in the hardware cascade port enabled by the switch, as in the present switch, so that only one flow port is connected to the parent switch, the finally formed network topology is still a tree structure even if the physical network is arbitrarily connected.
In one embodiment, the ad hoc network module may include: the device comprises a first decision module, a protocol data updating module, a second decision module and a port management module.
In the process of building a target network by the physical network arbitrarily connected by the switch:
each hardware cascade port is used for sending protocol data to the neighbor switch in the physical network and receiving the protocol data sent by the neighbor switch by taking the period as a unit until the number of the periods reaches the upper limit.
The upper limit of the number of cycles is equal to or greater than the expected number of layers of the physical network, and usually does not exceed 10, although not limited thereto. The protocol data carries the ID of the data sender, the ID of the root switch identified by the data sender, and the hierarchy of the data sender relative to the identified root switch. Specifically, for the switch, the protocol data sent to the neighbor switch carries the ID of the switch, the ID of the root switch identified by the switch, and the hierarchy of the switch relative to the identified root switch; for any neighbor switch, the protocol data sent to the switch carries the ID of the neighbor switch, the ID of the root switch identified by the neighbor switch, and the hierarchy of the neighbor switch relative to the identified root switch. Each switch in the physical network is powered on, namely, the switch is defaulted to be a root switch, and the switch is not exceptional. Therefore, in the protocol data initially sent out by each switch, the ID of the root switch identified by the switch is the self ID, and the hierarchy of the root switch identified by the switch is 0.
And the first decision module is used for deciding a new root switch according to the ID of the root switch identified by the switch and the ID of the root switch identified by each neighbor switch in each period.
Specifically, the first decision module selects the switch with the minimum MAC address as a new root switch from the MAC address of the root switch identified by the switch and the MAC addresses of the root switches identified by the neighbor switches.
In another implementation, the ID of the switch may also be other types of information, such as the device number of the switch; in this way, the first decision module may also select one of the switches having the minimum device number, the maximum device number, or the target device number as the new root switch from the device number of the root switch identified by the switch and the device numbers of the root switches identified by the neighbor switches. The target device number may be a preset number, a group or a segment.
And the protocol data updating module is used for responding to the decision of the first decision module to obtain a new root switch in each period and updating the hierarchy in the protocol data to be sent to the neighbor switches in the next period and the ID of the root switch.
The specific updating mode comprises the following steps: replacing the ID of the currently identified root switch with the ID of the new root switch, and updating the hierarchy of the switch relative to the new root switch according to the hierarchy of the switch winning in the decision relative to the new root switch; wherein, the switch wins in the decision means: the root switch identified by the switch before the decision is the new root switch identified by the decision.
For example, if the neighbor switch that wins the decision is at level 1 with respect to the new root switch, the level of the switch with respect to the new root switch is updated to 2; if the neighbor switch that wins the decision is at a level of 3 with respect to the new root switch, the level of the own switch with respect to the new root switch is updated to 4. It will be appreciated that each time the hierarchy is updated, 1 is added to the hierarchy of the winning neighbor switch relative to the new root switch because the switch is originally adjacent to the neighbor switch, i.e., the number of hops from the neighbor switch is essentially 1. And if the switch is the winner of the decision, the protocol data updating module is not triggered.
And the second decision module is used for deciding the parent switch of the switch from the neighbor switches according to the ID and the hierarchy of the neighbor switches when the number of the periods reaches the upper limit and the switch is not the root switch.
When the parent switch is specifically decided, the ID can be compared to realize the decision. For example, when the ID is a MAC address, a neighbor switch having the smallest MAC address is selected from the neighbor switches in the previous layer as a parent switch of the present switch.
The port management module is used for shielding the ports of the switch connected with the switches at the same level when the number of the periods reaches the upper limit and the switch is not a root switch; and the second decision module is also used for shielding the ports of the non-father switch in the upper level connected with the switch after the second decision module finishes working. Thus, the ports of the switch connected to the same level and the ports connected to the non-parent switches in the previous level are shielded, and become shielded ports.
Fig. 4(a) to 4(g) show an exemplary process of constructing a target network with a tree structure by a physical network formed by arbitrary interconnection of network switches provided by the embodiment of the present invention. Where the circle represents a switch and the value inside the circle represents the ID of the switch.
Fig. 4(a) shows a state where the switches 1 to 10 are all powered on and initialized, and it can be seen that root IDs (IDs of root switches) recorded in each switch are set IDs (own IDs), and levels (levels) are all 0.
Fig. 4(b) is a state of each switch after the 1 st cycle of decision of the first decision module. Comparing fig. 4(a), it can be seen that all the identified root switches except switch 1 are updated, and the corresponding hierarchy level is increased by 1.
Fig. 4(c) shows the state of each switch after the 2 nd cycle of decision by the second decision module. As can be seen from a comparison of fig. 4(b), all switches except switch 10 now identify the root switch as switch 1. All the switches 4, 5, 7, 8, 9, and 10 are added with 1 again according to the hierarchy of the switch (switches 3, 6, 3, 2/3, 2, and 7 in turn) that wins their own internal decision, that is, level is updated to 2.
Fig. 4(d) shows the state of each switch after the 3 rd cycle of decision by the second decision module. As can be seen from comparison of fig. 4(c), all switches assume switch 1 as the root switch, and the corresponding hierarchy is also defined. From the hierarchy and the physical connection relationship between the switches at this time, the current network topology can be obtained as shown in fig. 4 (e).
Assuming that the expected number of layers of the physical network is 4, when the number of cycles reaches 4, the second decision modules of the remaining switches except the root switch 1 are triggered to shield the ports connected to the non-parent switches in the upper hierarchy and shield the ports connected to the switches in the same hierarchy, and the effect is as shown in 4 (f). At this time, the original physical network forms a target network having a tree structure as shown in fig. 4 (g).
Based on the ad hoc network module, the network switch provided by the embodiment of the invention is used for establishing the network, so that the network can be rapidly converged, and the parallel receiving and the serial concurrency are carried out in a network topology with a tree structure.
Since the ethernet protocol specifies that the shortest communication frame is 64 bytes long and there is also a delay of 64 bytes. Therefore, if the protocol data meets the regulations of the current ethernet, the protocol data is transmitted between the switches, and at least (64+64) × 8 is 1024 nanoseconds is required; where 8 means that the transmission of a single byte takes 8 nanoseconds. Therefore, the length of the above period is preferably not less than 1024 nanoseconds. For example preferably 2 microseconds. Thus, even if the number of layers of the physical network is 10, the time required for the physical network connected by the network switch provided by the embodiment of the present invention to converge to the target network is 2 microseconds × 10 — 20 microseconds, which is very fast.
Of course, since the shortest communication frame length is only the specification of the existing ethernet protocol, the 1024 ns limit is only to enable the network switch provided by the embodiment of the present invention to better adapt and match the existing ethernet. Therefore, a period of no less than 1024 ns is only one option for adapting to the current ethernet, and this option does not affect the application of the network switch provided by the embodiment of the present invention in future networks. That is, in future networks, the length of the period may be less than 1024 nanoseconds if there is no limit to the length of the lowest communication frame or if the length of the lowest communication frame is smaller than 64 bytes.
In one embodiment, as shown in fig. 5, a network switch provided in an embodiment of the present invention further includes: a link delay test module; the link delay test module includes: a first sub-module, a second sub-module, and a third sub-module.
Specifically, the first sub-module is enabled when the port management module finishes working and the switch is a root switch, and is configured to issue clock synchronization data through each subordinate flow port. Here, the clock synchronization data is also one frame of well-defined communication data; for example, the clock synchronization data may be a shortest communication frame.
And the second sub-module is started when the port management module finishes working and the switch is a branch switch, and is used for forwarding the clock synchronization data to each sub-switch through each lower-level circulation port when the upper-level circulation port receives the clock synchronization data sent by the parent switch, starting timing and feeding back response data to the parent switch through the upper-level circulation port when the timing is finished. It is understood that a so-called branch switch refers to a switch that has a sub-switch and is not a root switch.
Referring to fig. 6, it is known that the present switch is a branch switch, and the link delay between the present switch and the parent switch is assumed to be t delay1 The link delay between the local exchange and the sub-exchange is t delay2 . Firstly, a father switch sends clock synchronization data to the switch; has passed through t delay1 When the local switch receives the clock synchronization data, the local switch immediately forwards the clock synchronization data to the sub-switches and simultaneously starts timing; when the timing is over, the local exchange feeds back response data 1 to the parent exchange, and the response data 1 also passes through t delay1 The link of (a) arrives at the parent switch after a delay. Similarly, the clock synchronization data sent from the local exchange to the sub-exchange passes through t delay2 The sub-switch immediately forwards the clock synchronization data down to the sub-switch (not shown in fig. 6) of the next layer, and simultaneously starts timing; when the timing is over, the sub-exchanger immediatelyFeeding back response data 2 to the switch; the response data 2 likewise passes through t delay The link of (2) arrives at the local switch after being delayed. According to the working process, the branch switch in the whole target network works in the same way.
And the third sub-module is started after the port management module finishes working and the switch is a root switch or a branch switch, and is used for calculating and recording the actually measured link delay between the switch and the sub-switch according to the time of receiving the response data, the time of sending clock synchronization data to the sub-switch and the time length of timing in the second sub-module when any lower-level circulation port receives the response data fed back by the sub-switch.
Referring to fig. 7, when it is known that the current switch is a root switch or a branch switch, the manner of calculating the measured link delay by the third sub-module of the current switch is as follows:
Figure BDA0003338650080000141
in the formula, t 1 For the moment, t, at which the switch forwards the clock-synchronized data Sync to the sub-switches 2 For the moment, T, when the local exchange receives the feedback of the sub-exchange to respond to the data Ack cal Timing duration, t, in the second submodule delay Measured link delay calculated for the third sub-module.
Thus, the measured link delay between each two adjacent switches in the target network is known. Therefore, the link delay can be taken into account when the exchange data is subsequently transmitted and received between the exchangers, so that the timeliness of the exchange data in the transmission process can be accurately and effectively ensured.
Preferably, the timing in the second submodule is preferably not less than 1024 ns. For example preferably 2 microseconds. It will be appreciated that this limitation is also in order to meet the requirements for the shortest communication frame in current ethernet protocols, and may not be necessary in future networks.
Based on the link delay test module, the network switch provided by the embodiment of the invention can acquire the link delay between the network switch and the adjacent switch in a hardware actual measurement mode; that is to say, the network switch provided by the embodiment of the present invention can implement a network-wide single clock by means of hard clock synchronization. Because the precision of the hard clock synchronization is only determined by the working frequency of the hardware physical chip, the clock synchronization effect with ultra-high precision can be achieved, for example, the ultra-high clock synchronization precision of about 8 nanoseconds can be achieved by using a high-speed chip with the working frequency of 133 MHz; this provides the advantage of strong real-time performance for the target network formed by the network switches provided by the embodiments of the present invention.
In one embodiment, the link delay test module may be triggered multiple times in succession, so as to obtain multiple measured link delays between the switch and each sub-switch in the third sub-module. In this way, the third sub-module may be further configured to determine a reference link delay between the local switch and each sub-switch based on a plurality of measured link delays between the local switch and the sub-switch. It will be appreciated that the reference link delay is more accurate than the measured link delay for a single test.
The third sub-module may calculate, for each sub-switch of the local switch, an average value of multiple actually measured link delays between the local switch and the sub-switch, and use the average value as a reference link delay between the local switch and the sub-switch. Or, the third sub-module may, for each sub-switch, use a preset screening rule to screen the actual measured link delay meeting the requirement from the multiple actual measured link delays between the sub-switch and the switch, and then obtain an average value of the screened actual measured link delays to serve as the reference link delay between the sub-switch and the switch. The screening rules may be various, and the main function is to remove abnormal link delay data, which is not limited in the embodiment of the present invention.
In an embodiment, as shown in fig. 8, a network switch provided in an embodiment of the present invention further includes: a clock synchronization module; the clock synchronization module is used for calculating the time stamp of the exchange data received by the lower circulation port according to the actually measured link delay between the switch and the sub-switch so as to perform clock synchronization with the target network. Specifically, the time when the lower-level flow port receives the exchange data is subtracted by the actually measured link delay between the sub-switch and the sub-switch, so that the time stamp of the exchange data can be calculated. Therefore, the time stamp of the exchange data circulating in the target network is generated under the unified clock mechanism, and the whole network clock synchronization can be realized.
In summary, the network switch provided in the embodiments of the present invention can make a digital system "more physically distributed" and "more information concentrated", form a data circulation mechanism among the switches, perform fast autonomous networking according to a randomly connected physical network, so that the network converges fast, use a single clock in the whole network, and have an accuracy exceeding clock synchronization, thereby building a strong real-time network/system.
It should be noted that the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the description of the specification, reference to the description of the term "one embodiment", "some embodiments", "an example", "a specific example", or "some examples", etc., means that a particular feature or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples described in this specification can be combined and combined by those skilled in the art. While the present application has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a review of the drawings, the disclosure, and the appended claims.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (8)

1. A network switch is characterized in that the switch comprises an ad hoc network module, a data sequencing module and a plurality of hardware cascade ports; wherein the content of the first and second substances,
after any hardware cascade port is started, the self-organizing network module is configured to be a circulation port or a shielding port according to the physical connection relation between the switch and a target network; the network topology of the target network is a tree structure; only one upper-level circulation port in each circulation port is connected with the only father switch in the upper level, and the rest lower-level circulation ports are respectively connected with the sub switches in the lower level;
each lower-level circulation port is used for receiving the switching data sent by each sub-switch in parallel;
the data sorting module is used for sorting the exchange data received by each lower-level circulation port according to a preset sorting rule;
the upper circulation port is used for sending the switching data sequenced by the data sequencing module to a father switch and receiving the switching data sent by the father switch;
each lower-level circulation port is further configured to send, in parallel and synchronously, to each child switch, the switching data that the upper-level circulation port receives from the parent switch;
the target network is constructed by an original physical network; the switches in the physical network can be arbitrarily interconnected;
the ad hoc network module comprises: the device comprises a first decision module, a protocol data updating module, a second decision module and a port management module;
in the process of establishing the target network by the physical network:
each hardware cascade port is used for sending protocol data to a neighbor switch in the physical network and receiving the protocol data sent by the neighbor switch by taking a period as a unit until the number of the periods reaches an upper limit; wherein the upper limit is equal to or greater than an expected number of layers of the physical network; the protocol data carries the ID of the data sender, the ID of the root switch identified by the data sender and the hierarchy of the data sender relative to the identified root switch;
the first decision module is used for deciding a new root switch according to the ID of the root switch identified by the switch and the ID of the root switch identified by each neighbor switch in each period; each switch in the physical network is powered on, namely the switch is defaulted to be a root switch;
the protocol data updating module is used for responding to the first decision module to decide out a new root switch in each period and updating the hierarchy in the protocol data to be sent to the neighbor switch in the next period and the ID of the root switch;
the second decision module is used for deciding a parent switch of the switch from the neighbor switches according to the IDs and the levels of the neighbor switches when the number of the periods reaches the upper limit and the switch is not the root switch;
the port management module is used for shielding the ports of the switch connected with the switches at the same level when the number of the periods reaches the upper limit and the switch is not a root switch; and the second decision module is also used for shielding the port of the non-father switch in the upper level connected with the switch after the second decision module finishes working.
2. The network switch according to claim 1, wherein the data sorting module sorts the switching data received by each of the circulation ports according to a preset sorting rule, and includes:
sequencing the exchange data received by each circulation port according to a sequencing rule of priority primary and timestamp secondary of the exchange data;
the exchange data with high priority is arranged in front, the exchange data with low priority is arranged behind, the exchange data with old time stamp is arranged in front, and the exchange data with new time stamp is arranged behind.
3. The network switch of claim 1, wherein the switch further comprises: a link delay test module; the link delay test module comprises: a first sub-module, a second sub-module, and a third sub-module;
the first sub-module is started when the port management module finishes working and the switch is a root switch, and is used for issuing clock synchronization data through each lower-level circulation port;
the second sub-module is started when the port management module finishes working and the switch is a branch switch, and is used for forwarding clock synchronization data to each sub-switch through each lower-level circulation port when the upper-level circulation port receives the clock synchronization data sent by the parent switch, starting timing and feeding back response data to the parent switch through the upper-level circulation port when timing is finished;
and the third sub-module is started when the port management module finishes working and the switch is a root switch or a branch switch, and is used for calculating and recording the actually measured link delay between the switch and the sub-switch according to the time of receiving the response data, the time of sending clock synchronization data to the sub-switch and the time length of timing when any lower-level circulation port receives the response data fed back by the sub-switch.
4. The network switch of claim 3, wherein the switch further comprises: a clock synchronization module;
and the clock synchronization module is used for calculating the time stamp of the exchange data received by the lower circulation port according to the actually measured link delay between the local switch and the sub-switch so as to perform clock synchronization with the target network.
5. The network switch of claim 3, wherein the length of the period and the duration of the timing are neither less than 1024 nanoseconds.
6. The network switch of claim 3, wherein the length of the period and the duration of the timing are both 2 microseconds.
7. The network switch of claim 1, wherein the ID is a MAC address;
the first decision-making module decides a new root switch according to the ID of the root switch recognized by the switch and the ID of the root switch recognized by each neighbor switch, including:
and selecting the switch with the minimum MAC address from the MAC address of the root switch determined by the switch and the MAC address of the root switch determined by each neighbor switch as a new root switch.
8. The network switch of claim 3, wherein the measured link delay is calculated by:
Figure FDA0003708216010000041
wherein, t 2 Time t of receiving response data fed back from the sub-switch for the lower port 1 Time of forwarding clock synchronization data to the sub-switch for the subordinate port, T cal Duration of said timing, t delay Is the calculated measured link delay.
CN202111301925.6A 2021-11-04 2021-11-04 Network switch Active CN114040262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111301925.6A CN114040262B (en) 2021-11-04 2021-11-04 Network switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111301925.6A CN114040262B (en) 2021-11-04 2021-11-04 Network switch

Publications (2)

Publication Number Publication Date
CN114040262A CN114040262A (en) 2022-02-11
CN114040262B true CN114040262B (en) 2022-08-05

Family

ID=80142886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111301925.6A Active CN114040262B (en) 2021-11-04 2021-11-04 Network switch

Country Status (1)

Country Link
CN (1) CN114040262B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103947159A (en) * 2011-10-18 2014-07-23 施耐德电气建筑有限公司 Self-healing communications network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7240105B2 (en) * 2001-01-26 2007-07-03 International Business Machines Corporation Distributed multicast caching technique
CN1668023A (en) * 2004-03-10 2005-09-14 浙江大学 Network architecture and transmission method suitable for digital media release service
CN100588180C (en) * 2007-09-30 2010-02-03 中控科技集团有限公司 Packet forward method and switch
CN109936480B (en) * 2019-03-19 2020-09-15 鹏城实验室 Network topology discovery method and device, storage medium and electronic equipment
CN110620683B (en) * 2019-08-30 2021-03-23 华为技术有限公司 Message sending method, device and system applied to distributed router networking

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103947159A (en) * 2011-10-18 2014-07-23 施耐德电气建筑有限公司 Self-healing communications network

Also Published As

Publication number Publication date
CN114040262A (en) 2022-02-11

Similar Documents

Publication Publication Date Title
US6243756B1 (en) Network device with unified management
US7733789B1 (en) Remote monitoring of switch network
US5802054A (en) Atomic network switch with integrated circuit switch nodes
US6459700B1 (en) Multiple segment network device configured for a stacked arrangement
US5392285A (en) Cascading twisted pair ethernet hubs by designating one hub as a master and designating all other hubs as slaves
CN100527697C (en) Means and a method for switching data packets or frames
US20080089245A1 (en) Automated multiple-instance spanning tree reconfiguration
CN105022717A (en) Network on chip resource arbitration method and arbitration unit of additional request number priority
CN113316091B (en) Information sending method and device applied to unmanned aerial vehicle cluster
CN110830394B (en) Method for generating routing table based on RapidIO network
CN102546417A (en) Scheduling method of network-on-chip router based on network information
JPH06237256A (en) Fddi station bypass device
CN114070448B (en) Main clock selection method based on multi-attribute decision
CN113726879B (en) Hybrid data center network system VHCN based on VLC link
CN114040262B (en) Network switch
CN114221781A (en) Flow filtering method and system, electronic device and storage medium
CN111740922A (en) Data transmission method, device, electronic equipment and medium
CN115037669B (en) Cross-domain data transmission method based on federal learning
CN114039909B (en) Method for realizing rapid real-time spanning tree protocol
CN112910795B (en) Edge load balancing method and system based on many sources
Mills et al. Highball: a high speed, reserved-access, wide area network
CN116319549B (en) Distributed flow scheduling method and device
CN114039692B (en) Hard clock synchronization method
CN107249147B (en) Information synchronization method and system in a kind of automatically switching optical networks
EP3618317A1 (en) Message sending method and message receiving method and apparatus

Legal Events

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