WO2022062568A1 - Switch configuration method and related device - Google Patents

Switch configuration method and related device Download PDF

Info

Publication number
WO2022062568A1
WO2022062568A1 PCT/CN2021/104921 CN2021104921W WO2022062568A1 WO 2022062568 A1 WO2022062568 A1 WO 2022062568A1 CN 2021104921 W CN2021104921 W CN 2021104921W WO 2022062568 A1 WO2022062568 A1 WO 2022062568A1
Authority
WO
WIPO (PCT)
Prior art keywords
switch
electrical switch
interface
configuration information
optical
Prior art date
Application number
PCT/CN2021/104921
Other languages
French (fr)
Chinese (zh)
Inventor
刘欣超
郑好棉
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022062568A1 publication Critical patent/WO2022062568A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • H04L49/111Switch interfaces, e.g. port details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports

Definitions

  • the present application relates to the field of communications, and in particular, to a switch configuration method and related equipment.
  • optical interconnect technology can solve some problems of electrical switches, such as energy consumption and scalability.
  • a part of electrical switches can be replaced by optical switches, and connections between different electrical switches can be established through optical switches.
  • the transmission and reception of services between the two electrical switches need to use the same pair of optical ports of the optical switch to perform optical switching.
  • the embodiments of the present application provide a switch configuration method and related equipment. There can be more idle paths in the system for establishing a new connection between two electrical switches, and there is no need to deploy more interfaces and user interfaces on the electrical switches. For the connected fiber, cost savings.
  • the present application provides a method for configuring a switch.
  • the method is executed by the controller and specifically includes multiple steps.
  • the controller acquires the physical topology between the optical switch and the set of electrical switches, wherein each electrical switch includes at least one group of physical interfaces, each group of physical interfaces includes a sending interface and a receiving interface, and the optical switch includes multiple optical ports.
  • the controller determines the service sending path and the service receiving path between the first electrical switch and the second electrical switch in the electrical switch set according to the physical topology, wherein the sending interface on the service sending path and the receiving interface on the service receiving path are not in the same group physical interface.
  • the controller determines a logical interface in the first electrical switch or the second electrical switch according to the service sending path and the service receiving path, where the logical interface includes a sending interface on the service sending path and a receiving interface on the service receiving path.
  • the controller sends first configuration information to the first electrical switch or the second electrical switch, where the first configuration information is used to instruct the first electrical switch or the second electrical switch to transmit services through a local logical interface.
  • the method further includes:
  • the controller determines each pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path.
  • the controller sends second configuration information to the optical switch, where the second configuration information is used to indicate each pair of optical ports used for optical switching in the optical switch.
  • the controller also needs to configure the optical switch, so that the optical switch can perform optical switching according to the service transmission path determined by the controller.
  • the optical switch includes at least a first optical switch and a second optical switch.
  • Acquiring the physical topology between the optical switch and the electrical switch set includes: acquiring the first physical topology between the first optical switch and the electrical switch set, and acquiring the second physical topology between the second optical switch and the electrical switch set.
  • Determining each pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path includes: determining each pair of optical ports used for optical switching in the first optical switch according to the service sending path, and determining each pair of optical ports used for optical switching in the first optical switch according to the service receiving path. Determine each pair of optical ports used for optical switching in the second optical switch.
  • the number of optical switches is multiple, and the controller needs to acquire the physical topology between each optical switch and the electrical switch, and determine each pair of optical ports used for optical switching on each optical switch.
  • This solution is specifically applied to the scenario of multiple optical switches, which improves the practicability of this solution.
  • the first electrical switch or the second electrical switch includes a link aggregation interface
  • the link aggregation interface includes multiple groups of physical interfaces.
  • Determining the logical interface in the first electrical switch or the second electrical switch according to the service sending path and the service receiving path includes: updating the link aggregation interface according to the service sending path and the service receiving path, and the updated link aggregation interface includes a logical interface.
  • the first configuration information includes an Internet Protocol (Internet Protocol, IP) address of the logical interface of the peer electrical switch corresponding to the logical interface of each electrical switch, so that the electrical switch can transmit services according to the IP address , which improves the feasibility of this scheme.
  • IP Internet Protocol
  • the present application provides a method for configuring a switch.
  • the method is specifically completed by autonomous pairing between electrical switches.
  • the first electrical switch is connected to the optical switch
  • the second electrical switch is connected to the optical switch
  • the first electrical switch includes multiple groups of interfaces
  • the second electrical switch includes multiple groups of interfaces
  • each group of interfaces includes a sending interface and a receiving interface.
  • the method specifically includes multiple steps.
  • the first electrical switch receives the first configuration information sent by the second electrical switch through the optical switch.
  • the first configuration information includes a first identifier of a sending interface on the second electrical switch that outputs the first configuration information.
  • the first electrical switch broadcasts the second configuration information through each sending interface on the first electrical switch, and sends the second configuration information to the second electrical switch through the optical switch.
  • Each second configuration information includes a first identifier, a second identifier of a receiving interface on the first electrical switch that inputs the first configuration information, and a third identifier of a sending interface on the first electrical switch that outputs the second configuration information.
  • the first electrical switch receives third configuration information sent by the second electrical switch through the optical switch, where the third configuration information includes the first identifier, the second identifier, the third identifier and a receiving interface on the second switch for inputting the second configuration information
  • the fourth identifier of wherein the sending interface for outputting the first configuration information on the second electrical switch and the receiving interface for inputting the second configuration information are not the same group of interfaces.
  • the optical switch includes at least a first optical switch and a second optical switch.
  • the receiving, by the first electrical switch, the first configuration information sent by the second electrical switch through the optical switch includes: the first electrical switch receiving the first configuration information sent by the second electrical switch through the first optical switch.
  • the first electrical switch sends the second configuration information through each sending interface on the first electrical switch, and sends the second configuration information to the second electrical switch through the optical switch.
  • Each sending interface sends the second configuration information, and sends the second configuration information to the second electrical switch through the second optical switch.
  • the method further includes:
  • the first electrical switch receives, through the optical switch, fourth configuration information broadcast by the third electrical switch, where the fourth configuration information is configuration information used by the third electrical switch to reply to the first electrical switch.
  • the first electrical switch deletes the fourth configuration information.
  • the electrical switch can determine whether the configuration information is related to itself according to the identifier in the received configuration information, and if not, the configuration information can be deleted. It is ensured that the pairing of electrical switches is not affected by other electrical switches.
  • the present application provides a controller including a processor, a memory and a transceiver.
  • the processor, the memory and the optical transceiver are connected to each other through lines.
  • the processor is used to: first, obtain the physical topology between the optical switch and the electrical switch set, each electrical switch in the electrical switch set includes at least one group of physical interfaces, each group of physical interfaces includes a sending interface and a receiving interface, and the optical switch Including multiple optical ports. After that, determine the service sending path and the service receiving path between the first electrical switch and the second electrical switch in the electrical switch set according to the physical topology, wherein the sending interface on the service sending path and the receiving interface on the service receiving path are not in the same group physical interface. Next, a logical interface in the first electrical switch or the second electrical switch is determined according to the service sending path and the service receiving path, where the logical interface includes a sending interface on the service sending path and a receiving interface on the service receiving path.
  • the transceiver is configured to: send first configuration information to the first electrical switch or the second electrical switch, where the first configuration information is used to instruct the first electrical switch or the second electrical switch to transmit services through a local logical interface.
  • the processor is further configured to: determine each pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path.
  • the transceiver is further configured to: send second configuration information to the optical switch, where the second configuration information is used to indicate each pair of optical ports used for optical switching in the optical switch.
  • the optical switch includes at least a first optical switch and a second optical switch.
  • the processor is specifically configured to: acquire the first physical topology between the first optical switch and the electrical switch set, and acquire the second physical topology between the second optical switch and the electrical switch set.
  • Each pair of optical ports used for optical switching in the first optical switch is determined according to the service sending path, and each pair of optical ports used for optical switching in the second optical switch is determined according to the service receiving path.
  • the first electrical switch or the second electrical switch includes a link aggregation interface
  • the link aggregation interface includes multiple groups of physical interfaces.
  • the processor is specifically configured to: update the link aggregation interface according to the service sending path and the service receiving path, and the updated link aggregation interface includes a logical interface.
  • the first configuration information includes an IP address of a logical interface of the peer electrical switch corresponding to the logical interface.
  • the present application provides an electrical switch, including a processor, a memory, and a transceiver.
  • the processor, the memory and the optical transceiver are connected to each other through lines.
  • the processor invokes program code in memory for controlling the transceiver.
  • the transceiver is used for: first, receiving first configuration information sent by the second electrical switch through the optical switch, where the first configuration information includes a first identifier of a sending interface on the second electrical switch that outputs the first configuration information. After that, broadcast the second configuration information through each sending interface on the electrical switch, and send the second configuration information to the second electrical switch through the optical switch, where each second configuration information includes the first identifier, the first identifier entered on the electrical switch The second identifier of the receiving interface of the configuration information and the third identifier of the sending interface on the electrical switch that outputs the second configuration information.
  • the third configuration information sent by the second electrical switch is received by the optical switch, where the third configuration information includes the first identifier, the second identifier, the third identifier and the fourth identifier of the receiving interface on the second switch for inputting the second configuration information identification, wherein the sending interface for outputting the first configuration information on the second electrical switch and the receiving interface for inputting the second configuration information are not in the same group of interfaces.
  • the optical switch includes at least a first optical switch and a second optical switch.
  • the transceiver is specifically configured to: receive the first configuration information sent by the second electrical switch through the first optical switch.
  • the second configuration information is sent through each sending interface on the electrical switch, and the second configuration information is sent to the second electrical switch through the second optical switch.
  • the transceiver is further configured to receive, through the optical switch, fourth configuration information broadcast by the third electrical switch, where the fourth configuration information is the configuration information used by the third electrical switch to reply to the electrical switch.
  • the processor is used for: deleting the fourth configuration information.
  • the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, wherein, when the computer program is executed by hardware, any one of the methods in the first aspect or the second aspect can be implemented. some or all of the steps.
  • FIG. 1 is a schematic diagram of a network structure in an embodiment of the application
  • FIG. 2 is a schematic diagram of an embodiment of a configuration method of a switch in an embodiment of the present application
  • FIG. 3 is a schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application
  • FIG. 4 is a schematic diagram of a link aggregation interface in an embodiment of the present application.
  • FIG. 5 is another schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application
  • FIG. 6 is a schematic diagram of one embodiment of a configuration method of a switch in an embodiment of the present application.
  • FIG. 7 is another schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a structure of a controller in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a structure of an electrical switch in an embodiment of the present application.
  • the embodiments of the present application provide a switch configuration method and related equipment. There can be more idle paths in the system for establishing a new connection between two electrical switches, and there is no need to deploy more interfaces and user interfaces on the electrical switches. For the connected fiber, cost savings.
  • FIG. 1 is a schematic diagram of a network structure in an embodiment of the present application. As shown in FIG. 1 , the present application is mainly applied in a scenario where an electrical switch interacts with an optical switch.
  • the electrical switch includes electrical switch 1 , electrical switch 2 , electrical switch 3 and electrical switch 4 as shown in FIG. 1 .
  • the optical switches include optical switch A, optical switch B, and optical switch C as shown in FIG. 1 . Specifically, a connection is established between every two electrical switches through an optical switch.
  • Each group of physical interfaces (including sending interfaces and receiving interfaces) on the electrical switch is connected with a corresponding optical interface on the optical switch through optical fibers.
  • connection between the electrical switch 1 and the electrical switch 3 is established through the optical switch A.
  • a connection is established between the electrical switch 2 and the electrical switch 4 through the optical switch B.
  • a connection is established between the electrical switch 3 and the electrical switch 4 through the optical switch C.
  • the electrical switch 2 and the electrical switch 4 may be changed to establish a connection through the optical switch A. Then, the physical interface corresponding to the optical switch B on the electrical switch 1 is idle, and the physical interface corresponding to the optical switch B on the electrical switch 4 is also idle.
  • the number of physical interfaces on each electrical switch is limited, and the transmission and reception of services between every two electrical switches requires the use of the same pair of optical ports of the optical switch for optical switching. This may result in not enough free paths in the system for establishing new connections. If the number of physical interfaces on an electrical switch is to be increased, more physical interfaces and optical fibers for connection need to be deployed on the electrical switch, resulting in higher costs.
  • the present application provides a method for configuring a switch, and there can be more idle paths in the system for establishing a new connection between two electrical switches, without deploying more interfaces on the electrical switches and connecting them fiber, saving costs.
  • FIG. 2 is a schematic diagram of an embodiment of a configuration method of a switch in an embodiment of the present application.
  • the configuration method of the switch is specifically performed by the controller, and the configuration method of the switch includes the following steps.
  • the controller may acquire the physical topology between the optical switch and the set of electrical switches through pre-configuration or manual input.
  • the physical topology specifically includes the physical connection relationship between the interface on the electrical switch and the optical interface on the optical switch. Wherein, every two electrical switches are connected through optical switches.
  • each electrical switch includes at least one group of physical interfaces, and each group of physical interfaces includes a sending interface and a receiving interface.
  • Each optical switch includes multiple optical ports for optical switching.
  • Each group of physical ports on the electrical switch can be connected to the corresponding optical ports on the optical switch through optical fibers. It should be understood that the number of optical switches in this application is usually multiple, and the specific number is not limited here.
  • this application does not limit the specific application scenarios of the above physical topology, as long as it is a connection established between a layer of electrical switches and a layer of optical switches.
  • the above physical topology can be specifically applied to spine layer switches in a data center.
  • FIG. 3 is a schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application.
  • the electrical switch includes an electrical switch 101 , an electrical switch 102 and an electrical switch 103 .
  • the optical switch includes an optical switch 201 and an optical switch 202 .
  • Each electrical switch includes two groups of physical interfaces, namely interface group 1 and interface group 2.
  • Each group of physical interfaces includes a sending interface (the interface shown in the black box in Figure 3) and the receiving interface (the white box in Figure 3). interface shown).
  • Each group of physical ports on the electrical switch is connected to the optical ports on the optical switch in one-to-one correspondence.
  • the transmission and reception of the service between two electrical switches requires the same pair of optical ports of the optical switch to perform optical switching.
  • electrical switch 101 outputs services through interface group 1, the services are input to optical port 1 of optical switch 201, and output from optical port 2 to interface group 1 of electrical switch 102 through optical switching.
  • the electrical switch 102 outputs services through the interface group 1, the services are input to the optical port 2 of the optical switch 201, and output from the optical port 1 to the interface group 1 of the electrical switch 101 after the optical switch.
  • the embodiment of the present application is different from the traditional service transmission mode in that the sending interface on the service sending path and the receiving interface on the service receiving path between at least two electrical switches are not the same group of interfaces.
  • electrical switch 101 outputs services through interface group 1, the services are input to optical port 1 of optical switch 201, and output from optical port 2 to interface group 1 of electrical switch 102 through optical switching.
  • the electrical switch 102 outputs the service through the interface group 2, the service is input to the optical port 2 of the optical switch 202, and is output from the optical port 1 to the interface group 2 of the electrical switch 101 after the optical switch.
  • the service sent from the electrical switch 101 to the electrical switch 102 needs to be optically switched through the optical switch 201
  • the service sent from the electrical switch 102 to the electrical switch 101 needs to be optically switched through the optical switch 202 .
  • the electrical switch 101 sends the service to the electrical switch 102 through the sending interface in the interface group 1, and receives the service from the electrical switch 102 through the receiving interface in the interface group 2.
  • the electrical switch 102 sends services to the electrical switch 101 through the sending interface in the interface group 2 , and receives the service from the electrical switch 101 through the receiving interface in the interface group 1 .
  • the interfaces used for service sending and service receiving are not the same set of physical interfaces.
  • the service transmission mode provided by the present application can be integrated with the traditional service transmission mode.
  • the above-mentioned traditional service transmission mode is used between certain two electrical switches, and the service transmission mode provided by the present application is used between the other two electrical switches.
  • the controller can more flexibly calculate the service transmission path between every two electrical switches, so that there can be more idle paths in the system for establishing a new connection between the two electrical switches.
  • the controller may configure the sending interface on the service sending path and the receiving interface on the service receiving path as a set of logical interfaces.
  • a logical interface can be understood as an interface that can realize the data exchange function but does not exist physically and needs to be established through configuration. That is, the controller can be reconfigured on the basis of an existing physical interface group to form a logical interface, so that the sending interface and the receiving interface in different physical interface groups can be configured as one logical interface.
  • a logical interface is only a logical division to distinguish it from a physical interface group, and it is essentially composed of physical interfaces. With reference to the example in step 202 above, the sending interface in the interface group 1 and the receiving interface in the interface group 2 on the electrical switch 101 may be configured as logical interfaces.
  • the sending interface in the interface group 2 and the receiving interface in the interface group 1 on the electrical switch 102 may be configured as logical interfaces. It should be understood that the controller also needs to determine each pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path. It should also be understood that if a certain electrical switch still transmits and receives services through the same set of physical interfaces, then there is no need to configure a logical interface for the electrical switch. It should be noted that the logical interface configured on the electrical switch includes a plurality of physical interfaces, but is not limited to the sending interface on the above-mentioned sending path and the receiving interface on the service receiving path.
  • the link aggregation interface may be updated on the basis of the existing link aggregation interface of the electrical switch to form the above-mentioned logical interface.
  • Link aggregation refers to a logical link formed by bundling several links together.
  • Each aggregation group uniquely corresponds to a logical interface, which is called a link aggregation interface or an Eth-Trunk interface. It should be understood that, in the traditional link aggregation technology, each link aggregation interface includes multiple groups of physical interfaces, and the sending interface and the receiving interface in each group of physical interfaces need to be configured on the same link aggregation interface.
  • FIG. 4 is a schematic diagram of a link aggregation interface in an embodiment of the present application.
  • the electrical switch includes physical interface groups 1-4, wherein interface group 1 and interface group 2 are configured as link aggregation interface 1, and interface group 3 and interface group 4 are configured as link aggregation interface 2.
  • the controller determines according to the calculation that the sending interface of interface group 1 and the receiving interface of interface group 3 need to be configured as a group of logical interfaces. Then, the controller can update Link Aggregation Interface 1 and Link Aggregation Interface 2. Specifically, the receiving interface in the interface group 1 is allocated to the link aggregation interface 2, and the receiving interface in the interface group 3 is allocated to the link aggregation interface 1. In this way, the updated link aggregation interface 1 includes the above-mentioned logical interface that needs to be configured. In this way, it is not only ensured that there are more idle paths in the system for establishing a new connection between the two electrical switches, but also the bandwidth and reliability can be increased through link aggregation.
  • the controller may generate first configuration information corresponding to the first electrical switch or the second electrical switch according to the determined logical interface, and send the first configuration information to the corresponding electrical switch.
  • the electrical switch can complete the configuration of the local logical interface according to the first configuration information, and transmit services through the local logical interface.
  • the first configuration information may include an Internet Protocol (Internet Protocol, IP) address of the logical interface of the opposite end electrical switch, so that the electrical switch sends services to the opposite end electrical switch according to the IP address.
  • IP Internet Protocol
  • the first electrical switch can determine the IP address of the logical interface of the second electrical switch, and the first electrical switch can send services to the logical interface of the second electrical switch through the local logical interface.
  • the first configuration information may also include Open Shortest Path First (Open Shortest Path First, OSPF) related configuration information and Border Gateway Protocol (Border Gateway Protocol, BGP) related configuration information, etc., which are not specifically limited here.
  • the controller also needs to generate the second configuration information according to the determined optical port on the optical switch for optical switching, and send the second configuration information to the optical switch.
  • the optical switch may determine each pair of optical ports used for optical switching according to the second configuration information.
  • the configuration of the electrical switch and the configuration of the optical switch can be done by the same controller. Specifically, as shown in FIG. 3 , the controller sends corresponding first configuration information to each electrical switch, and sends corresponding second configuration information to each optical switch. Furthermore, the configuration of the electrical switches and the configuration of the optical switches can be done by different controllers.
  • FIG. 5 is another schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application. As shown in FIG. 5 , the first controller sends corresponding first configuration information to each electrical switch, and the second controller sends corresponding second configuration information to each optical switch.
  • FIG. 3 the following describes a service sending path and a service receiving path between every two electrical switches in FIG. 3 .
  • the electrical switch 101 outputs the service through the sending interface in the interface group 1, the service is input from the optical port 1 of the optical switch 201, and after the optical switch is output from the optical port 2 of the optical switch 201 to the receiving interface of the interface group 1 in the electrical switch 102 interface.
  • the electrical switch 102 outputs the service through the sending interface in the interface group 2, the service is input from the optical port 2 of the optical switch 202, and after the optical switch is output from the optical port 1 of the optical switch 202 to the receiving interface of the interface group 2 in the electrical switch 101 interface.
  • the electrical switch 101 outputs the service through the sending interface in the interface group 2, the service is input from the optical port 1 of the optical switch 202, and after the optical switch is output from the optical port 3 of the optical switch 202 to the receiving interface group 1 in the electrical switch 103 interface.
  • the electrical switch 103 outputs the service through the sending interface in the interface group 2, the service is input from the optical port 3 of the optical switch 201, and after the optical switch is output from the optical port 1 of the optical switch 201 to the receiving interface group 1 of the electrical switch 101 interface.
  • the electrical switch 102 outputs the service through the sending interface in the interface group 1, the service is input from the optical port 2 of the optical switch 201, and after the optical switch is output from the optical port 3 of the optical switch 201 to the receiving interface group 2 of the electrical switch 103 interface.
  • the electrical switch 103 outputs the service through the sending interface in the interface group 1, the service is input from the optical port 3 of the optical switch 202, and after the optical switch is output from the optical port 2 of the optical switch 202 to the receiving interface group 2 of the electrical switch 102 interface.
  • FIG. 6 is a schematic diagram of an embodiment of a configuration method of a switch in an embodiment of the present application.
  • the configuration method of the switch includes the following steps.
  • the first electrical switch receives, through the optical switch, the first configuration information sent by the second electrical switch.
  • FIG. 7 is another schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application.
  • This embodiment is also applied to a system in which a physical topology is established between an electrical switch and an optical switch.
  • the difference from the foregoing embodiment is that this embodiment does not require the participation of a controller.
  • the first configuration information includes a first identifier of a sending interface on the second switch that outputs the first configuration information.
  • the first identifier may be a combination of switch ID and interface number.
  • the electrical switch 101 sends the first configuration information through the sending interface in the interface group 1, then the first identifier can be represented as (switch 101, sending interface 1). It should be understood that the above-mentioned first identifier is just an example, and the present application does not limit the specific expression form of the first identifier.
  • the second electrical switch can start a timer while sending the first configuration information. If the timer expires and still cannot receive messages replied by other electrical switches, it proves that the current service sending path is unreachable, and the second electrical switch cannot communicate with the other electrical switches. The switch needs to reselect a new interface to send the first configuration information.
  • the first electrical switch broadcasts the second configuration information through each sending interface.
  • the first electrical switch since the first electrical switch does not know which local interface can be paired with the second electrical switch. Therefore, the first electrical switch needs to send the second configuration information through each sending interface, then the second configuration information output by at least one sending interface can be transmitted to the second electrical switch.
  • the second configuration information includes the above-mentioned first identifier, the second identifier of the receiving interface on the first electrical switch that inputs the first configuration information, and the third identifier of the sending interface that outputs the second configuration information on the first electrical switch.
  • the electrical switch 102 sends the second configuration information through the sending interfaces in the interface group 1 and the interface group 2 .
  • the first configuration information is input from the receiving interface of the interface group 1 on the electrical switch 102, and the second identifier can be represented as (receiver 102, receiving interface 1).
  • the third identification may include (receiver 102, transmission interface 1) and (receiver 102, transmission interface 2).
  • the first electrical switch receives, through the optical switch, the third configuration information sent by the second electrical switch.
  • the second electrical switch After the second electrical switch receives the second configuration information sent by the first electrical switch, it can determine the service sending path and the service receiving path between the first electrical switch and the second electrical switch, and complete the local configuration. Furthermore, the second electrical switch also needs to send third configuration information to the first electrical switch, so that the first electrical switch determines the service sending path and the service receiving path, and completes the local configuration.
  • the third configuration information includes the first identification, the second identification, the third identification and the fourth identification of the receiving interface on the second electrical switch where the second configuration information is input.
  • the second configuration information is output from the sending interface of the interface group 2 on the electrical switch 102, and the second configuration information is input from the receiving interface of the interface group 2 on the electrical switch 101.
  • the fourth identifier can be represented as (receive machine 101, receiving interface 2). It should be understood that if the second electrical switch has received the second configuration information from multiple local receiving interfaces, the second electrical switch may select one receiving interface to complete the local configuration and send the third configuration information to the first electrical switch.
  • the transmission and reception of services between two electrical switches need to use the same pair of optical ports of the optical switch to perform optical switching.
  • the sending interface for outputting the first configuration information and the receiving interface for inputting the second configuration information on the second electrical switch may not be the same group of physical interfaces. It should be understood that, from a global perspective, the present application does not limit whether the same set of physical interfaces is used for service transmission and reception between two electrical switches.
  • the two electrical switches are automatically paired according to their own idle interfaces, and the sending and receiving services can use the same group of physical interfaces or physical interfaces in different groups.
  • the third electrical switch receives the second configuration information broadcast by the first electrical switch, since the second configuration information includes identifiers related to the first electrical switch and the second electrical switch, the third electrical switch The electrical switch can then determine that the pairing is performed between the first electrical switch and the second electrical switch.
  • the third electrical switch may delete the second configuration information without processing.
  • the second configuration information is output from the sending interface of the interface group 1 on the electrical switch 102, and the second configuration information is input from the receiving interface of the interface group 2 on the electrical switch 103.
  • the electrical switch 103 can determine that the second configuration information is used for the pairing of the electrical switch 101 and the electrical switch 102 according to the relevant identifier in the second configuration information, and the electrical switch 103 can delete the second configuration information.
  • FIG. 8 is a schematic diagram of a structure of a controller in an embodiment of the present application.
  • the controller includes a processor 801 , a memory 802 and a transceiver 803 .
  • the processor 801, the memory 802 and the transceiver 803 are interconnected by wires.
  • the memory 802 is used for storing program instructions and data.
  • the transceiver 803 is configured to perform the operation of sending and receiving information in the embodiment shown in FIG. 2 above.
  • the processor 801 is configured to perform other operations except for information sending and receiving in the above-mentioned embodiment shown in FIG. 2 .
  • FIG. 9 is a schematic diagram of a structure of an electrical switch in an embodiment of the present application.
  • the controller includes a processor 901 , a memory 902 and a transceiver 903 .
  • the processor 901, the memory 902 and the transceiver 903 are interconnected by wires.
  • the memory 902 is used for storing program instructions and data.
  • the transceiver 903 is configured to perform the operations of sending and receiving information in the embodiments shown in FIG. 2 and FIG. 6 .
  • the processor 901 is configured to perform other operations except for information sending and receiving in the above-mentioned embodiments shown in FIG. 2 and FIG. 6 .
  • the processors shown in FIG. 8 and FIG. 9 can be a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application-specific integrated circuit ASIC, or at least one integrated circuit for Relevant programs are executed to realize the technical solutions provided by the embodiments of the present application.
  • the memories shown in Figures 8 and 9 above may store operating systems and other applications.
  • program codes for implementing the technical solutions provided by the embodiments of the present application are stored in a memory and executed by a processor.
  • a memory may be included within the processor.
  • the processor and memory are two separate structures.
  • the above-mentioned processing unit or processor may be a central processing unit, a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices , transistor logic devices, hardware components, or any combination thereof.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.

