CN114007152B - Port convergence processing method and device for optical fiber switch - Google Patents

Port convergence processing method and device for optical fiber switch Download PDF

Info

Publication number
CN114007152B
CN114007152B CN202210003023.2A CN202210003023A CN114007152B CN 114007152 B CN114007152 B CN 114007152B CN 202210003023 A CN202210003023 A CN 202210003023A CN 114007152 B CN114007152 B CN 114007152B
Authority
CN
China
Prior art keywords
port
convergence
data frame
group
port number
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
CN202210003023.2A
Other languages
Chinese (zh)
Other versions
CN114007152A (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.)
Beijing Tasson Science and Technology Co Ltd
Original Assignee
Beijing Tasson Science and 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 Beijing Tasson Science and Technology Co Ltd filed Critical Beijing Tasson Science and Technology Co Ltd
Priority to CN202210003023.2A priority Critical patent/CN114007152B/en
Publication of CN114007152A publication Critical patent/CN114007152A/en
Application granted granted Critical
Publication of CN114007152B publication Critical patent/CN114007152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q11/0071Provisions for the electrical-optical layer interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0073Provisions for forwarding or routing, e.g. lookup tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0086Network resource allocation, dimensioning or optimisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Use Of Switch Circuits For Exchanges And Methods Of Control Of Multiplex Exchanges (AREA)
  • Optical Communication System (AREA)

Abstract

The invention provides a port convergence processing method and device for a fiber switch. The method comprises the following steps: receiving a data frame to be forwarded, and performing data query on a preset hash table based on a frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame; determining a corresponding port aggregation group according to the port aggregation group number; and based on the port state table and the source port number of the port aggregation group, searching whether a corresponding target port number exists in a port number configuration table of the port aggregation group in a polling mode, and if so, forwarding the data frame based on the target port corresponding to the target port number. By adopting the method provided by the invention, the polling search of the corresponding target port and the data frame forwarding are realized through the port convergence group which is pre-configured with the cascade ports corresponding to at least two optical fiber switches, so that the bandwidth of the cascade ports of the optical fiber switches is improved, the adaptability is strong, and the efficiency and the stability of the data frame forwarding can be effectively improved.

Description

