CN117714373A - Distributed system based on virtual network and communication method - Google Patents

Distributed system based on virtual network and communication method Download PDF

Info

Publication number
CN117714373A
CN117714373A CN202311812093.3A CN202311812093A CN117714373A CN 117714373 A CN117714373 A CN 117714373A CN 202311812093 A CN202311812093 A CN 202311812093A CN 117714373 A CN117714373 A CN 117714373A
Authority
CN
China
Prior art keywords
node
address
virtual
data packet
distributed system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311812093.3A
Other languages
Chinese (zh)
Inventor
杨波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Original Assignee
Beijing Topsec Technology Co Ltd
Beijing Topsec Network Security Technology Co Ltd
Beijing Topsec Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Topsec Technology Co Ltd, Beijing Topsec Network Security Technology Co Ltd, Beijing Topsec Software Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN202311812093.3A priority Critical patent/CN117714373A/en
Publication of CN117714373A publication Critical patent/CN117714373A/en
Pending legal-status Critical Current

Links

Abstract

The utility model provides a distributed system and communication method based on virtual network, the distributed system based on virtual network includes a plurality of nodes and the virtual network that is connected with each node, and each node includes virtual equipment and network card, and each node in the distributed system communicates through virtual network, keeps the IP allocation of virtual network after the equipment of distributed system moves or removes, only need the connection passageway of reestablishing virtual network can to the fortune dimension efficiency of distributed system has been improved.

Description