Abstract

Provided are a switch configuration method and a related device. The method of the present application comprises: acquiring a physical topology between an optical switch and an electric switch set; determining a service sending path and a service receiving path between a first electric switch and a second electric switch in the electric switch set according to the physical topology, wherein a sending interface on the service sending path and a receiving interface on the service receiving path are not in the same group of physical interfaces; determining a logic interface in the first electrical switch or the second electrical switch according to the service sending path and the service receiving path, wherein the logic interface comprises the sending interface on the service sending path and the receiving interface on the service receiving path; and sending first configuration information to the first electrical switch or the second electrical switch, wherein the first configuration information is used for instructing the first electrical switch or the second electrical switch to transmit a service by means of a local logic interface. By means of the above-mentioned means, there can be more idle paths in a system for establishing a connection between two electrical switches.

Description

一种交换机的配置方法及相关设备A switch configuration method and related equipment
本申请要求于2020年9月27日提交中国国家知识产权局、申请号为202011033164.6、申请名称为“一种交换机的配置方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011033164.6 and the application title "A method for configuring a switch and related equipment" filed with the State Intellectual Property Office of China on September 27, 2020, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及通信领域,尤其涉及一种交换机的配置方法及相关设备。The present application relates to the field of communications, and in particular, to a switch configuration method and related equipment.
背景技术Background technique
随着网络、通信和计算机系统的大规模应用和发展。互联网数据中心也迅速发展,移动互联网、视频业务以及云计算的发展为数据中心带来流量的爆发式增长,使得愈来愈多的应用及业务处理汇聚到数据中心。虽然数据中心电交换设备的交换速率和接口速率的不断提高,但是依然无法应付海量增长的数据交换的需求。With the large-scale application and development of network, communication and computer systems. Internet data centers are also developing rapidly. The development of mobile Internet, video services and cloud computing has brought explosive growth of traffic to data centers, making more and more applications and business processing converge to data centers. Although the exchange rate and interface rate of the electrical exchange equipment in the data center are constantly improving, they are still unable to cope with the demand for massively increasing data exchange.
近年来,随着光技术的发展和光集成工艺的成熟,光互联技术应用于数据中心可以解决电交换机的一些问题,如能耗、扩展性等。具体地,可以用光交换机代替一部分电交换机,不同的电交换机之间可以通过光交换机建立连接。其中,两个电交换机之间业务的发送和接收需要采用光交换机的同一对光口进行光交换。然而通过这种方式,如果两个电交换机之间需要建立新的连接时,可能会没有空闲路径,从而需要在电交换机上部署更多的接口和用于连接的光纤,导致成本较高。In recent years, with the development of optical technology and the maturity of optical integration technology, the application of optical interconnect technology to data centers can solve some problems of electrical switches, such as energy consumption and scalability. Specifically, a part of electrical switches can be replaced by optical switches, and connections between different electrical switches can be established through optical switches. Among them, the transmission and reception of services between the two electrical switches need to use the same pair of optical ports of the optical switch to perform optical switching. However, in this way, if a new connection needs to be established between two electrical switches, there may be no idle paths, so that more interfaces and optical fibers for connection need to be deployed on the electrical switches, resulting in higher costs.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种交换机的配置方法及相关设备,系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接,无需在电交换机上部署更多的接口和用于连接的光纤,节约了成本。The embodiments of the present application provide a switch configuration method and related equipment. There can be more idle paths in the system for establishing a new connection between two electrical switches, and there is no need to deploy more interfaces and user interfaces on the electrical switches. For the connected fiber, cost savings.
第一方面,本申请提供了一种交换机的配置方法。该方法由控制器执行,具体包括多个步骤。控制器获取光交换机与电交换机集合之间的物理拓扑,其中,每个电交换机包括至少一组物理接口,每组物理接口包括一个发送接口和一个接收接口,光交换机包括多个光口。控制器根据物理拓扑确定电交换机集合中第一电交换机和第二电交换机之间的业务发送路径和业务接收路径,其中,业务发送路径上的发送接口和业务接收路径上的接收接口不是同一组物理接口。控制器根据业务发送路径和业务接收路径确定第一电交换机或第二电交换机中的逻辑接口,逻辑接口包括业务发送路径上的发送接口和业务接收路径上的接收接口。控制器向第一电交换机或第二电交换机发送第一配置信息,第一配置信息用于 指示第一电交换机或第二电交换机通过本地的逻辑接口传输业务。In a first aspect, the present application provides a method for configuring a switch. The method is executed by the controller and specifically includes multiple steps. The controller acquires the physical topology between the optical switch and the set of electrical switches, wherein each electrical switch includes at least one group of physical interfaces, each group of physical interfaces includes a sending interface and a receiving interface, and the optical switch includes multiple optical ports. The controller determines the service sending path and the service receiving path between the first electrical switch and the second electrical switch in the electrical switch set according to the physical topology, wherein the sending interface on the service sending path and the receiving interface on the service receiving path are not in the same group physical interface. The controller determines a logical interface in the first electrical switch or the second electrical switch according to the service sending path and the service receiving path, where the logical interface includes a sending interface on the service sending path and a receiving interface on the service receiving path. The controller sends first configuration information to the first electrical switch or the second electrical switch, where the first configuration information is used to instruct the first electrical switch or the second electrical switch to transmit services through a local logical interface.
在该实施方式中,两个电交换机之间的业务不再必须要采用电交换机的同一组接口进行收发,那么每两个电交换机之间的业务传输路径可以进行更灵活地配置,使得系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接,无需在电交换机上部署更多的接口和用于连接的光纤,节约了成本。In this implementation manner, services between two electrical switches no longer have to be sent and received by using the same set of interfaces of the electrical switches, so the service transmission path between each two electrical switches can be configured more flexibly, so that in the system There can be more idle paths for establishing a new connection between the two electrical switches, and there is no need to deploy more interfaces and optical fibers for connection on the electrical switches, which saves costs.
在一些可能的实施方式中,方法还包括:In some possible implementations, the method further includes:
控制器根据业务发送路径和业务接收路径确定光交换机中用于光交换的每一对光口。控制器向光交换机发送第二配置信息,第二配置信息用于指示光交换机中用于光交换的每一对光口。在该实施方式中,控制器还需要对光交换机进行配置,以使得光交换机可以按照控制器确定的业务传输路径来进行光交换。The controller determines each pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path. The controller sends second configuration information to the optical switch, where the second configuration information is used to indicate each pair of optical ports used for optical switching in the optical switch. In this embodiment, the controller also needs to configure the optical switch, so that the optical switch can perform optical switching according to the service transmission path determined by the controller.
在一些可能的实施方式中,光交换机至少包括第一光交换机和第二光交换机。In some possible implementations, the optical switch includes at least a first optical switch and a second optical switch.
获取光交换机与电交换机集合之间的物理拓扑包括:获取第一光交换机与电交换机集合之间的第一物理拓扑,获取第二光交换机与电交换机集合之间的第二物理拓扑。Acquiring the physical topology between the optical switch and the electrical switch set includes: acquiring the first physical topology between the first optical switch and the electrical switch set, and acquiring the second physical topology between the second optical switch and the electrical switch set.
根业务发送路径和业务接收路径确定光交换机中用于光交换的每一对光口包括:根据业务发送路径确定第一光交换机中用于光交换的每一对光口,并根据业务接收路径确定第二光交换机中用于光交换的每一对光口。Determining each pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path includes: determining each pair of optical ports used for optical switching in the first optical switch according to the service sending path, and determining each pair of optical ports used for optical switching in the first optical switch according to the service receiving path. Determine each pair of optical ports used for optical switching in the second optical switch.
在该实施方式中,光交换机的数量是多个,控制器需要获取每个光交换机与电交换机之间的物理拓扑,并确定每个光交换机上用于光交换的每一对光口。本方案具体应用于多个光交换机的场景中,提高了本方案的实用性。In this embodiment, the number of optical switches is multiple, and the controller needs to acquire the physical topology between each optical switch and the electrical switch, and determine each pair of optical ports used for optical switching on each optical switch. This solution is specifically applied to the scenario of multiple optical switches, which improves the practicability of this solution.
在一些可能的实施方式中,第一电交换机或第二电交换机包括链路聚合接口,链路聚合接口包括多组物理接口。In some possible implementations, the first electrical switch or the second electrical switch includes a link aggregation interface, and the link aggregation interface includes multiple groups of physical interfaces.
根据业务发送路径和业务接收路径确定第一电交换机或第二电交换机中的逻辑接口包括:根据业务发送路径和业务接收路径更新链路聚合接口,更新后的链路聚合接口包括逻辑接口。Determining the logical interface in the first electrical switch or the second electrical switch according to the service sending path and the service receiving path includes: updating the link aggregation interface according to the service sending path and the service receiving path, and the updated link aggregation interface includes a logical interface.
在该实施方式中,不仅保证了系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接,还可以通过链路聚合增加带宽并提高可靠性。In this embodiment, it is not only ensured that there are more idle paths in the system for establishing a new connection between the two electrical switches, but also the bandwidth and reliability can be increased through link aggregation.
在一些可能的实施方式中,第一配置信息包括与每个电交换机的逻辑接口对应的对端电交换机的逻辑接口的互联网协议(Internet Protocol,IP)地址,使得电交换机可以根据IP地址传输业务,提高了本方案的可实现性。In some possible implementations, the first configuration information includes an Internet Protocol (Internet Protocol, IP) address of the logical interface of the peer electrical switch corresponding to the logical interface of each electrical switch, so that the electrical switch can transmit services according to the IP address , which improves the feasibility of this scheme.
第二方面,本申请提供了一种交换机的配置方法。该方法具体由电交换机之间自主配对完成。其中,第一电交换机与光交换机连接,第二电交换机与光交换机连接,第一电交换机包括多组接口,第二电交换机包括多组接口,每一组接口包括发送接口和接收接口。 该方法具体包括多个步骤。首先,第一电交换机通过光交换机接收第二电交换机发送的第一配置信息。第一配置信息包括第二电交换机上输出第一配置信息的发送接口的第一标识。接下来,第一电交换机通过第一电交换机上的每个发送接口广播第二配置信息,并通过光交换机将第二配置信息发送至第二电交换机。每个第二配置信息包括第一标识、第一电交换机上输入第一配置信息的接收接口的第二标识和第一电交换机上输出第二配置信息的发送接口的第三标识。进而,第一电交换机通过光交换机接收第二电交换机发送的第三配置信息,第三配置信息包括第一标识、第二标识、第三标识和第二交换机上输入第二配置信息的接收接口的第四标识,其中,第二电交换机上输出第一配置信息的发送接口与输入第二配置信息的接收接口不是同一组接口。In a second aspect, the present application provides a method for configuring a switch. The method is specifically completed by autonomous pairing between electrical switches. The first electrical switch is connected to the optical switch, the second electrical switch is connected to the optical switch, the first electrical switch includes multiple groups of interfaces, the second electrical switch includes multiple groups of interfaces, and each group of interfaces includes a sending interface and a receiving interface. The method specifically includes multiple steps. First, the first electrical switch receives the first configuration information sent by the second electrical switch through the optical switch. The first configuration information includes a first identifier of a sending interface on the second electrical switch that outputs the first configuration information. Next, the first electrical switch broadcasts the second configuration information through each sending interface on the first electrical switch, and sends the second configuration information to the second electrical switch through the optical switch. Each second configuration information includes a first identifier, a second identifier of a receiving interface on the first electrical switch that inputs the first configuration information, and a third identifier of a sending interface on the first electrical switch that outputs the second configuration information. Furthermore, the first electrical switch receives third configuration information sent by the second electrical switch through the optical switch, where the third configuration information includes the first identifier, the second identifier, the third identifier and a receiving interface on the second switch for inputting the second configuration information The fourth identifier of , wherein the sending interface for outputting the first configuration information on the second electrical switch and the receiving interface for inputting the second configuration information are not the same group of interfaces.
在该实施方式中,两个电交换机之间的业务不再必须要采用电交换机的同一组接口进行收发,那么每两个电交换机之间的业务传输路径可以进行更灵活地配置,使得系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接,无需在电交换机上部署更多的接口和用于连接的光纤,节约了成本。In this implementation manner, services between two electrical switches no longer have to be sent and received by using the same set of interfaces of the electrical switches, so the service transmission path between each two electrical switches can be configured more flexibly, so that in the system There can be more idle paths for establishing a new connection between the two electrical switches, and there is no need to deploy more interfaces and optical fibers for connection on the electrical switches, which saves costs.
在一些可能的实施方式中,光交换机至少包括第一光交换机和第二光交换机。In some possible implementations, the optical switch includes at least a first optical switch and a second optical switch.
第一电交换机接收第二电交换机通过光交换机发送的第一配置信息包括:第一电交换机接收第二电交换机通过第一光交换机发送的第一配置信息。The receiving, by the first electrical switch, the first configuration information sent by the second electrical switch through the optical switch includes: the first electrical switch receiving the first configuration information sent by the second electrical switch through the first optical switch.
第一电交换机通过第一电交换机上的每个发送接口发送第二配置信息,并通过光交换机将第二配置信息发送至第二电交换机包括:第一电交换机通过第一电交换机上的每个发送接口发送第二配置信息,并通过第二光交换机将第二配置信息发送至第二电交换机。The first electrical switch sends the second configuration information through each sending interface on the first electrical switch, and sends the second configuration information to the second electrical switch through the optical switch. Each sending interface sends the second configuration information, and sends the second configuration information to the second electrical switch through the second optical switch.
在一些可能的实施方式中,方法还包括:In some possible implementations, the method further includes:
第一电交换机通过光交换机接收第三电交换机广播的第四配置信息,第四配置信息是第三电交换机用于回复第一电交换机的配置信息。第一电交换机删除第四配置信息。在该实施方式中,电交换机可以根据收到的配置信息中的标识判断该配置信息是否与自身相关,如果不相关则可以删除该配置信息。保证了电交换机的两两配对不受其他电交换机的影响。The first electrical switch receives, through the optical switch, fourth configuration information broadcast by the third electrical switch, where the fourth configuration information is configuration information used by the third electrical switch to reply to the first electrical switch. The first electrical switch deletes the fourth configuration information. In this implementation manner, the electrical switch can determine whether the configuration information is related to itself according to the identifier in the received configuration information, and if not, the configuration information can be deleted. It is ensured that the pairing of electrical switches is not affected by other electrical switches.
第三方面,本申请提供了一种控制器,包括处理器、存储器以及收发器。其中,该处理器、该存储器以及该光收发器通过线路互相连接。In a third aspect, the present application provides a controller including a processor, a memory and a transceiver. Wherein, the processor, the memory and the optical transceiver are connected to each other through lines.
处理器用于:首先,获取光交换机与电交换机集合之间的物理拓扑,电交换机集合中每个电交换机包括至少一组物理接口,每一组物理接口包括一个发送接口和一个接收接口,光交换机包括多个光口。之后,根据物理拓扑确定电交换机集合中第一电交换机和第二电交换机之间的业务发送路径和业务接收路径,其中,业务发送路径上的发送接口和业务接收路径上的接收接口不是同一组物理接口。接下来,根据业务发送路径和业务接收路径确定第一电交换机或第二电交换机中的逻辑接口,逻辑接口包括业务发送路径上的发送接口和业务接收路径上的接收接口。The processor is used to: first, obtain the physical topology between the optical switch and the electrical switch set, each electrical switch in the electrical switch set includes at least one group of physical interfaces, each group of physical interfaces includes a sending interface and a receiving interface, and the optical switch Including multiple optical ports. After that, determine the service sending path and the service receiving path between the first electrical switch and the second electrical switch in the electrical switch set according to the physical topology, wherein the sending interface on the service sending path and the receiving interface on the service receiving path are not in the same group physical interface. Next, a logical interface in the first electrical switch or the second electrical switch is determined according to the service sending path and the service receiving path, where the logical interface includes a sending interface on the service sending path and a receiving interface on the service receiving path.
收发器用于:向第一电交换机或第二电交换机发送第一配置信息,第一配置信息用于 指示第一电交换机或第二电交换机通过本地的逻辑接口传输业务。The transceiver is configured to: send first configuration information to the first electrical switch or the second electrical switch, where the first configuration information is used to instruct the first electrical switch or the second electrical switch to transmit services through a local logical interface.
在一些可能的实施方式中,处理器还用于:根据业务发送路径和业务接收路径确定光交换机中用于光交换的每一对光口。In some possible implementations, the processor is further configured to: determine each pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path.
收发器还用于:向光交换机发送第二配置信息,第二配置信息用于指示光交换机中用于光交换的每一对光口。The transceiver is further configured to: send second configuration information to the optical switch, where the second configuration information is used to indicate each pair of optical ports used for optical switching in the optical switch.
在一些可能的实施方式中,光交换机至少包括第一光交换机和第二光交换机。In some possible implementations, the optical switch includes at least a first optical switch and a second optical switch.
处理器具体用于:获取第一光交换机与电交换机集合之间的第一物理拓扑,获取第二光交换机与电交换机集合之间的第二物理拓扑。根据业务发送路径确定第一光交换机中用于光交换的每一对光口,并根据业务接收路径确定第二光交换机中用于光交换的每一对光口。The processor is specifically configured to: acquire the first physical topology between the first optical switch and the electrical switch set, and acquire the second physical topology between the second optical switch and the electrical switch set. Each pair of optical ports used for optical switching in the first optical switch is determined according to the service sending path, and each pair of optical ports used for optical switching in the second optical switch is determined according to the service receiving path.
在一些可能的实施方式中,第一电交换机或第二电交换机包括链路聚合接口,链路聚合接口包括多组物理接口。In some possible implementations, the first electrical switch or the second electrical switch includes a link aggregation interface, and the link aggregation interface includes multiple groups of physical interfaces.
处理器具体用于:根据业务发送路径和业务接收路径更新链路聚合接口,更新后的链路聚合接口包括逻辑接口。The processor is specifically configured to: update the link aggregation interface according to the service sending path and the service receiving path, and the updated link aggregation interface includes a logical interface.
在一些可能的实施方式中,第一配置信息包括逻辑接口对应的对端电交换机的逻辑接口的IP地址。In some possible implementation manners, the first configuration information includes an IP address of a logical interface of the peer electrical switch corresponding to the logical interface.
第四方面,本申请提供了一种电交换机,包括处理器、存储器以及收发器。其中,该处理器、该存储器以及该光收发器通过线路互相连接。处理器调用存储器中的程序代码用于控制收发器。In a fourth aspect, the present application provides an electrical switch, including a processor, a memory, and a transceiver. Wherein, the processor, the memory and the optical transceiver are connected to each other through lines. The processor invokes program code in memory for controlling the transceiver.
收发器用于:首先,通过光交换机接收第二电交换机发送的第一配置信息,第一配置信息包括第二电交换机上输出第一配置信息的发送接口的第一标识。之后,通过电交换机上的每个发送接口广播第二配置信息,并通过光交换机将第二配置信息发送至第二电交换机,每个第二配置信息包括第一标识、电交换机上输入第一配置信息的接收接口的第二标识和电交换机上输出第二配置信息的发送接口的第三标识。接下来,通过光交换机接收第二电交换机发送的第三配置信息,第三配置信息包括第一标识、第二标识、第三标识和第二交换机上输入第二配置信息的接收接口的第四标识,其中,第二电交换机上输出第一配置信息的发送接口与输入第二配置信息的接收接口不是同一组接口。The transceiver is used for: first, receiving first configuration information sent by the second electrical switch through the optical switch, where the first configuration information includes a first identifier of a sending interface on the second electrical switch that outputs the first configuration information. After that, broadcast the second configuration information through each sending interface on the electrical switch, and send the second configuration information to the second electrical switch through the optical switch, where each second configuration information includes the first identifier, the first identifier entered on the electrical switch The second identifier of the receiving interface of the configuration information and the third identifier of the sending interface on the electrical switch that outputs the second configuration information. Next, the third configuration information sent by the second electrical switch is received by the optical switch, where the third configuration information includes the first identifier, the second identifier, the third identifier and the fourth identifier of the receiving interface on the second switch for inputting the second configuration information identification, wherein the sending interface for outputting the first configuration information on the second electrical switch and the receiving interface for inputting the second configuration information are not in the same group of interfaces.
在一些可能的实施方式中,光交换机至少包括第一光交换机和第二光交换机。In some possible implementations, the optical switch includes at least a first optical switch and a second optical switch.
收发器具体用于:接收第二电交换机通过第一光交换机发送的第一配置信息。通过电交换机上的每个发送接口发送第二配置信息,并通过第二光交换机将第二配置信息发送至第二电交换机。The transceiver is specifically configured to: receive the first configuration information sent by the second electrical switch through the first optical switch. The second configuration information is sent through each sending interface on the electrical switch, and the second configuration information is sent to the second electrical switch through the second optical switch.
在一些可能的实施方式中,收发器还用于:通过光交换机接收第三电交换机广播的第 四配置信息,第四配置信息是第三电交换机用于回复电交换机的配置信息。处理器用于:删除第四配置信息。In some possible implementations, the transceiver is further configured to receive, through the optical switch, fourth configuration information broadcast by the third electrical switch, where the fourth configuration information is the configuration information used by the third electrical switch to reply to the electrical switch. The processor is used for: deleting the fourth configuration information.
第五方面,本申请提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,其中,计算机程序被硬件执行时能够实现上述第一方面或第二方面中任意一种方法的部分或全部步骤。In a fifth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, wherein, when the computer program is executed by hardware, any one of the methods in the first aspect or the second aspect can be implemented. some or all of the steps.
本申请实施例中,两个电交换机之间的业务不再必须要采用电交换机的同一组接口进行收发,那么每两个电交换机之间的业务传输路径可以进行更灵活地配置,使得系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接,无需在电交换机上部署更多的接口和用于连接的光纤,节约了成本。In the embodiment of the present application, services between two electrical switches no longer have to be sent and received by using the same set of interfaces of the electrical switches, so the service transmission path between each two electrical switches can be configured more flexibly, so that in the system There can be more idle paths for establishing a new connection between the two electrical switches, and there is no need to deploy more interfaces and optical fibers for connection on the electrical switches, which saves costs.
附图说明Description of drawings
图1为本申请实施例中的一种网络结构示意图;FIG. 1 is a schematic diagram of a network structure in an embodiment of the application;
图2为本申请实施例中交换机的配置方法的一个实施例示意图;FIG. 2 is a schematic diagram of an embodiment of a configuration method of a switch in an embodiment of the present application;
图3为本申请实施例中光交换机与电交换机集合之间物理拓扑的一个示意图;3 is a schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application;
图4为本申请实施例中链路聚合接口的一个示意图;FIG. 4 is a schematic diagram of a link aggregation interface in an embodiment of the present application;
图5为本申请实施例中光交换机与电交换机集合之间物理拓扑的另一个示意图;5 is another schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application;
图6为本申请实施例中交换机的配置方法的那个一个实施例示意图;FIG. 6 is a schematic diagram of one embodiment of a configuration method of a switch in an embodiment of the present application;
图7为本申请实施例中光交换机与电交换机集合之间物理拓扑的另一个示意图;7 is another schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application;
图8为本申请实施例中控制器的一种结示意图;8 is a schematic diagram of a structure of a controller in an embodiment of the present application;
图9为本申请实施例中电交换机的一种结示意图。FIG. 9 is a schematic diagram of a structure of an electrical switch in an embodiment of the present application.
具体实施方式detailed description
本申请实施例提供了一种交换机的配置方法及相关设备,系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接,无需在电交换机上部署更多的接口和用于连接的光纤,节约了成本。The embodiments of the present application provide a switch configuration method and related equipment. There can be more idle paths in the system for establishing a new connection between two electrical switches, and there is no need to deploy more interfaces and user interfaces on the electrical switches. For the connected fiber, cost savings.
需要说明的是,本申请说明书和权利要求书及上述附图中的术语“第一”、“第二”和“第三”等用于区别类似的对象,而非限定特定的顺序或先后次序。应理解,上述术语在适当情况下可以互换,以便在本申请描述的实施例能够以除了在本申请描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含。例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second" and "third" in the description and claims of the present application and the above drawings are used to distinguish similar objects, rather than limiting a specific order or sequence. . It is to be understood that the above terms are interchangeable under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those described herein. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units expressly listed, but may include steps or units not expressly listed or for such process, method, product or Other steps or units inherent to the device.
图1为本申请实施例中的一种网络结构示意图。如图1所示,本申请主要应用于电交换机与光交换机交互的场景中。其中,电交换机包括如图1所示的电交换机1、电交换机2、 电交换机3和电交换机4。光交换机包括如图1所示的光交换机A、光交换机B和光交换机C。具体地,每两个电交换机之间通过光交换机建立连接。电交换机上的每组物理接口(包括发送接口和接收接口)与光交换机上对应的一个光口通过光纤连接。FIG. 1 is a schematic diagram of a network structure in an embodiment of the present application. As shown in FIG. 1 , the present application is mainly applied in a scenario where an electrical switch interacts with an optical switch. The electrical switch includes electrical switch 1 , electrical switch 2 , electrical switch 3 and electrical switch 4 as shown in FIG. 1 . The optical switches include optical switch A, optical switch B, and optical switch C as shown in FIG. 1 . Specifically, a connection is established between every two electrical switches through an optical switch. Each group of physical interfaces (including sending interfaces and receiving interfaces) on the electrical switch is connected with a corresponding optical interface on the optical switch through optical fibers.
例如,电交换机1和电交换机3之间通过光交换机A建立连接。电交换机2和电交换机4之间通过光交换机B建立连接。电交换机3和电交换机4之间通过光交换机C建立连接。可以看出,电交换机1上与光交换机A对应的物理接口被占用了,电交换机4上与光交换机B和光交换机C对应的物理接口也都被占用了。因此,电交换机1和电交换机4之间暂时无法通过光交换机A、光交换机B和光交换机C来建立连接。在这种情况下,只能通过光交换路径重排来实现电交换机1和电交换机4之间的连接。具体可以将电交换机2和电交换机4改为通过光交换机A来建立连接。那么,电交换机1上与光交换机B对应的物理接口空闲,电交换机4上与光交换机B对应的物理接口也空闲,电交换机1和电交换机4之间可以通过光交换机B建立连接。For example, the connection between the electrical switch 1 and the electrical switch 3 is established through the optical switch A. A connection is established between the electrical switch 2 and the electrical switch 4 through the optical switch B. A connection is established between the electrical switch 3 and the electrical switch 4 through the optical switch C. It can be seen that the physical interface corresponding to the optical switch A on the electrical switch 1 is occupied, and the physical interfaces corresponding to the optical switch B and the optical switch C on the electrical switch 4 are also occupied. Therefore, the connection between the electrical switch 1 and the electrical switch 4 cannot be established through the optical switch A, the optical switch B, and the optical switch C temporarily. In this case, the connection between the electrical switch 1 and the electrical switch 4 can only be achieved through optical switching path rearrangement. Specifically, the electrical switch 2 and the electrical switch 4 may be changed to establish a connection through the optical switch A. Then, the physical interface corresponding to the optical switch B on the electrical switch 1 is idle, and the physical interface corresponding to the optical switch B on the electrical switch 4 is also idle.
然而,在实际应用中,每个电交换机上的物理接口数量都是有限的,并且每两个电交换机之间业务的发送和接收需要采用光交换机的同一对光口进行光交换。这就可能会导致系统中没有足够多的空闲路径用于建立新的连接。如果要增加电交换机上的物理接口数量,就需要在电交换机上部署更多的物理接口和用于连接的光纤,导致成本较高。However, in practical applications, the number of physical interfaces on each electrical switch is limited, and the transmission and reception of services between every two electrical switches requires the use of the same pair of optical ports of the optical switch for optical switching. This may result in not enough free paths in the system for establishing new connections. If the number of physical interfaces on an electrical switch is to be increased, more physical interfaces and optical fibers for connection need to be deployed on the electrical switch, resulting in higher costs.
为此,本申请提供了一种交换机的配置方法,系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接,无需在电交换机上部署更多的接口和用于连接的光纤,节约了成本。To this end, the present application provides a method for configuring a switch, and there can be more idle paths in the system for establishing a new connection between two electrical switches, without deploying more interfaces on the electrical switches and connecting them fiber, saving costs.
图2为本申请实施例中交换机的配置方法的一个实施例示意图。在示例中,交换机的配置方法具体由控制器执行,交换机的配置方法包括如下步骤。FIG. 2 is a schematic diagram of an embodiment of a configuration method of a switch in an embodiment of the present application. In an example, the configuration method of the switch is specifically performed by the controller, and the configuration method of the switch includes the following steps.
201、获取光交换机与电交换机集合之间的物理拓扑。201. Acquire the physical topology between the optical switch and the electrical switch set.
本实施例中,控制器可以通过预配置或人工输入的方式获取光交换机与电交换机集合之间的物理拓扑。该物理拓扑具体包括电交换机上接口与光交换机上光口之间的物理连接关系。其中,每两个电交换机之间通过光交换机连接。具体地,每个电交换机包括至少一组物理接口,每组物理接口都包括发送接口和接收接口。每个光交换机包括多个用于光交换的光口。电交换机上的每一组物理接口都可以通过光纤与光交换机上对应的光口连接。应理解,本申请中光交换机的数量通常为多个,具体数量此处不做限定。另外,本申请不限定上述物理拓扑的具体应用场景,只要是一层电交换机和一层光交换机之间建立的连接即可,例如上述物理拓扑具体可应用于数据中心中的spine层交换机。In this embodiment, the controller may acquire the physical topology between the optical switch and the set of electrical switches through pre-configuration or manual input. The physical topology specifically includes the physical connection relationship between the interface on the electrical switch and the optical interface on the optical switch. Wherein, every two electrical switches are connected through optical switches. Specifically, each electrical switch includes at least one group of physical interfaces, and each group of physical interfaces includes a sending interface and a receiving interface. Each optical switch includes multiple optical ports for optical switching. Each group of physical ports on the electrical switch can be connected to the corresponding optical ports on the optical switch through optical fibers. It should be understood that the number of optical switches in this application is usually multiple, and the specific number is not limited here. In addition, this application does not limit the specific application scenarios of the above physical topology, as long as it is a connection established between a layer of electrical switches and a layer of optical switches. For example, the above physical topology can be specifically applied to spine layer switches in a data center.
图3为本申请实施例中光交换机与电交换机集合之间物理拓扑的一个示意图。如图3所示,电交换机包括电交换机101、电交换机102和电交换机103。光交换机包括光交换机201和光交换机202。每个电交换机包括2组物理接口,分别为接口组1和接口组2,每组物理接口包括发送接口(如图3中黑色框所示的接口)和接收接口(如图3中白色框所示 的接口)。电交换机上的每组物理接口与光交换机上的光口一一对应连接。FIG. 3 is a schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application. As shown in FIG. 3 , the electrical switch includes an electrical switch 101 , an electrical switch 102 and an electrical switch 103 . The optical switch includes an optical switch 201 and an optical switch 202 . Each electrical switch includes two groups of physical interfaces, namely interface group 1 and interface group 2. Each group of physical interfaces includes a sending interface (the interface shown in the black box in Figure 3) and the receiving interface (the white box in Figure 3). interface shown). Each group of physical ports on the electrical switch is connected to the optical ports on the optical switch in one-to-one correspondence.
202、根据物理拓扑确定电交换机集合中第一电交换机和第二电交换机之间的业务发送路径和业务接收路径。202. Determine, according to the physical topology, a service sending path and a service receiving path between the first electrical switch and the second electrical switch in the electrical switch set.
在传统的业务传输方式中,两个电交换机之间的业务的发送和接收需要采用光交换机的同一对光口进行光交换。以图3为例,电交换机101通过接口组1输出业务,该业务输入到光交换机201的光口1,并通过光交换后从光口2输出到电交换机102的接口组1。同理,电交换机102通过接口组1输出业务,该业务输入到光交换机201的光口2,并通过光交换后从光口1输出到电交换机101的接口组1。In the traditional service transmission mode, the transmission and reception of the service between two electrical switches requires the same pair of optical ports of the optical switch to perform optical switching. Taking FIG. 3 as an example, electrical switch 101 outputs services through interface group 1, the services are input to optical port 1 of optical switch 201, and output from optical port 2 to interface group 1 of electrical switch 102 through optical switching. Similarly, the electrical switch 102 outputs services through the interface group 1, the services are input to the optical port 2 of the optical switch 201, and output from the optical port 1 to the interface group 1 of the electrical switch 101 after the optical switch.
本申请实施例区别于传统的业务传输方式,至少两个电交换机之间的业务发送路径上的发送接口和业务接收路径上的接收接口不是同一组接口。以图3为例,电交换机101通过接口组1输出业务,该业务输入到光交换机201的光口1,并通过光交换后从光口2输出到电交换机102的接口组1。不同的是,电交换机102通过接口组2输出业务,该业务输入到光交换机202的光口2,并通过光交换后从光口1输出到电交换机101的接口组2。可以看出,电交换机101向电交换机102发送的业务需要通过光交换机201进行光交换,而电交换机102向电交换机101发送的业务需要通过光交换机202进行光交换。电交换机101通过接口组1中的发送接口向电交换机102发送业务,并通过接口组2中的接收接口接收来自电交换机102的业务。同理,电交换机102通过接口组2中的发送接口向电交换机101发送业务,并通过接口组1中的接收接口接收来自电交换机101的业务。对于电交换机101和电交换机102来说,业务发送和业务接收所采用的接口并不是同一组物理接口。The embodiment of the present application is different from the traditional service transmission mode in that the sending interface on the service sending path and the receiving interface on the service receiving path between at least two electrical switches are not the same group of interfaces. Taking FIG. 3 as an example, electrical switch 101 outputs services through interface group 1, the services are input to optical port 1 of optical switch 201, and output from optical port 2 to interface group 1 of electrical switch 102 through optical switching. The difference is that the electrical switch 102 outputs the service through the interface group 2, the service is input to the optical port 2 of the optical switch 202, and is output from the optical port 1 to the interface group 2 of the electrical switch 101 after the optical switch. It can be seen that the service sent from the electrical switch 101 to the electrical switch 102 needs to be optically switched through the optical switch 201 , and the service sent from the electrical switch 102 to the electrical switch 101 needs to be optically switched through the optical switch 202 . The electrical switch 101 sends the service to the electrical switch 102 through the sending interface in the interface group 1, and receives the service from the electrical switch 102 through the receiving interface in the interface group 2. Similarly, the electrical switch 102 sends services to the electrical switch 101 through the sending interface in the interface group 2 , and receives the service from the electrical switch 101 through the receiving interface in the interface group 1 . For the electrical switch 101 and the electrical switch 102, the interfaces used for service sending and service receiving are not the same set of physical interfaces.
应理解,在实际应用中,可以将本申请所提供的业务传输方式与传统的业务传输方式进行融合。例如,某两个电交换机之间采用上述传统的业务传输方式,而另外两个电交换机之间采用本申请提供的业务传输方式。通过这种融合的方案,控制器可以更灵活地计算每两个电交换机之间的业务传输路径,使得系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接。It should be understood that, in practical applications, the service transmission mode provided by the present application can be integrated with the traditional service transmission mode. For example, the above-mentioned traditional service transmission mode is used between certain two electrical switches, and the service transmission mode provided by the present application is used between the other two electrical switches. Through this integrated solution, the controller can more flexibly calculate the service transmission path between every two electrical switches, so that there can be more idle paths in the system for establishing a new connection between the two electrical switches.
203、根据业务发送路径和业务接收路径确定第一电交换机或第二电交换机中的逻辑接口。203. Determine a logical interface in the first electrical switch or the second electrical switch according to the service sending path and the service receiving path.
本实施例中,控制器可以将业务发送路径上的发送接口和业务接收路径上的接收接口配置为一组逻辑接口。逻辑接口可以理解为能够实现数据交换功能但物理上不存在,需要通过配置建立的接口。也就是说,控制器可以在已有的物理接口组的基础上重新配置以形成逻辑接口,使得不同物理接口组中的发送接口和接收接口可以配置为一个逻辑接口。逻辑接口只是为了与物理接口组进行区分而进行的一种逻辑上的划分,其本质上还是由物理接口组成的。结合上述步骤202中的示例,电交换机101上接口组1中的发送接口和接口组2中的接收接口可以配置为逻辑接口。电交换机102上接口组2中的发送接口和接口组1中的接收接口可以配置为逻辑接口。应理解,控制器还需要根据业务发送路径和业务接收路径确定光交换机中用于光交换的每一对光口。还应理解,如果某个电交换机仍通过同 一组物理接口进行业务收发,那么也无需为该电交换机配置逻辑接口。需要说明的是,电交换机上配置的逻辑接口包括多个物理接口但不限于上述发送路径上的发送接口和业务接收路径上的接收接口。In this embodiment, the controller may configure the sending interface on the service sending path and the receiving interface on the service receiving path as a set of logical interfaces. A logical interface can be understood as an interface that can realize the data exchange function but does not exist physically and needs to be established through configuration. That is, the controller can be reconfigured on the basis of an existing physical interface group to form a logical interface, so that the sending interface and the receiving interface in different physical interface groups can be configured as one logical interface. A logical interface is only a logical division to distinguish it from a physical interface group, and it is essentially composed of physical interfaces. With reference to the example in step 202 above, the sending interface in the interface group 1 and the receiving interface in the interface group 2 on the electrical switch 101 may be configured as logical interfaces. The sending interface in the interface group 2 and the receiving interface in the interface group 1 on the electrical switch 102 may be configured as logical interfaces. It should be understood that the controller also needs to determine each pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path. It should also be understood that if a certain electrical switch still transmits and receives services through the same set of physical interfaces, then there is no need to configure a logical interface for the electrical switch. It should be noted that the logical interface configured on the electrical switch includes a plurality of physical interfaces, but is not limited to the sending interface on the above-mentioned sending path and the receiving interface on the service receiving path.
在一种可能的实施方式中,可以在电交换机已有的链路聚合接口的基础上,更新链路集合接口以形成上述的逻辑接口。链路聚合是指将若干条链路捆绑在一起所形成的逻辑链路。每个聚合组唯一对应着一个逻辑接口,这个逻辑接口称之为链路聚合接口或Eth-Trunk接口。应理解,传统的链路集合技术中,每个链路聚合接口包括多组物理接口,每组物理接口中的发送接口和接收接口都需要配置在同一个链路聚合接口中。而本申请中,可以根据需要将每组物理接口中的发送接口和接收接口配置在不同的链路聚合接口中。下面以图4为例进行介绍,图4为本申请实施例中链路聚合接口的一个示意图。In a possible implementation, the link aggregation interface may be updated on the basis of the existing link aggregation interface of the electrical switch to form the above-mentioned logical interface. Link aggregation refers to a logical link formed by bundling several links together. Each aggregation group uniquely corresponds to a logical interface, which is called a link aggregation interface or an Eth-Trunk interface. It should be understood that, in the traditional link aggregation technology, each link aggregation interface includes multiple groups of physical interfaces, and the sending interface and the receiving interface in each group of physical interfaces need to be configured on the same link aggregation interface. In this application, the sending interface and the receiving interface in each group of physical interfaces may be configured on different link aggregation interfaces as required. The following takes FIG. 4 as an example for introduction. FIG. 4 is a schematic diagram of a link aggregation interface in an embodiment of the present application.
如图4所示,电交换机包括物理接口组1-4,其中,接口组1和接口组2配置为链路聚合接口1,接口组3和接口组4配置为链路聚合接口2。如果控制器根据计算确定接口组1的发送接口和接口组3的接收接口需要配置为一组逻辑接口。那么,控制器可以更新链路聚合接口1和链路聚合接口2。具体地,将接口组1中的接收接口分配至链路聚合接口2,将接口组3中的接收接口分配至链路聚合接口1。这样一来,更新后的链路聚合接口1包括上述需要配置的逻辑接口。通过这种方式,不仅保证了系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接,还可以通过链路聚合增加带宽并提高可靠性。As shown in FIG. 4 , the electrical switch includes physical interface groups 1-4, wherein interface group 1 and interface group 2 are configured as link aggregation interface 1, and interface group 3 and interface group 4 are configured as link aggregation interface 2. If the controller determines according to the calculation that the sending interface of interface group 1 and the receiving interface of interface group 3 need to be configured as a group of logical interfaces. Then, the controller can update Link Aggregation Interface 1 and Link Aggregation Interface 2. Specifically, the receiving interface in the interface group 1 is allocated to the link aggregation interface 2, and the receiving interface in the interface group 3 is allocated to the link aggregation interface 1. In this way, the updated link aggregation interface 1 includes the above-mentioned logical interface that needs to be configured. In this way, it is not only ensured that there are more idle paths in the system for establishing a new connection between the two electrical switches, but also the bandwidth and reliability can be increased through link aggregation.
204、向第一电交换机或第二电交换机发送第一配置信息,并向光交换机发送第二配置信息。204. Send the first configuration information to the first electrical switch or the second electrical switch, and send the second configuration information to the optical switch.
控制器可以根据确定的逻辑接口生成与第一电交换机或第二电交换机对应的第一配置信息,并将第一配置信息发送至对应的电交换机。电交换机可以根据第一配置信息完成本地逻辑接口的配置,并通过本地的逻辑接口传输业务。应理解,第一配置信息中可以包括对端电交换机的逻辑接口的互联网协议(Internet Protocol,IP)地址,以使得电交换机根据该IP地址向对端电交换机发送业务。例如,第一电交换机收到第一配置信息后即可确定第二电交换机的逻辑接口的IP地址,第一电交换机可以通过本地的逻辑接口向第二电交换机的逻辑接口发送业务。此外,第一配置信息中还可以包括开放最短路径优先(Open Shortest Path First,OSPF)的相关配置信息和边界网关协议(Border Gateway Protocol,BGP)的相关配置信息等,具体此处不做限定。The controller may generate first configuration information corresponding to the first electrical switch or the second electrical switch according to the determined logical interface, and send the first configuration information to the corresponding electrical switch. The electrical switch can complete the configuration of the local logical interface according to the first configuration information, and transmit services through the local logical interface. It should be understood that the first configuration information may include an Internet Protocol (Internet Protocol, IP) address of the logical interface of the opposite end electrical switch, so that the electrical switch sends services to the opposite end electrical switch according to the IP address. For example, after receiving the first configuration information, the first electrical switch can determine the IP address of the logical interface of the second electrical switch, and the first electrical switch can send services to the logical interface of the second electrical switch through the local logical interface. In addition, the first configuration information may also include Open Shortest Path First (Open Shortest Path First, OSPF) related configuration information and Border Gateway Protocol (Border Gateway Protocol, BGP) related configuration information, etc., which are not specifically limited here.
需要说明的是,控制器还需要根据确定的光交换机上用于光交换的光口生成第二配置信息,并将第二配置信息发送至光交换机。光交换机可以根据第二配置信息确定用于光交换的每一对光口。It should be noted that the controller also needs to generate the second configuration information according to the determined optical port on the optical switch for optical switching, and send the second configuration information to the optical switch. The optical switch may determine each pair of optical ports used for optical switching according to the second configuration information.
可选地,电交换机的配置和光交换机的配置可以由同一个控制器完成。具体可以如图3所示,控制器向每个电交换机发送对应的第一配置信息,并向每个光交换机发送对应的第二配置信息。此外,电交换机的配置和光交换机的配置可以由不同的控制器完成。图5为本申请实施例中光交换机与电交换机集合之间物理拓扑的另一个示意图。如图5所示, 第一控制器向每个电交换机发送对应的第一配置信息,第二控制器向每个光交换机发送对应的第二配置信息。Optionally, the configuration of the electrical switch and the configuration of the optical switch can be done by the same controller. Specifically, as shown in FIG. 3 , the controller sends corresponding first configuration information to each electrical switch, and sends corresponding second configuration information to each optical switch. Furthermore, the configuration of the electrical switches and the configuration of the optical switches can be done by different controllers. FIG. 5 is another schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application. As shown in FIG. 5 , the first controller sends corresponding first configuration information to each electrical switch, and the second controller sends corresponding second configuration information to each optical switch.
下面以图3为示例,对图3中每两个电交换机之间的业务发送路径和业务接收路径进行说明。Taking FIG. 3 as an example, the following describes a service sending path and a service receiving path between every two electrical switches in FIG. 3 .
第一、电交换机101和电交换机102之间的业务收发路径。First, a service sending and receiving path between the electrical switch 101 and the electrical switch 102 .
电交换机101通过接口组1中的发送接口输出业务,该业务从光交换机201的光口1输入,并通过光交换后从光交换机201的光口2输出至电交换机102中接口组1的接收接口。电交换机102通过接口组2中的发送接口输出业务,该业务从光交换机202的光口2输入,并通过光交换后从光交换机202的光口1输出至电交换机101中接口组2的接收接口。The electrical switch 101 outputs the service through the sending interface in the interface group 1, the service is input from the optical port 1 of the optical switch 201, and after the optical switch is output from the optical port 2 of the optical switch 201 to the receiving interface of the interface group 1 in the electrical switch 102 interface. The electrical switch 102 outputs the service through the sending interface in the interface group 2, the service is input from the optical port 2 of the optical switch 202, and after the optical switch is output from the optical port 1 of the optical switch 202 to the receiving interface of the interface group 2 in the electrical switch 101 interface.
第二、电交换机101和电交换机103之间的业务收发路径。Second, a service sending and receiving path between the electrical switch 101 and the electrical switch 103 .
电交换机101通过接口组2中的发送接口输出业务,该业务从光交换机202的光口1输入,并通过光交换后从光交换机202的光口3输出至电交换机103中接口组1的接收接口。电交换机103通过接口组2中的发送接口输出业务,该业务从光交换机201的光口3输入,并通过光交换后从光交换机201的光口1输出至电交换机101中接口组1的接收接口。The electrical switch 101 outputs the service through the sending interface in the interface group 2, the service is input from the optical port 1 of the optical switch 202, and after the optical switch is output from the optical port 3 of the optical switch 202 to the receiving interface group 1 in the electrical switch 103 interface. The electrical switch 103 outputs the service through the sending interface in the interface group 2, the service is input from the optical port 3 of the optical switch 201, and after the optical switch is output from the optical port 1 of the optical switch 201 to the receiving interface group 1 of the electrical switch 101 interface.
第三、电交换机102和电交换机103之间的业务收发路径。Third, the service transmission and reception path between the electrical switch 102 and the electrical switch 103 .
电交换机102通过接口组1中的发送接口输出业务,该业务从光交换机201的光口2输入,并通过光交换后从光交换机201的光口3输出至电交换机103中接口组2的接收接口。电交换机103通过接口组1中的发送接口输出业务,该业务从光交换机202的光口3输入,并通过光交换后从光交换机202的光口2输出至电交换机102中接口组2的接收接口。The electrical switch 102 outputs the service through the sending interface in the interface group 1, the service is input from the optical port 2 of the optical switch 201, and after the optical switch is output from the optical port 3 of the optical switch 201 to the receiving interface group 2 of the electrical switch 103 interface. The electrical switch 103 outputs the service through the sending interface in the interface group 1, the service is input from the optical port 3 of the optical switch 202, and after the optical switch is output from the optical port 2 of the optical switch 202 to the receiving interface group 2 of the electrical switch 102 interface.
上面对本申请中由控制器对交换机进行配置的方法进行了介绍。下面对本申请中电交换机之间自主配置的方法进行介绍。The method for configuring the switch by the controller in the present application is described above. The following describes a method for autonomous configuration between electrical switches in this application.
图6为本申请实施例中交换机的配置方法的那个一个实施例示意图。在示例中,交换机的配置方法包括如下步骤。FIG. 6 is a schematic diagram of an embodiment of a configuration method of a switch in an embodiment of the present application. In an example, the configuration method of the switch includes the following steps.
301、第一电交换机通过光交换机接收第二电交换机发送的第一配置信息。301. The first electrical switch receives, through the optical switch, the first configuration information sent by the second electrical switch.
图7为本申请实施例中光交换机与电交换机集合之间物理拓扑的另一个示意图。本实施例同样应用于电交换机与光交换机之间建立物理拓扑的系统中,与上述实施例的区别在于,本实施例无需控制器的参与。关于该物理拓扑具体可以参考图2所示实施例中步骤201的相关描述,此处不再赘述。具体地,第一配置信息中包括第二交换机上输出第一配置信息的发送接口的第一标识。其中,该第一标识可以是交换机ID和接口号的组合。以图7为例,电交换机101通过接口组1中的发送接口发送第一配置信息,那么该第一标识可以表 示为(交换机101、发送接口1)。应理解,上述的第一标识只是一个示例,本申请不限定第一标识的具体表现形式。FIG. 7 is another schematic diagram of a physical topology between an optical switch and an electrical switch set in an embodiment of the present application. This embodiment is also applied to a system in which a physical topology is established between an electrical switch and an optical switch. The difference from the foregoing embodiment is that this embodiment does not require the participation of a controller. For details of the physical topology, reference may be made to the relevant description of step 201 in the embodiment shown in FIG. 2 , which will not be repeated here. Specifically, the first configuration information includes a first identifier of a sending interface on the second switch that outputs the first configuration information. Wherein, the first identifier may be a combination of switch ID and interface number. Taking Fig. 7 as an example, the electrical switch 101 sends the first configuration information through the sending interface in the interface group 1, then the first identifier can be represented as (switch 101, sending interface 1). It should be understood that the above-mentioned first identifier is just an example, and the present application does not limit the specific expression form of the first identifier.
需要说明的是,第二电交换机在发送第一配置信息的同时可以启动定时器,若定时器超时后仍不能收到其他电交换机回复的消息,则证明当前的业务发送路径不通,第二电交换机需要重新选择新的接口来发送第一配置信息。It should be noted that the second electrical switch can start a timer while sending the first configuration information. If the timer expires and still cannot receive messages replied by other electrical switches, it proves that the current service sending path is unreachable, and the second electrical switch cannot communicate with the other electrical switches. The switch needs to reselect a new interface to send the first configuration information.
302、第一电交换机通过每个发送接口广播第二配置信息。302. The first electrical switch broadcasts the second configuration information through each sending interface.
本实施例中,由于第一电交换机并不知道通过本地哪个接口可以与第二电交换机完成配对。因此,第一电交换机需要通过每个发送接口发送第二配置信息,那么至少会有一个发送接口输出的第二配置信息可以传输至第二电交换机。其中,第二配置信息包括上述的第一标识、第一电交换机上输入第一配置信息的接收接口的第二标识和第一电交换机上输出第二配置信息的发送接口的第三标识。以图7为例,电交换机102通过接口组1和接口组2中的发送接口发送第二配置信息。第一配置信息从电交换机102上接口组1的接收接口输入,第二标识可以表示为(接收机102、接收接口1)。第三标识可以包括(接收机102、发送接口1)和(接收机102、发送接口2)。In this embodiment, since the first electrical switch does not know which local interface can be paired with the second electrical switch. Therefore, the first electrical switch needs to send the second configuration information through each sending interface, then the second configuration information output by at least one sending interface can be transmitted to the second electrical switch. The second configuration information includes the above-mentioned first identifier, the second identifier of the receiving interface on the first electrical switch that inputs the first configuration information, and the third identifier of the sending interface that outputs the second configuration information on the first electrical switch. Taking FIG. 7 as an example, the electrical switch 102 sends the second configuration information through the sending interfaces in the interface group 1 and the interface group 2 . The first configuration information is input from the receiving interface of the interface group 1 on the electrical switch 102, and the second identifier can be represented as (receiver 102, receiving interface 1). The third identification may include (receiver 102, transmission interface 1) and (receiver 102, transmission interface 2).
303、第一电交换机通过光交换机接收第二电交换机发送的第三配置信息。303. The first electrical switch receives, through the optical switch, the third configuration information sent by the second electrical switch.
第二电交换机收到第一电交换机发送的第二配置信息后,即可确定第一电交换机和第二电交换机之间的业务发送路径和业务接收路径,并完成本地配置。进而,第二电交换机还需要向第一电交换机发送第三配置信息,以使得第一电交换机确定业务发送路径和业务接收路径,并完成本地配置。其中,第三配置信息包括第一标识、第二标识、第三标识和第二电交换机上输入第二配置信息的接收接口的第四标识。以图7为例,第二配置信息从电交换机102上接口组2的发送接口输出,并且,第二配置信息从电交换机101上接口组2的接收接口输入,第四标识可以表示为(接收机101、接收接口2)。应理解,如果第二电交换机从本地多个接收接口上都收到了第二配置信息,那么第二电交换机可以任选一个接收接口完成本地配置,并向第一电交换机发送第三配置信息。After the second electrical switch receives the second configuration information sent by the first electrical switch, it can determine the service sending path and the service receiving path between the first electrical switch and the second electrical switch, and complete the local configuration. Furthermore, the second electrical switch also needs to send third configuration information to the first electrical switch, so that the first electrical switch determines the service sending path and the service receiving path, and completes the local configuration. Wherein, the third configuration information includes the first identification, the second identification, the third identification and the fourth identification of the receiving interface on the second electrical switch where the second configuration information is input. Taking FIG. 7 as an example, the second configuration information is output from the sending interface of the interface group 2 on the electrical switch 102, and the second configuration information is input from the receiving interface of the interface group 2 on the electrical switch 101. The fourth identifier can be represented as (receive machine 101, receiving interface 2). It should be understood that if the second electrical switch has received the second configuration information from multiple local receiving interfaces, the second electrical switch may select one receiving interface to complete the local configuration and send the third configuration information to the first electrical switch.
需要说明的是,区别于传统方案中,两个电交换机之间的业务的发送和接收需要采用光交换机的同一对光口进行光交换。本实施例中,第二电交换机上输出第一配置信息的发送接口与输入第二配置信息的接收接口可以不是同一组物理接口。应理解,从全局上来说,本申请并不限定两个电交换机之间的业务收发是否使用同一组物理接口。两个电交换机之间根据自身空闲的接口来自主配对,收发业务可以采用同一组物理接口,也可以采用不同组中的物理接口。It should be noted that, different from the traditional solution, the transmission and reception of services between two electrical switches need to use the same pair of optical ports of the optical switch to perform optical switching. In this embodiment, the sending interface for outputting the first configuration information and the receiving interface for inputting the second configuration information on the second electrical switch may not be the same group of physical interfaces. It should be understood that, from a global perspective, the present application does not limit whether the same set of physical interfaces is used for service transmission and reception between two electrical switches. The two electrical switches are automatically paired according to their own idle interfaces, and the sending and receiving services can use the same group of physical interfaces or physical interfaces in different groups.
在一种可能的实施方式中,如果第三电交换机收到第一电交换机广播的第二配置信息,由于第二配置信息中包括与第一电交换机和第二电交换机相关的标识,第三电交换机即可确定该配对是在第一电交换机和第二电交换机之间进行的。第三电交换机可以删除该第二配置信息,不用处理。以图7为例,第二配置信息从电交换机102上接口组1的发送接口 输出,并且,第二配置信息从电交换机103上接口组2的接收接口输入。电交换机103根据第二配置信息中的相关标识可以确定该第二配置信息用于电交换机101和电交换机102的配对,则电交换机103可以删除该第二配置信息。In a possible implementation manner, if the third electrical switch receives the second configuration information broadcast by the first electrical switch, since the second configuration information includes identifiers related to the first electrical switch and the second electrical switch, the third electrical switch The electrical switch can then determine that the pairing is performed between the first electrical switch and the second electrical switch. The third electrical switch may delete the second configuration information without processing. Taking FIG. 7 as an example, the second configuration information is output from the sending interface of the interface group 1 on the electrical switch 102, and the second configuration information is input from the receiving interface of the interface group 2 on the electrical switch 103. The electrical switch 103 can determine that the second configuration information is used for the pairing of the electrical switch 101 and the electrical switch 102 according to the relevant identifier in the second configuration information, and the electrical switch 103 can delete the second configuration information.
本申请实施例中,两个电交换机之间的业务不再必须要采用电交换机的同一组接口进行收发,那么每两个电交换机之间的业务传输路径可以进行更灵活地配置,使得系统中可以有更多的空闲路径用于建立两个电交换机之间新的连接,无需在电交换机上部署更多的接口和用于连接的光纤,节约了成本。In the embodiment of the present application, services between two electrical switches no longer have to be sent and received by using the same set of interfaces of the electrical switches, so the service transmission path between each two electrical switches can be configured more flexibly, so that in the system There can be more idle paths for establishing a new connection between the two electrical switches, and there is no need to deploy more interfaces and optical fibers for connection on the electrical switches, which saves costs.
下面对本申请提供的控制器和电交换机进行介绍。The controller and the electrical switch provided by the present application will be introduced below.
图8为本申请实施例中控制器的一种结示意图。该控制器包括处理器801、存储器802和收发器803。该处理器801、存储器802和收发器803通过线路相互连接。其中,存储器802用于存储程序指令和数据。需要说明的是,收发器803用于执行上述图2所示实施例中信息的收发操作。处理器801用于执行上述图2所示实施例中除了信息收发外的其他操作。FIG. 8 is a schematic diagram of a structure of a controller in an embodiment of the present application. The controller includes a processor 801 , a memory 802 and a transceiver 803 . The processor 801, the memory 802 and the transceiver 803 are interconnected by wires. Among them, the memory 802 is used for storing program instructions and data. It should be noted that the transceiver 803 is configured to perform the operation of sending and receiving information in the embodiment shown in FIG. 2 above. The processor 801 is configured to perform other operations except for information sending and receiving in the above-mentioned embodiment shown in FIG. 2 .
图9为本申请实施例中电交换机的一种结示意图。该控制器包括处理器901、存储器902和收发器903。该处理器901、存储器902和收发器903通过线路相互连接。其中,存储器902用于存储程序指令和数据。需要说明的是,收发器903用于执行上述图2和图6所示实施例中信息的收发操作。处理器901用于执行上述图2和图6所示实施例中除了信息收发外的其他操作。FIG. 9 is a schematic diagram of a structure of an electrical switch in an embodiment of the present application. The controller includes a processor 901 , a memory 902 and a transceiver 903 . The processor 901, the memory 902 and the transceiver 903 are interconnected by wires. Among them, the memory 902 is used for storing program instructions and data. It should be noted that the transceiver 903 is configured to perform the operations of sending and receiving information in the embodiments shown in FIG. 2 and FIG. 6 . The processor 901 is configured to perform other operations except for information sending and receiving in the above-mentioned embodiments shown in FIG. 2 and FIG. 6 .
需要说明的是,上述图8和图9中所示的处理器可以采用通用的中央处理器(Central Processing Unit,CPU),微处理器,应用专用集成电路ASIC,或者至少一个集成电路,用于执行相关程序,以实现本申请实施例所提供的技术方案。上述图8和图9中所示的存储器可以存储操作系统和其他应用程序。在通过软件或者固件来实现本申请实施例提供的技术方案时,用于实现本申请实施例提供的技术方案的程序代码保存在存储器中,并由处理器来执行。在一实施例中,处理器内部可以包括存储器。在另一实施例中,处理器和存储器是两个独立的结构。It should be noted that, the processors shown in FIG. 8 and FIG. 9 can be a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application-specific integrated circuit ASIC, or at least one integrated circuit for Relevant programs are executed to realize the technical solutions provided by the embodiments of the present application. The memories shown in Figures 8 and 9 above may store operating systems and other applications. When implementing the technical solutions provided by the embodiments of the present application through software or firmware, program codes for implementing the technical solutions provided by the embodiments of the present application are stored in a memory and executed by a processor. In one embodiment, a memory may be included within the processor. In another embodiment, the processor and memory are two separate structures.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,随机接入存储器等。具体地,例如:上述处理单元或处理器可以是中央处理器,通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。上述的这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实 现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium mentioned may be read only memory, random access memory, or the like. Specifically, for example, the above-mentioned processing unit or processor may be a central processing unit, a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices , transistor logic devices, hardware components, or any combination thereof. Whether the above functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
当使用软件实现时,上述实施例描述的方法步骤可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。When implemented in software, the method steps described in the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that the above is only the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any changes or substitutions should be included within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (19)

  1. 一种交换机的配置方法,其特征在于,包括:A method for configuring a switch, comprising:
    获取光交换机与电交换机集合之间的物理拓扑,所述电交换机集合中每个电交换机包括至少一组物理接口,每一组物理接口包括一个发送接口和一个接收接口,所述光交换机包括多个光口;Obtain a physical topology between an optical switch and a set of electrical switches, each electrical switch in the set of electrical switches includes at least one set of physical interfaces, each set of physical interfaces includes a sending interface and a receiving interface, and the optical switch includes multiple a light port;
    根据所述物理拓扑确定所述电交换机集合中第一电交换机和第二电交换机之间的业务发送路径和业务接收路径,其中,所述业务发送路径上的发送接口和所述业务接收路径上的接收接口不是同一组物理接口;A service sending path and a service receiving path between the first electrical switch and the second electrical switch in the electrical switch set are determined according to the physical topology, wherein the sending interface on the service sending path and the service receiving path are The receiving interface is not the same set of physical interfaces;
    根据所述业务发送路径和所述业务接收路径确定所述第一电交换机或所述第二电交换机中的逻辑接口,所述逻辑接口包括所述业务发送路径上的发送接口和所述业务接收路径上的接收接口;A logical interface in the first electrical switch or the second electrical switch is determined according to the service sending path and the service receiving path, where the logical interface includes a sending interface on the service sending path and the service receiving path the receiving interface on the path;
    向所述第一电交换机或所述第二电交换机发送第一配置信息,所述第一配置信息用于指示所述第一电交换机或所述第二电交换机通过本地的逻辑接口传输业务。Sending first configuration information to the first electrical switch or the second electrical switch, where the first configuration information is used to instruct the first electrical switch or the second electrical switch to transmit services through a local logical interface.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    根据所述业务发送路径和所述业务接收路径确定所述光交换机中用于光交换的一对光口;Determine a pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path;
    向所述光交换机发送第二配置信息,所述第二配置信息用于指示所述光交换机中用于光交换的一对光口。Send second configuration information to the optical switch, where the second configuration information is used to indicate a pair of optical ports used for optical switching in the optical switch.
  3. 根据权利要求2所述的方法,其特征在于,所述光交换机至少包括第一光交换机和第二光交换机;The method according to claim 2, wherein the optical switch comprises at least a first optical switch and a second optical switch;
    获取光交换机与电交换机集合之间的物理拓扑包括:Obtaining the physical topology between the set of optical switches and electrical switches includes:
    获取所述第一光交换机与所述电交换机集合之间的第一物理拓扑,获取所述第二光交换机与所述电交换机集合之间的第二物理拓扑。Obtain a first physical topology between the first optical switch and the electrical switch set, and obtain a second physical topology between the second optical switch and the electrical switch set.
  4. 根据权利要求3所述的方法,其特征在于,根据所述业务发送路径和所述业务接收路径确定所述光交换机中用于光交换的一对光口包括:The method according to claim 3, wherein determining a pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path comprises:
    根据所述业务发送路径确定所述第一光交换机中用于光交换的一对光口,并根据所述业务接收路径确定所述第二光交换机中用于光交换的一对光口。A pair of optical ports used for optical switching in the first optical switch is determined according to the service sending path, and a pair of optical ports used for optical switching in the second optical switch is determined according to the service receiving path.
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一电交换机或所述第二电交换机包括链路聚合接口,所述链路聚合接口包括多组物理接口,根据所述业务发送路径和所述业务接收路径确定所述第一电交换机或所述第二电交换机中的逻辑接口包括:The method according to any one of claims 1 to 4, wherein the first electrical switch or the second electrical switch comprises a link aggregation interface, and the link aggregation interface comprises multiple groups of physical interfaces, Determining the logical interface in the first electrical switch or the second electrical switch according to the service sending path and the service receiving path includes:
    根据所述业务发送路径和所述业务接收路径更新所述链路聚合接口,更新后的链路聚合接口包括所述逻辑接口。The link aggregation interface is updated according to the service sending path and the service receiving path, and the updated link aggregation interface includes the logical interface.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述第一配置信息包括所述逻辑接口对应的对端电交换机的逻辑接口的互联网协议IP地址。The method according to any one of claims 1 to 5, wherein the first configuration information includes an Internet Protocol IP address of a logical interface of the peer electrical switch corresponding to the logical interface.
  7. 一种交换机的配置方法,其特征在于,包括:A method for configuring a switch, comprising:
    第一电交换机通过光交换机接收第二电交换机发送的第一配置信息,所述第一配置信 息包括所述第二电交换机上输出所述第一配置信息的发送接口的第一标识,所述第一电交换机与所述光交换机连接,所述第二电交换机与所述光交换机连接,所述第一电交换机包括多组接口,所述第二电交换机包括多组接口,每一组接口包括发送接口和接收接口;The first electrical switch receives, through the optical switch, first configuration information sent by the second electrical switch, where the first configuration information includes a first identifier of a sending interface on the second electrical switch that outputs the first configuration information, the The first electrical switch is connected to the optical switch, the second electrical switch is connected to the optical switch, the first electrical switch includes multiple groups of interfaces, the second electrical switch includes multiple groups of interfaces, each group of interfaces Including sending interface and receiving interface;
    所述第一电交换机通过所述第一电交换机上的每个发送接口广播第二配置信息,并通过所述光交换机将所述第二配置信息发送至所述第二电交换机,每个所述第二配置信息包括所述第一标识、所述第一电交换机上输入所述第一配置信息的接收接口的第二标识和所述第一电交换机上输出所述第二配置信息的发送接口的第三标识;The first electrical switch broadcasts the second configuration information through each sending interface on the first electrical switch, and sends the second configuration information to the second electrical switch through the optical switch, each The second configuration information includes the first identifier, the second identifier of the receiving interface on the first electrical switch for inputting the first configuration information, and the sending of the second configuration information on the first electrical switch. the third identifier of the interface;
    所述第一电交换机通过所述光交换机接收所述第二电交换机发送的第三配置信息,所述第三配置信息包括所述第一标识、所述第二标识、所述第三标识和所述第二交换机上输入所述第二配置信息的接收接口的第四标识,其中,所述第二电交换机上输出所述第一配置信息的发送接口与输入所述第二配置信息的接收接口不是同一组接口。The first electrical switch receives, through the optical switch, third configuration information sent by the second electrical switch, where the third configuration information includes the first identifier, the second identifier, the third identifier and The fourth identifier of the receiving interface for inputting the second configuration information on the second switch, wherein the sending interface for outputting the first configuration information on the second electrical switch and the receiving interface for inputting the second configuration information The interfaces are not the same set of interfaces.
  8. 根据权利要求7所述的方法,其特征在于,所述光交换机至少包括第一光交换机和第二光交换机;The method according to claim 7, wherein the optical switch comprises at least a first optical switch and a second optical switch;
    第一电交换机接收第二电交换机通过光交换机发送的第一配置信息包括:The first electrical switch receiving the first configuration information sent by the second electrical switch through the optical switch includes:
    所述第一电交换机接收所述第二电交换机通过所述第一光交换机发送的所述第一配置信息;receiving, by the first electrical switch, the first configuration information sent by the second electrical switch through the first optical switch;
    所述第一电交换机通过所述第一电交换机上的每个发送接口发送第二配置信息,并通过所述光交换机将所述第二配置信息发送至所述第二电交换机包括:The sending, by the first electrical switch, the second configuration information through each sending interface on the first electrical switch, and sending the second configuration information to the second electrical switch through the optical switch includes:
    所述第一电交换机通过所述第一电交换机上的每个发送接口发送第二配置信息,并通过所述第二光交换机将所述第二配置信息发送至所述第二电交换机。The first electrical switch sends second configuration information through each sending interface on the first electrical switch, and sends the second configuration information to the second electrical switch through the second optical switch.
  9. 根据权利要求7或8所述的方法,其特征在于,所述方法还包括:The method according to claim 7 or 8, wherein the method further comprises:
    所述第一电交换机通过所述光交换机接收所述第三电交换机广播的第四配置信息,所述第四配置信息是所述第三电交换机用于回复所述第一电交换机的配置信息;The first electrical switch receives, through the optical switch, fourth configuration information broadcast by the third electrical switch, where the fourth configuration information is configuration information used by the third electrical switch to reply to the first electrical switch ;
    所述第一电交换机删除所述第四配置信息。The first electrical switch deletes the fourth configuration information.
  10. 一种控制器,其特征在于,包括:处理器、存储器以及收发器,所述处理器、所述存储器以及所述收发器通过线路互相连接;A controller, characterized in that it comprises: a processor, a memory and a transceiver, wherein the processor, the memory and the transceiver are connected to each other through lines;
    所述处理器用于:The processor is used to:
    获取光交换机与电交换机集合之间的物理拓扑,所述电交换机集合中每个电交换机包括至少一组物理接口,每一组物理接口包括一个发送接口和一个接收接口,所述光交换机包括多个光口;Obtain a physical topology between an optical switch and a set of electrical switches, each electrical switch in the set of electrical switches includes at least one set of physical interfaces, each set of physical interfaces includes a sending interface and a receiving interface, and the optical switch includes multiple a light port;
    根据所述物理拓扑确定所述电交换机集合中第一电交换机和第二电交换机之间的业务发送路径和业务接收路径,其中,所述业务发送路径上的发送接口和所述业务接收路径上的接收接口不是同一组物理接口;A service sending path and a service receiving path between the first electrical switch and the second electrical switch in the electrical switch set are determined according to the physical topology, wherein the sending interface on the service sending path and the service receiving path are The receiving interface is not the same set of physical interfaces;
    根据所述业务发送路径和所述业务接收路径确定所述第一电交换机或所述第二电交换机中的逻辑接口,所述逻辑接口包括所述业务发送路径上的发送接口和所述业务接收路径上的接收接口;A logical interface in the first electrical switch or the second electrical switch is determined according to the service sending path and the service receiving path, where the logical interface includes a sending interface on the service sending path and the service receiving path the receiving interface on the path;
    所述收发器用于:The transceiver is used to:
    向所述第一电交换机或所述第二电交换机发送第一配置信息,所述第一配置信息用于指示所述第一电交换机或所述第二电交换机通过本地的逻辑接口传输业务。Sending first configuration information to the first electrical switch or the second electrical switch, where the first configuration information is used to instruct the first electrical switch or the second electrical switch to transmit services through a local logical interface.
  11. 根据权利要求10所述的控制器,其特征在于,所述处理器还用于:The controller of claim 10, wherein the processor is further configured to:
    根据所述业务发送路径和所述业务接收路径确定所述光交换机中用于光交换的一对光口;Determine a pair of optical ports used for optical switching in the optical switch according to the service sending path and the service receiving path;
    所述收发器还用于:The transceiver is also used to:
    向所述光交换机发送第二配置信息,所述第二配置信息用于指示所述光交换机中用于光交换的一对光口。Send second configuration information to the optical switch, where the second configuration information is used to indicate a pair of optical ports used for optical switching in the optical switch.
  12. 根据权利要求11所述的控制器,其特征在于,所述光交换机至少包括第一光交换机和第二光交换机;所述处理器具体用于:The controller according to claim 11, wherein the optical switch includes at least a first optical switch and a second optical switch; and the processor is specifically configured to:
    获取所述第一光交换机与所述电交换机集合之间的第一物理拓扑,获取所述第二光交换机与所述电交换机集合之间的第二物理拓扑。Obtain a first physical topology between the first optical switch and the electrical switch set, and obtain a second physical topology between the second optical switch and the electrical switch set.
  13. 根据权利要求11所述的控制器,其特征在于,所述处理器具体用于:The controller according to claim 11, wherein the processor is specifically configured to:
    根据所述业务发送路径确定所述第一光交换机中用于光交换的一对光口,并根据所述业务接收路径确定所述第二光交换机中用于光交换的一对光口。A pair of optical ports used for optical switching in the first optical switch is determined according to the service sending path, and a pair of optical ports used for optical switching in the second optical switch is determined according to the service receiving path.
  14. 根据权利要求10至13中任一项所述的控制器,其特征在于,所述第一电交换机或所述第二电交换机包括链路聚合接口,所述链路聚合接口包括多组物理接口,所述处理器具体用于:The controller according to any one of claims 10 to 13, wherein the first electrical switch or the second electrical switch comprises a link aggregation interface, and the link aggregation interface comprises multiple groups of physical interfaces , the processor is specifically used to:
    根据所述业务发送路径和所述业务接收路径更新所述链路聚合接口,更新后的链路聚合接口包括所述逻辑接口。The link aggregation interface is updated according to the service sending path and the service receiving path, and the updated link aggregation interface includes the logical interface.
  15. 根据权利要求10至14中任一项所述的控制器,其特征在于,所述第一配置信息包括所述逻辑接口对应的对端电交换机的逻辑接口的互联网协议IP地址。The controller according to any one of claims 10 to 14, wherein the first configuration information comprises an Internet Protocol IP address of a logical interface of the peer electrical switch corresponding to the logical interface.
  16. 一种电交换机,其特征在于,包括:处理器、存储器以及收发器,所述处理器、所述存储器以及所述收发器通过线路互相连接,所述处理器调用所述存储器中的程序代码用于控制所述收发器;所述收发器用于:An electrical switch, characterized in that it comprises: a processor, a memory and a transceiver, the processor, the memory and the transceiver are connected to each other through a line, and the processor calls the program code in the memory to use for controlling the transceiver; the transceiver is used to:
    通过光交换机接收第二电交换机发送的第一配置信息,所述第一配置信息包括所述第二电交换机上输出所述第一配置信息的发送接口的第一标识,所述电交换机与所述光交换机连接,所述第二电交换机与所述光交换机连接,所述电交换机包括多组接口,所述第二电交换机包括多组接口,每一组接口包括发送接口和接收接口;The first configuration information sent by the second electrical switch is received through the optical switch, where the first configuration information includes the first identifier of the sending interface on the second electrical switch that outputs the first configuration information, and the electrical switch is connected to the second electrical switch. the optical switch is connected, the second electrical switch is connected to the optical switch, the electrical switch includes multiple groups of interfaces, the second electrical switch includes multiple groups of interfaces, and each group of interfaces includes a sending interface and a receiving interface;
    通过所述电交换机上的每个发送接口广播第二配置信息,并通过所述光交换机将所述第二配置信息发送至所述第二电交换机,每个所述第二配置信息包括所述第一标识、所述电交换机上输入所述第一配置信息的接收接口的第二标识和所述电交换机上输出所述第二配置信息的发送接口的第三标识;Second configuration information is broadcast through each sending interface on the electrical switch, and the second configuration information is sent to the second electrical switch through the optical switch, each of the second configuration information includes the a first identifier, a second identifier of a receiving interface on the electrical switch for inputting the first configuration information, and a third identifier for a sending interface on the electrical switch for outputting the second configuration information;
    通过所述光交换机接收所述第二电交换机发送的第三配置信息,所述第三配置信息包括所述第一标识、所述第二标识、所述第三标识和所述第二交换机上输入所述第二配置信息的接收接口的第四标识,其中,所述第二电交换机上输出所述第一配置信息的发送接口与输入所述第二配置信息的接收接口不是同一组接口。The third configuration information sent by the second electrical switch is received by the optical switch, where the third configuration information includes the first identifier, the second identifier, the third identifier, and the second identifier on the second switch. The fourth identifier of the receiving interface for inputting the second configuration information, wherein the sending interface for outputting the first configuration information on the second electrical switch and the receiving interface for inputting the second configuration information are not the same group of interfaces.
  17. 根据权利要求16所述的电交换机,其特征在于,所述光交换机至少包括第一光交换机和第二光交换机;所述收发器具体用于:The electrical switch according to claim 16, wherein the optical switch comprises at least a first optical switch and a second optical switch; the transceiver is specifically used for:
    接收所述第二电交换机通过所述第一光交换机发送的所述第一配置信息;receiving the first configuration information sent by the second electrical switch through the first optical switch;
    通过所述电交换机上的每个发送接口发送第二配置信息,并通过所述第二光交换机将所述第二配置信息发送至所述第二电交换机。The second configuration information is sent through each sending interface on the electrical switch, and the second configuration information is sent to the second electrical switch through the second optical switch.
  18. 根据权利要求16或17所述的电交换机,其特征在于,所述收发器还用于:The electrical switch according to claim 16 or 17, wherein the transceiver is further used for:
    通过所述光交换机接收所述第三电交换机广播的第四配置信息,所述第四配置信息是所述第三电交换机用于回复所述电交换机的配置信息;receiving, through the optical switch, fourth configuration information broadcast by the third electrical switch, where the fourth configuration information is configuration information used by the third electrical switch to reply to the electrical switch;
    所述处理器用于:删除所述第四配置信息。The processor is configured to: delete the fourth configuration information.
  19. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在计算机设备上运行时,使得所述计算机设备执行如权利要求1至9中任一项所述的方法。A computer-readable storage medium, characterized by comprising computer instructions, which, when executed on a computer device, cause the computer device to perform the method according to any one of claims 1 to 9.