Port convergence processing method and device for optical fiber switch
Technical Field
The invention relates to the technical field of network communication, in particular to a port convergence processing method and device for an optical fiber switch. In addition, an electronic device and a processor-readable storage medium are also related.
Background
Fibre Channel (FC) is a high-speed serial bus with high bandwidth, high reliability and strong anti-interference capability. The FC-AE standard for avionics is being widely used in an increasing number of avionics and military equipment. With the increase of the number of nodes and the expansion of the scale of the optical fiber network, the limited number of access ports provided by a single optical fiber switch in more and more local area network environments has been difficult to meet the demand. At present, a cascade technology is needed to interconnect a plurality of optical fiber switches instead of a single optical fiber switch, so as to provide more access ports for the system. When optical fiber switches are cascaded, how to ensure that the relay link between the switches has sufficient bandwidth becomes a key point of current research. Only if the bandwidth is enough, the ports of the slave switch can have the same bandwidth as the master switch. However, in some cases, the limited bandwidth of a single cascaded port may be difficult to satisfy the bandwidth requirements for two fabric switch data interactions. In the field of optical fiber switches in the internet, two or more cascaded ports of the same type are generally connected in parallel to transmit data at the same time, and this way of connecting multiple cascaded ports in parallel is called port aggregation.
Therefore, how to design a data forwarding scheme for multiple cascaded ports of a fabric switch becomes a difficult problem to be solved urgently.
Disclosure of Invention
Therefore, the invention provides a port convergence processing method and a port convergence processing device for an optical fiber switch, which aim to solve the problems of limited bandwidth of a cascade intermediate link of the optical fiber switch and higher limitation in the prior art, which result in poorer data frame forwarding efficiency and stability.
In a first aspect, the present invention provides a port convergence processing method for a fabric switch, including:
receiving a data frame to be forwarded, and performing data query on a preset hash table based on a frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame;
determining a corresponding port aggregation group according to the port aggregation group number; based on the port state table and the source port number of the port convergence group, searching whether a corresponding target port number exists in a port number configuration table of the port convergence group in a polling mode, and if so, forwarding the data frame based on a target port corresponding to the target port number; and the port convergence group is pre-configured with cascade ports corresponding to at least two optical fiber switches.
Further, the method for processing port convergence for a fabric switch further includes:
in the process of forwarding a data frame, acquiring a link indicator signal corresponding to the optical fiber switch in the port aggregation group, and determining the current link state corresponding to the cascade port of the optical fiber switch in the port aggregation group based on the level of the link indicator signal;
updating the value of a bit in the port state table based on the current link state, if the current link state is normal, updating the value of the bit in the port state table to be 1, and if the current link state is abnormal, updating the value of the bit in the port state table to be 0 to obtain an updated port state table;
based on the updated port state table and the source port number, searching whether a port number corresponding to a target port with a normal current link state exists in a port number configuration table of the port convergence group by a preset port query unit in a polling mode; and if so, forwarding the data frame based on the target port with the normal current link state.
Further, before receiving the data frame to be forwarded, the method for processing port convergence for a fabric switch further includes:
when initializing the optical fiber switch in the port convergence group, pre-configuring a port state table and a port number configuration table corresponding to the port convergence group; all initial bits of the port state table and the port number configuration table are 0, when a cascade port is configured in the optical fiber switch in the port convergence group, a corresponding bit in the port state table is set to be 1, and a port number of the cascade port is stored in the port number configuration table; wherein each table entry included in the port state table is 8 bits, each bit corresponds to a cascade port, and the cascade port includes the target port; each table entry contained in the port number configuration table is 40 bits, and the port number configuration table is used for storing the port numbers of all the cascading ports in the port aggregation group.
Further, the method for processing port convergence for a fabric switch further includes: and adding, deleting or modifying the cascade ports in the port convergence group according to a preset rule, and respectively updating the port state table of the port convergence group and the value of the corresponding bit in the port number configuration table of the port convergence group.
Further, the method for processing port convergence for a fabric switch further includes: and respectively configuring corresponding port query units aiming at the port convergence groups, wherein the port query units correspond to the port convergence groups one to one.
Further, the method for processing port convergence for a fabric switch further includes:
recording the current target port number for forwarding the data frame;
when a new data frame to be forwarded is received, a new target port number is inquired in a polling mode on the basis of the current target port number, and the new data frame to be forwarded is forwarded on the basis of the new target port number; wherein, the new target port number is different from the cascade port corresponding to the current target port number.
In a second aspect, the present invention further provides a port convergence processing apparatus for a fabric switch, including:
the route query module is used for receiving a data frame to be forwarded, and performing data query on a preset hash table based on the frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame;
the port convergence processing module is used for determining a corresponding port convergence group according to the port convergence group number; based on the port state table and the source port number of the port convergence group, searching whether a corresponding target port number exists in a port number configuration table of the port convergence group in a polling mode, and if so, forwarding the data frame based on a target port corresponding to the target port number; and the port convergence group is pre-configured with cascade ports corresponding to at least two optical fiber switches.
Further, the port convergence processing apparatus for a fabric switch further includes:
a current link state determining unit, configured to obtain a link indicator signal corresponding to the optical fiber switch in the port aggregation group in a data frame forwarding process, and determine a current link state corresponding to a cascade port of the optical fiber switch in the port aggregation group based on a level of the link indicator signal;
a port state table updating unit, configured to update a value of a bit in the port state table based on the current link state, if the current link state is normal, update the value of the bit in the port state table to be 1, and if the current link state is abnormal, update the value of the bit in the port state table to be 0, to obtain an updated port state table;
a port query module, configured to search, by using a preset port query unit in a polling manner, whether a port number corresponding to a target port in a current link state that is normal exists in a port number configuration table of the port aggregation group based on the updated port state table and the source port number; and if so, forwarding the data frame based on the target port with the normal current link state.
Further, the port convergence processing apparatus for a fabric switch further includes:
a port convergence table configuration unit, configured to, before receiving a data frame to be forwarded, when initializing an optical fiber switch in the port convergence group, pre-configure a port state table and a port number configuration table corresponding to the port convergence group; all initial bits of the port state table and the port number configuration table are 0, when a cascade port is configured in the optical fiber switch in the port convergence group, a corresponding bit in the port state table is set to be 1, and a port number of the cascade port is stored in the port number configuration table; wherein each table entry included in the port state table is 8 bits, each bit corresponds to a cascade port, and the cascade port includes the target port; each table entry contained in the port number configuration table is 40 bits, and the port number configuration table is used for storing port numbers of all cascading ports in the port aggregation group.
Further, the port convergence processing apparatus for a fabric switch further includes: and the port convergence group adjusting unit is used for adding, deleting or modifying the cascade ports in the port convergence group according to a preset rule, and respectively updating the port state table of the port convergence group and the value of the corresponding bit in the port number configuration table of the port convergence group.
Further, the port convergence processing apparatus for a fabric switch further includes: and the port query unit configuration unit is used for configuring corresponding port query units aiming at the port convergence groups respectively, and the port query units correspond to the port convergence groups one to one.
Further, the port convergence processing apparatus for a fabric switch further includes:
a port number recording unit, configured to record a current target port number for forwarding the data frame;
the polling control unit is used for inquiring a new target port number in a polling mode on the basis of the current target port number when receiving a new data frame to be forwarded, and forwarding the new data frame to be forwarded based on the new target port number; wherein, the new target port number is different from the cascade port corresponding to the current target port number.
In a third aspect, the present invention also provides an electronic device, including: the present invention relates to a port aggregation processing method for a fabric switch, and more particularly, to a port aggregation processing method for a fabric switch, which includes a memory, a processor, and a computer program stored in the memory and running on the processor.
In a fourth aspect, the present invention further provides a processor-readable storage medium, having stored thereon a computer program, which when executed by a processor, implements the steps of the port aggregation processing method for a fabric switch according to any one of the above.
According to the port convergence processing method for the optical fiber switch, provided by the embodiment of the invention, the corresponding target port forwarding data frame is searched by polling the port convergence group of the cascade port corresponding to at least two optical fiber switches, so that the bandwidth of the cascade port of the optical fiber switch is improved, the adaptability is strong, and the efficiency and the stability of data frame forwarding can be effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a port convergence processing method for a fabric switch according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a port convergence processing method for a fabric switch according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a port state table of a port aggregation group according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a port number configuration table of a port aggregation group according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an updated port state table combined with a link indicator flag signal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a port convergence processing apparatus for a fabric switch according to an embodiment of the present invention;
fig. 7 is a schematic physical structure diagram of an electronic device 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.
The following describes an embodiment of a port aggregation processing method for a fabric switch according to the present invention in detail. As shown in fig. 1, which is a schematic flow chart of a port convergence processing method for a fabric switch according to an embodiment of the present invention, a specific implementation process includes the following steps:
step 101: and receiving a data frame to be forwarded, and performing data query on a preset hash table based on the frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame.
In the embodiment of the present invention, before executing this step, a port state table and a port number configuration table corresponding to the port aggregation group, that is, a Trunk port state table and a Trunk port number configuration table, need to be configured in advance. Specifically, when the optical fiber switch in the port aggregation group is initialized, the port state table and the port number configuration table corresponding to the port aggregation group may be configured. All initial bit (bit) bits of the port state table and the port number configuration table are 0, when a cascade port is configured in the optical fiber switch in the port convergence group, a corresponding bit in the port state table is set to be 1, and the port number of the cascade port is stored in the port number configuration table. Each table entry contained in the port state table is 8 bits, each bit corresponds to a cascade port, and the cascade port contains the target port; each table entry contained in the port number configuration table has 40 bits and is used for storing the port numbers of all the cascading ports in the port aggregation group. Wherein, each port aggregation group is called a Trunk.
In the specific implementation process, all bits of the port state table and the port number configuration table which are just powered on are 0, when a cascade port (port) corresponding to the port aggregation group is configured, the corresponding bit in the port state table is written into 1, and the corresponding port number is stored in the port number configuration table. Of course, the system may add, delete, or modify the cascade ports in the port aggregation group according to a preset rule according to an actual situation, and update the port state table of the port aggregation group and the value of the corresponding bit in the port number configuration table of the port aggregation group, respectively. For example, in the deleting process, only 0 needs to be written into the corresponding bit in the port state table, and the port number configuration table may adopt a circular covering mode, and then 0 does not need to be written.
As shown in fig. 3 and 4, which are a configured port state table and a port number configuration table, respectively. In the configuration shown, two ports having a port number equal to 8 and a port number equal to 31 are configured as port0 and port7 of Trunk 0. Each table entry in the port state table is 8 bits, and each bit indicates whether the port has configuration (1 has configuration, 0 has no configuration); the port number configures each entry 40bit in the table, and all the port numbers in the port aggregation group are stored.
It should be noted that, in the process of forwarding the data frame, the port state table may also be updated by obtaining a link indicator signal (i.e., link signal) corresponding to the optical fiber switch in the port aggregation group. Specifically, the current link state corresponding to the cascade port of the optical fiber switch in the port aggregation group may be determined based on the level of the link indicator signal; and then updating the value of the bit in the port state table based on the current link state, if the current link state is normal, updating the value of the bit in the port state table to be 1, and if the current link state is abnormal, updating the value of the bit in the port state table to be 0, so as to obtain an updated port state table, which is specifically shown in fig. 5. When the subsequent port convergence group queries the available port number, only the updated port state table needs to be queried, and the position of 1 in the table indicates that the port number corresponding to the position in the port configuration table is available, otherwise, the port is unavailable.
After the port state table and the port number configuration table corresponding to the port aggregation group are configured in advance through the above contents, the step 101 is executed. In this step, a data frame to be routed and forwarded is received first, and a corresponding port aggregation group number is queried through a preset hash table according to a frame identifier in a frame header of the data frame, so that a target port number or a target port (i.e., an available port number or port) in each port aggregation group is queried through a corresponding port query unit in the following. It should be noted that, in the embodiment of the present invention, the number of the port aggregation groups may be determined according to actual needs. Each port aggregation group may be configured with 1-8 ports. When only 1 port is configured in the port aggregation group, the port aggregation group has the same function as a single port of a conventional fabric switch. When the number of the ports configured in the port convergence group is greater than or equal to 2, the normal port convergence function can be realized.
Step 102: determining a corresponding port aggregation group according to the port aggregation group number; based on the port state table and the source port number of the port convergence group, searching whether a corresponding target port number exists in a port number configuration table of the port convergence group in a polling mode, and if so, forwarding the data frame based on a target port corresponding to the target port number; and the port convergence group is pre-configured with cascade ports corresponding to at least two optical fiber switches.
And when a data frame routing request exists, returning the inquired target port number to the application end in a polling mode. And the load balancing can be realized by a port polling mode and is distributed to all the cascaded ports in the configured port aggregation group. In a specific implementation process, when a new application is generated next time, a new port needs to be queried downwards on the basis of the port number recorded last time, that is, when a new data frame to be forwarded is received, a new target port number is queried in a polling manner on the basis of the current target port number, and the new data frame to be forwarded is forwarded on the basis of the new target port number; wherein, the new target port number is different from the cascade port corresponding to the current target port number. If the target port is not queried in the 8 cascaded ports, the query is stopped.
In the specific implementation process, aiming at the requirements of multicast and broadcast, when there is a data frame routing request, all the port aggregation groups firstly judge whether there is a routing request corresponding to the port aggregation group, if so, the query flow is started, otherwise, the query flow is directly returned to 0 (no target port is available). In the case of multicast and broadcast, when a port belonging to a certain port aggregation group initiates a data frame routing request, it is required that the port aggregation group cannot return any valid port number, otherwise a broadcast storm may occur. In order to avoid this, when a route is queried by the route query module, in addition to querying the port aggregation group number according to the frame header information of the data frame, the port number (i.e., the source port number) from which the data frame originates needs to be analyzed from the frame header information, so as to obtain the port aggregation group number and the source port number that are transmitted, first, the source port number is compared with all the port numbers of the port aggregation group, and if a port number equal to the source port number exists in all the ports of the port aggregation group, the port aggregation group cannot return to any port.
During the operation of the optical switch, if the link to which the returned route points is unavailable (for example, a physical failure of the link), traffic blocking of the optical switch may be caused. Therefore, the link state of a port needs to be monitored in real time, and usually, all optical fiber switches have a link indicator mark link signal, that is, a link indicator mark signal (link is high level indicating that a port is available, and a low level port is not available), and in a port query process based on a port aggregation group, if a link corresponding to a certain port is not available, the link is directly skipped over to find a next available port.
Any N (N > =1) ports (namely cascading ports) of the optical fiber switches are configured into a port aggregation group, and port numbers in the port aggregation group are returned in a polling mode according to the current link state, the source port number and the application type, so that high bandwidth is established between at least two optical fiber switches, and load balance is achieved.
In addition, in the process of forwarding a data frame, acquiring a link indicator signal corresponding to the optical fiber switch in the port aggregation group, and determining a current link state corresponding to a cascade port of the optical fiber switch in the port aggregation group based on the level of the link indicator signal; updating the value of a bit in the port state table based on the current link state, if the current link state is normal, updating the value of the bit in the port state table to be 1, and if the current link state is abnormal, updating the value of the bit in the port state table to be 0 to obtain an updated port state table; based on the updated port state table and the source port number, searching whether a port number corresponding to a target port with a normal current link state exists in a port number configuration table of the port convergence group by a preset port query unit in a polling mode; and if so, forwarding the data frame based on the target port with the normal current link state.
In a specific implementation process, after the port state table and the port number configuration table corresponding to the port aggregation group are configured in advance, normal data frame exchange of the optical fiber switch can be performed.
As shown in fig. 2, first, the route query module receives a data frame, and queries a port aggregation group number and a source port number of the data frame through a preset hash table according to a frame identifier in a frame header; then, the queried port aggregation group number and the port number of the source data frame are input to a Trunk module (port aggregation processing module). And the Trunk module queries available port numbers according to a preset flow. For example, for a 32-port switch, in order to adapt to various situations, 32 port query units need to be instantiated, and each port query unit is responsible for querying the port number in a port aggregation group. The actual port number obtained by querying by the 32 port querying unit is the actual routing result. The results queried by the 32 port query units are not always available, and only effective query results are selected. The following describes a preset process by taking an example that the port aggregation group includes seven cascaded ports, which specifically includes: if no port number equal to the source port exists in the port aggregation group; reading a port position addr recorded by a last forwarding data frame; the following judgment processes are carried out in sequence: judging whether the bit =1 of the (addr + 0) th port mapping table of the combined link signal exists, judging whether the bit =1 of the (addr + 1) th port mapping table of the combined link signal exists, judging whether the bit =1 of the (addr + 2) th port mapping table of the combined link signal exists, judging whether the bit =1 of the (addr + 3) th port mapping table of the combined link signal exists, judging whether the bit =1 of the (addr + 4) th port mapping table of the combined link signal exists, judging whether the bit =1 of the (addr + 5) th port mapping table of the combined link signal exists, judging whether the bit =1 of the (addr + 6) th port mapping table of the combined link signal exists, judging whether the bit =1 of the (addr + 7) th port mapping table of the combined link signal exists, and if the bit =1 of the (addr + 7) th port mapping table of the combined link signal exists, finishing the query in the flow, recording the position of the corresponding target port and returning the corresponding port number; if not, finishing the query and determining that no target port is available in the port convergence group. The Trunk port mapping table combining the link signals is a Trunk port number configuration table or a port number configuration table. The internal Trunk table in fig. 2 is a port state table or Trunk port state table corresponding to the port aggregation group.
According to the port convergence processing method for the optical fiber switch, provided by the embodiment of the invention, the corresponding target port forwarding data frame is searched by polling the port convergence group of the cascade port corresponding to at least two optical fiber switches, so that the bandwidth of the cascade port of the optical fiber switch is improved, the adaptability is strong, and the efficiency and the stability of data frame forwarding can be effectively improved.
Corresponding to the method for processing port convergence for the optical fiber switch, the invention also provides a device for processing port convergence for the optical fiber switch. Since the embodiment of the apparatus is similar to the above method embodiment, so that the description is relatively simple, and please refer to the description of the above method embodiment, the following description is only illustrative for the embodiment of the port aggregation processing apparatus of the optical fiber switch.
Fig. 6 is a schematic structural diagram of a port convergence processing apparatus for a fabric switch according to an embodiment of the present invention.
A route query module 601, configured to receive a data frame to be forwarded, and perform data query on a preset hash table based on a frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame;
a port convergence processing module 602, configured to determine a corresponding port convergence group according to the port convergence group number; based on the port state table and the source port number of the port convergence group, searching whether a corresponding target port number exists in a port number configuration table of the port convergence group in a polling mode, and if so, forwarding the data frame based on a target port corresponding to the target port number; and the port convergence group is pre-configured with cascade ports corresponding to at least two optical fiber switches. In this embodiment of the present invention, the port convergence processing module 602 is a Trunk module in fig. 2.
Further, the port convergence processing apparatus for a fabric switch further includes:
a current link state determining unit, configured to obtain a link indicator signal corresponding to the optical fiber switch in the port aggregation group in a data frame forwarding process, and determine a current link state corresponding to a cascade port of the optical fiber switch in the port aggregation group based on a level of the link indicator signal;
a port state table updating unit, configured to update a value of a bit in the port state table based on the current link state, if the current link state is normal, update the value of the bit in the port state table to be 1, and if the current link state is abnormal, update the value of the bit in the port state table to be 0, to obtain an updated port state table;
a port query module, configured to search, by using a preset port query unit in a polling manner, whether a port number corresponding to a target port in a current link state that is normal exists in a port number configuration table of the port aggregation group based on the updated port state table and the source port number; and if so, forwarding the data frame based on the target port with the normal current link state.
Further, the port convergence processing apparatus for a fabric switch further includes:
a port convergence table configuration unit, configured to, before receiving a data frame to be forwarded, when initializing an optical fiber switch in the port convergence group, pre-configure a port state table and a port number configuration table corresponding to the port convergence group; all initial bits of the port state table and the port number configuration table are 0, when a cascade port is configured in the optical fiber switch in the port convergence group, a corresponding bit in the port state table is set to be 1, and a port number of the cascade port is stored in the port number configuration table; wherein each table entry included in the port state table is 8 bits, each bit corresponds to a cascade port, and the cascade port includes the target port; each table entry contained in the port number configuration table is 40 bits, and the port number configuration table is used for storing the port numbers of all the cascading ports in the port aggregation group.
Further, the port convergence processing apparatus for a fabric switch further includes: and the port convergence group adjusting unit is used for adding, deleting or modifying the cascade ports in the port convergence group according to a preset rule, and respectively updating the port state table of the port convergence group and the value of the corresponding bit in the port number configuration table of the port convergence group.
Further, the port convergence processing apparatus for a fabric switch further includes: and the port query unit configuration unit is used for configuring corresponding port query units aiming at the port convergence groups respectively, and the port query units correspond to the port convergence groups one to one.
Further, the port convergence processing apparatus for a fabric switch further includes:
a port number recording unit, configured to record a current target port number for forwarding the data frame;
the polling control unit is used for inquiring a new target port number in a polling mode on the basis of the current target port number when receiving a new data frame to be forwarded, and forwarding the new data frame to be forwarded based on the new target port number; wherein, the new target port number is different from the cascade port corresponding to the current target port number.
The port convergence processing device for the optical fiber switch provided by the embodiment of the invention searches for the corresponding target port forwarding data frame by the port convergence group which is preconfigured with the cascade ports corresponding to at least two optical fiber switches, improves the bandwidth of the cascade ports of the optical fiber switch, has strong adaptability, and can effectively improve the efficiency and stability of data frame forwarding.
Corresponding to the port convergence processing method for the optical fiber switch, the invention also provides electronic equipment. Since the embodiment of the electronic device is similar to the above method embodiment, the description is simple, and please refer to the description of the above method embodiment, and the electronic device described below is only schematic. Fig. 7 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention. The electronic device may include: a processor (processor) 701, a memory (memory) 702 and a communication bus 703, wherein the processor 701 and the memory 702 communicate with each other through the communication bus 703 and communicate with the outside through a communication interface 704. The processor 701 may invoke logic instructions in the memory 702 to perform a port aggregation processing method for a fabric switch. The method comprises the following steps: receiving a data frame to be forwarded, and performing data query on a preset hash table based on a frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame; determining a corresponding port aggregation group according to the port aggregation group number; based on the port state table and the source port number of the port convergence group, searching whether a corresponding target port number exists in a port number configuration table of the port convergence group in a polling mode, and if so, forwarding the data frame based on a target port corresponding to the target port number; and the port convergence group is pre-configured with cascade ports corresponding to at least two optical fiber switches.
Furthermore, the logic instructions in the memory 702 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a Memory chip, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In another aspect, embodiments of the present invention further provide a computer program product, where the computer program product includes a computer program stored on a processor-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a computer, the computer is capable of executing the port aggregation processing method for a fiber switch provided in the foregoing method embodiments. The method comprises the following steps: receiving a data frame to be forwarded, and performing data query on a preset hash table based on a frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame; determining a corresponding port aggregation group according to the port aggregation group number; based on the port state table and the source port number of the port convergence group, searching whether a corresponding target port number exists in a port number configuration table of the port convergence group in a polling mode, and if so, forwarding the data frame based on a target port corresponding to the target port number; and the port convergence group is pre-configured with cascade ports corresponding to at least two optical fiber switches.
In still another aspect, an embodiment of the present invention further provides a processor-readable storage medium, where a computer program is stored on the processor-readable storage medium, and when the computer program is executed by a processor, the computer program is implemented to perform the port aggregation processing method for a fabric switch provided in the foregoing embodiments. The method comprises the following steps: receiving a data frame to be forwarded, and performing data query on a preset hash table based on a frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame; determining a corresponding port aggregation group according to the port aggregation group number; based on the port state table and the source port number of the port convergence group, searching whether a corresponding target port number exists in a port number configuration table of the port convergence group in a polling mode, and if so, forwarding the data frame based on a target port corresponding to the target port number; and the port convergence group is pre-configured with cascade ports corresponding to at least two optical fiber switches.
The processor-readable storage medium may be any available media or data storage device that can be accessed by a processor, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
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. One of ordinary skill in the art can understand and implement it without inventive effort.
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 necessary general hardware platform, and certainly can also be implemented by hardware. Based on the understanding, the above technical solutions substantially or otherwise contributing to the prior art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the various embodiments or some parts of the embodiments.
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; 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 such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A port convergence processing method for a fiber switch is characterized by comprising the following steps:
when initializing an optical fiber switch in a port convergence group, pre-configuring a port state table and a port number configuration table corresponding to the port convergence group; all initial bits of the port state table and the port number configuration table are 0, when a configuration cascade port of an optical fiber switch in the port convergence group exists, a corresponding bit in the port state table is set to be 1, and a port number of the cascade port is stored in the port number configuration table; each table entry contained in the port state table is 8 bits, each bit corresponds to a cascade port, and the cascade port comprises a target port; each table entry contained in the port number configuration table is 40 bits and is used for storing the port numbers of all the cascading ports in the port aggregation group; receiving a data frame to be forwarded, and performing data query on a preset hash table based on a frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame;
determining a corresponding port aggregation group according to the port aggregation group number; based on the port state table and the source port number of the port convergence group, searching whether a corresponding target port number exists in a port number configuration table of the port convergence group in a polling mode, and if so, forwarding the data frame based on a target port corresponding to the target port number; the port convergence group is pre-configured with at least two cascade ports corresponding to the optical fiber switches;
in the process of forwarding a data frame, acquiring a link indicator signal corresponding to the optical fiber switch in the port aggregation group, and determining a current link state corresponding to a cascade port of the optical fiber switch in the port aggregation group based on the level of the link indicator signal;
updating the value of a bit in the port state table based on the current link state, if the current link state is normal, updating the value of the bit in the port state table to be 1, and if the current link state is abnormal, updating the value of the bit in the port state table to be 0 to obtain an updated port state table;
based on the updated port state table and the source port number, searching whether a port number corresponding to a target port with a normal current link state exists in a port number configuration table of the port convergence group by a preset port query unit in a polling mode; and if so, forwarding the data frame based on the target port with the normal current link state.
2. The port convergence processing method for the fabric switch according to claim 1, further comprising, before receiving the data frame to be forwarded:
when initializing the optical fiber switch in the port convergence group, pre-configuring a port state table and a port number configuration table corresponding to the port convergence group; when a configuration cascade port of an optical fiber switch in the port convergence group is configured, setting a corresponding bit in the port state table to be 1, and storing a port number of the cascade port into the port number configuration table; wherein each table entry included in the port state table is 8 bits, each bit corresponds to a cascade port, and the cascade port includes the target port; each table entry contained in the port number configuration table is 40 bits, and the port number configuration table is used for storing the port numbers of all the cascading ports in the port aggregation group.
3. The method for port convergence processing for a fabric switch according to claim 1, further comprising: and adding, deleting or modifying the cascade ports in the port convergence group according to a preset rule, and respectively updating the port state table of the port convergence group and the value of the corresponding bit in the port number configuration table of the port convergence group.
4. The method for port convergence processing for a fabric switch according to claim 1, further comprising: and respectively configuring corresponding port query units aiming at the port convergence groups, wherein the port query units correspond to the port convergence groups one to one.
5. The method for port convergence processing for a fabric switch according to claim 1, further comprising:
recording the current target port number for forwarding the data frame;
when a new data frame to be forwarded is received, a new target port number is inquired in a polling mode on the basis of the current target port number, and the new data frame to be forwarded is forwarded on the basis of the new target port number; wherein, the new target port number is different from the cascade port corresponding to the current target port number.
6. A port convergence processing device for a fiber switch, comprising:
the routing query module is used for pre-configuring a port state table and a port number configuration table corresponding to a port aggregation group when initializing an optical fiber switch in the port aggregation group; all initial bits of the port state table and the port number configuration table are 0, when a configuration cascade port of an optical fiber switch in the port convergence group exists, a corresponding bit in the port state table is set to be 1, and a port number of the cascade port is stored in the port number configuration table; each table entry contained in the port state table is 8 bits, each bit corresponds to a cascade port, and the cascade port comprises a target port; each table entry contained in the port number configuration table is 40 bits and is used for storing the port numbers of all the cascading ports in the port aggregation group; receiving a data frame to be forwarded, and performing data query on a preset hash table based on a frame identifier of the data frame to obtain a corresponding port aggregation group number and a source port number of the data frame;
the port convergence processing module is used for determining a corresponding port convergence group according to the port convergence group number; based on the port state table and the source port number of the port aggregation group, searching whether a corresponding target port number exists in a port number configuration table of the port aggregation group in a polling mode, and if so, forwarding the data frame based on a target port corresponding to the target port number; the port convergence group is pre-configured with at least two cascade ports corresponding to the optical fiber switches;
further comprising:
a current link state determining unit, configured to obtain a link indicator signal corresponding to the optical fiber switch in the port aggregation group in a data frame forwarding process, and determine a current link state corresponding to a cascade port of the optical fiber switch in the port aggregation group based on a level of the link indicator signal;
a port state table updating unit, configured to update a value of a bit in the port state table based on the current link state, if the current link state is normal, update the value of the bit in the port state table to be 1, and if the current link state is abnormal, update the value of the bit in the port state table to be 0, to obtain an updated port state table;
a port query module, configured to search, by using a preset port query unit, whether a port number corresponding to a target port in a port number configuration table of the port aggregation group that is in a normal current link state exists, in a polling manner, based on the updated port state table and the source port number; and if so, forwarding the data frame based on the target port with the normal current link state.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor when executing the program implements the steps of the port aggregation processing method for a fabric switch according to any one of claims 1 to 5.
8. A processor readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the steps of the port aggregation processing method for a fabric switch according to any one of claims 1 to 5.
CN202210003023.2A 2022-01-05 2022-01-05 Port convergence processing method and device for optical fiber switch Active CN114007152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210003023.2A CN114007152B (en) 2022-01-05 2022-01-05 Port convergence processing method and device for optical fiber switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210003023.2A CN114007152B (en) 2022-01-05 2022-01-05 Port convergence processing method and device for optical fiber switch