Distributed system based on virtual network and communication method
Technical Field
The application relates to the technical field of distributed systems, in particular to a distributed system based on a virtual network and a communication method.
Background
The distributed system plays an important role in the field of big data and AI data analysis, and can provide a solid foundation for various applications by improving the data processing capability. Among them, distributed storage and distributed databases are one of the important applications of distributed systems. These systems employ a consistency algorithm to store data fragments, each piece of data being associated with cluster information. Typically, each slice is identified using the IP of the particular device. Therefore, the IP of the devices in the cluster is not allowed to be changed (nodes can be deleted before new nodes are added, but this way of changing the IP is limited by the specific software functions and not all software is supported). For the distributed cluster equipment, if the machine room needs to be replaced, a common method is to build a system in a new machine room, then synchronize data to the new distributed system, and then dismantle the old system. But in some cases this operation is not allowed. For example, when a system deployed at a customer site fails, the equipment needs to be sent back to the manufacturer for a reason, and when the equipment is removed from the machine room, the IP changes, resulting in the system not being operational.
Disclosure of Invention
An objective of the embodiments of the present application is to provide a distributed system and a communication method based on a virtual network, so as to solve the problem that the system cannot operate due to the change of the device IP in the existing distributed system.
The distributed system based on the virtual network comprises a plurality of nodes and the virtual network connected with each node, wherein each node comprises virtual equipment and a network card;
when a first node of the distributed system communicates with a second node, the first node is configured to:
acquiring an original data packet to be transmitted by using first virtual equipment of a first node; the original data packet comprises a source virtual IP address and a destination virtual IP address;
the first virtual device searches the FDB table according to the destination virtual IP address to obtain a second MAC address of a second node corresponding to the destination virtual IP address; according to the second MAC address of the second node, searching an ARP table to obtain a second route IP address of the second node; adding a first routing IP address of a first node and a second routing IP address of a second node to the outer layer of the original data packet to obtain a routable data packet;
transmitting the routable data packet to a set port of the second node by using a first network card of the first node;
the second node is configured to:
receiving a routable data packet by using a set port of a second network card of the second node;
obtaining a routable data packet received by a set port by using second virtual equipment of a second node;
and the second virtual equipment removes the first routing IP address and the second routing IP address of the outer layer of the routable data packet to obtain the original data packet.
In the technical scheme, the distributed system based on the virtual network comprises a plurality of nodes and the virtual network connected with each node, each node comprises the virtual equipment and the network card, each node in the distributed system communicates through the virtual network, after the equipment of the distributed system is moved or moved, the IP distribution of the virtual network is maintained, and only the connection channel of the virtual network is required to be re-established, so that the operation and maintenance efficiency of the distributed system is improved.
In some alternative embodiments, building a virtual network in a distributed system includes:
creating a corresponding static virtual device at each node to obtain the virtual device of each node;
for each node, adding the MAC address and the route IP address of the opposite node in an ARP table;
for each node, the MAC address and virtual IP address of the correspondent node are added in the FDB table.
The ARP table is a dynamic table and is stored in a computer for recording the mapping relation between the IP address and the MAC address. The ARP protocol, i.e. the address resolution protocol, is a network layer protocol running on each network node and responsible for mapping the host IP address to the MAC address. ARP tables are important for host communication in an ethernet environment because the host needs to know the MAC address of the other party to communicate. An ARP table is maintained on each node or host in the network topology for quickly looking up the MAC address of the destination host.
The FDB table, i.e. a two-layer MAC address table, is called Forwarding DataBase, and is used for recording the correspondence between MAC, port, and VLAN (virtual IP address in this embodiment), and is mainly used for two-layer forwarding. The FDB table stores the mapping between the sending port of the exchanger and the destination MAC address of the message, and has two parts, namely dynamic and static. When a certain port receives a data frame, the mapping relationship between the source MAC address of the data frame and the port is stored in the FDB table. If the entry is already present in the FDB table, the aging time for the entry is updated.
In some alternative embodiments, reestablishing the virtual network of the distributed system after the routing IP address of the node of the distributed system changes, comprises:
creating a corresponding static virtual device at each node to obtain the virtual device of each node;
and updating the routing IP address of the node in the ARP table for each node, and keeping the FDB table unchanged.
In the above technical solution, in the distributed system based on the virtual network, after the equipment of the distributed system is moved or moved, the routing IP address of the node equipment is changed, and at this time, the IP allocation of the virtual network (that is, the FDB table is unchanged) is maintained, and only the routing IP address of the node in the ARP table needs to be updated to reestablish the connection channel of the virtual network.
In some alternative embodiments, the virtual network comprises a VXLAN virtual network and the virtual device comprises a vtep virtual device.
In the above technical solution, a virtual network is established by using VXLAN technology, and VXLAN (Virtual eXtensible Local Area Network ) is a virtualized tunnel communication technology. The method is an Overlay technology, and a virtual two-layer network is built through a three-layer network. The VXLAN is an Overlay logical network constructed by using a UDP layer by using a tunneling technology on an underlying physical network (underrun), so that the logical network and the physical network are decoupled, and flexible networking requirements are realized. The method has little influence on the original network architecture, and can build a new network without any change to the original network. The VXLAN not only supports one-to-one but also supports one-to-many, one VXLAN device can learn the IP addresses of other opposite ends in a learning mode like a network bridge, and a static forwarding table can be directly configured. The vtep virtual device created in this embodiment is a static vtep, and directly configures a static forwarding table FDB table, so that the opposite-end virtual IP address is not automatically learned.
The communication method of the distributed system based on the virtual network, provided by the embodiment of the application, is applied to a first node, and comprises the following steps:
acquiring an original data packet to be transmitted by using first virtual equipment of a first node; the original data packet comprises a source virtual IP address and a destination virtual IP address;
the first virtual device searches the FDB table according to the destination virtual IP address to obtain a second MAC address of a second node corresponding to the destination virtual IP address; according to the second MAC address of the second node, searching an ARP table to obtain a second route IP address of the second node; adding a first routing IP address of a first node and a second routing IP address of a second node to the outer layer of the original data packet to obtain a routable data packet;
and sending the routable data packet to a set port of the second node by using the first network card of the first node.
The communication method of the distributed system based on the virtual network, provided by the embodiment of the application, is applied to the second node, and comprises the following steps:
receiving a routable data packet by using a set port of a second network card of the second node;
obtaining a routable data packet received by a set port by using second virtual equipment of a second node;
and the second virtual equipment removes the first routing IP address and the second routing IP address of the outer layer of the routable data packet to obtain the original data packet.
The method for building the distributed system based on the virtual network provided by the embodiment of the application comprises the following steps:
creating corresponding static virtual equipment at each node of the distributed system to obtain virtual equipment of each node;
for each node of the distributed system, adding the MAC address and the route IP address of the opposite node in an ARP table;
for each node of the distributed system, the MAC address and virtual IP address of the correspondent node are added in the FDB table.
In some alternative embodiments, reestablishing the virtual network of the distributed system after the routing IP address of the node of the distributed system changes, comprises:
creating a corresponding static virtual device at each node to obtain the virtual device of each node;
and updating the routing IP address of the node in the ARP table for each node, and keeping the FDB table unchanged.
An electronic device provided in an embodiment of the present application includes: a processor and a memory storing machine-readable instructions executable by the processor, which when executed by the processor, perform a method as any one of the above.
A computer readable storage medium provided by an embodiment of the present application, on which a computer program is stored, which when executed by a processor performs a method as described in any of the above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart illustrating a communication process between a first node and a second node of a distributed system according to an embodiment of the present application;
fig. 2 is a schematic diagram of a communication process between a first node and a second node according to an embodiment of the present application;
fig. 3 is a schematic diagram of one possible structure of an electronic device according to an embodiment of the present application.
Icon: 110-communication unit, 120-memory, 130-input unit, 131-touch-sensitive surface, 132-other input device, 140-display unit, 141-display panel, 150-sensor, 160-audio circuit, 170-wireless communication unit, 180-processor, 190-power supply.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
The distributed system based on the virtual network comprises a plurality of nodes and the virtual network connected with each node, wherein each node comprises virtual equipment and a network card.
The virtual network of the present embodiment may employ VXLAN technology, VPN technology, or GRE technology. Wherein GRE (Generic Routing Encapsulation) is a network transmission technology that can be used to implement data transmission between different networks. Its role is to establish a virtual communication link between different network protocols, allowing them to transmit data over a separate logical link. GRE technology may encapsulate data messages of certain network layer protocols (e.g., IP and IPX) such that the encapsulated data messages can be transmitted in another network layer protocol (e.g., IP). It adopts Tunnel technology and is a third layer Tunnel protocol of VPN (Virtual Private Network). Tunnel is a virtual point-to-point connection that provides a path over which encapsulated data packets can be transported, and encapsulates and decapsulates the data packets at both ends of a Tunnel, respectively. VPN technology is a technology that creates secure encrypted connections over less secure networks, allowing remote users and affiliates to securely access applications and resources. VPN is also known as a virtual private network, and users access remote resources on VPN servers through a unique authentication identification procedure. To ensure security, data is transported through a secure tunnel, and VPN users must use authentication methods (including passwords, tokens or other unique identification procedures) to access the VPN server.
Referring to fig. 1, fig. 1 is a flowchart illustrating a communication process between a first node and a second node of a distributed system according to an embodiment of the present application, where the first node is configured to execute the following steps 100-300:
step 100, acquiring an original data packet to be transmitted by using first virtual equipment of a first node; the original data packet comprises a source virtual IP address and a destination virtual IP address;
step 200, the first virtual device searches the FDB table according to the destination virtual IP address to obtain a second MAC address of a second node corresponding to the destination virtual IP address; according to the second MAC address of the second node, searching an ARP table to obtain a second route IP address of the second node; adding a first routing IP address of a first node and a second routing IP address of a second node to the outer layer of the original data packet to obtain a routable data packet;
step 300, using the first network card of the first node to send the routable data packet to the set port of the second node;
the second node is configured to perform the following steps 400-600:
step 400, receiving a routable data packet by using a set port of a second network card of the second node;
step 500, obtaining a routable data packet received by a set port by using a second virtual device of a second node;
and 600, removing the first routing IP address and the second routing IP address of the outer layer of the routable data packet by the second virtual device to obtain the original data packet.
In the embodiment of the application, the distributed system based on the virtual network comprises a plurality of nodes and the virtual network connected with each node, each node comprises virtual equipment and a network card, each node in the distributed system communicates through the virtual network, after equipment of the distributed system is moved or moved, IP allocation of the virtual network is kept, and only a connection channel of the virtual network is required to be re-established, so that the operation and maintenance efficiency of the distributed system is improved.
In some alternative embodiments, when the distributed system builds a virtual network, the following steps are performed: creating a corresponding static virtual device at each node to obtain the virtual device of each node; for each node, adding the MAC address and the route IP address of the opposite node in an ARP table; for each node, the MAC address and virtual IP address of the correspondent node are added in the FDB table.
The ARP table is a dynamic table and is stored in a computer for recording the mapping relation between the IP address and the MAC address. The ARP protocol, i.e. the address resolution protocol, is a network layer protocol running on each network node and responsible for mapping the host IP address to the MAC address. ARP tables are important for host communication in an ethernet environment because the host needs to know the MAC address of the other party to communicate. An ARP table is maintained on each node or host in the network topology for quickly looking up the MAC address of the destination host.
The FDB table, i.e. a two-layer MAC address table, is called Forwarding DataBase, and is used for recording the correspondence between MAC, port, and VLAN (virtual IP address in this embodiment), and is mainly used for two-layer forwarding. The FDB table stores the mapping between the sending port of the exchanger and the destination MAC address of the message, and has two parts, namely dynamic and static. When a certain port receives a data frame, the mapping relationship between the source MAC address of the data frame and the port is stored in the FDB table. If the entry is already present in the FDB table, the aging time for the entry is updated.
In some alternative embodiments, after the routing IP address of the node of the distributed system is changed, the virtual network of the distributed system is rebuilt, specifically comprising the following steps: creating a corresponding static virtual device at each node to obtain the virtual device of each node; and updating the routing IP address of the node in the ARP table for each node, and keeping the FDB table unchanged.
In this embodiment of the present application, after a device of a distributed system is moved or moved, a routing IP address of a node device is changed, and at this time, IP allocation of the virtual network is maintained (that is, an FDB table is unchanged), and only a routing IP address of a node in an ARP table needs to be updated to reestablish a connection channel of the virtual network.
In some alternative embodiments, the virtual network comprises a VXLAN virtual network and the virtual device comprises a vtep virtual device.
In the embodiment of the application, a virtual network is established by adopting a VXLAN technology, and VXLAN (Virtual eXtensible Local Area Network ) is a virtualized tunnel communication technology. The method is an Overlay technology, and a virtual two-layer network is built through a three-layer network. The VXLAN is an Overlay logical network constructed by using a UDP layer by using a tunneling technology on an underlying physical network (underrun), so that the logical network and the physical network are decoupled, and flexible networking requirements are realized. The method has little influence on the original network architecture, and can build a new network without any change to the original network. The VXLAN not only supports one-to-one but also supports one-to-many, one VXLAN device can learn the IP addresses of other opposite ends in a learning mode like a network bridge, and a static forwarding table can be directly configured. The vtep virtual device created in this embodiment is a static vtep, and directly configures a static forwarding table FDB table, so that the opposite-end virtual IP address is not automatically learned.
All the above alternative solutions of the present embodiment may be combined in any manner to form the alternative solution of the present invention, which is not illustrated herein.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a communication process between a first node and a second node according to an embodiment of the present application. The number of host nodes which can be accommodated in the virtual network can be established by means of the VXLAN tunnel. For the purpose of illustrating the solution only the first node host1 and the second node host2 are used.
When the first node host1 sends a packet to the second node host2 of the virtual IP address 10.7.2.3 using the virtual IP address 10.7.2.2 of VXLAN1 of the virtual network card. As for the first node host1, 10.7.2.2 is used as a source address of a packet and 10.7.2.3 is used as a destination address of a packet in the same manner as the packet is transmitted and the packet is transmitted at the same time. The system can be informed to the virtual network card VXLAN1 to process the data according to the routing table.
The virtual network card VXLAN1 receives the original data packet, and cannot directly send the original data packet to the destination address 10.7.2.3, and needs to query according to the FDB table to determine that the destination address 10.7.2.3 corresponds to the second node host2, then, send the data packet through the VXLAN tunnel, and perform secondary packaging, and add the address 192.168.13 of the routable second node host2 to the outer layer of the data packet sent to 10.7.2.3, where, when the data packet leaves the host1 network card eth0, the outer layer of the data packet has one more layer of address, the destination address of the outer layer is the address 192.168.13 of host2, and the source address of the outer layer is the address 192.168.12 of host 1.
The second node host2 receives the data packet sent by the first node host1 through a designated port, the designated port is used for receiving the VXLAN data packet, the address of the outer layer of the data packet is removed, and the content of the internal data packet is processed by the VXLAN1 of the second node host2, so that the second node host2 obtains the original data packet.
The communication method of the distributed system based on the virtual network, provided by the embodiment of the application, is applied to a first node, and comprises the following steps: acquiring an original data packet to be transmitted by using first virtual equipment of a first node; the original data packet comprises a source virtual IP address and a destination virtual IP address; the first virtual device searches the FDB table according to the destination virtual IP address to obtain a second MAC address of a second node corresponding to the destination virtual IP address; according to the second MAC address of the second node, searching an ARP table to obtain a second route IP address of the second node; adding a first routing IP address of a first node and a second routing IP address of a second node to the outer layer of the original data packet to obtain a routable data packet; and sending the routable data packet to a set port of the second node by using the first network card of the first node.
The communication method of the distributed system based on the virtual network, provided by the embodiment of the application, is applied to the second node, and comprises the following steps: receiving a routable data packet by using a set port of a second network card of the second node; obtaining a routable data packet received by a set port by using second virtual equipment of a second node; and the second virtual equipment removes the first routing IP address and the second routing IP address of the outer layer of the routable data packet to obtain the original data packet.
The method for building the distributed system based on the virtual network provided by the embodiment of the application comprises the following steps: creating corresponding static virtual equipment at each node of the distributed system to obtain virtual equipment of each node; for each node of the distributed system, adding the MAC address and the route IP address of the opposite node in an ARP table; for each node of the distributed system, the MAC address and virtual IP address of the correspondent node are added in the FDB table.
In some alternative embodiments, reestablishing the virtual network of the distributed system after the routing IP address of the node of the distributed system changes, comprises: creating a corresponding static virtual device at each node to obtain the virtual device of each node; and updating the routing IP address of the node in the ARP table for each node, and keeping the FDB table unchanged.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Referring to fig. 3, the electronic device may be used to implement the communication method of the virtual network-based distributed system provided in the above-described embodiment, or a method of building the virtual network-based distributed system. Specifically, the present invention relates to a method for manufacturing a semiconductor device.
The electronic device may include a communication unit 110, a memory 120 including one or more computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a WiFi (wireless fidelity) module 170, a processor 180 including one or more processing cores, and a power supply 190. Those skilled in the art will appreciate that the electronic device structure shown in fig. 3 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the communication unit 110 may be used for receiving and transmitting information or signals during a call, and the communication unit 110 may be a network communication device such as an RF (radio frequency) circuit, a router, a modem, and the like. In particular, when the communication unit 110 is an RF circuit, the downlink information of the base station is received and then processed by one or more processors 180; in addition, data relating to uplink is transmitted to the base station. In general, RF circuits as communication units include, but are not limited to, antennas, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier ), a duplexer, and the like. In addition, the communication unit 110 may also communicate with networks and other devices through wireless communication. The wireless communication may use any communication standard or protocol including, but not limited to, GSM (Global Systemof Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service ), CDMA (Code Division Multiple Access, code division multiple access), WCDMA (Wideband Code Division Multiple Access ), LTE (Long Term Evolution, long term evolution), email, SMS (Short Messaging Service, short message service), and the like. The memory 120 may be used to store software programs and modules, and the processor 180 performs various functional applications and data processing by executing the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device (such as audio data, phonebooks, etc.), and the like. In addition, memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 120 may also include a memory controller to provide access to the memory 120 by the processor 180 and the input unit 130.
The input unit 130 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may comprise a touch sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch-sensitive surface 131 or thereabout by using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 180, and can receive commands from the processor 180 and execute them. In addition, the touch-sensitive surface 131 may be implemented in various types of resistive, capacitive, infrared, surface acoustic wave, and the like. In addition to the touch-sensitive surface 131, the input unit 130 may also comprise other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 140 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the electronic device, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141, and alternatively, the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display ), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may overlay the display panel 141, and upon detection of a touch operation thereon or thereabout by the touch-sensitive surface 131, the touch-sensitive surface is transferred to the processor 180 to determine the type of touch event, and the processor 180 then provides a corresponding visual output on the display panel 141 based on the type of touch event. Although in fig. 3 the touch-sensitive surface 131 and the display panel 141 are implemented as two separate components for input and output functions, in some embodiments the touch-sensitive surface 131 may be integrated with the display panel 141 for input and output functions.
The electronic device may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or the backlight when the electronic device moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the electronic device are not described in detail herein.
Audio circuitry 160, speakers, and a microphone may provide an audio interface between the user and the electronic device. The audio circuit 160 may transmit the received electrical signal converted from audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 160 and converted into audio data, which are processed by the audio data output processor 180 for transmission to, for example, another electronic device via the RF circuit 110, or which are output to the memory 120 for further processing. Audio circuitry 160 may also include an ear bud jack to provide communication of the peripheral headphones with the electronic device.
To enable wireless communication, the electronic device may be configured with a wireless communication unit 170, and the wireless communication unit 170 may be a WiFi module. WiFi belongs to a short-distance wireless transmission technology, and the electronic equipment can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the wireless communication unit 170, so that wireless broadband Internet access is provided for the user. Although fig. 3 shows a wireless communication unit 170, it is understood that it does not belong to the necessary constitution of the electronic device, and can be omitted entirely as required within a range not changing the essence of the invention.
The processor 180 is a control center of the electronic device, connects various parts of the entire cellular phone using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 120, and calling data stored in the memory 120, thereby performing overall monitoring of the cellular phone. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The electronic device also includes a power supply 190 (e.g., a battery) for powering the various components, which may be logically connected to the processor 180 via a power management system, such as to provide for managing charge, discharge, and power consumption by the power management system. The power supply 190 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the electronic device may further include a camera, a bluetooth module, etc., which will not be described herein. In particular, in this embodiment, the display unit of the electronic device is a touch screen display, the electronic device further includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for: acquiring an original data packet to be transmitted by using first virtual equipment of a first node; the original data packet comprises a source virtual IP address and a destination virtual IP address; the first virtual device searches the FDB table according to the destination virtual IP address to obtain a second MAC address of a second node corresponding to the destination virtual IP address; according to the second MAC address of the second node, searching an ARP table to obtain a second route IP address of the second node; adding a first routing IP address of a first node and a second routing IP address of a second node to the outer layer of the original data packet to obtain a routable data packet; and sending the routable data packet to a set port of the second node by using the first network card of the first node.
Optionally, the memory is further configured to store the following instructions: receiving a routable data packet by using a set port of a second network card of the second node; obtaining a routable data packet received by a set port by using second virtual equipment of a second node; and removing the first routing IP address and the second routing IP address of the outer layer of the routable data packet by using the second virtual device to obtain the original data packet.
Optionally, the memory is further configured to store the following instructions: creating corresponding static virtual equipment at each node of the distributed system to obtain virtual equipment of each node; for each node of the distributed system, adding the MAC address and the route IP address of the opposite node in an ARP table; for each node of the distributed system, the MAC address and virtual IP address of the correspondent node are added in the FDB table.
Optionally, the memory is further configured to store the following instructions: reconstructing a virtual network of the distributed system after a change in a routing IP address of a node of the distributed system, comprising: creating a corresponding static virtual device at each node to obtain the virtual device of each node; and updating the routing IP address of the node in the ARP table for each node, and keeping the FDB table unchanged.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
Further, the units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, functional modules in various embodiments of the present application may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application, and various modifications and variations may be suggested to one skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A distributed system based on a virtual network, which is characterized by comprising a plurality of nodes and a virtual network connected with each node, wherein each node comprises a virtual device and a network card;
when a first node of the distributed system communicates with a second node, the first node is configured to:
acquiring an original data packet to be transmitted by using first virtual equipment of a first node; the original data packet comprises a source virtual IP address and a destination virtual IP address;
the first virtual device searches an FDB table according to the destination virtual IP address to obtain a second MAC address of a second node corresponding to the destination virtual IP address; according to the second MAC address of the second node, searching an ARP table to obtain a second route IP address of the second node; adding a first routing IP address of a first node and a second routing IP address of a second node to the outer layer of the original data packet to obtain a routable data packet;
transmitting the routable data packet to a set port of a second node by using a first network card of the first node;
the second node is configured to:
receiving a routable data packet by using a set port of a second network card of the second node;
obtaining a routable data packet received by the set port by using second virtual equipment of the second node;
and the second virtual device removes the first routing IP address and the second routing IP address of the outer layer of the routable data packet to obtain the original data packet.
2. The system of claim 1, wherein building a virtual network at the distributed system comprises:
creating a corresponding static virtual device at each node to obtain the virtual device of each node;
for each node, adding the MAC address and the route IP address of the opposite node in an ARP table;
for each node, the MAC address and virtual IP address of the correspondent node are added in the FDB table.
3. The system of claim 1, wherein the reconstructing the virtual network of the distributed system after the routing IP address of the node of the distributed system changes comprises:
creating a corresponding static virtual device at each node to obtain the virtual device of each node;
and updating the routing IP address of the node in the ARP table for each node, and keeping the FDB table unchanged.
4. The system of claim 1, wherein the virtual network comprises a VXLAN virtual network and the virtual device comprises a vtep virtual device.
5. A method of communication of a virtual network based distributed system, applied to a first node, the method comprising:
acquiring an original data packet to be transmitted by using first virtual equipment of a first node; the original data packet comprises a source virtual IP address and a destination virtual IP address;
the first virtual device searches an FDB table according to the destination virtual IP address to obtain a second MAC address of a second node corresponding to the destination virtual IP address; according to the second MAC address of the second node, searching an ARP table to obtain a second route IP address of the second node; adding a first routing IP address of a first node and a second routing IP address of a second node to the outer layer of the original data packet to obtain a routable data packet;
and sending the routable data packet to a set port of the second node by using the first network card of the first node.
6. A method of communication of a virtual network based distributed system, applied to a second node, the method comprising:
receiving a routable data packet by using a set port of a second network card of the second node;
obtaining a routable data packet received by the set port by using second virtual equipment of the second node;
and the second virtual device removes the first routing IP address and the second routing IP address of the outer layer of the routable data packet to obtain the original data packet.
7. A method for building a distributed system based on a virtual network, comprising:
creating a corresponding static virtual device at each node of the distributed system to obtain virtual devices of each node;
for each node of the distributed system, adding the MAC address and the route IP address of the opposite node in an ARP table;
for each node of the distributed system, the MAC address and virtual IP address of the correspondent node are added in the FDB table.
8. The method of claim 7, wherein reconstructing the virtual network of the distributed system after the routing IP address of the node of the distributed system is changed, comprises:
creating a corresponding static virtual device at each node to obtain the virtual device of each node;
and updating the routing IP address of the node in the ARP table for each node, and keeping the FDB table unchanged.
9. An electronic device, comprising: a processor and a memory storing machine-readable instructions executable by the processor, which when executed by the processor, perform the method of any of claims 5-8.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, performs the method according to any of claims 5-8.
CN202311812093.3A 2023-12-26 2023-12-26 Distributed system based on virtual network and communication method Pending CN117714373A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311812093.3A CN117714373A (en) 2023-12-26 2023-12-26 Distributed system based on virtual network and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311812093.3A CN117714373A (en) 2023-12-26 2023-12-26 Distributed system based on virtual network and communication method