PCT/CN2021/104921 2020-09-27 2021-07-07 Switch configuration method and related device WO2022062568A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011033164.6 2020-09-27
CN202011033164.6A CN114363272B (en) 2020-09-27 2020-09-27 Configuration method of switch and related equipment

Publications (1)

Publication Number Publication Date
WO2022062568A1 true WO2022062568A1 (en) 2022-03-31

Family

ID=80846165

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/104921 WO2022062568A1 (en) 2020-09-27 2021-07-07 Switch configuration method and related device

Country Status (2)

Country Link
CN (1) CN114363272B (en)
WO (1) WO2022062568A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366467A (en) * 2023-05-29 2023-06-30 北京大学 Server-agnostic distributed training software defined aggregate communication framework and method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116781511B (en) * 2023-08-22 2023-11-03 苏州浪潮智能科技有限公司 Configuration method and device of host system, computing system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102177668A (en) * 2008-08-08 2011-09-07 惠普开发有限公司 Methods and systems for implementing high-radix switch topologies on relatively lower-radix switch physical networks
CN103797737A (en) * 2011-06-20 2014-05-14 普莱克希公司 Optical architecture and channel plan employing multi-fiber configurations for data center network switching
CN103812796A (en) * 2012-11-14 2014-05-21 日立金属株式会社 Communication system and network relay apparatus

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104253770B (en) * 2013-06-27 2017-07-14 新华三技术有限公司 Realize the method and apparatus of the distributed virtual switch system
WO2015077878A1 (en) * 2013-11-26 2015-06-04 Rockstar Consortium Us Lp Switched path aggregation for data centers
US9247325B2 (en) * 2013-11-27 2016-01-26 Nec Laboratories America, Inc. Hybrid electro-optical distributed software-defined data center architecture
US9967182B2 (en) * 2015-07-31 2018-05-08 Nicira, Inc. Enabling hardware switches to perform logical routing functionalities
CN108476080B (en) * 2015-11-05 2021-01-05 洛克利光子有限公司 Multidimensional optoelectronic switch
CN105515993B (en) * 2015-11-26 2019-02-15 西安空间无线电技术研究所 A kind of photoelectricity hybrid switching inner track mapping method
WO2017092009A1 (en) * 2015-12-03 2017-06-08 华为技术有限公司 Configuration processing method and device for switch
US10193750B2 (en) * 2016-09-07 2019-01-29 Cisco Technology, Inc. Managing virtual port channel switch peers from software-defined network controller
CN108347378A (en) * 2017-12-29 2018-07-31 北京智芯微电子科技有限公司 A kind of control dedicated network and dynamic routing method for bulk power grid
CN108683617B (en) * 2018-04-28 2021-01-01 新华三技术有限公司 Message distribution method and device and distribution switch

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102177668A (en) * 2008-08-08 2011-09-07 惠普开发有限公司 Methods and systems for implementing high-radix switch topologies on relatively lower-radix switch physical networks
CN103797737A (en) * 2011-06-20 2014-05-14 普莱克希公司 Optical architecture and channel plan employing multi-fiber configurations for data center network switching
CN103812796A (en) * 2012-11-14 2014-05-21 日立金属株式会社 Communication system and network relay apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366467A (en) * 2023-05-29 2023-06-30 北京大学 Server-agnostic distributed training software defined aggregate communication framework and method
CN116366467B (en) * 2023-05-29 2023-08-08 北京大学 Server-agnostic distributed training software defined aggregate communication framework and method