Publications (2)

Publication Number Publication Date
CN114007152A CN114007152A (en) 2022-02-01
CN114007152B true CN114007152B (en) 2022-06-07

Family

ID=79932580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210003023.2A Active CN114007152B (en) 2022-01-05 2022-01-05 Port convergence processing method and device for optical fiber switch

Country Status (1)

Country Link
CN (1) CN114007152B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105490845A (en) * 2015-12-08 2016-04-13 中国航空工业集团公司西安航空计算技术研究所 FC switcher cascading configuration and routing realizing method
CN108123878A (en) * 2016-11-30 2018-06-05 华为技术有限公司 A kind of method for routing, device and data transfer equipment
CN108234360A (en) * 2016-12-14 2018-06-29 中国航空工业集团公司西安航空计算技术研究所 A kind of antiblocking FC switch concatenations port is realized and method
CN113890855A (en) * 2021-09-23 2022-01-04 苏州浪潮智能科技有限公司 Message forwarding method, system, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0227048D0 (en) * 2002-11-20 2002-12-24 3Com Corp Network units for use in and organisation of cascade systems

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105490845A (en) * 2015-12-08 2016-04-13 中国航空工业集团公司西安航空计算技术研究所 FC switcher cascading configuration and routing realizing method
CN108123878A (en) * 2016-11-30 2018-06-05 华为技术有限公司 A kind of method for routing, device and data transfer equipment
CN108234360A (en) * 2016-12-14 2018-06-29 中国航空工业集团公司西安航空计算技术研究所 A kind of antiblocking FC switch concatenations port is realized and method
CN113890855A (en) * 2021-09-23 2022-01-04 苏州浪潮智能科技有限公司 Message forwarding method, system, equipment and medium

