Message broadcasting method and device
By pre-recording the broadcast agent address of the remote cabinet through OVS, messages are sent only to the broadcast agent, solving the problem of excessive network bandwidth consumption caused by message broadcast in host overlay technology, reducing the network burden and improving forwarding performance.
Patent Information
- Application Number
- CN202310274944.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-03-17
AI Technical Summary
In host overlay technology, when OVS broadcasts messages, network bandwidth consumption is too high, increasing the network burden.
The OVS pre-records the address of the broadcast agent in the remote cabinet and sends messages only to the broadcast agent instead of each OVS, reducing the number of message duplications.
This saves network bandwidth, reduces network burden, and improves OVS forwarding performance.
Smart Images

Figure CN116248617B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message broadcasting method and device. Background Art
[0002] Currently, host overlay network technology is widely used in data center network architectures. The control endpoint of host overlay technology is the Open Virtual Switch (OVS), and all packet forwarding is handled by the OVS. For example, when the OVS broadcasts a message, it must broadcast a copy of the message to each remote OVS, significantly increasing network bandwidth consumption and burdening the network. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a message broadcast method and apparatus to save network bandwidth and reduce network burden when OVS performs message broadcast. The specific technical solution is as follows:
[0004] In a first aspect of an embodiment of the present application, a message broadcasting method is provided, which is applied to a first OVS of a first cabinet, the method comprising:
[0005] Obtaining a first message to be broadcast, where the first message belongs to a target tenant network;
[0006] Determine, based on pre-recorded addresses of each OVS in the first cabinet under different tenant networks and addresses of broadcast agents in each cabinet under different tenant networks, first addresses of other OVSs in the first cabinet under the target tenant network and second addresses of broadcast agents in other cabinets, where a broadcast agent in a cabinet is an OVS in the cabinet;
[0007] According to the first address and the second address, the first message is broadcast to other OVSs in the first cabinet, and the first message is broadcast to broadcast agents in the other cabinets.
[0008] In some embodiments, when the first OVS is a Broadcast Agent, the method further includes:
[0009] Receive a second message broadcast by the OVS in another cabinet, where the second message belongs to the target tenant network;
[0010] Determine the third addresses of other OVSs in the first cabinet under the target tenant network according to the pre-recorded addresses of each OVS in the first cabinet under different tenant networks;
[0011] According to the third address, the second message is broadcast to other OVSs in the first cabinet.
[0012] In some embodiments, the addresses of OVSs in the same cabinet belong to the same network segment; or, different cabinets have different identifiers.
[0013] In some embodiments, the method further comprises:
[0014] When the first OVS accesses the first cabinet, the address of the first OVS is sent to the controller, where the first OVS belongs to the target tenant network, so that the controller determines the OVS in each cabinet under the target tenant network, and determines first information and second information based on the address of the OVS in each cabinet under the target tenant network, where the first information is the address of the broadcast agent in each cabinet under the target tenant network, and the second information is the address of each OVS in the first cabinet under the target tenant network;
[0015] Receive and record the first information and the second information sent by the controller.
[0016] In some embodiments, the method further comprises:
[0017] Receive the address of the second OVS sent by the controller, where the second OVS is the OVS in the first cabinet that is newly connected to the target tenant network; add the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network; and / or
[0018] The controller receives the address of a first broadcast agent in the second cabinet of the target tenant network, and adds the address of the first broadcast agent to the addresses of the broadcast agents in each cabinet of the target tenant network.
[0019] In some embodiments, the method further comprises:
[0020] Receiving a first deletion message from a controller for a third OVS, where the third OVS belongs to the OVS in the first cabinet of the target tenant network; deleting the pre-recorded address of the third OVS in the first cabinet of the target tenant network according to the first deletion message; and / or
[0021] receiving a second deletion message from a controller regarding a third OVS, wherein the third OVS belongs to the OVS in the first cabinet of the target tenant network, and the second deletion message includes the address of the second Broadcast Agent in the first cabinet of the target tenant network; deleting the pre-recorded address of the third OVS in the first cabinet of the target tenant network according to the second deletion message, and updating the address of the Broadcast Agent in the first cabinet of the target tenant network to the address of the second Broadcast Agent; and / or
[0022] receiving a broadcast agent update message sent by a controller, the update message including the address of a third broadcast agent in the second cabinet under the target tenant network; and updating the address of the broadcast agent in the second cabinet under the target tenant network to the address of the third broadcast agent according to the update message.
[0023] In some embodiments, the method further comprises:
[0024] When the first OVS accesses the first cabinet, the first OVS address is sent to each OVS in the target tenant network, and the addresses of each OVS in the target tenant network are received. The target tenant network is the tenant network to which the first OVS belongs.
[0025] Determine and record the address of the broadcast agent in the first cabinet under the target tenant network according to the received addresses of each OVS in the first cabinet, and record the addresses of each OVS in the first cabinet under the target tenant network;
[0026] According to the received addresses of the OVSs in the other cabinets, the addresses of the broadcast agents in the other cabinets under the target tenant network are determined and recorded.
[0027] In some embodiments, the method further comprises:
[0028] Receive the address of the second OVS sent by the second OVS, where the second OVS is the OVS in the first cabinet that is newly connected to the target tenant network; add the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network; and / or
[0029] Receive the address of the fourth OVS sent by the fourth OVS, where the fourth OVS is the OVS in the second cabinet that is newly connected to the target tenant network; if the address of the broadcast agent in the second cabinet is pre-recorded, discard the address of the fourth OVS; if the address of the broadcast agent in the second cabinet is not pre-recorded, determine that the address of the broadcast agent in the second cabinet under the target tenant network is the address of the fourth OVS and record it.
[0030] In some embodiments, the method further comprises:
[0031] When the third OVS in the first cabinet is deleted, if the third OVS is the broadcast agent in the first cabinet under the target tenant network, determine a second broadcast agent from the OVSs in the first cabinet under the target tenant network other than the third OVS, update the address of the broadcast agent in the first cabinet under the target tenant network to the address of the second broadcast agent, and delete the pre-recorded address of the third OVS in the first cabinet under the target tenant network; if the third OVS is not the broadcast agent in the first cabinet under the target tenant network, delete the pre-recorded address of the third OVS in the first cabinet under the target tenant network, and the third OVS belongs to the OVS in the first cabinet under the target tenant network; and / or
[0032] When it is detected that the fifth OVS in the second cabinet is deleted, if the fifth OVS is the broadcast agent in the second cabinet, a third broadcast agent is determined from the OVSs in the second cabinet under the target tenant network except the fifth OVS, and the address of the broadcast agent in the second cabinet under the target tenant network is updated to the address of the third broadcast agent. The fifth OVS belongs to the OVS in the second cabinet under the target tenant network.
[0033] In a second aspect of an embodiment of the present application, a message broadcasting device is provided, which is applied to a first OVS of a first cabinet, and the device includes:
[0034] an acquisition module, configured to acquire a first message to be broadcast, where the first message belongs to a target tenant network;
[0035] a first determining module configured to determine, based on pre-recorded addresses of each OVS in the first cabinet under different tenant networks and addresses of broadcast agents in each cabinet under different tenant networks, first addresses of other OVSs in the first cabinet under the target tenant network and second addresses of broadcast agents in other cabinets, where a broadcast agent in a cabinet is an OVS in the cabinet;
[0036] A first broadcast module is configured to broadcast the first message to other OVSs in the first cabinet according to the first address and the second address, and to broadcast the first message to broadcast agents in the other cabinets.
[0037] In some embodiments, the apparatus further comprises:
[0038] A first receiving module is configured to receive, when the first OVS is a broadcast agent, a second message broadcast by the OVS in other cabinets, where the second message belongs to a target tenant network;
[0039] A second determining module is configured to determine the third addresses of other OVSs in the first cabinet under the target tenant network according to the pre-recorded addresses of each OVS in the first cabinet under different tenant networks;
[0040] The second broadcast module is configured to broadcast the second message to other OVSs in the first cabinet according to the third address.
[0041] In some embodiments, the addresses of OVSs in the same cabinet belong to the same network segment; or, different cabinets have different identifiers.
[0042] In some embodiments, the apparatus further comprises:
[0043] a first sending module, configured to send, when the first OVS accesses the first cabinet, the address of the first OVS to the controller, the first OVS belonging to the target tenant network, so that the controller determines the OVSs in each cabinet under the target tenant network, and determines, based on the addresses of the OVSs in each cabinet under the target tenant network, first information and second information, the first information being the address of the broadcast agent in each cabinet under the target tenant network, and the second information being the address of each OVS in the first cabinet under the target tenant network;
[0044] The second receiving module is used to receive and record the first information and the second information sent by the controller.
[0045] In some embodiments, the apparatus further comprises:
[0046] A third receiving module is configured to receive an address of a second OVS sent by the controller, where the second OVS is the OVS in the first cabinet that is newly connected to the target tenant network; and add the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network; and / or
[0047] The controller is configured to receive an address of a first broadcast agent sent by a controller, where the first broadcast agent is a broadcast agent in a second cabinet in the target tenant network, and add the address of the first broadcast agent to the addresses of broadcast agents in each cabinet in the target tenant network.
[0048] In some embodiments, the apparatus further includes: a fourth receiving module,
[0049] Used to receive a first deletion message of a third OVS sent by a controller, where the third OVS belongs to the OVS in the first cabinet of the target tenant network; according to the first deletion message, delete the pre-recorded address of the third OVS in the first cabinet of the target tenant network; and / or
[0050] for receiving a second deletion message from a controller regarding a third OVS, wherein the third OVS belongs to an OVS in the first cabinet of the target tenant network, and the second deletion message includes an address of a second broadcast agent in the first cabinet of the target tenant network; deleting a pre-recorded address of the third OVS in the first cabinet of the target tenant network according to the second deletion message, and updating the address of the broadcast agent in the first cabinet of the target tenant network to the address of the second broadcast agent; and / or
[0051] Used to receive an update message of a broadcast agent sent by a controller, the update message including the address of a third broadcast agent in the second cabinet under the target tenant network; and update the address of the broadcast agent in the second cabinet under the target tenant network to the address of the third broadcast agent according to the update message.
[0052] In some embodiments, the apparatus further comprises:
[0053] A second sending module is configured to send the address of the first OVS to each OVS under a target tenant network when the first OVS is connected to the first cabinet, and receive the addresses of each OVS sent by the addresses of each OVS under the target tenant network, where the target tenant network is the tenant network to which the first OVS belongs;
[0054] a third determining module, configured to determine and record the address of the broadcast agent in the first cabinet under the target tenant network based on the received addresses of the respective OVSs in the first cabinet, and record the addresses of the respective OVSs in the first cabinet under the target tenant network;
[0055] The fourth determining module is configured to determine and record the addresses of the broadcast agents in the other cabinets under the target tenant network according to the received addresses of the respective OVSs in the other cabinets.
[0056] In some embodiments, the apparatus further includes: a fifth receiving module,
[0057] Used to receive the address of the second OVS sent by the second OVS, where the second OVS is the OVS in the first cabinet that is newly connected to the target tenant network; add the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network; and / or
[0058] Used to receive the address of the fourth OVS sent by the fourth OVS, where the fourth OVS is the OVS in the second cabinet that is newly connected to the target tenant network; if the address of the broadcast agent in the second cabinet is pre-recorded, discard the address of the fourth OVS; if the address of the broadcast agent in the second cabinet is not pre-recorded, determine the address of the broadcast agent in the second cabinet under the target tenant network as the address of the fourth OVS, and record it.
[0059] In some embodiments, the apparatus further comprises: an update module,
[0060] for, when a third OVS in the first cabinet is deleted, if the third OVS is a broadcast agent in the first cabinet under the target tenant network, determining a second broadcast agent from the OVSs in the first cabinet under the target tenant network other than the third OVS, updating the address of the broadcast agent in the first cabinet under the target tenant network to the address of the second broadcast agent, and deleting the pre-recorded address of the third OVS in the first cabinet under the target tenant network; if the third OVS is not a broadcast agent in the first cabinet under the target tenant network, deleting the pre-recorded address of the third OVS in the first cabinet under the target tenant network, where the third OVS belongs to the OVS in the first cabinet under the target tenant network; and / or
[0061] and configured to, upon detecting that the fifth OVS in the second cabinet is deleted, if the fifth OVS is the broadcast agent in the second cabinet, determine a third broadcast agent from the OVSs in the second cabinet under the target tenant network other than the fifth OVS, update the address of the broadcast agent in the second cabinet under the target tenant network to the address of the third broadcast agent, and ensure that the fifth OVS belongs to the OVS in the second cabinet under the target tenant network.
[0062] In a third aspect of the embodiments of the present application, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0063] Memory for storing computer programs;
[0064] The processor is configured to implement any of the above-mentioned message broadcasting method steps when executing the program stored in the memory.
[0065] In a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned message broadcasting method steps is implemented.
[0066] Beneficial effects of the embodiments of the present application:
[0067] In the technical solution provided by the embodiments of the present application, the OVS pre-records the address of a broadcast agent in a remote cabinet. When broadcasting a message to a remote cabinet, the OVS only needs to copy the message and send it to the broadcast agent in the remote cabinet. The OVS does not need to copy and send a message to each OVS in the remote cabinet, thus saving network bandwidth and reducing network burden.
[0068] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0070] Figure 1 This is a schematic diagram of the first network architecture under the host overlay technology of the data center in the related art;
[0071] Figure 2 A schematic diagram of a first flow chart of a message broadcasting method provided in an embodiment of the present application;
[0072] Figure 3 A schematic diagram of a network architecture for a data center host overlay technology provided in an embodiment of the present application;
[0073] Figure 4 A second flow chart of the message broadcasting method provided in an embodiment of the present application;
[0074] Figure 5 This is a schematic diagram of the second network architecture under the host overlay technology of the data center in the related art;
[0075] Figure 6 A schematic diagram of the structure of a message broadcasting device provided in an embodiment of the present application;
[0076] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.
[0078] In recent years, data center network architectures have continued to evolve, evolving from the traditional three-tier converged architecture to the current mainstream two-tier spine-leaf network architecture. Within this spine-leaf architecture, current data centers generally use overlay technology, such as establishing VXLAN (Virtual eXtensible Local Area Network) tunnels to exchange or forward data between switches.
[0079] Specifically, overlay technology can be implemented in two ways: host overlay and network overlay. In host overlay, the network's control endpoint is on the server side, which includes at least one software switch, typically an Open Virtual Server (OVS). Broadcast packets are broadcast by the OVS. In network overlay, the network's control endpoint is on the hardware switch side, which also broadcasts broadcast packets. In network overlay, the OVS on the server side functions only as a standard Layer 2 switch.
[0080] In the host overlay technology scenario, service development relies entirely on software implementation. This makes service development more flexible and iterative, and its capabilities can be quickly updated without relying on hardware. This fully decouples services from hardware switches, and therefore many large Internet companies currently use the host overlay technology solution for service development.
[0081] However, the problem with host overlay technology is that the network's control endpoint is on the software switch, OVS. All packet forwarding requires OVS to handle this. The CPU performance of the OVS forwarding software is clearly inferior to that of a dedicated hardware switch, resulting in low OVS forwarding performance. To improve OVS forwarding performance, the industry's OVS form factor has evolved from kernel OVS to DPDK (Data Plane Development Kit) OVS.
[0082] In addition, if Figure 1The network architecture of the data center using host overlay technology is shown. This network architecture can be a VXLAN network architecture, including Underlay Leaf devices (which are access hardware switches), Spine devices, and servers. A server typically includes an OVS and multiple VMs (Virtual Machines). Assume that there are M access hardware switches and N servers in the network, where N is typically much larger than M. Based on host overlay technology, a VXLAN tunnel must be established between the OVS in one server and the OVS in each other server. The number of VXLAN tunnels required for host overlay technology is: Based on network overlay technology, a VXLAN tunnel must be established between a hardware switch and each other hardware switch. The number of VXLAN tunnels in network overlay technology is: The increase in the number of VXLAN tunnels means that more packets need to be copied when broadcasting packets in the network, which occupies more network bandwidth and greatly increases the network burden.
[0083] In order to save network bandwidth and reduce network burden when OVS broadcasts messages, Figure 2 As shown, an embodiment of the present application provides a message broadcast method, which is applied to a first OVS of a first cabinet, and the method includes the following steps:
[0084] Step S21: obtaining a first message to be broadcast, where the first message belongs to a target tenant network;
[0085] Step S22: Determine the first addresses of other OVSs in the first cabinet of the target tenant network and the second addresses of the Broadcast Agents in the other cabinets based on the pre-recorded addresses of the OVSs in the first cabinet of different tenant networks and the addresses of the Broadcast Agents in the cabinets of different tenant networks. A Broadcast Agent in a cabinet is an OVS in the cabinet.
[0086] Step S23: broadcast the first message to other OVSs in the first cabinet according to the first address and the second address, and broadcast the first message to broadcast agents in other cabinets.
[0087] In the technical solution provided by the embodiments of the present application, the OVS pre-records the address of a broadcast agent in a remote cabinet. When broadcasting a message to a remote cabinet, the OVS only needs to copy the message and send it to the broadcast agent in the remote cabinet. The OVS does not need to copy and send a message to each OVS in the remote cabinet, thus saving network bandwidth and reducing network burden.
[0088] In the embodiment of the present application, the first rack can be any rack (RACK), and the first OVS can be any OVS in the first rack, without limitation. An OVS can belong to one or more tenant networks. The address (such as IP address) of an OVS remains unchanged in different tenant networks. In addition, the OVSs included in different tenant networks can be the same or different.
[0089] In order to distinguish the OVS in different cabinets, in the embodiment of the present application, an address planning can be made for the OVS under the cabinet, and the OVS in the same cabinet belong to the same network segment. Figure 3 The network architecture under the host overlay technology shown in the figure includes OVS1-OVS12, which belong to different cabinets 1-4 respectively. Among them, the IP addresses of OVS1-OVS3 in cabinet 1 belong to the 10.0.1.0 / 24 network segment, the IP addresses of OVS4-OVS6 in cabinet 2 belong to the 10.0.2.0 / 24 network segment, the IP addresses of OVS7-OVS9 in cabinet 3 belong to the 10.0.3.0 / 24 network segment, and the IP addresses of OVS10-OVS12 in cabinet 4 belong to the 10.0.4.0 / 24 network segment.
[0090] In the embodiment of the present application, a unique identifier, referred to as a cabinet identifier, may also be assigned to each cabinet. Each OVS is informed of the cabinet identifier of the cabinet to which it belongs. The OVS sends a message carrying the cabinet identifier, allowing other OVSs or controllers to distinguish between OVSs in different cabinets.
[0091] In the embodiment of the present application, the OVSs of different cabinets may be distinguished by other methods, which are not limited to this.
[0092] In step S21 above, the target tenant network is any tenant network to which the first OVS belongs. The first message can be any message that needs to be broadcast in the target tenant network, such as a message whose destination MAC (Media Access Control) address is a broadcast address, or a message whose destination MAC address is an unknown address. The first message can be a message from a VM included in the server side to which the first OVS belongs.
[0093] The first message carries the identifier of the tenant network. After receiving the first message, the first OVS can determine the target tenant network to which the first message belongs based on the identifier of the tenant network carried in the first message.
[0094] In step S22 above, the first OVS pre-records the addresses of each OVS in the first cabinet under different tenant networks, as well as the addresses of the broadcast agents in each cabinet under different tenant networks. A broadcast agent in a cabinet is an OVS in that cabinet. In an embodiment of the present application, in order to shorten the service interruption time caused by a broadcast agent failure, the broadcast agent in a cabinet can be divided into a primary broadcast agent and a backup broadcast agent. The first OVS records the addresses of the primary broadcast agent and the backup broadcast agent in each cabinet under different tenant networks. When the primary broadcast agent in a cabinet is normal, the first OVS completes the message broadcast based on the address of the primary broadcast agent in the cabinet; when the primary broadcast agent in a cabinet is abnormal, the first OVS completes the message broadcast based on the address of the backup broadcast agent in the cabinet. For ease of description, the following explanation is based on an example of only one broadcast agent in a cabinet, which is not intended to be limiting.
[0095] In order to broadcast the first message under the tenant network to which the first message belongs, the first OVS determines the addresses of the other OVSs in the first cabinet under the target tenant network, i.e., the first address, based on the pre-recorded addresses of the various OVSs in the first cabinet under different tenant networks; and determines the addresses of the broadcast agents in the cabinets under the target tenant network, i.e., the second address, based on the pre-recorded addresses of the broadcast agents in the cabinets under different tenant networks. In an embodiment of the present application, when the first cabinet includes one OVS (i.e., the first OVS), the first address is empty; when the first cabinet includes multiple OVSs, the number of the first addresses is one or more. In the first cabinet, for each cabinet, the address of a broadcast agent is recorded; when there is one other cabinet, the number of the second addresses is one; when there are multiple other cabinets, the number of the second addresses is multiple.
[0096] In the above step S23, after the first OVS determines the first address in step S22, it copies a first message for each first address and broadcasts the first message to the OVS corresponding to the first address; after determining the second address in step S22, it copies a first message for each second address and broadcasts the first message to the OVS corresponding to the second address (i.e., the broadcast agent).
[0097] The broadcast agent of other cabinets pre-records the addresses of each OVS in the other cabinets under different tenant networks. After receiving the first message, it determines the address (such as the fourth address) of the other OVS in the other cabinet under the target tenant network based on the pre-recorded addresses of each OVS in the other cabinets in different tenant networks; and broadcasts the message to the other OVS in the other cabinet based on the determined fourth address.
[0098] In some embodiments, when the first OVS is the broadcast agent of the first cabinet, such as Figure 4 As shown, the embodiment of the present application further provides a message broadcasting method, which is applied to the first OVS of the first cabinet. The method may include the following steps:
[0099] Step S41: receiving a second message broadcast by the OVS in another cabinet, where the second message belongs to the target tenant network;
[0100] Step S42, determining the third addresses of other OVSs in the first cabinet under the target tenant network according to the pre-recorded addresses of the respective OVSs in the first cabinet under different tenant networks;
[0101] Step S43: broadcast the second message to other OVSs in the first cabinet according to the third address.
[0102] In the technical solution provided by the embodiment of the present application, after the broadcast agent receives the second message broadcast by the OVS in other cabinets, it forwards the second message to the other OVS in the first cabinet. There is no need for the OVS in other cabinets to copy and send a message to each OVS in the first cabinet. The broadcast agent of the first cabinet sends the message within the first cabinet and does not occupy network bandwidth, which further saves network bandwidth and reduces the network burden.
[0103] In the above step S41, the second message can be any message that needs to be broadcast in the target tenant network. The second message can be a message from the VM of the OVS in other cabinets. The process of the OVS in other cabinets broadcasting the second message to the first OVS can be referred to above. Figure 2 The process shown is that the first OVS broadcasts the first message to the OVSs in other cabinets.
[0104] In the above step S42, the first OVS pre-records the addresses of each OVS in the first cabinet under different tenant networks. In order to broadcast the second message in the tenant network to which the second message belongs, the first OVS determines the addresses of other OVSs in the first cabinet except the first OVS under the target tenant network, i.e., the third address, based on the pre-recorded addresses of each OVS in the first cabinet in different tenant networks. In this embodiment of the present application, when the first cabinet includes one OVS (i.e., the first OVS), the third address is empty. When the first cabinet includes multiple OVSs, the third address is one or more.
[0105] In the above step S43, the first OVS copies a second message for each third address according to the third address determined in step S42, and broadcasts the second message to other OVSs at the third address in the first cabinet.
[0106] The following combination Figure 3 and Figure 5 The network architecture under the host overlay technology shown in the figure is used to illustrate the message broadcast method provided in the embodiment of the present application. Figure 3 and Figure 5 As shown, the server side includes cabinets 1-4, each of which includes three OVSs. Figure 5 As shown, when OVS1 in cabinet 1 needs to broadcast a message to all OVSs in cabinet 4, a copy of the message must be made in each of the three VXLAN tunnels and sent. Figure 3 As shown in the figure, when OVS1 in cabinet 1 needs to broadcast a message to OVS in cabinet 4, it only needs to copy a message in a VXLAN tunnel (that is, the VXLAN tunnel between OVS1 and broadcast agent OVS10) and send it, and then the broadcast agent OVS10 broadcasts it to OVS11-12 in cabinet 4, which is the same as Figure 5 Compared with the message broadcast method shown in FIG, this method greatly saves network bandwidth and greatly reduces the network burden.
[0107] In the embodiment of the present application, the first OVS is any OVS in the first cabinet, and the first OVS pre-records the addresses of each OVS in the first cabinet under different tenant networks, as well as the addresses of the broadcast agents in each cabinet under different tenant networks. In the embodiment of the present application, the first OVS can record the above two types of information in the form of a database, or in the form of a data table. For example, a broadcast proxy table can be used to record the addresses of the broadcast agents in each cabinet under different tenant networks, as shown in Table 1, and a local endpoint table can be used to record the addresses of each OVS in the first cabinet under different tenant networks, as shown in Table 2. For the convenience of description, the Broadcast proxy table will be referred to as the first data table, and the Local endpoint table will be referred to as the second data table. In Tables 1 and 2, each row represents a data table.
[0108] Table 1
[0109] Tenant Network Broadcast Agent Tenant Network 1 [proxy1, proxy2, …] Tenant Network 2 [proxy1, proxy3, …]
[0110] Table 2
[0111] Tenant Network local node Tenant Network 1 [IP01, IP02, …] Tenant Network 2 [IP01, IP03, …]
[0112] Table 1 records: Under tenant network 1, the addresses of the broadcast agents of each cabinet are Proxy1 and Proxy2, etc.; under tenant network 2, the addresses of the broadcast agents of each cabinet are Proxy1 and Proxy3, etc. Table 2 records: Under tenant network 1, the addresses of the OVS servers in the first cabinet are IP01 and IP02, etc.; under tenant network 2, the addresses of the OVS servers in the first cabinet are IP01 and IP03, etc.
[0113] In an embodiment of the present application, the second data table can be established based on the existing VXLAN tunnel establishment process, that is, the OVS selects an OVS belonging to the same network segment as the current OVS from the VXLAN remote list and adds the address of the selected OVS to the second data table. The information recorded in the OVS, such as the addresses of each OVS in the cabinet under different tenant networks and the addresses of the broadcast agents in each cabinet under different tenant networks, can be controlled by an upper-layer controller or established by a protocol such as EVPN.
[0114] When the information recorded in the OVS is controlled by the upper-layer controller, if the addresses of the OVSs in the same cabinet are pre-configured to be in the same network segment, each OVS in each cabinet sends its own address to the controller, and the controller can determine the OVS included in each cabinet based on the addresses of each OVS. For example, the controller can determine the OVSs whose addresses belong to the same network segment as the OVS included in the same cabinet. In the embodiment of the present application, the addresses of the OVSs in the same cabinet can also be configured arbitrarily. In this case, each OVS in each cabinet sends its own address to the controller and sends the identifier of the cabinet to which the OVS belongs to the controller. The controller can determine the OVS included in each cabinet based on the identifier of the cabinet.
[0115] After determining the OVS included in each cabinet, the controller combines the tenant networks to which each OVS belongs to determine the broadcast agent for each cabinet in each tenant network and the OVS in each cabinet in each tenant network. Based on this information, the controller establishes a first data table corresponding to each tenant network and a second data table corresponding to each cabinet in each tenant network. The first data table corresponding to each tenant network records the address of the broadcast agent in each cabinet in that tenant network, and the second data table corresponding to each cabinet in each tenant network records the address of each OVS in that cabinet in that tenant network.
[0116] In the embodiments of the present application, the broadcast agent determination rule can be set according to actual needs. For example, the broadcast agent determination rule may be: determine the OVS with the largest IP address in the next cabinet of the tenant network as the broadcast agent for the cabinet in the tenant network; or determine the OVS that first connected to the tenant network in the next cabinet of the tenant network as the broadcast agent for the cabinet in the tenant network.
[0117] When the controller establishes the first data table and the second data table, when OVS is added or deleted in the entire network architecture, the controller updates the first data table and / or the second data table. The following five cases are explained:
[0118] Case 1: The first OVS is connected to the first cabinet.
[0119] When the first OVS accesses the first cabinet, a first OVS is added to the first cabinet, and the first OVS belongs to one or more tenant networks (such as the target tenant network). The first OVS sends the address of the first OVS to the controller. Afterwards, the controller determines the OVS in each cabinet under the target tenant network, and determines the first information and the second information based on the address of the OVS in each cabinet under the target tenant network, and sends the first information and the second information to the first OVS. The first information is the address of the broadcast agent in each cabinet under the target tenant network, and the second information is the address of each OVS in the first cabinet under the target tenant network. The first OVS receives and records the first information and the second information.
[0120] In the embodiment of the present application, the first OVS may be the first OVS in the first cabinet to access the target tenant network, or the first OVS may not be the first OVS in the first cabinet to access the target tenant network. These two situations are described below.
[0121] 1) The first OVS is the first OVS in the first cabinet that connects to the target tenant network. The first OVS sends its address to the controller. The controller determines that the first OVS is the broadcast agent in the first cabinet under the target tenant network, populates the first OVS's address in the first data table corresponding to the target tenant network, establishes a second data table corresponding to the first cabinet under the target tenant network, populates the first OVS's address in the established second data table, and sends the populated first and second data tables to the first OVS. The first OVS records the populated first data table (i.e., first information) and second data table (i.e., second information).
[0122] In addition, the controller can send the populated first data table to each OVS in other cabinets under the target tenant network. After receiving the populated first data table, each OVS in other cabinets updates the local first data table of the OVS, that is, adds the address of the first OVS to the address of the broadcast agent under the target tenant network.
[0123] For example, Figure 3 As shown in the figure, assume that OVS1-OVS3 in cabinet 1 are not connected to any tenant networks. When OVS1 connects to tenant networks 1 and 2, OVS1 becomes the first OVS in cabinet 1's tenant networks 1 and 2, and is the first OVS. Tenant networks 1 and 2 are the target tenant networks. This example, which is not intended to be limiting, uses cabinet 4 as an example. In cabinet 4, OVS10 connects to tenant network 1, OVS11 connects to tenant network 2, and OVS12 connects to no tenant network. OVS1's address is IP1, OVS10's address is IP10, and OVS11's address is IP11.
[0124] When OVS1 connects to tenant networks 1 and 2, it sends OVS1's IP address to the controller. Table 3 shows the first data table corresponding to tenant networks 1 and 2 in the controller. The controller does not record the second data table corresponding to cabinet 1 under tenant networks 1 and 2.
[0125] Table 3
[0126] Tenant Network Broadcast Agent Tenant Network 1 [IP10,…] Tenant Network 2 [IP11,…]
[0127] The controller fills the address IP1 of OVS1 in the first data table corresponding to tenant network 1 and tenant network 2 shown in Table 3, and obtains the first data table shown in Table 4.
[0128] Table 4
[0129] Tenant Network Broadcast Agent Tenant Network 1 [IP10, IP1, …] Tenant Network 2 [IP11, IP1, …]
[0130] In Table 4, the first and second rows are the first data tables corresponding to tenant network 1 and tenant network 2.
[0131] In addition, the controller creates a second data table corresponding to cabinet 1 under tenant network 1 and tenant network 2, and fills the address IP1 of OVS1 in the second data table, as shown in Table 5.
[0132] Table 5
[0133] Tenant Network local node Tenant Network 1 [IP1] Tenant Network 2 [IP1]
[0134] In Table 5, the first and second rows are the second data tables filled in under tenant network 1 and tenant network 2, respectively.
[0135] The controller sends the information in the first and second rows of Table 4 and the information in the first and second rows of Table 5 to OVS1. At the same time, the controller sends the information in the first row of Table 4 to OVS10 in tenant network 1 and the information in the second row of Table 4 to OVS11 in tenant network 2. OVS1, OVS10, and OVS11 update their local records based on the received information.
[0136] 2) The first OVS is not the first OVS in the first cabinet to access the target tenant network. In the first data table, the controller has recorded the address of the broadcast agent of the first cabinet under the target tenant network. In this case, the first OVS sends the address of the first OVS to the controller. The controller can update the second data table corresponding to the first cabinet under the target tenant network without changing the first data table corresponding to the target tenant network, such as filling the address of the first OVS into the second data table corresponding to the first cabinet under the target tenant network, and sending the filled second data table to each OVS (including the first OVS) in the first cabinet under the target tenant network. Each OVS in the first cabinet under the target tenant network receives and records the filled second data table, that is, adds the address of the first OVS to the address of the OVS in the first cabinet under the target tenant network. In addition, the controller sends the unchanged first data table corresponding to the target tenant network to the first OVS. The first OVS records the received first data table.
[0137] For example, Figure 3 As shown in the figure, assume that OVS2 in cabinet 1 is connected to tenant network 1 and serves as the broadcast agent for cabinet 1 under tenant network 1. OVS3 is connected to tenant network 2 and serves as the broadcast agent for cabinet 1 under tenant network 2. OVS1 is not connected to any tenant network. When OVS1 connects to tenant networks 1 and 2, OVS1 is not the first OVS in cabinet 1 for tenant networks 1 and 2. OVS1 is the first OVS, and tenant networks 1 and 2 are the target tenant networks. OVS1's address is IP1, OVS2's address is IP2, and OVS3's address is IP3. When OVS1 connects to tenant networks 1 and 2, it sends OVS1's address IP1 to the controller. The first data table corresponding to tenant networks 1 and 2 in the controller is shown in Table 6, and the second data table corresponding to cabinet 1 under tenant networks 1 and 2 in the controller is shown in Table 7.
[0138] Table 6
[0139] Tenant Network Broadcast Agent Tenant Network 1 [IP2,…] Tenant Network 2 [IP3,…]
[0140] Table 7
[0141] Tenant Network local node Tenant Network 1 [IP2] Tenant Network 2 [IP3]
[0142] After receiving IP1 sent by OVS1, the controller does not change Table 6, but fills OVS1's address IP1 in the second data table corresponding to cabinet 1 under tenant network 1 and tenant network 2 shown in Table 7, and obtains the second data table shown in Table 8.
[0143] Table 8
[0144] Tenant Network local node Tenant Network 1 [IP2, IP1] Tenant Network 2 [IP3, IP1]
[0145] The controller sends the first row of information in Table 8 to each OVS in Cabinet 1 under Tenant Network 1 (including OVS1), and the second row of information in Table 8 to each OVS in Cabinet 1 under Tenant Network 2 (including OVS1). Furthermore, the controller sends the first and second rows of information in Table 6 to OVS1. Each OVS in Cabinet 1 under Tenant Network 1 and Tenant Network 2 (e.g., OVS1, OVS2, and OVS3) updates its local records based on the received information. The first row of Table 6 recorded by OVS2 remains unchanged, and the second row of Table 6 recorded by OVS3 remains unchanged. The controller does not need to send the information in Table 6 to the OVSs in other cabinets (e.g., Cabinet 4), and the OVSs in other cabinets do not update the first data table.
[0146] In case 2, the second OVS is connected to the first cabinet.
[0147] If the first OVS in the target tenant network is already connected to the first cabinet, and the second OVS in the target tenant network is connected to the first cabinet, and both the first and second OVS belong to the target tenant network, the second OVS is not the first OVS in the first cabinet to connect to the target tenant network. In this case, the second OVS sends its address to the controller. The controller sends information to the first and second OVSs to update the information they have locally stored. For details, see the description of the first OVS connecting to the target tenant network in 2) of scenario 1 above.
[0148] The first OVS receives and records the address of the second OVS in the first cabinet under the target tenant network sent by the controller, such as filling the address of the second OVS into the second data table corresponding to the first cabinet under the target tenant network, that is, adding the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network.
[0149] Case 3: The fourth OVS in the second cabinet newly connects to the target tenant network. The second cabinet is any cabinet different from the first cabinet, and the fourth OVS is the OVS in the second cabinet that newly connects to the target tenant network. The fourth OVS in the second cabinet newly connects to the target tenant network in two cases: the fourth OVS is the first OVS in the second cabinet to connect to the target tenant network, and the fourth OVS is not the first OVS in the second cabinet to connect to the target tenant network.
[0150] If the fourth OVS is not the first OVS in the second cabinet to connect to the target tenant network, each OVS in the second cabinet of the target tenant network updates the second data table corresponding to the second cabinet of the target tenant network, but the first OVS is unaware of this. For details, see the description of the case where the first OVS is not the first OVS in the first cabinet to connect to the target tenant network in 2) of scenario 1.
[0151] When the fourth OVS is the first OVS in the second cabinet to access the target tenant network, the controller determines that the fourth OVS is the broadcast agent (i.e., the first broadcast agent) in the second cabinet under the target tenant network, fills the address of the first broadcast agent in the first data table corresponding to the target tenant network, and establishes a second data table corresponding to the second cabinet under the target tenant network, fills the address of the first broadcast agent in the established second data table, and sends the filled first data table and the filled second data table to each OVS in the second cabinet under the target tenant network (i.e., the above-mentioned fourth OVS), and the fourth OVS records the filled first data table and the filled second data table.
[0152] In addition, the controller sends the populated first data table to the OVSs in other cabinets (including the first OVS). The first OVS in the first cabinet detects the change in the first data table and updates the first data table corresponding to the target tenant network. Specifically, it adds the address of the first broadcast agent to the addresses of the broadcast agents in each cabinet under the target tenant network. For details, see 1) of Case 1, regarding the first OVS being the first OVS in the first cabinet to connect to the target tenant network.
[0153] Case 4: The third OVS in the first cabinet is deleted.
[0154] The third OVS can be any OVS in the first cabinet of the target tenant network. The third OVS belongs to the target tenant network. The controller can monitor whether each OVS in the first cabinet has been deleted through a keepalive mechanism. When the controller detects that the third OVS has been deleted, it performs different operations based on whether the third OVS is the broadcast agent in the first cabinet of the target tenant network, as follows:
[0155] 1) The third OVS is not the broadcast agent in the first cabinet under the target tenant network. When the controller detects that the third OVS has been deleted, it deletes the address of the third OVS in the first cabinet under the target tenant network and sends a first deletion message of the third OVS to each OVS (including the first OVS) in the first cabinet under the target tenant network. Taking the first OVS as an example, the first OVS deletes the pre-recorded address of the third OVS in the first cabinet under the target tenant network based on the first deletion message. The first deletion message can carry the address of the third OVS and can also carry the second data table corresponding to the first cabinet under the target tenant network, where the second data table includes the address of the first OVS.
[0156] For example, Figure 3 As shown, it is assumed that OVS2 in cabinet 1 is connected to tenant network 1 and is the broadcast agent of cabinet 1 under tenant network 1. OVS3 is connected to tenant network 2 and is the broadcast agent of cabinet 1 under tenant network 2. OVS1 is connected to tenant network 1 and tenant network 2. Cabinet 1 also includes OVS13 ( Figure 3(not shown), OVS13 connects to Tenant Network 1. OVS1 is the first OVS, and Tenant Network 1 and Tenant Network 2 are the target tenant networks. OVS1's address is IP1, OVS2's address is IP2, OVS3's address is IP3, and OVS13's address is IP13. The controller records the second data table corresponding to Cabinet 1 under Tenant Network 1 and Tenant Network 2, as shown in Table 9.
[0157] Table 9
[0158] Tenant Network local node Tenant Network 1 [IP2, IP1, IP13] Tenant Network 2 [IP3, IP1]
[0159] When OVS13 is deleted, OVS13 becomes the third OVS, and the controller deletes IP13 corresponding to tenant network 1 in Table 9. The second data table after deleting IP13 is shown in Table 8.
[0160] The controller sends a first deletion message of OVS13 to each OVS (including OVS1) in cabinet 1 under tenant network 1. In an embodiment of the present application, the first deletion message may carry the address IP13 of OVS13, and may also carry the second data table corresponding to cabinet 1 under tenant network 1 (such as the first row in Table 8). Taking OVS1 as an example, OVS1 deletes IP13 in the second data table corresponding to cabinet 1 under tenant network 1 according to the first deletion message, and completes the update of the second data table. Similarly, OVS2 updates the second data table corresponding to cabinet 1 under tenant network 1. Each OVS in cabinet 1 under tenant network 1 does not need to update the first data table. In addition, other cabinets (such as cabinet 4) will not perceive the changes in the second data table in cabinet 1, nor will they update the first data table.
[0161] 2) The third OVS is the broadcast agent in the first cabinet of the target tenant network. When the controller detects that the third OVS has been deleted, it deletes the address of the broadcast agent in the first cabinet of the target tenant network (i.e., the address of the third OVS), deletes the address of the third OVS in the first cabinet of the target tenant network, and re-determines a broadcast agent, such as the second broadcast agent, from the remaining OVSs in the first cabinet of the target tenant network. The controller sends a second deletion message for the third OVS to each OVS in the first cabinet of the target tenant network (including the first OVS). The second deletion message includes the address of the second broadcast agent in the first cabinet of the target tenant network. Taking the first OVS as an example, based on the second deletion message, the first OVS deletes the address of the third OVS in the first cabinet of the target tenant network and updates the pre-recorded address of the broadcast agent in the first cabinet of the target tenant network to the address of the second broadcast agent. The second deletion message may carry the address of the third OVS and the address of the second broadcast agent, and may also carry the second data table corresponding to the first cabinet of the target tenant network and the first data table corresponding to the target tenant network.
[0162] In addition, the controller may also send an update message to each OVS in other cabinets in the target tenant network. The update message may include the address of the second broadcast agent. Based on the update message, each OVS in other cabinets in the target tenant network updates the address of the broadcast agent in the first cabinet in the target tenant network to the address of the second broadcast agent.
[0163] For example, Figure 3 As shown, assume that OVS2 in cabinet 1 is connected to tenant network 1 and serves as the broadcast agent for cabinet 1 under tenant network 1. OVS3 is connected to tenant network 2 and serves as the broadcast agent for cabinet 1 under tenant network 2. OVS1 is connected to tenant networks 1 and 2. OVS1 is the first OVS, and tenant networks 1 and 2 are target tenant networks. Except for cabinet 1, only cabinet 4 is used as an example, which is not limiting. OVS10 in cabinet 4 is connected to tenant network 1 and serves as the broadcast agent for cabinet 4 under tenant network 1. OVS11 is connected to tenant network 2 and serves as the broadcast agent for cabinet 4 under tenant network 2. OVS12 is not connected to any tenant network. OVS1's address is IP1, OVS2's address is IP2, OVS3's address is IP3, OVS10's address is IP10, and OVS11's address is IP11. The first data table corresponding to tenant network 1 and tenant network 2 in the controller is shown in Table 10, and the second data table corresponding to cabinet 1 under tenant network 1 and tenant network 2 in the controller is shown in Table 8.
[0164] Table 10
[0165] Tenant Network Broadcast Agent Tenant Network 1 [IP2, IP10, …] Tenant Network 2 [IP3, IP11, …]
[0166] When OVS2 is deleted, OVS2 becomes the third OVS. The controller deletes IP2 corresponding to tenant network 1 in Table 10 and IP2 corresponding to tenant network 1 in Table 8. The first data table after deleting IP2 is shown in Table 11, and the second data table after deleting IP2 is shown in Table 12.
[0167] Table 11
[0168] Tenant Network Broadcast Agent Tenant Network 1 [IP10,…] Tenant Network 2 [IP3, IP11, …]
[0169] Table 12
[0170] Tenant Network local node Tenant Network 1 [IP1] Tenant Network 2 [IP3, IP1]
[0171] The controller re-determines the broadcast agent from the remaining OVS in cabinet 1 under tenant network 1, such as OVS1, and fills the address IP1 of OVS1 into the first data table corresponding to tenant network 1 in Table 11. The obtained first data table is shown in Table 13.
[0172] Table 13
[0173] Tenant Network Broadcast Agent Tenant Network 1 [IP10, IP1, …] Tenant Network 2 [IP3, IP11, …]
[0174] The controller sends a second deletion message of OVS2 to the remaining OVSs (including OVS1) in cabinet 1 under tenant network 1. In an embodiment of the present application, the second deletion message may carry the address of the second broadcast agent in cabinet 1 under tenant network 1 (i.e., the address IP1 of OVS1), and may also carry the second data table corresponding to cabinet 1 under tenant network 1 (such as the first row in Table 12) and the first data table corresponding to tenant network 1 (such as the first row in Table 13). Taking OVS1 as an example, OVS1 deletes IP2 corresponding to cabinet 1 under tenant network 1 according to the second deletion message, and updates the address of the broadcast agent of cabinet 1 under tenant network 1 to IP1, i.e., IP2 in the first and second data tables under tenant network 1, and adds IP1 to the first data table corresponding to tenant network 1, completing the update of the second data table and the second data table.
[0175] In addition, the controller sends an update message to each OVS in other cabinets under Tenant Network 1 (e.g., OVS10 in Cabinet 4). This update message may include the address IP1 of Broadcast Agent OVS1. Based on the update message, OVS10 updates the address of the Broadcast Agent in Cabinet 1 under Tenant Network 1 to OVS1's address IP1, as shown in the first row of Table 13 above.
[0176] In case 5, the fifth OVS in the second cabinet is deleted.
[0177] The second cabinet is any cabinet different from the first cabinet, the fifth OVS can be any OVS in the second cabinet, and the first OVS and the fifth OVS belong to the target tenant network. When the controller detects that the fifth OVS in the second cabinet has been deleted, it performs different operations based on whether the fifth OVS is the broadcast agent in the second cabinet of the target tenant network, as follows:
[0178] 1) The fifth OVS is not a broadcast agent in the second cabinet. When the controller detects that the fifth OVS has been deleted, it deletes the address of the fifth OVS in the second cabinet of the target tenant network and sends a first deletion message for the fifth OVS to each OVS in the second cabinet of the target tenant network. In response to the first deletion message, each OVS in the second cabinet of the target tenant network deletes the pre-recorded address of the fifth OVS in the second cabinet of the target tenant network. For details, see 1) of Case 4 regarding the handling of the situation where the third OVS is not a broadcast agent in the first cabinet of the target tenant network. Here, the first OVS is unaware of the deletion of the OVS in the second cabinet and does not update the first and second data tables.
[0179] 2) The fifth OVS is a broadcast agent in the second cabinet. When the controller detects that the fifth OVS has been deleted, it deletes the address of the broadcast agent in the second cabinet of the target tenant network (i.e., the address of the fifth OVS), deletes the address of the fifth OVS in the second cabinet of the target tenant network, and re-determines a broadcast agent from the remaining OVSs in the second cabinet of the target tenant network, such as the third broadcast agent. The controller sends a second deletion message for the fifth OVS to each OVS in the second cabinet of the target tenant network. The second deletion message includes the address of the third broadcast agent in the second cabinet of the target tenant network. Based on the second deletion message, each OVS in the second cabinet of the target tenant network deletes the address of the fifth OVS in the second cabinet of the target tenant network and updates the pre-recorded address of the broadcast agent in the second cabinet of the target tenant network to the address of the third broadcast agent. The second deletion message may carry the address of the fifth OVS and the address of the third broadcast agent, and may also carry the second data table corresponding to the second cabinet of the target tenant network and the first data table corresponding to the target tenant network.
[0180] In addition, the controller can also send an update message to each OVS in other cabinets under the target tenant network (including the first OVS in the first cabinet). This update message may include the address of the third broadcast agent. Taking the first OVS as an example, based on the update message, the first OVS updates the address of the broadcast agent in the second cabinet under the target tenant network to the address of the third broadcast agent. For details, see Scenario 4, step 2) for the processing operation for the third OVS being the broadcast agent in the first cabinet under the target tenant network. Here, the first OVS will perceive that the fifth OVS in the second cabinet has been deleted and will update the first data table.
[0181] When the information recorded in the OVS is established by a protocol such as EVPN, if the addresses of the OVSs in the same cabinet are pre-configured in the same network segment, each OVS in each cabinet sends its own address to each OVS in each cabinet. Taking the first OVS as an example, after the first OVS receives the address of each OVS in each cabinet, it determines the OVS included in each cabinet based on the address of each OVS, such as determining the OVS whose address belongs to the same network segment as the OVS included in the same cabinet. In the embodiment of the present application, the address of the OVS in the same cabinet can also be configured arbitrarily. At this time, each OVS in each cabinet sends its own address to each OVS in each cabinet, and sends the identification of the cabinet to which the OVS belongs to each OVS in each cabinet. The first OVS can determine the OVS included in each cabinet based on the identification of the cabinet.
[0182] After determining the OVS included in each cabinet, the first OVS combines the tenant networks to which each OVS belongs to determine the broadcast agent of each cabinet under different tenant networks, as well as each OVS in each cabinet under different tenant networks, and establishes a first data table corresponding to each tenant network and a second data table corresponding to each cabinet under each tenant network based on the determined information.
[0183] In the embodiment of the present application, the first data table and the second data table are established by the EVPN protocol. There is no need to modify the existing EVPN protocol implementation. It is only necessary to establish a tunnel mechanism on the existing EVPN and aggregate multiple VXLAN tunnels located in the same network segment into one VXLAN tunnel locally in OVS.
[0184] When the first data table and the second data table are established by a protocol such as EVPN, when OVS is added or deleted in the entire network architecture, the first data table and / or the second data table are updated by the protocol such as EVPN. The following five cases are explained:
[0185] Case 1: The first OVS is connected to the first cabinet.
[0186] When the first OVS is connected to the first cabinet, the first OVS is newly added to the first cabinet, and the first OVS belongs to one or more target tenant networks. In this embodiment of the present application, the first OVS can be the first OVS in the first cabinet to connect to the target tenant network, or the first OVS can not be the first OVS in the first cabinet to connect to the target tenant network. These two situations are described below.
[0187] 1) The first OVS is the first OVS in the first cabinet to access the target tenant network. Except for the first OVS, the first cabinet does not include an OVS in the target tenant network. The first OVS sends the address of the first OVS to each OVS under the target tenant network (including the OVS in the first cabinet and other cabinets). In addition, the first OVS receives the address of each OVS itself sent by each OVS under the target tenant network (including the OVS in the first cabinet and other cabinets). Because the first OVS is the first OVS in the first cabinet to access the target tenant network, the first OVS actually only sends the address of the first OVS to each OVS in other cabinets under the target tenant network, and only receives the addresses sent by each OVS in other cabinets under the target tenant network.
[0188] The first OVS determines, based on the received addresses of the OVSs in the first cabinet, that the first OVS is the broadcast agent for the first cabinet in the target tenant network. Based on the addresses of the OVSs in each of the other cabinets in the target tenant network, the first OVS determines, from the OVSs in each of the other cabinets in the target tenant network, the broadcast agent for each of the other cabinets in the target tenant network. The first OVS records the addresses of the determined broadcast agents in the target tenant network, i.e., the address of the broadcast agent in the first cabinet in the target tenant network and the address of the broadcast agent in each of the other cabinets in the target tenant network. For example, the first OVS addresses and the addresses of the broadcast agents in each of the other cabinets in the target tenant network are populated into a first data table corresponding to the target tenant network. Furthermore, the first OVS may also record the addresses of the OVSs in the first cabinet in the target tenant network, for example, by establishing a second data table corresponding to the first cabinet in the target tenant network and populating the first OVS address into the established second data table.
[0189] After receiving the address of the first OVS, each OVS in the other cabinets determines that the first OVS is the broadcast agent of the first cabinet under the target tenant network, and adds the address of the first OVS to the address of the broadcast agent under the target tenant network, that is, adds the address of the first OVS to the first data table corresponding to the target tenant network.
[0190] For example, Figure 3 As shown, assume that OVS1-OVS3 in cabinet 1 are not connected to any tenant networks. When OVS1 connects to tenant networks 1 and 2, OVS1 becomes the first OVS in cabinet 1's tenant networks 1 and 2, and is the first OVS. Tenant networks 1 and 2 are the target tenant networks. This example, which is not intended to be limiting, uses cabinet 4 as an example. In cabinet 4, OVS10 connects to tenant network 1, OVS11 connects to tenant network 2, and OVS12 connects to both tenant networks 1 and 2. OVS1's address is IP1, OVS10's address is IP10, OVS11's address is IP11, and OVS12's address is IP12.
[0191] When OVS1 connects to Tenant Network 1 and Tenant Network 2, it sends OVS1's address IP1 to OVS10, OVS11, and OVS12. At the same time, OVS10 sends OVS10's address IP10 to OVS1, OVS11 sends OVS11's address IP11 to OVS1, and OVS12 sends OVS12's address IP12 to OVS1.
[0192] OVS1 determines that OVS1 itself is the broadcast agent for cabinet 1 under tenant network 1 and tenant network 2. Furthermore, based on the addresses of OVS10 and OVS12 in cabinet 4 under tenant network 1, OVS10 and OVS12 determine the broadcast agent in cabinet 4 under tenant network 1, such as OVS10. Based on the addresses of OVS11 and OVS12 in cabinet 4 under tenant network 2, OVS11 and OVS12 determine the broadcast agent in cabinet 4 under tenant network 2, such as OVS11. OVS1 populates the IP addresses of Broadcast Agent OVS1 and OVS10 and IP10 into the first data table corresponding to tenant network 1. OVS1 populates the IP addresses of Broadcast Agent OVS1 and OVS11 and IP11 into the first data table corresponding to tenant network 2, as shown in Table 4.
[0193] In addition, OVS1 may also establish a second data table corresponding to cabinet 1 under tenant network 1 and tenant network 2, and fill the address IP1 of OVS1 in the established second data table, as shown in Table 5.
[0194] In addition, a first data table is pre-recorded in OVS10, as shown in Table 14.
[0195] Table 14
[0196] Tenant Network Broadcast Agent Tenant Network 1 [IP10,…]
[0197] After receiving OVS1's address IP1, OVS10 determines that OVS1 is the broadcast agent for cabinet 1 in tenant network 1 and adds OVS1's address IP1 to the first data table corresponding to tenant network 1 (Table 14), as shown in the first row of Table 4. Similarly, OVS11 and OVS12 update the first data table.
[0198] 2) The first OVS is not the first OVS in the first cabinet to connect to the target tenant network. In addition to the first OVS, the first cabinet also includes an OVS for the target tenant network. The first OVS sends its address to each OVS in the target tenant network (including OVSs in the first cabinet and other cabinets). After receiving the first OVS's address, the OVSs in the other cabinets have already recorded the address of the Broadcast Agent in the first cabinet of the target tenant network. Therefore, the first OVS's address can be discarded, and the Broadcast Agent's address is not updated. This means that the first data table corresponding to the target tenant network is not updated, nor is the second data table.
[0199] After receiving the address of the first OVS, each OVS in the first cabinet under the target tenant network does not update the first data table corresponding to the target tenant network because the address of the broadcast agent in the first cabinet under the target tenant network has been recorded. Instead, the second data table is updated, such as by adding the address of the first OVS to the address of the OVS in the first cabinet under the target tenant network, that is, adding the address of the first OVS to the second data table corresponding to the first cabinet under the target tenant network.
[0200] In addition, each OVS in the first cabinet and other cabinets under the target tenant network sends its own address to the first OVS. The first OVS receives the address of each OVS sent by the first cabinet and other cabinets under the target tenant network. The first OVS determines the broadcast agent of each cabinet (including the first cabinet) under the target tenant network based on the address of each OVS in each cabinet, and records the address of the broadcast agent of each cabinet under the target tenant network, such as establishing a first data table corresponding to the target tenant network, and adding the address of the broadcast agent of each cabinet under the target tenant network to the first data table. In addition, the first OVS records the address of each OVS in the first cabinet under the target tenant network, such as establishing a second data table corresponding to the first cabinet under the target tenant network, and adding the address of each OVS in the first cabinet under the target tenant network to the second data table.
[0201] For example, Figure 3 As shown, assume that OVS2 in cabinet 1 is connected to tenant network 1 and serves as the broadcast agent for cabinet 1 under tenant network 1. OVS3 is connected to tenant network 2 and serves as the broadcast agent for cabinet 1 under tenant network 2. OVS1 is not connected to any tenant network. When OVS1 connects to tenant networks 1 and 2, OVS1 is not the first OVS in cabinet 1 for tenant networks 1 and 2. OVS1 is the first OVS, and tenant networks 1 and 2 are the target tenant networks. In addition to cabinet 1, only cabinet 4 is used as an example, which is not limiting. In cabinet 4, OVS10 is connected to tenant network 1, OVS11 is connected to tenant network 2, and OVS12 is connected to tenant networks 1 and 2. OVS1's address is IP1, OVS2's address is IP2, OVS3's address is IP3, OVS10's address is IP10, OVS11's address is IP11, and OVS12's address is IP12.
[0202] When OVS1 connects to Tenant Network 1 and Tenant Network 2, it sends OVS1's address IP1 to OVS2, OVS3, OVS10, OVS11, and OVS12. At the same time, OVS2 sends OVS2's address IP2 to OVS1, OVS3 sends OVS3's address IP3 to OVS1, OVS10 sends OVS10's address IP10 to OVS1, OVS11 sends OVS11's address IP11 to OVS1, and OVS12 sends OVS12's address IP12 to OVS1.
[0203] OVS10, OVS11, and OVS12 do not update the first data table and the second data table.
[0204] After OVS2 receives the IP address of OVS1, it adds the IP address of OVS1 to the second data table corresponding to tenant network 1, as shown in the first row of Table 8. After OVS3 receives the IP address of OVS1, it adds the IP address of OVS1 to the second data table corresponding to tenant network 2, as shown in the second row of Table 8.
[0205] After OVS1 receives the addresses sent by OVS2, OVS3, OVS10, OVS11, and OVS12, it can determine, based on the addresses, that OVS1, OVS2, and OVS3 belong to the same cabinet 1, and that OVS10, OVS11, and OVS12 belong to the same cabinet 4. Furthermore, OVS1 determines the broadcast agent in cabinet 1 under tenant network 1, such as OVS2, from OVS1 and OVS2 belonging to tenant network 1, and determines the broadcast agent in cabinet 1 under tenant network 3, such as OVS3, from OVS1 and OVS3 belonging to tenant network 2; and determines the broadcast agent in cabinet 4 under tenant network 1, such as OVS10, from OVS10 and OVS12 belonging to tenant network 1, and determines the broadcast agent in cabinet 4 under tenant network 3, such as OVS11, from OVS11 and OVS12 belonging to tenant network 2. OVS1 establishes a first data table corresponding to tenant network 1, and adds OVS2's IP address and OVS10's IP address to this first data table, as shown in the first row of Table 10. It also establishes a first data table corresponding to tenant network 2, and adds OVS3's IP address and OVS11's IP address to this first data table, as shown in the second row of Table 10. Furthermore, OVS1 establishes a second data table corresponding to cabinet 1 under tenant network 1, and adds OVS1's IP address and OVS2's IP address to this second data table, as shown in the first row of Table 8. It also establishes a second data table corresponding to cabinet 1 under tenant network 2, and adds OVS1's IP address and OVS3's IP address to this second data table, as shown in the second row of Table 8.
[0206] Case 2: The second OVS is connected to the first cabinet.
[0207] When the first OVS of the target tenant network is connected to the first cabinet, when the second OVS of the target tenant network is connected to the first cabinet, and both the first OVS and the second OVS belong to the target tenant network, the second OVS is not the first OVS in the first cabinet to be connected to the target tenant network.
[0208] In this case, the second OVS sends the address of the second OVS to each OVS in the first cabinet and other cabinets (including the first OVS) under the target tenant network. After receiving the address of the second OVS, the OVS in other cabinets does not update the first data table corresponding to the target tenant network, nor does it update the second data table.
[0209] After receiving the address of the second OVS, each OVS (including the first OVS) in the first cabinet under the target tenant network does not update the first data table corresponding to the target tenant network, but updates the second data table, such as adding the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network, that is, adding the address of the second OVS to the second data table corresponding to the first cabinet under the target tenant network.
[0210] In addition, each OVS in the first cabinet and other cabinets under the target tenant network sends its own address to the second OVS. The second OVS receives the address of each OVS sent by each OVS in the first cabinet and other cabinets under the target tenant network. The second OVS determines the broadcast agent of each cabinet (including the first cabinet) under the target tenant network based on the address of each OVS in each cabinet, and records the address of the broadcast agent of each cabinet under the target tenant network, such as establishing a first data table corresponding to the target tenant network, and adding the address of the broadcast agent of each cabinet under the target tenant network to the first data table. In addition, the second OVS records the address of each OVS in the first cabinet under the target tenant network, such as establishing a second data table corresponding to the first cabinet under the target tenant network, and adding the address of each OVS in the first cabinet under the target tenant network to the second data table.
[0211] Case 3: The fourth OVS in the second cabinet newly connects to the target tenant network. The second cabinet is any cabinet different from the first cabinet, and the fourth OVS is the OVS in the second cabinet that newly connects to the target tenant network. The fourth OVS in the second cabinet newly connects to the target tenant network in two cases: the fourth OVS is the first OVS in the second cabinet to connect to the target tenant network, and the fourth OVS is not the first OVS in the second cabinet to connect to the target tenant network.
[0212] When the fourth OVS is not the first OVS in the second cabinet to access the target tenant network, the fourth OVS sends its address to each OVS in the target tenant network (including the first OVS). After receiving the address of the second OVS, the OVSs in other cabinets do not update the first data table corresponding to the target tenant network, nor do they update the second data table.
[0213] After receiving the address of the fourth OVS, each OVS in the second cabinet of the target tenant network does not update the first data table corresponding to the target tenant network, but updates the second data table corresponding to the second cabinet of the target tenant network, for example, by adding the address of the fourth OVS to the address of the OVS in the second cabinet of the target tenant network. After receiving the address of the fourth OVS, the first OVS, having already recorded the address of the broadcast agent in the second cabinet of the target tenant network, can discard the fourth OVS address and not update the address of the broadcast agent. In other words, it does not update the first data table corresponding to the target tenant network, nor does it update the second data table. For details, see the description of Scenario 1 (2) regarding the first OVS not being the first OVS in the first cabinet to connect to the target tenant network.
[0214] When the OVS in the second cabinet is the first OVS in the second cabinet to connect to the target tenant network, each OVS in the second cabinet of the target tenant network updates the second data table corresponding to the second cabinet of the target tenant network and the first data table corresponding to the target tenant network. After receiving the address of the fourth OVS, the first OVS, because it does not record the address of the broadcast agent in the second cabinet of the target tenant network, determines that the address of the broadcast agent in the second cabinet of the target tenant network is the address of the fourth OVS, records the address, and updates the first data table corresponding to the target tenant network. For example, after receiving the address of the fourth OVS, the first OVS determines that the fourth OVS is the broadcast agent of the second cabinet of the target tenant network and adds the fourth OVS address to the address of the broadcast agent in the target tenant network, i.e., adds the fourth OVS address to the first data table corresponding to the target tenant network. For details, see the description of 1) of Case 1 regarding the first OVS being the first OVS in the first cabinet to connect to the target tenant network.
[0215] Case 4: The third OVS in the first cabinet is deleted.
[0216] The third OVS can be any OVS in the first cabinet of the target tenant network. The third OVS belongs to the target tenant network. The first OVS can monitor whether each OVS in the first cabinet has been deleted through a keepalive mechanism. When the first OVS detects that the third OVS has been deleted, it performs different operations based on whether the third OVS is the broadcast agent in the first cabinet of the target tenant network, as follows:
[0217] 1) The third OVS is not the broadcast agent in the first cabinet under the target tenant network. When the first OVS detects that the third OVS has been deleted, it deletes the address of the third OVS in the first cabinet under the target tenant network, that is, deletes the address of the third OVS recorded in the second data table corresponding to the first cabinet under the target tenant network.
[0218] 2) The third OVS is the broadcast agent in the first cabinet of the target tenant network. When the first OVS detects that the third OVS has been deleted, it deletes the address of the third OVS in the first cabinet of the target tenant network, that is, deletes the address of the third OVS recorded in the second data table corresponding to the first cabinet of the target tenant network; re-determines a broadcast agent from the remaining OVSs in the first cabinet of the target tenant network (OVSs in the first cabinet other than the third OVS), such as the second broadcast agent, and updates the address of the broadcast agent in the first cabinet of the target tenant network to the address of the second broadcast agent.
[0219] In case 5, the fifth OVS in the second cabinet is deleted.
[0220] The second cabinet is any cabinet different from the first cabinet, the fifth OVS can be any OVS in the second cabinet, and the first OVS and the fifth OVS belong to the target tenant network. In this embodiment of the present application, when the fifth OVS is not the broadcast agent in the second cabinet, upon detecting that the fifth OVS has been deleted, the first OVS does not perform any processing, such as not updating the first data table and the second data table.
[0221] When the fifth OVS is the broadcast agent in the second cabinet, when the first OVS detects that the fifth OVS is deleted, it re-determines a broadcast agent, such as a third broadcast agent, from the remaining OVSs in the second cabinet under the target tenant network (the OVSs in the second cabinet except the fifth OVS), and updates the address of the broadcast agent in the second cabinet under the target tenant network to the address of the third broadcast agent, that is, updates the address of the broadcast agent in the second cabinet in the first data table corresponding to the target tenant network to the address of the third broadcast agent.
[0222] In an embodiment of the present application, the information recorded in the OVS, such as the first data table and the second data table mentioned above, is updated by an upper-layer controller or a protocol such as EVPN, thereby ensuring that the information recorded in the OVS is consistent with the information in the actual network architecture, thereby further effectively saving network bandwidth.
[0223] Corresponding to the above-mentioned message broadcasting method, the embodiment of the present application provides a message broadcasting device, such as Figure 6 As shown, the first OVS applied to the first cabinet includes:
[0224] An acquisition module 61 is configured to acquire a first message to be broadcast, where the first message belongs to a target tenant network;
[0225] A first determining module 62 is configured to determine first addresses of other OVSs in the first cabinet of a target tenant network and second addresses of Broadcast Agents in other cabinets based on pre-recorded addresses of each OVS in the first cabinet of different tenant networks and addresses of Broadcast Agents in each cabinet of different tenant networks, where a Broadcast Agent in a cabinet is an OVS in the cabinet;
[0226] The first broadcast module 63 is configured to broadcast the first message to other OVSs in the first cabinet according to the first address and the second address, and broadcast the first message to broadcast agents in other cabinets.
[0227] In the technical solution provided by the embodiments of the present application, the OVS pre-records the address of a broadcast agent in a remote cabinet. When broadcasting a message to a remote cabinet, the OVS only needs to copy the message and send it to the broadcast agent in the remote cabinet. The OVS does not need to copy and send a message to each OVS in the remote cabinet, thus saving network bandwidth and reducing network burden.
[0228] In some embodiments, the message broadcasting apparatus may further include:
[0229] A first receiving module is configured to receive a second message broadcast by the OVS in other cabinets when the first OVS is a broadcast agent, where the second message belongs to a target tenant network;
[0230] The second determining module is used to determine the third addresses of other OVSs in the first cabinet under the target tenant network according to the pre-recorded addresses of each OVS in the first cabinet under different tenant networks;
[0231] The second broadcast module is configured to broadcast a second message to other OVSs in the first cabinet according to the third address.
[0232] In some embodiments, the addresses of OVSs in the same cabinet belong to the same network segment; or, different cabinets have different identifiers.
[0233] In some embodiments, the message broadcasting apparatus may further include:
[0234] a first sending module, configured to send the address of the first OVS to the controller when the first OVS accesses the first cabinet, the first OVS belonging to the target tenant network, so that the controller determines the OVSs in each cabinet under the target tenant network, and determines first information and second information according to the addresses of the OVSs in each cabinet under the target tenant network, the first information being the address of the broadcast agent in each cabinet under the target tenant network, and the second information being the address of each OVS in the first cabinet under the target tenant network;
[0235] The second receiving module is used to receive and record the first information and the second information sent by the controller, the first information is the address of the broadcast agent in each cabinet under the target tenant network, and the second information is the address of each OVS in the first cabinet under the target tenant network.
[0236] In some embodiments, the message broadcasting device may further include: a third receiving module,
[0237] Used to receive the address of a second OVS sent by the controller, where the second OVS is the OVS in the first cabinet that is newly connected to the target tenant network; add the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network; and / or
[0238] The controller is used to receive the address of the first Broadcast Agent sent by the controller, where the first Broadcast Agent is the Broadcast Agent in the second cabinet under the target tenant network, and add the address of the first Broadcast Agent to the addresses of the Broadcast Agents in each cabinet under the target tenant network.
[0239] In some embodiments, the message broadcasting apparatus may further include:
[0240] A fourth receiving module is configured to receive a first deletion message of a third OVS sent by the controller, where the third OVS belongs to the OVS in the first cabinet of the target tenant network; according to the first deletion message, delete the pre-recorded address of the third OVS in the first cabinet of the target tenant network; and / or
[0241] for receiving a second deletion message from the controller regarding a third OVS, where the third OVS belongs to an OVS in a first cabinet of a target tenant network, and the second deletion message includes an address of a second broadcast agent in the first cabinet of the target tenant network; deleting a pre-recorded address of the third OVS in the first cabinet of the target tenant network according to the second deletion message, and updating the address of the broadcast agent in the first cabinet of the target tenant network to the address of the second broadcast agent; and / or
[0242] The controller is configured to receive a Broadcast Agent update message from the controller, the update message including the address of the third Broadcast Agent in the second cabinet of the target tenant network; and update the address of the Broadcast Agent in the second cabinet of the target tenant network to the address of the third Broadcast Agent according to the update message.
[0243] In some embodiments, the message broadcasting apparatus may further include:
[0244] The second sending module is used to send the address of the first OVS to each OVS under the target tenant network when the first OVS is connected to the first cabinet, and receive the addresses of each OVS sent by the addresses of each OVS under the target tenant network, where the target tenant network is the tenant network to which the first OVS belongs;
[0245] A third determining module is configured to determine and record the address of the broadcast agent in the first cabinet under the target tenant network based on the received addresses of the respective OVSs in the first cabinet, and record the addresses of the respective OVSs in the first cabinet under the target tenant network;
[0246] The fourth determining module is configured to determine and record the addresses of the broadcast agents in other cabinets under the target tenant network according to the received addresses of the OVSs in other cabinets.
[0247] In some embodiments, the message broadcasting device may further include: a fifth receiving module,
[0248] Used to receive the address of a second OVS sent by a second OVS, where the second OVS is the OVS in the first cabinet that is newly connected to the target tenant network; add the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network; and / or
[0249] Used to receive the address of the fourth OVS sent by the fourth OVS, where the fourth OVS is the OVS in the second cabinet that is newly connected to the target tenant network; if the address of the broadcast agent in the second cabinet is pre-recorded, the address of the fourth OVS is discarded; if the address of the broadcast agent in the second cabinet is not pre-recorded, the address of the broadcast agent in the second cabinet under the target tenant network is determined to be the address of the fourth OVS and recorded.
[0250] In some embodiments, the message broadcasting device may further include: an update module,
[0251] for, when a third OVS in a first cabinet is deleted, if the third OVS is a broadcast agent in the first cabinet under a target tenant network, determining a second broadcast agent from the OVSs in the first cabinet under the target tenant network other than the third OVS, updating the address of the broadcast agent in the first cabinet under the target tenant network to the address of the second broadcast agent, and deleting the pre-recorded address of the third OVS in the first cabinet under the target tenant network; if the third OVS is not a broadcast agent in the first cabinet under the target tenant network, deleting the pre-recorded address of the third OVS in the first cabinet under the target tenant network, and the third OVS belongs to the OVS in the first cabinet under the target tenant network; and / or
[0252] Used to, when it is detected that the fifth OVS in the second cabinet is deleted, if the fifth OVS is the broadcast agent in the second cabinet, determine a third broadcast agent from the OVSs in the second cabinet under the target tenant network except the fifth OVS, update the address of the broadcast agent in the second cabinet under the target tenant network to the address of the third broadcast agent, and the fifth OVS belongs to the OVS in the second cabinet under the target tenant network.
[0253] The present application also provides an electronic device, such as the above-mentioned OVS, see Figure 7 As shown, it includes a processor 71, a communication interface 72, a memory 73 and a communication bus 74, wherein the processor 71, the communication interface 72, and the memory 73 communicate with each other through the communication bus 74.
[0254] Memory 73, for storing computer programs;
[0255] The processor 71 is configured to implement any of the above-mentioned message broadcasting methods when executing the program stored in the memory 73 .
[0256] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0257] The communication interface is used for communication between the above electronic device and other devices.
[0258] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0259] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0260] In another embodiment provided by the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above-mentioned message broadcasting methods are implemented.
[0261] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any message broadcasting method in the above embodiments.
[0262] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can 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, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0263] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0264] Each embodiment in this specification is described in a related manner. Similar portions between embodiments can be referenced to each other. Each embodiment focuses on the differences between other embodiments. In particular, the device, electronic device, storage medium, and computer program product embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.
[0265] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.
Claims
1. A message broadcasting method, characterized in that: The method is applied to a first open virtual switch (OVS) in a first cabinet, and includes: Obtaining a first message to be broadcast, where the first message belongs to a target tenant network; Determine, based on pre-recorded addresses of each OVS in the first cabinet under different tenant networks and addresses of broadcast agents in each cabinet under different tenant networks, first addresses of other OVSs in the first cabinet under the target tenant network and second addresses of broadcast agents in other cabinets, where a broadcast agent in a cabinet is an OVS in the cabinet; According to the first address and the second address, the first message is broadcast to other OVSs in the first cabinet, and the first message is broadcast to broadcast agents in the other cabinets.
2. The method according to claim 1, characterized in that When the first OVS is a broadcast agent, the method further includes: Receive a second message broadcast by the OVS in another cabinet, where the second message belongs to the target tenant network; Determine the third addresses of other OVSs in the first cabinet under the target tenant network according to the pre-recorded addresses of each OVS in the first cabinet under different tenant networks; According to the third address, the second message is broadcast to other OVSs in the first cabinet.
3. The method according to claim 1 or 2, characterized in that The addresses of OVSs in the same cabinet belong to the same network segment; or different cabinets have different identifiers.
4. The method according to claim 3, characterized in that The method further comprises: When the first OVS accesses the first cabinet, the address of the first OVS is sent to the controller, where the first OVS belongs to the target tenant network, so that the controller determines the OVS in each cabinet under the target tenant network, and determines first information and second information based on the address of the OVS in each cabinet under the target tenant network, where the first information is the address of the broadcast agent in each cabinet under the target tenant network, and the second information is the address of each OVS in the first cabinet under the target tenant network; Receive and record the first information and the second information sent by the controller.
5. The method according to claim 3, characterized in that The method further comprises: Receive the address of the second OVS sent by the controller, where the second OVS is the OVS in the first cabinet that is newly connected to the target tenant network; add the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network; and / or The controller receives the address of a first broadcast agent in the second cabinet of the target tenant network, and adds the address of the first broadcast agent to the addresses of the broadcast agents in each cabinet of the target tenant network.
6. The method according to claim 3, characterized in that The method further comprises: Receiving a first deletion message from a controller for a third OVS, where the third OVS belongs to the OVS in the first cabinet of the target tenant network; deleting the pre-recorded address of the third OVS in the first cabinet of the target tenant network according to the first deletion message; and / or receiving a second deletion message from a controller regarding a third OVS, wherein the third OVS belongs to the OVS in the first cabinet of the target tenant network, and the second deletion message includes the address of the second Broadcast Agent in the first cabinet of the target tenant network; deleting the pre-recorded address of the third OVS in the first cabinet of the target tenant network according to the second deletion message, and updating the address of the Broadcast Agent in the first cabinet of the target tenant network to the address of the second Broadcast Agent; and / or receiving a broadcast agent update message from a controller, the update message including an address of a third broadcast agent in a second cabinet under the target tenant network; and updating the address of the broadcast agent in the second cabinet under the target tenant network to the address of the third broadcast agent according to the update message.
7. The method according to claim 3, characterized in that The method further comprises: When the first OVS accesses the first cabinet, the first OVS address is sent to each OVS in the target tenant network, and the addresses of each OVS in the target tenant network are received. The target tenant network is the tenant network to which the first OVS belongs. Determine and record the address of the broadcast agent in the first cabinet under the target tenant network according to the received addresses of each OVS in the first cabinet, and record the addresses of each OVS in the first cabinet under the target tenant network; According to the received addresses of the OVSs in the other cabinets, the addresses of the broadcast agents in the other cabinets under the target tenant network are determined and recorded.
8. The method according to claim 3, characterized in that The method further comprises: Receive the address of the second OVS sent by the second OVS, where the second OVS is the OVS in the first cabinet that is newly connected to the target tenant network; add the address of the second OVS to the address of the OVS in the first cabinet under the target tenant network; and / or Receive the address of the fourth OVS sent by the fourth OVS, where the fourth OVS is the OVS in the second cabinet that is newly connected to the target tenant network; if the address of the broadcast agent in the second cabinet is pre-recorded, discard the address of the fourth OVS; if the address of the broadcast agent in the second cabinet is not pre-recorded, determine that the address of the broadcast agent in the second cabinet under the target tenant network is the address of the fourth OVS and record it.
9. The method according to claim 3, characterized in that The method further comprises: When the third OVS in the first cabinet is deleted, if the third OVS is the broadcast agent in the first cabinet under the target tenant network, determine a second broadcast agent from the OVSs in the first cabinet under the target tenant network other than the third OVS, update the address of the broadcast agent in the first cabinet under the target tenant network to the address of the second broadcast agent, and delete the pre-recorded address of the third OVS in the first cabinet under the target tenant network; if the third OVS is not the broadcast agent in the first cabinet under the target tenant network, delete the pre-recorded address of the third OVS in the first cabinet under the target tenant network, and the third OVS belongs to the OVS in the first cabinet under the target tenant network; and / or When it is detected that the fifth OVS in the second cabinet is deleted, if the fifth OVS is the broadcast agent in the second cabinet, a third broadcast agent is determined from the OVSs in the second cabinet under the target tenant network except the fifth OVS, and the address of the broadcast agent in the second cabinet under the target tenant network is updated to the address of the third broadcast agent. The fifth OVS belongs to the OVS in the second cabinet under the target tenant network.
10. A message broadcasting device, characterized in that: A first open virtual switch (OVS) applied to a first cabinet, the apparatus comprising: an acquisition module, configured to acquire a first message to be broadcast, where the first message belongs to a target tenant network; a first determining module configured to determine, based on pre-recorded addresses of each OVS in the first cabinet under different tenant networks and addresses of broadcast agents in each cabinet under different tenant networks, first addresses of other OVSs in the first cabinet under the target tenant network and second addresses of broadcast agents in other cabinets, where a broadcast agent in a cabinet is an OVS in the cabinet; A first broadcast module is configured to broadcast the first message to other OVSs in the first cabinet according to the first address and the second address, and to broadcast the first message to broadcast agents in the other cabinets.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method steps described in any one of claims 1 to 9 when executing a program stored in a memory.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Communication method and device for virtual extensible local area network (VXLAN)
CN107404436A
Message forwarding control method and device
CN109831390A