Also Published As

Publication number Publication date
CN114363272B (en) 2023-03-31
CN114363272A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
US9094285B2 (en) Automatic discovery of multiple controllers in Software Defined Networks (SDNs)
TWI393401B (en) System, apparatus, method and memory having computer program embodied thereon for managing multicast routing
US11563641B1 (en) Shifting network traffic from a network device
US20180013630A1 (en) Method for a switch-initiated sdn controller discovery and establishment of an in-band control network
WO2022062568A1 (en) Switch configuration method and related device
JP2017518007A (en) Network control method and apparatus
CN105162704A (en) Multicast replication method and device in Overlay network
US9729948B1 (en) Systems and methods for discovery of a controller in openflow networks
WO2021139304A1 (en) Method and device for multi-cloud interconnection
CN110995591A (en) Method, device and medium for selecting optimal path based on link layer discovery protocol
US20210112020A1 (en) Multicast traffic control in hybrid networks containing both software defined networking domains and non-sdn ip domains
CN103986638A (en) Method and device for binding multiple public network links for ADVPN tunnel
CN107645394B (en) Switch configuration method in SDN network
JP2015104042A (en) Transfer device, server and route change method
CN104038427A (en) Router renewing method and device
JPWO2016098275A1 (en) Communication method
US11296980B2 (en) Multicast transmissions management
CN111447130B (en) Method, network equipment and system for creating connectivity detection session
CN113037883B (en) Method and device for updating MAC address table entries
CN109981315B (en) Information processing method, equipment and system of ANIMA network
CN108259292B (en) Method and device for establishing tunnel
US10129089B1 (en) Shifting network traffic
CN113039752A (en) Network node and method for supporting a service-based architecture
WO2021213517A1 (en) Routing domain identifier configuration method and device
WO2023083103A1 (en) Data processing method and related apparatus

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21870947

Country of ref document: EP

Kind code of ref document: A1