Also Published As

Publication number Publication date
CN114007152A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
KR102162730B1 (en) Technologies for distributed routing table lookup
US20160241474A1 (en) Technologies for modular forwarding table scalability
CN110417569B (en) Network link fault processing method and tunnel endpoint equipment
CN113839862B (en) Method, system, terminal and storage medium for synchronizing ARP information between MCLAG neighbors
US20220345404A1 (en) Packet sending method, routing entry generation method, apparatus, and storage medium
CN112311674B (en) Message sending method, device and storage medium
CN109600326B (en) Method, node and system for forwarding data or message
US11750496B2 (en) Method for multi-cloud interconnection and device
US20220345400A1 (en) Packet sending method and apparatus, and storage medium
EP4329248A1 (en) Packet forwarding method and apparatus, network device, and storage medium
EP4020905A1 (en) Packet transmission method, device, and system
EP4020904B1 (en) Packet transmission method, device, and system
US8886913B2 (en) Apparatus and method for identifier management
US20170012874A1 (en) Software router and methods for looking up routing table and for updating routing entry of the software router
CN114007152B (en) Port convergence processing method and device for optical fiber switch
CN114615179A (en) Message transmission method, device and system
CN116760834A (en) Load balancing method, system, equipment and storage medium
CN116032837A (en) Flow table unloading method and device
CN112866115B (en) Method, device, electronic equipment and storage medium for realizing transparent serial connection
CN111327543A (en) Message forwarding method and device, storage medium and electronic device
CN113568863A (en) Data transmission method, routing node, many-core system and computer readable medium
CN113328963A (en) Routing table entry issuing and message forwarding method, device and network equipment
CN115242699A (en) Message transmission method, slice generation method, device and system
CN114911728A (en) Data searching method and device and integrated circuit
CN113472645A (en) Method, device and equipment for sending route and processing route

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
CP03 Change of name, title or address

Address after: 701, 7th Floor, Building 6, Courtyard 8, Kegu 1st Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing, 100176

Patentee after: Beijing Tasson Technology Ltd.

Address before: Room 701, 7 / F, building 6, courtyard 8, KEGU 1st Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing 100176

Patentee before: BEIJING TASSON TECHNOLOGY Ltd.

CP03 Change of name, title or address