Publications (1)

Publication Number Publication Date
CN117714373A true CN117714373A (en) 2024-03-15

Family

ID=90151525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311812093.3A Pending CN117714373A (en) 2023-12-26 2023-12-26 Distributed system based on virtual network and communication method

Country Status (1)

Country Link
CN (1) CN117714373A (en)

Similar Documents

Publication Publication Date Title
US11003639B2 (en) Database data migration method, apparatus, terminal, system, and storage medium
EP3618561B1 (en) Session management methods and devices
WO2015144033A1 (en) Packets forwarding
CN104639672B (en) The method and apparatus for carrying out domain name mapping
CN108924274B (en) Domain name system DNS processing method and device, storage medium and electronic equipment
CN104168340A (en) Domain name resolution method, server, terminal and system
CN105491135B (en) Establish the method and device of data connection
CN107147549B (en) Intelligent household equipment networking method and device
CN112269842A (en) Information processing method and device, storage medium and computer equipment
CN106470234B (en) Equipment discovery method and device
CN105306244B (en) Router management method, system and equipment
CN110213069B (en) Data forwarding method and device, disaster recovery system and storage medium
WO2017076279A1 (en) Method of updating forward information base item, and device and system utilizing same
CN117714373A (en) Distributed system based on virtual network and communication method
CN103973546B (en) Communicating method, device and system
KR102596801B1 (en) PC5 link establishment methods, equipment and systems
CN107371212B (en) Method and device for sending data
CN115987890B (en) Method, device, electronic equipment and storage medium for cross-cluster access to virtual IP address
CN115801709B (en) Method and device for managing route MAC address, electronic equipment and storage medium
WO2018137180A1 (en) Domain name access method and device
CN110213319B (en) Access method and device, terminal, server and storage medium
CN110870289B (en) Method and device for restoring surfing Internet of local area network equipment
CN112398704B (en) Virtual network delay calculation method and terminal equipment
CN116846948A (en) Control method for establishing direct link, direct link establishing method and related device
CN117155833A (en) Service monitoring method, system and computer readable storage medium

Legal Events

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