CN113055265B - Method and device for realizing coexistence and synchronization of multiple Ethernet ring protocols - Google Patents

Method and device for realizing coexistence and synchronization of multiple Ethernet ring protocols Download PDF

Info

Publication number
CN113055265B
CN113055265B CN202110302070.2A CN202110302070A CN113055265B CN 113055265 B CN113055265 B CN 113055265B CN 202110302070 A CN202110302070 A CN 202110302070A CN 113055265 B CN113055265 B CN 113055265B
Authority
CN
China
Prior art keywords
instance
hardware
software
vlan
instances
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
CN202110302070.2A
Other languages
Chinese (zh)
Other versions
CN113055265A (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202110302070.2A priority Critical patent/CN113055265B/en
Publication of CN113055265A publication Critical patent/CN113055265A/en
Application granted granted Critical
Publication of CN113055265B publication Critical patent/CN113055265B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/437Ring fault isolation or reconfiguration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Abstract

The invention relates to the technical field of communication, and discloses a method and a device for realizing coexistence and synchronization of a plurality of Ethernet ring protocols. The method comprises the following steps: distributing a software instance for each instance of the ring network protocol; issuing vlan configuration of each instance of the looped network protocol to a corresponding software instance; the vlan in the software instance is mapped to the hardware instance according to the algorithm, and by the method, the conflict that a plurality of ring network protocols simultaneously use the same vlan to map the valn to different hardware instance tables can be solved, and the coexistence of the plurality of ring network protocols can be realized under the condition of limited hardware resources.

Description

Method and device for realizing coexistence and synchronization of multiple Ethernet ring protocols
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for implementing coexistence and synchronization of multiple ethernet ring protocols.
Background
Common ring protocols of the Ethernet switch include STP/RSTP/MSTP/VBST, G.8031, G.8032, EAPS, loopcheck, smartlink and the like, and currently, the popular method is to adopt a mutual exclusion method of different ring protocols to avoid the simultaneous operation of different ring protocols. Therefore, a problem needs to be solved that different ring protocols cannot run simultaneously.
Existing switch chips only have spanning tree hardware entries that are much smaller than the number of VLANs, and due to hardware resource limitations (generally <128/256/512), multiple VLANs are often employed to map to one spanning tree hardware entry, and the same VLAN is required to map to the same spanning tree hardware entry.
At present, the conventional method of the ring protocol and the hardware table entry is that the VLAN of the ring protocol is directly mapped with the hardware table entry, and when a plurality of ring protocols use the same VLAN, the same VLAN is mapped to different hardware table entries, which causes the hardware table entry to collide and cannot be processed.
Disclosure of Invention
Therefore, in order to solve the above technical problems, it is necessary to provide a method and an apparatus for implementing coexistence and synchronization of multiple ethernet ring protocols, which can not only solve the conflict that valn of multiple ring protocols using the same vlan is mapped to different hardware instance tables, but also implement coexistence of multiple ring protocols under the condition of limited hardware resources.
In a first aspect, an embodiment of the present invention provides a method for implementing coexistence and synchronization of multiple ethernet ring protocols, where the method includes:
distributing a software instance for each instance of the ring network protocol;
issuing the vlan configuration of each instance of the ring network protocol to the corresponding software instance;
and mapping the vlan in the software instance to the hardware instance according to an algorithm.
In some embodiments, the method further comprises:
issuing port state information of the instance of the ring network protocol to the corresponding software instance;
and issuing the port state information of the software instance to the corresponding hardware instance.
In some embodiments, the mapping the vlan in the software instance to the hardware instance according to an algorithm includes:
merging the same vlan between different ones of said software instances into one hardware instance based on the vlan configuration in said software instances, an
And respectively allocating a single hardware instance to the different remaining vlans in the different software instances according to the vlan configuration in the software instances.
In some embodiments, said merging the same vlan among different software instances into one hardware instance according to the vlan configuration in the software instance, and allocating a separate hardware instance to each of the different remaining vlans in different software instances according to the vlan configuration in the software instance includes:
traversing the software instances in the software instance table aiming at each vlan, and obtaining each software instance corresponding to the vlan according to the vlan configuration in the software instances;
and traversing the hardware instances in the hardware instance table, if the software instances recorded in the hardware instances are the same as the software instances corresponding to the vlan, mapping the vlan to the hardware instances, otherwise, creating a new hardware instance, and mapping the vlan to the new hardware instances.
In some embodiments, the method further comprises:
adding the new hardware instance into a new hardware instance table;
comparing the vlan of the new hardware instance in the new hardware instance table with the vlan of the hardware instance in the hardware instance table;
and deleting the hardware instances corresponding to the different vlans in the hardware instance table, and adding the hardware instances in the new hardware instance table to the hardware instance table.
In some embodiments, the method further comprises:
and emptying the new hardware instance table.
In some embodiments, the method further comprises:
and issuing the port state information in the hardware instance to hardware.
In a second aspect, an embodiment of the present invention further provides an apparatus for implementing coexistence and synchronization of multiple ethernet ring protocols, including:
the distribution module is used for distributing a software instance for each instance of the ring network protocol;
the issuing module is used for issuing the vlan configuration of each instance of the ring network protocol to the corresponding software instance;
and the mapping module is used for mapping the vlan in the software instance to the hardware instance according to an algorithm.
In a third aspect, an embodiment of the present invention further provides a network device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the above-described method.
In a fourth aspect, the embodiments of the present invention also provide a non-transitory computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the processor is caused to execute the above method.
Compared with the prior art, the invention has the beneficial effects that: different from the situation in the prior art, the method and the device for realizing coexistence and synchronization of multiple ethernet ring protocols in the embodiment of the present invention allocate a software instance to each instance of a ring network protocol, issue a vlan configuration of each instance of the ring network protocol to the corresponding software instance, and map the vlan in the software instance to a hardware instance according to an algorithm.
Drawings
One or more embodiments are illustrated by corresponding figures in the drawings, which are not to be construed as limiting the embodiments, unless expressly stated otherwise, and the drawings are not to scale.
FIG. 1 is a diagram of a hardware configuration of a network device in one embodiment of the invention;
FIG. 2 is a flow chart illustrating a method for implementing coexistence and synchronization of multiple Ethernet ring protocols in one embodiment of the present invention;
FIG. 3 is a diagram illustrating the mapping effect according to an embodiment of the present invention;
FIG. 4 is a detailed flow diagram for algorithmically mapping vlans in a software instance to a hardware instance in accordance with one embodiment of the invention;
FIG. 5 is a schematic flow chart illustrating a comparison of vlans of hardware instances in different hardware instance tables according to an embodiment of the present invention;
FIG. 6 is a detailed flow diagram for algorithmically mapping vlans in a software instance to a hardware instance in accordance with one embodiment of the invention;
fig. 7 is a schematic structural diagram of an apparatus for implementing coexistence and synchronization of multiple ethernet ring protocols according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, if not conflicted, the various features of the embodiments of the invention may be combined with each other within the scope of protection of the invention. Additionally, while functional block divisions are performed in device schematics, with logical sequences shown in flowcharts, in some cases, steps shown or described may be performed in a different order than the block divisions in devices, or in flowcharts. The terms "first", "second", "third", and the like used in the present invention do not limit data and execution order, but distinguish the same items or similar items having substantially the same function and action.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a network device according to an embodiment of the present invention, where the network device 100 may be any type of device with a forwarding function, for example: and (4) a switch. The single-board type switch comprises a main control which is a main control, and the rack type switch comprises two main controls, wherein one main control is a main control, and the other main control is a standby control.
In particular, how shown in FIG. 1, the network device 100 includes one or more processors 102 and memory 104. One processor 102 is illustrated in fig. 1. The processor 102 and the memory 104 may be connected by a bus or other means, such as by a bus in FIG. 1.
The memory 104 is a non-volatile computer-readable storage medium and can be used for storing non-volatile software programs, non-volatile computer-executable programs, and modules, such as programs, instructions, and modules corresponding to the method for implementing coexistence and synchronization of multiple ethernet ring protocols in the embodiments of the present invention. The processor 102 executes various functional applications of the network device and data processing by executing nonvolatile software programs, instructions, and modules stored in the memory 104, that is, implements the method of implementing coexistence and synchronization of multiple ethernet ring protocols in the embodiments described below.
The memory 104 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to device usage that enables coexistence and synchronization of a plurality of ethernet ring protocols, and the like. Further, the memory 104 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 104 may optionally include memory remotely located from the processor 102, and these remote memories may be networked to devices that enable coexistence and synchronization of multiple ethernet ring protocols. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
As shown in fig. 2, an embodiment of the present invention provides a method for implementing coexistence and synchronization of multiple ethernet ring protocols, where the method is performed by a network device, and the method includes:
step 202, a software instance is allocated to each instance of the ring network protocol.
In the embodiment of the invention, the settings of vlan addition, deletion, port forwarding and discarding of the instance of the ring network protocol are all pre-stored in the software instance, and different software instances are distinguished by using integer IDs, wherein if the multi-master control system does not require the master system and the slave system to be consistent. Specifically, each instance of each ring network protocol applies for and allocates one software instance, and the network device allocates one software instance for each instance of each ring network protocol.
And 204, issuing the vlan configuration of each instance of the ring network protocol to the corresponding software instance.
Each instance of a network protocol includes one or more vlans. Illustratively, as shown in fig. 3, the ring network protocol 1 includes an instance 1 and an instance 2, where vlans configured in the instance 1 are vlans 1-3, 5, and 7, and vlans configured in the instance 2 are vlans 4, 6, and 8-10; the ring network protocol 2 comprises an example 1 and an example 2, the vlan configured by the example 1 is vlan1-3, 5 and 7, and the vlan configured by the example 2 is vlan4, 6 and 8-10; the ring network protocol 3 includes an example 1 and an example 2, the vlan configured in the example 1 is vlan1-10, the vlan configured in the example 2 is vlan11, and then the vlan configuration of each example of the ring network protocol is issued to the corresponding software example, specifically, the vlan configuration of the example 1 in the ring network protocol 1 is issued to the software example 1, the vlan configuration of the example 2 in the ring network protocol 1 is issued to the software example 2, and the vlan configuration of the example 1 in the ring network protocol 2 is issued to the software example 3 until all the vlan configurations of the examples in the ring network protocol are issued completely.
In some embodiments, in addition to issuing vlan configuration of each instance of the ring network protocol to the corresponding software instance, it is also necessary to issue port state information of each instance of the ring network protocol to the corresponding software instance.
Specifically, each instance of the ring network protocol includes not only vlan configuration but also port state information. Taking the above example as reference, as shown in fig. 3, example 1 under ring network protocol 1 includes PORT1 and PORT2, where PORT1, i.e., PORT 1: FWD, PORT2 or PORT 2: DROP, which issues port1 and port2 to software example 1; example 2 under ring network protocol 1 includes PORT3 and PORT4, where PORT3, PORT 3: FWD, PORT4 or PORT 4: DROP, port3 and port4 are issued to software instance 2. Example 1 under ring network protocol 2 includes PORT5 and PORT6, PORT5 being PORT 5: FWD, PORT6 or PORT 6: DROP, issuing port5 and port6 to software instance 3; example 2 under ring network protocol 2 includes PORT7 and PORT8, where PORT7 is PORT 7: FWD, PORT8, PORT 8: DROP, port7 and port8 are issued to software instance 4. Example 1 under ring network protocol 3 includes PORT9 and PORT10, where PORT9, PORT 9: FWD, PORT10, PORT 10: DROP, issuing port9 and port10 to software instance 5; example 2 under ring network protocol 3 includes PORT11 and PORT12, where PORT11, PORT 11: FWD, PORT12, PORT 12: DROP, port11 and port12 are issued to software instance 6.
Step 206, mapping the vlan in the software instance to the hardware instance according to an algorithm.
In embodiments of the present invention, the hardware instances, each associated with one or more vlans, are the smallest units that control forwarding, dropping. Specifically, mapping the valn in the software instance to the hardware instance according to the algorithm needs to satisfy several conditions, one of which requires that the mapping from the vlan in the software instance to the hardware instance is the same every time of calculation, and solves the problem of synchronization between the software instance and the hardware instance between the masters. In the active/standby environment, the data of the active main control and the standby main control are required to be completely consistent, so that no error occurs when the standby main control is switched to the active main control. Secondly, the mapping from the vlan in the software instance to the hardware instance needs to realize asynchronous calculation, and hardware instance oscillation caused by frequent addition or deletion of the vlan in the software instance is solved. Specifically, when the vlan in the software instance is mapped to the hardware instance according to the algorithm, the algorithm is not directly run in the operation, but the operation is directly returned to completion after the software table entry is saved in the operation. And then, calculation is carried out through an asynchronous mechanism, such as a timer, so that quick return can be realized, the blocking time of upper-layer application is reduced, and secondly, merging operation can be carried out on frequently issued hardware, thereby being beneficial to issuing the hardware in subsequent batches. Thirdly, each hardware instance needs to comprise as many vlans as possible so as to reduce the resource occupation of the hardware instance.
In some embodiments, in addition to mapping the vlan in the software instance to the hardware instance according to the algorithm, the port state information of the software instance needs to be issued to the hardware instance according to the above method.
Specifically, the purpose of the ring network protocol is to control the opening and closing of an interface, and open and close hardware through a port state, so as to realize the passing and discarding of traffic. Taking the above example in mind, as shown in fig. 3, the PORT1 in software instance 1 is: FWD, PORT 2: DROP; PORT5 in software example 3: FWD, PORT 6: DROP; PORT9 in software example 5: FWD, PORT 10: DROP is issued to hardware instance 1, and similarly, PORT3 in software instance 2: FWD, PORT 4: DROP; PORT7 in software example 4: FWD, PORT 8: DROP; PORT9 in software example 5: FWD, PORT 10: and the DROP is issued to the hardware instance 2 until all the port state information of all the software instances is issued to the corresponding hardware instances.
In some embodiments, as an implementation of step 206, comprises: merging the same vlan between different software instances into one hardware instance according to the vlan configuration in the software instances, and respectively allocating a separate hardware instance to the different remaining vlans in different software instances according to the vlan configuration in the software instances.
As shown in FIG. 3, in connection with the above examples, software instance 1 includes vlans 1-3, 5, 7, software instance 2 includes vlans 4, 6, 8-10, software instance 3 includes vlans 1-3, 5, 7, software instance 4 includes vlans 4, 6, 8-10, software instance 5 includes vlans 1-10, software instance 6 includes vlans 11, vlans in software instances are algorithmically mapped to hardware instances, specifically, the same vlans between different software instances are merged into one hardware instance according to the vlan configuration of the software instance, and the remaining different vlans in each software instance are respectively allocated to a separate hardware instance according to the vlan configuration in the software instance, i.e., vlans 1-3, 5, 7 in software instance 1, software instance 3 and software instance 5 are merged into hardware instance 1, and vlans 4 in software instance 2, software instance 4 and software instance 5 are merged into hardware instance 1, 6. 8-10 are merged into hardware instance 2 and vlan11 in software instance 6 is assigned to hardware instance 3.
In some embodiments, as shown in fig. 4, the merging the same vlan between different software instances into one hardware instance according to the vlan configuration in the software instance, and allocating a separate hardware instance to the different remaining vlans in different software instances according to the vlan configuration in the software instance respectively includes:
step 402, traversing the software instances in the software instance table for each vlan, and obtaining each software instance corresponding to the vlan according to the vlan configuration in the software instances.
In the embodiment of the invention, the software instance table comprises all the software instances, the software instances in the software instance table are traversed aiming at each vlan, and the software instances corresponding to the vlans are obtained according to the vlan configuration in the software instances. Illustratively, each calculation starts with vlan-1 and ends with vlan-4094. Firstly, clearing a software instance table corresponding to the vlan, traversing the software instance with the software instance of 1 in the software instance table, judging whether the vlan exists in the software instance with the software instance of 1, if so, recording the software instance corresponding to the vlan through the software instance table, and then continuously judging whether the software instance in the software instance table is traversed and ended. And if the vlan does not exist in the software instance with the software instance 1, judging whether the software instance in the software instance table is traversed and ended, if so, executing the step 404, and if not, continuously judging whether the vlan exists in the software instance with the software instance 2.
And step 404, traversing the hardware instances in the hardware instance table, mapping the vlan to the hardware instances if the software instances recorded in the hardware instances are the same as the software instances corresponding to the vlan, otherwise, creating a new hardware instance, and mapping the vlan to the new hardware instances.
In embodiments of the present invention, each hardware instance records an ID of the software instance that maps the vlan to the hardware instance. Specifically, the above example is carried out, the hardware instance with the hardware instance equal to 1 in the hardware instance table is traversed, if the software instance recorded in the hardware instance equal to 1 is the same as each software instance corresponding to the vlan, the vlan is mapped to the hardware instance, then whether the vlan is smaller than 4094 is continuously determined, if the vlan is smaller than the vlan, the vlan equal to 2 is continuously calculated until the vlan is larger than or equal to 4094, and then step 504 is executed. And if the software instances recorded in the hardware instance 1 are different from the software instances corresponding to the vlan, sequentially traversing all the hardware instances in the hardware instance table, if the software instances are different from the software instances corresponding to the vlan, creating a new hardware instance, and mapping the vlan to the new hardware instance.
In some embodiments, as shown in fig. 5, the method further comprises:
step 502, add the new hardware instance to a new hardware instance table.
Specifically, the new hardware instance table includes all new hardware instances, and after the vlan is mapped to a new hardware instance, the new hardware instance is added to the new hardware instance table.
Step 504, comparing the vlan of the new hardware instance in the new hardware instance table with the vlan of the hardware instance in the hardware instance table.
And determining the hardware instances in the hardware instance table and the hardware instances in the new hardware instance table through vlan comparison, wherein the vlan of each hardware instance cannot be the same as the vlans of other hardware instances.
Step 506, deleting the hardware instances corresponding to the different vlans in the hardware instance table, and adding the hardware instances in the new hardware instance table to the hardware instance table.
And comparing the vlan of the new hardware instance in the new hardware instance table with the vlan of the hardware instance in the hardware instance table to determine the different hardware instances, deleting the hardware instance corresponding to the vlan in the hardware instance table at the last time for the different hardware instances, and adding the hardware instance in the new hardware instance table to the hardware instance table. In addition, no operation is performed for the hardware instance having no difference.
In some embodiments, the method further comprises: and emptying the new hardware instance table.
Specifically, each calculation of the new hardware instance table, i.e., the temporary hardware instance table, is an empty table, and after the hardware instance in the new hardware instance table is added to the hardware instance table, the new hardware instance table is emptied.
In some other embodiments, the method further comprises: and issuing the port state information in the hardware instance to hardware.
And when the mapping from the vlan to the hardware instance is completely finished, the port state information in the hardware instance is issued to the hardware, so that the passing and discarding of the flow are realized.
In the embodiment of the invention, a software instance is distributed for each instance of the ring network protocol, then the vlan configuration of each instance of the ring network protocol is issued to the corresponding software instance, and then the vlan in the software instance is mapped to the hardware instance according to the algorithm, so that the conflict that valn generated by using the same vlan by a plurality of ring network protocols simultaneously is mapped to different hardware instance tables can be solved, and the coexistence of a plurality of ring network protocols can be realized under the condition of limited hardware resources, thereby saving the hardware resources to run more ring network protocol instances.
To facilitate understanding of the mapping algorithm of the present invention, the following description will be made of how vlans in a software instance are mapped to a hardware instance, as shown in fig. 6,
s600, starting with vlan1, proceeding to S601;
s601, emptying a software instance table corresponding to the vlan, and turning to S602;
s602, starting from the software instance 1, going to S603;
s603, judging whether to add the vlan, if so, turning to S604, otherwise, turning to S605;
s604, recording a software instance corresponding to the vlan through a software instance table, and turning to S605;
s605, determining whether all the software instances in the software instance table have been traversed, if so, going to S606, otherwise going to S602, and starting to traverse from the software instance of 2;
s606, starting from the hardware instance 1, go to S607;
s607, judging whether the software instance recorded in the hardware instance is the same as each software instance corresponding to the vlan, if so, turning to S608, otherwise, turning to S609;
s608, mapping the vlan to the hardware instance, and turning to S610;
step 609, judging whether all the hardware instances in the hardware instance table are traversed, if so, turning to step 611, otherwise, turning to step 606, and starting traversal from the step 2;
s610, determining whether vlan is smaller than 4094, if yes, going to step S600, starting to calculate from vlan 2, otherwise, going to S612;
s611, creating a new hardware instance, and turning to S610;
s612, comparing the vlan of the new hardware instance in the new hardware instance table with the vlan of the hardware instance in the hardware instance table, deleting the hardware instances corresponding to the vlans having a difference in the hardware instance table, adding the hardware instance in the new hardware instance table to the hardware instance table, and going to S613;
s613, emptying the new hardware instance table.
Correspondingly, an embodiment of the present invention further provides an apparatus 700 for implementing coexistence and synchronization of multiple ethernet ring protocols, as shown in fig. 7, including:
an allocating module 702, configured to allocate a software instance for each instance of the ring network protocol;
the issuing module 704 is configured to issue the vlan configuration of each instance of the ring network protocol to the corresponding software instance;
and a mapping module 706, configured to map the vlan in the software instance to a hardware instance according to an algorithm.
In the embodiment of the invention, a software instance is allocated to each instance of the ring network protocol through an allocation module, then the vlan of each instance of the ring network protocol is allocated to the corresponding software instance through an issuing module, and then the vlan in the software instance is mapped to the hardware instance through a mapping module according to an algorithm, so that the conflict that a plurality of ring network protocols simultaneously use the same vlan to map valn to different hardware instance tables can be solved, and the coexistence of a plurality of ring network protocols can be realized under the condition of limited hardware resources, thereby saving the hardware resources to run more ring network protocol instances.
Optionally, in other embodiments of the apparatus, as shown in fig. 7, the issuing module 704 may further be configured to:
issuing port state information of the instance of the ring network protocol to the corresponding software instance;
and issuing the port state information of the software instance to the corresponding hardware instance.
And issuing the port state information in the hardware instance to hardware.
Optionally, in other embodiments of the apparatus, as shown in fig. 7, the mapping module 706 is specifically configured to:
merging the same vlan between different ones of said software instances into one hardware instance based on the vlan configuration in said software instances, an
And respectively allocating a single hardware instance to the different remaining vlans in the different software instances according to the vlan configuration in the software instances.
Traversing the software instances in the software instance table aiming at each vlan, and obtaining each software instance corresponding to the vlan according to the vlan configuration in the software instances;
and traversing the hardware instances in the hardware instance table, if the software instances recorded in the hardware instances are the same as the software instances corresponding to the vlan, mapping the vlan to the hardware instances, otherwise, creating a new hardware instance, and mapping the vlan to the new hardware instances.
Optionally, in another embodiment of the apparatus, as shown in fig. 7, the apparatus 700 further includes:
a join module 708 configured to join the new hardware instance to a new hardware instance table;
a comparing module 710, configured to compare the vlan of the new hardware instance in the new hardware instance table with the vlan of the hardware instance in the hardware instance table;
a deleting module 712, configured to delete the hardware instances corresponding to the different vlans in the hardware instance table, and add the hardware instances in the new hardware instance table to the hardware instance table.
Optionally, in another embodiment of the apparatus, as shown in fig. 7, the apparatus 700 further includes:
a flush module 714 configured to flush the new hardware instance table.
It should be noted that the apparatus for implementing coexistence and synchronization of multiple ethernet ring protocols may execute the method for implementing coexistence and synchronization of multiple ethernet ring protocols provided in the embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method.
Embodiments of the present invention further provide a non-transitory computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by one or more processors, the one or more processors may execute the method for implementing coexistence and synchronization of multiple ethernet ring protocols in any of the method embodiments.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and these modifications or substitutions do not depart from the spirit of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for implementing coexistence and synchronization of multiple ethernet ring protocols, the method comprising:
distributing a software instance for each instance of the ring network protocol;
issuing the vlan configuration of each instance of the ring network protocol to the corresponding software instance;
merging the same vlan between different ones of said software instances into one hardware instance based on the vlan configuration in said software instances, an
And respectively allocating a single hardware instance to the different remaining vlans in the different software instances according to the vlan configuration in the software instances.
2. The method of claim 1, further comprising:
issuing port state information of the instance of the ring network protocol to the corresponding software instance;
and issuing the port state information of the software instance to the corresponding hardware instance.
3. The method as claimed in claim 1, wherein said merging the same vlan among different said software instances into one hardware instance based on the vlan configuration among said software instances, and allocating a separate hardware instance to each of the different remaining vlans in different said software instances based on the vlan configuration among said software instances comprises:
traversing the software instances in the software instance table aiming at each vlan, and obtaining each software instance corresponding to the vlan according to the vlan configuration in the software instances;
and traversing the hardware instances in the hardware instance table, if the software instances recorded in the hardware instances are the same as the software instances corresponding to the vlan, mapping the vlan to the hardware instances, otherwise, creating a new hardware instance, and mapping the vlan to the new hardware instances.
4. The method of claim 3, further comprising:
adding the new hardware instance into a new hardware instance table;
comparing the vlan of the new hardware instance in the new hardware instance table with the vlan of the hardware instance in the hardware instance table;
and deleting the hardware instances corresponding to the different vlans in the hardware instance table, and adding the hardware instances in the new hardware instance table to the hardware instance table.
5. The method of claim 4, further comprising:
and emptying the new hardware instance table.
6. The method according to any one of claims 2-5, further comprising:
and issuing the port state information in the hardware instance to hardware.
7. An apparatus for implementing coexistence and synchronization of multiple ethernet ring protocols, comprising:
the distribution module is used for distributing a software instance for each instance of the ring network protocol;
the issuing module is used for issuing the vlan configuration of each instance of the ring network protocol to the corresponding software instance;
a mapping module for merging the vlan configuration in said software instance with the same vlan across different said software instances into one hardware instance, an
And respectively allocating a single hardware instance to the different remaining vlans in the different software instances according to the vlan configuration in the software instances.
8. A network device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1-6.
CN202110302070.2A 2021-03-22 2021-03-22 Method and device for realizing coexistence and synchronization of multiple Ethernet ring protocols Active CN113055265B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110302070.2A CN113055265B (en) 2021-03-22 2021-03-22 Method and device for realizing coexistence and synchronization of multiple Ethernet ring protocols

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110302070.2A CN113055265B (en) 2021-03-22 2021-03-22 Method and device for realizing coexistence and synchronization of multiple Ethernet ring protocols

Publications (2)

Publication Number Publication Date
CN113055265A CN113055265A (en) 2021-06-29
CN113055265B true CN113055265B (en) 2022-07-08

Family

ID=76514455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110302070.2A Active CN113055265B (en) 2021-03-22 2021-03-22 Method and device for realizing coexistence and synchronization of multiple Ethernet ring protocols

Country Status (1)

Country Link
CN (1) CN113055265B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865637A (en) * 2019-04-30 2020-10-30 烽火通信科技股份有限公司 Fault recovery method and system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8223668B2 (en) * 2006-12-14 2012-07-17 Rockstar Bidco Lp Method and apparatus for exchanging routing information and the establishment of connectivity across multiple network areas
CN101815107B (en) * 2010-05-13 2013-10-09 华为技术有限公司 Method, system and equipment for managing address in Ethernet ring
WO2012092262A1 (en) * 2010-12-28 2012-07-05 Citrix Systems, Inc. Systems and methods for vlan tagging via cloud bridge
US20140301185A1 (en) * 2011-04-15 2014-10-09 Hangzhou H3C Technologies Co., Ltd Handling a fault in an ethernet ring network
CN102497324B (en) * 2011-12-22 2015-09-23 杭州华三通信技术有限公司 Data transmission method between a kind of different Multiple Spanning Tree (MST) region and equipment
CN103200071B (en) * 2013-04-07 2016-05-04 杭州华三通信技术有限公司 A kind of many example calculation of MSTP method and apparatus
CN103685029B (en) * 2013-12-06 2016-08-17 杭州华三通信技术有限公司 Message forwarding method and equipment in a kind of rapid ring protection protocol networking
CN104283779B (en) * 2014-10-08 2019-01-22 新华三技术有限公司 A kind of determination method and apparatus of Multiple Spanning Tree (MST) region

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865637A (en) * 2019-04-30 2020-10-30 烽火通信科技股份有限公司 Fault recovery method and system

Also Published As

Publication number Publication date
CN113055265A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
CN101965714B (en) Method and filter arrangement for filtering messages that are received via a serial data bus by a user node of a communications network
US8892696B1 (en) Methods and apparatus for automatic configuration of virtual local area network on a switch device
EP3451592B1 (en) Packet transmission between vxlan domains
US20140064272A1 (en) Providing a layer-3 interface
CN103546380A (en) Message forwarding method and device based on strategy routing
CN111010329A (en) Message transmission method and device
CN107612702A (en) A kind of method for configuring routers and device
CN113055265B (en) Method and device for realizing coexistence and synchronization of multiple Ethernet ring protocols
CN105162786A (en) POWERLINK slave station frame buffer management system based on FPGA (Field Programmable Gate Array)
CN109787938B (en) Method and device for realizing access to virtual private cloud and computer readable storage medium
CN113037681B (en) ACL rule management method, ACL rule management device, computer equipment and computer readable medium
CN105791455A (en) Ternary content addressable memory TCAM space processing method and device
CN113422735B (en) Load balancing configuration method, convergence diverter and medium
CN109104369B (en) Path selection method and device
CN113114594B (en) Strategy generation method and device and storage medium
US9608915B2 (en) Least disruptive AF assignments in TRILL LAN adjacencies
CN110838966B (en) Equipment connection control method and device
US8665752B2 (en) Network modeling, service provisioning, and service management
CN113328948B (en) Resource management method, device, network equipment and computer readable storage medium
CN104092678A (en) Configuration method and device for access control lists
CN106302837B (en) A kind of the mac address table management method and device of optical network unit
CN113162782B (en) Data center network configuration method and device
CN109450696B (en) Network configuration method and device
CN106789288B (en) Method for intelligently configuring conflict-free static network management address for switch
CN102196061B (en) Address filter table generating method and device, and Ethernet frame receiving method and device

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