Available address pair management method and device, equipment and medium
By obtaining the reserved IP address and virtual network card list in the cloud platform, and generating and storing available address pairs according to user requests, the problem of low management efficiency of available address pairs in the virtual network card is solved, and more efficient data packet release and address management are achieved. to maintenance.
Patent Information
- Application Number
- CN202410813822.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-11
AI Technical Summary
Existing technology cannot conveniently and efficiently maintain the available address pairs of virtual network cards in the cloud platform, resulting in low management efficiency.
By obtaining the reserved IP address list and virtual network card list, determine the reserved IP address and virtual network card to be bound based on the user's binding request information, generate an available address pair, and store it in the target virtual network card so that the available addresses can be stored internally. Determine whether to allow access to the message data.
It improves the creation efficiency of available address pairs, realizes efficient maintenance of available address pairs in the virtual network card, and ensures the accuracy of data packet release.
Smart Images

Figure CN118764462A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud platforms, and in particular to a method, device, equipment and medium for managing available address pairs. Background Art
[0002] In the cloud platform, a virtual network card is a network interface card (NIC) simulated in software. Like a physical network interface card, a virtual network card also has its own MAC address and IP address. Although it is not a real, physically existing device, the cloud host operating system and applications will treat it as a real network interface. Each cloud host will be equipped with one or more virtual network cards to communicate with the host or other virtual machines. In addition, virtual network cards are often used in other specific application scenarios. Many other types of cloud resources also use virtual network cards, such as VPN, load balancer, floating IP, router interface, etc. Virtual network cards can be configured and managed through the cloud platform's management interface, which supports adding, deleting or modifying various settings of virtual network cards, such as IP address, subnet mask, adding or deleting available address pairs, etc.
[0003] The virtual network card decides whether to release the access data message based on the available address pairs stored internally, which are usually manually entered or deleted in the virtual network card according to actual needs. Since the available address pairs are the subordinate sub-resources of the virtual network card, their data size is large and most of the time they are specific, the existing maintenance method cannot conveniently and efficiently maintain the available address pairs in the virtual network card. Summary of the invention
[0004] In view of this, the present invention provides a method, device, equipment and medium for managing available address pairs to solve the problem of being unable to conveniently and efficiently maintain available address pairs in a virtual network card.
[0005] In a first aspect, the present invention provides a method for managing available address pairs, which is applied to a cloud platform, and the method comprises:
[0006] Obtain a reserved IP address list and a virtual network card list, wherein the virtual network card list includes: at least one virtual network card and a MAC address corresponding to each virtual network card, and the reserved IP address list includes at least one reserved IP address;
[0007] Upon receiving the user's binding request information, determining the reserved IP address to be bound from the at least one reserved IP address and determining the virtual network card to be bound from the at least one virtual network card according to the binding request information;
[0008] Generate an available address pair according to the reserved IP address to be bound and the MAC address of the virtual network card to be bound, and store it in the virtual network card to be bound, wherein the available address pair includes: an IP address and a MAC address;
[0009] The access message data received by the virtual network card to be bound is released according to the available address.
[0010] The user's binding request information is used to determine the reserved IP address to be bound and the virtual network card to be bound corresponding to the binding request information in the reserved IP address list and the reserved virtual network card list, thereby generating an available address pair based on the reserved IP address to be bound and the virtual network card to be bound, and storing it in the target virtual network card, so that the target virtual network card can decide whether to release the access message data based on the available address pair stored internally. This available address pair management method can establish a linkage between the reserved IP address and the MAC address of the virtual network card, greatly improving the efficiency of creating available address pairs, thereby more efficiently maintaining the available address pairs in the virtual network card.
[0011] In an optional implementation manner, the releasing the access message data received by the virtual network card to be bound according to the available address includes:
[0012] When the virtual network card to be bound receives the access message data, obtaining the destination IP address of the access message data;
[0013] Determine whether there is an available address pair in the virtual network card to be bound with the same IP address as the destination IP address;
[0014] If it exists, the access message data is allowed to pass.
[0015] After receiving the access message data at the virtual network card, the access message data is released according to the available address pair previously established by the reserved IP address and the virtual network card MAC address, thereby ensuring the accuracy of the data message release judgment.
[0016] In a feasible implementation manner, it is characterized in that after obtaining the reserved IP address list and the virtual network card list, the method further includes:
[0017] When receiving a reserved IP address creation operation from a user, creating a first reserved IP address in the reserved IP address list according to the reserved IP address creation operation;
[0018] Generate a verification address pair corresponding to each virtual network card according to the first reserved IP address and the MAC address corresponding to each virtual network card in the virtual network card list;
[0019] Determine the virtual network card to be bound in the virtual network card list according to the check address pair corresponding to each virtual network card, and determine the first reserved IP address as the reserved IP address to be bound;
[0020] Establishing a binding relationship between the reserved IP address to be bound and the virtual network card to be bound;
[0021] Upon receiving a reserved IP address retrieval request from a user, determining a reserved IP address to be retrieved according to the reserved IP address retrieval request;
[0022] Determine in the target virtual network card list the virtual network card that is currently bound to the reserved IP address to be retrieved;
[0023] In response to the user's reserved IP address retrieval request, a virtual network card that has a binding relationship between the user and the reserved IP address to be retrieved is returned.
[0024] When receiving a user's reserved IP address creation operation, verification address pairs corresponding to each virtual network card are generated according to the first reserved IP address created corresponding to the operation and the MAC addresses corresponding to each virtual network card, so that the virtual network card to be bound in the virtual network card list is determined according to the verification address pairs corresponding to each virtual network card, and the first reserved IP address is determined as the virtual network card to be bound, thereby establishing a binding relationship between the virtual network card to be bound and the reserved IP address to be bound, so that when a user's retrieval request for the reserved IP address is received, the virtual network card currently bound to the reserved IP address requested by the user can be returned, thereby ensuring that the user can more accurately understand the specific allocation of the current reserved IP address relative to the virtual network card.
[0025] In an optional implementation, after obtaining the reserved IP address list and the virtual network card list, the method further includes:
[0026] When receiving an available address pair storage operation from a user, storing a first available address pair in a first virtual network card in the virtual network card list according to the available address pair storage operation;
[0027] Determine the IP address in the first available address pair as the verification IP address;
[0028] Determine the reserved IP address to be bound in the reserved IP address list according to the verified IP address, and determine the first virtual network card as the virtual network card to be bound;
[0029] Establishing a binding relationship between the reserved IP address to be bound and the virtual network card to be bound;
[0030] Based on the binding relationship, the corresponding bound virtual network card is returned in response to the user's reserved IP address retrieval request.
[0031] By determining the verification IP address based on the first available address pair stored in the first virtual network card when receiving the user's available address pair storage operation, thereby determining the reserved IP address to be bound in the reserved IP address list based on the verification IP address, and determining the first virtual network card as the virtual network card to be bound, thereby establishing a binding relationship, when the user searches for the reserved IP address, the virtual network card that has a binding relationship with the user and the reserved IP address in the search request can be returned based on the current binding relationship, ensuring that the user can more accurately understand the specific allocation of the reserved IP address relative to the virtual network card. In an optional embodiment, after establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound, the method also includes:
[0032] When receiving a deletion operation of the target reserved IP address by the user, obtaining K virtual network cards that are bound to the target reserved IP address in the virtual network card list;
[0033] Determine the address pairs to be deleted corresponding to each of the K virtual network cards according to the MAC addresses corresponding to each of the K virtual network cards and the target reserved IP address;
[0034] In response to a deletion operation by the user, the target reserved IP address in the reserved IP address list and the address pairs to be deleted in the available address pairs corresponding to each virtual network card are deleted.
[0035] By generating available address pairs to be deleted corresponding to each virtual network card that has a binding relationship with the target reserved IP address according to the target reserved IP address and the MAC addresses corresponding to the several virtual network cards currently bound to it when receiving the user's deletion operation on the target reserved IP address; thereby deleting the target reserved IP address and the available address pairs to be deleted in each virtual network card in response to the user's deletion operation, the corresponding available address pairs in each virtual network card can be quickly deleted according to the binding relationship, avoiding the inefficiency of manually deleting the available address pairs and improving the maintenance efficiency of the available address pairs. In an optional embodiment, after establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound, the method further includes:
[0036] Upon receiving a deletion operation of a target available address pair in a target virtual network card from a user, determining whether a MAC address in the target available address pair is the same as a MAC address of the target virtual network card;
[0037] If they are the same, obtain N reserved IP addresses in the reserved IP address list that are bound to the target virtual network card;
[0038] Determine, according to the IP address in the target available address pair, a reserved IP address to be unbound from among the N reserved IP addresses;
[0039] In response to a deletion operation by the user, deleting the target available address pair in the target virtual network card, and releasing the binding relationship between the target virtual network card and the reserved IP address to be unbound;
[0040] Based on the current binding relationship, the corresponding bound virtual network card is returned in response to the user's reserved IP address retrieval request.
[0041] When receiving the user's target available address pair deletion operation for the target virtual network card, it is first determined whether the MAC address in the target available address pair is the same as the target virtual network card. If they are the same, the reserved IP address to be unbound in the reserved IP address bound to the target virtual network card is determined according to the IP address in the target available address pair. Then, when the target available address pair is deleted, the binding relationship is released, and the corresponding bound virtual network card is returned to the user's retrieval request according to the current binding relationship, so that the user can be guaranteed to understand the allocation of reserved IP addresses more accurately.
[0042] In an optional implementation, after establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound, the method further includes:
[0043] Upon receiving the user's unbinding request information, according to the unbinding request information, determining the to-be-unbound virtual network card corresponding to the unbinding request information in the virtual network card list, and determining the to-be-unbound reserved IP address corresponding to the unbinding request information in the reserved IP address list;
[0044] Determine the available address pair to be deleted of the virtual network card to be unbound according to the virtual network card to be unbound and the reserved IP address to be unbound;
[0045] In response to the user's unbinding request information, the binding relationship between the virtual network card to be unbound and the reserved IP address to be unbound is released, and the available address pair to be deleted in the virtual network card to be unbound is deleted.
[0046] After receiving the user's unbinding request information, the available address pair to be deleted in the virtual network card to be unbound is determined according to the reserved IP address to be unbound and the virtual network card to be unbound in the unbinding request information, so that when the binding relationship between the virtual network card to be unbound and the reserved IP address to be unbound is contacted, the available address pair to be deleted in the virtual network card to be unbound is deleted. The specific available address pair in the virtual network card can be quickly removed by unbinding the binding relationship, thereby achieving more efficient management of the available address pairs in the virtual network card.
[0047] In a second aspect, the present invention provides a management device for available address pairs, the device comprising:
[0048] A list acquisition module, used to acquire a reserved IP address list and a virtual network card list, wherein the virtual network card list includes: at least one virtual network card and a MAC address corresponding to each virtual network card, and the reserved IP address list includes at least one reserved IP address;
[0049] A user information processing module, configured to, upon receiving binding request information from a user, determine a reserved IP address to be bound from the at least one reserved IP address and determine a virtual network card to be bound from the at least one virtual network card according to the binding request information;
[0050] An available address pair generating module, used to generate an available address pair according to the reserved IP address to be bound and the MAC address of the virtual network card to be bound, and store it in the virtual network card to be bound, wherein the available address pair includes: an IP address and a MAC address;
[0051] The access data release module is used to release the access message data received by the virtual network card to be bound according to the available address.
[0052] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for managing available address pairs of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0053] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for managing available address pairs of the above-mentioned first aspect or any corresponding embodiment thereof.
[0054] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for managing available address pairs of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1is a flow chart of a method for managing available address pairs according to Embodiment 1 of the present invention;
[0057] Figure 2 is a flow chart of a method for managing available address pairs according to Embodiment 2 of the present invention;
[0058] Figure 3 is a flow chart of a method for managing available address pairs according to Embodiment 3 of the present invention;
[0059] Figure 4 is an example diagram of a binding relationship between a reserved IP address and a virtual network card according to an embodiment of the present invention;
[0060] Figure 5 is a structural block diagram of a management device for available address pairs according to an embodiment of the present invention;
[0061] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0063] Cloud computing is a model for the addition, use and delivery of Internet-based services, usually involving the provision of dynamically scalable and often virtualized resources through the Internet. Cloud computing platforms, also known as cloud platforms, are services based on hardware and software resources that provide computing, network and storage capabilities. There are usually three common types of cloud platforms, namely storage-based cloud platforms that focus on data storage, computing-based cloud platforms that focus on data processing, and comprehensive cloud computing platforms that take into account both computing and data storage processing.
[0064] Cloud computing breaks down huge data computing programs into countless small programs, and then processes and analyzes them separately through a system composed of multiple servers, obtains results and returns them to users. Therefore, cloud computing can complete the processing of tens of thousands of data in a very short time, thereby achieving a powerful network service effect. At this stage, cloud services are no longer just a kind of distributed computing, but the result of the hybrid evolution and leap of computer technologies such as distributed computing, utility computing, load balancing, parallel computing, network storage, hot backup redundancy and virtualization.
[0065] In addition, cloud computing services include Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS). In a broad sense, cloud computing brings together many computing resources and implements automated management through software, which can quickly provide resources with only a few people involved. Cloud computing is not a new network technology, but a new network application concept. Its core concept is to provide fast and secure cloud computing services and data storage on the website with the Internet as the center, so that everyone who uses the Internet can use the huge computing resources and data centers on the network.
[0066] In the cloud platform, a virtual network card is a network interface card (NIC) simulated in software. Like a physical network interface card, a virtual network card also has its own MAC address and IP address. Although it is not a real, physically existing device, the cloud host operating system and applications will treat it as a real network interface. Each cloud host will be equipped with one or more virtual network cards to communicate with the host or other virtual machines. In addition, virtual network cards are often used in other specific application scenarios. Many other types of cloud resources also use virtual network cards, such as VPN, load balancer, floating IP, router interface, etc. Virtual network cards can be configured and managed through the cloud platform's management interface, which supports adding, deleting or modifying various settings of virtual network cards, such as IP address, subnet mask, adding or deleting available address pairs, etc.
[0067] The virtual network card decides whether to release the access data message based on the available address pairs stored internally, which are usually manually entered or deleted in the virtual network card according to actual needs. Since the available address pairs are the subordinate sub-resources of the virtual network card, their data size is large and most of the time they are specific, the existing maintenance method cannot conveniently and efficiently maintain the available address pairs in the virtual network card.
[0068] To this end, an embodiment of the present invention provides a method for managing available address pairs, which uses the user's binding request information to determine the reserved IP address to be bound and the virtual network card to be bound corresponding to the binding request information in the reserved IP address list and the reserved virtual network card list, thereby generating an available address pair based on the reserved IP address to be bound and the virtual network card to be bound, and storing it in the target virtual network card, so that the target virtual network card can decide whether to release the access message data based on the available address pair stored internally. Such an available address pair management method can establish a linkage between the reserved IP address and the MAC address of the virtual network card, greatly improving the efficiency of creating the available address pair, thereby more efficiently maintaining the available address pair in the virtual network card.
[0069] Figure 1This is a flow chart of a method for managing available address pairs according to Example 1 of the present invention. Its application scenario is that upon receiving a user's request to establish a binding between a reserved IP address and a virtual network card, an available address pair is generated and stored in the target virtual network card.
[0070] The specific steps of Example 1 are as follows:
[0071] Step S101, obtaining a reserved IP address list and a virtual network card list, wherein the virtual network card list includes: at least one virtual network card and a MAC address corresponding to each virtual network card, and the reserved IP address list includes at least one reserved IP address.
[0072] There are usually multiple subnets in the cloud platform, and each subnet has multiple pre-set reserved IP addresses and virtual network cards, and the virtual network cards include pre-stored available address pairs. Users can interact with each subnet of the cloud platform through the client, so as to set the reserved IP addresses in a subnet of the cloud platform or the available address pairs in the virtual network card.
[0073] Therefore, before the user operates, the reserved IP address list and virtual network card list in each subnet can be prepared in advance. When the user performs relevant settings for a subnet, the corresponding processing is performed according to the pre-prepared reserved IP address list and virtual network card list. For ease of understanding, in this embodiment, all user operation requests are performed for this subnet. When setting other subnets, the specific process is the same, except that the specific content in the list will differ according to the actual situation.
[0074] Step S102, when receiving the binding request information from the user, determine a reserved IP address to be bound from at least one reserved IP address and a virtual network card to be bound from at least one virtual network card according to the binding request information.
[0075] It can be understood that a user can send a binding request message to a subnet of the cloud platform through a client to bind a reserved IP address and a virtual network card in the subnet, and the user's binding request message can include the reserved IP address and virtual network card that the user specifically wants to bind. The cloud platform can determine the IP address to be bound from at least one reserved IP address in the reserved IP address list based on the user's binding request message, and similarly, can also determine the virtual network card to be bound from at least one virtual network card in the virtual network card list.
[0076] In one example, a user can enter a subnet page on a client, where specific reserved IP addresses and virtual network cards can be displayed. The user selects a reserved IP address and a virtual network card, generates a binding request message, and sends it to the cloud platform. After receiving the user's binding request message, the cloud platform determines the reserved IP address and virtual network card to be bound in the actual subnet.
[0077] Specifically, after determining the virtual network card to be bound and the reserved IP address to be bound, a binding relationship between the two can be established and displayed on the client, so that the user can understand the specific allocation of the reserved IP address based on the binding relationship between the reserved IP address and those virtual network cards.
[0078] Step S103, generating an available address pair according to the reserved IP address to be bound and the MAC address of the virtual network card to be bound, and storing it in the virtual network card to be bound, the available address pair includes: an IP address and a MAC address.
[0079] After the virtual network card to be bound is determined, since the MAC address corresponding to each virtual network card still exists in the virtual network card list, an available address pair can be generated based on the MAC address of the virtual network card to be bound and the reserved IP address to be bound, and stored in the virtual network card to be bound. The available address pair consists of two parts, namely the IP address and the MAC address. The IP address in the generated available address pair is the reserved IP address to be bound, and the MAC address is the MAC address of the virtual network card to be bound.
[0080] Step S104: releasing the access message data received by the to-be-bound virtual network card according to the available address.
[0081] It can be understood that the virtual network card can determine whether to release the access message data accessing the virtual network card according to the available address pairs stored internally.
[0082] In the above-mentioned embodiment 1, the reserved IP address to be bound and the virtual network card to be bound corresponding to the binding request information are determined in the reserved IP address list and the reserved virtual network card list respectively through the user's binding request information, thereby generating an available address pair according to the reserved IP address to be bound and the virtual network card to be bound, and storing it in the target virtual network card, so that the target virtual network card can decide whether to release the access message data according to the available address pair stored internally. Such an available address pair management method can establish a linkage between the reserved IP address and the MAC address of the virtual network card, greatly improving the efficiency of creating the available address pair, thereby more efficiently maintaining the available address pair in the virtual network card.
[0083] Specifically, step S104 in the above embodiment 1 may include:
[0084] Step S1041, when the virtual network card to be bound receives access message data, obtain the destination IP address of the access message data.
[0085] When the target virtual network card receives the access message data, the message data contains the destination IP address that the message data ultimately expects to access, and the destination IP address is obtained to determine whether the access message data can be released.
[0086] Step S1042, determining whether there is an available address pair in the virtual network card to be bound whose IP address is the same as the destination IP address.
[0087] As described above, the available address pairs include IP addresses, and the IP addresses of each available address pair are compared with the destination IP address in the access message data to determine whether there is an available address pair with the same IP address as the destination IP address.
[0088] Step S1043: If it exists, access to the message data is allowed.
[0089] If it exists, it means that the access message data can be released to the destination IP address through the target virtual network card, and the access message data is allowed to be released and forwarded accordingly.
[0090] After receiving the access message data at the virtual network card, the access message data is released according to the available address pair previously established by the reserved IP address and the virtual network card MAC address, thereby ensuring the accuracy of the data message release judgment.
[0091] In the above-mentioned embodiment 1, when a user actively sends a binding request message to the cloud platform to establish a binding relationship between a reserved IP address and a virtual network card, the cloud platform directly determines the virtual network card to be bound and the reserved IP address to be bound based on the binding request message, and generates an available address pair and stores it in the virtual network card to be bound.
[0092] In other cases, when the cloud platform receives a reserved IP address creation operation, some virtual network cards may have available address pairs related to the newly created reserved IP address. In this case, it is also necessary to automatically establish a binding relationship between the reserved IP address and some virtual network cards to ensure that users can understand the specific allocation of the reserved IP address based on the binding relationship.
[0093] In view of this situation, Example 2 is provided. Figure 2 This is a flow chart of a method for managing available address pairs according to Embodiment 2 of the present invention. As shown in the figure, Embodiment 2 specifically includes the following steps:
[0094] Step S201, obtaining a reserved IP address list and a virtual network card list, wherein the virtual network card list includes: at least one virtual network card and a MAC address corresponding to each virtual network card, and the reserved IP address list includes at least one reserved IP address.
[0095] It can be understood that, similar to Example 1, before receiving a user's operation on a subnet, the subnet's current reserved IP address list and virtual network card list need to be prepared to cope with the user's related operations, which will not be repeated here.
[0096] Step S202: When a reserved IP address creation operation of a user is received, a first reserved IP address is created in a reserved IP address list according to the reserved IP address creation operation.
[0097] It can be understood that after receiving the user's reserved IP address creation operation, the cloud platform needs to respond to the user's operation and create a new reserved IP address in the reserved IP address list.
[0098] Specifically, the IP address creation operation initiated by the user may include: the main maintenance name for creating the reserved IP; the allocation method, for example, automatic allocation and manual allocation; the IP type, for example, IPv4 and IPv6, to specify whether the reserved IP is an IPv4 address or an IPv6 address; the IP address, for example, depending on the selected IP type, input address data in IPv4 format or input address data in IPv6 format.
[0099] The cloud platform can create a corresponding reserved IP address based on the specific information received.
[0100] Step S203: Generate a verification address pair corresponding to each virtual network card according to the first reserved IP address and the MAC address corresponding to each virtual network card in the virtual network card list.
[0101] It can be understood that after a reserved IP address is newly created, some virtual network cards may have stored available address pairs related to the reserved IP address before the reserved IP address is created. In this case, in order to ensure that the user can understand the actual allocation of the reserved IP address, it is necessary to establish a binding relationship between the newly created first reserved IP address and the qualified virtual network card.
[0102] Therefore, a verification address pair for each virtual network card can be generated based on the newly created first reserved IP address and the MAC address corresponding to each virtual network card in the virtual network card list, and whether each address pair is a virtual network card to be bound that needs to establish a binding relationship can be determined based on the verification address pair corresponding to each virtual network card.
[0103] For example, assuming that the newly created reserved IP address is A, the virtual network cards in the virtual network card list are: virtual network card 1, virtual network card 2 and virtual network card 3, and their corresponding MAC addresses are B, C, and D respectively; in this case, the verification address pair generated for virtual network card 1 is AB, and the IP address in the verification address pair is A, and the MAC address is B; similarly, the verification address pairs for virtual network card 2 and virtual network card 3 are AC and AD respectively.
[0104] Step S204: Determine the virtual network card to be bound in the virtual network card list according to the verification address pair corresponding to each virtual network card, and determine the first reserved IP address as the reserved IP address to be bound.
[0105] After the check address pair corresponding to each virtual network card is determined, the virtual network card to be bound in the virtual network card list is determined according to whether there is an available address pair identical to the check address pair in each virtual network card.
[0106] Using the example used above to explain, the check address pair corresponding to virtual network card 1 is AB, so it can be determined whether there is an available address pair in virtual network card 1 that is the same as the check address pair. If so, it means that there is an available address pair that meets the conditions in virtual network card 1, and it is necessary to establish a binding relationship between the reserved IP address of the newly created key and virtual network card 1, so virtual network card 1 is determined as the virtual network card to be bound. Similarly, according to the check address pairs corresponding to each virtual network card in the virtual network card list, it is determined whether the virtual network card is a virtual network card to be bound that needs to establish a binding relationship.
[0107] After all the virtual network cards to be bound in the virtual network card are determined, the reserved IP address of the newly created key is used as the reserved IP address to be bound, so as to subsequently establish a binding relationship between the virtual network card to be bound and the reserved IP address to be bound.
[0108] Step S205: establishing a binding relationship between the reserved IP address to be bound and the virtual network card to be bound.
[0109] As described above, after determining the virtual network card to be bound and the reserved IP address to be bound, a binding relationship between the two is established. In some cases, there may be multiple virtual network cards to be bound determined in the above step S203, and it is necessary to establish a binding relationship between the reserved IP address to be bound and each virtual network card to be bound. Or if there is no virtual network card that meets the conditions in step S203, that is, there is no virtual network card to be bound, then after creating the first reserved IP address, there is no need to establish any binding relationship.
[0110] Step S206: upon receiving a reserved IP address search request from a user, determining a reserved IP address to be searched according to the reserved IP address search request.
[0111] Step S207: Determine in the target virtual network card list the virtual network card that is currently bound to the reserved IP address to be retrieved.
[0112] Step S208, in response to the user's reserved IP address search request, returning the virtual network card that has a binding relationship between the user and the reserved IP address to be searched.
[0113] In the above steps S206 to S208, when the cloud platform receives a user's reserved IP address retrieval request, it returns the virtual network card currently bound to the corresponding retrieved reserved IP address according to the user's retrieval request. The purpose is to enable the user to more intuitively understand the allocation status of the retrieved reserved IP address, that is, which virtual network cards have available address pairs related to the retrieved reserved IP address.
[0114] It should be noted that the order between step S201 to step S208 can be executed sequentially or synchronously, and this embodiment does not limit this.
[0115] Wherein step S206 can be understood as determining which reserved IP address the user wants to retrieve, that is, determining the reserved IP address to be retrieved, according to the user's reserved IP address retrieval request.
[0116] In step S207, the virtual network card in the virtual network card list that has a binding relationship with the reserved IP address to be retrieved is determined, so that in step S208, the user's search request is responded to and the virtual network card that has a binding relationship with the reserved IP address to be retrieved is returned to the user, so that the user can more intuitively understand the allocation status of the reserved IP address he retrieved.
[0117] The relevant contents in the above steps S206 to S208 can be regarded as a response to the user's reserved IP address search request. It is not limited to the application in the corresponding case of Example 2. As long as the user sends a search request, information can be returned based on the current specific binding relationship.
[0118] When receiving a user's reserved IP address creation operation, verification address pairs corresponding to each virtual network card are generated according to the first reserved IP address created corresponding to the operation and the MAC addresses corresponding to each virtual network card, so that the virtual network card to be bound in the virtual network card list is determined according to the verification address pairs corresponding to each virtual network card, and the first reserved IP address is determined as the virtual network card to be bound, thereby establishing a binding relationship between the virtual network card to be bound and the reserved IP address to be bound, so that when a user's retrieval request for the reserved IP address is received, the virtual network card currently bound to the reserved IP address requested by the user can be returned, thereby ensuring that the user can more accurately understand the specific allocation of the current reserved IP address relative to the virtual network card.
[0119] The above-mentioned embodiment 2 is an embodiment corresponding to the case where, when the cloud platform receives a user's reserved IP address creation operation, it determines whether there is a virtual network card in the virtual network card list that needs to establish a binding relationship. In another similar case, that is, when the cloud platform receives a user's creation of a new available address pair in a virtual network card, it can also automatically determine whether it is necessary to determine whether there is a reserved IP address to be bound in the reserved IP address list based on the newly created available address pair, thereby establishing a binding relationship between the reserved IP address to be bound and the virtual network card where the newly created available address pair is located.
[0120] In view of this situation, Example 3 is provided. Figure 3 This is a flow chart of a method for managing available address pairs according to Embodiment 3 of the present invention. As shown in the figure, Embodiment 3 specifically includes the following steps:
[0121] Step S301, obtaining a reserved IP address list and a virtual network card list, wherein the virtual network card list includes: at least one virtual network card and a MAC address corresponding to each virtual network card, and the reserved IP address list includes at least one reserved IP address.
[0122] For specific details, please refer to the relevant contents in Example 1 and Example 2, which will not be repeated here.
[0123] Step S302: When an available address pair storage operation of a user is received, a first available address pair is stored in a first virtual network card in the virtual network card list according to the available address pair storage operation.
[0124] It can be understood that when receiving a request from the user to store the newly created first available address pair in the first virtual network card, the corresponding first available address pair is stored in the first virtual network card according to the user's specific available address pair storage operation.
[0125] Step S303: determine whether the MAC address in the first available address pair is the same as the MAC address of the first virtual network card.
[0126] It can be understood that the available address pair created by the user includes an IP address and a MAC address. When the user creates an available address pair in the virtual network card, the MAC address of the newly created available address pair and the MAC address of the virtual network card are not necessarily the same. The content in the available address pair is created by the user according to the actual situation. Therefore, it is necessary to determine whether the MAC address in the first available address pair of the newly created key is the same as the MAC address of the first virtual network card. Only when the two are the same will the subsequent steps be executed. If they are different, there is no need to establish a binding relationship based on the newly created available address pair.
[0127] Step S304: If they are the same, the IP address in the first available address pair is determined as the verification IP address.
[0128] When the MAC address in the first available address pair is the same as the MAC address of the first virtual network card, it is necessary to determine whether there is a reserved IP address in the current reserved IP address list that needs to establish a binding relationship. Therefore, the IP address in the first available address pair can be determined as the verification IP address, and the reserved IP addresses in the reserved IP address list can be verified based on the verification IP address to determine whether there is a qualified reserved IP address.
[0129] Step S305: Determine the reserved IP address to be bound in the reserved IP address list according to the verified IP address, and determine the first virtual network card as the virtual network card to be bound.
[0130] After determining the verification IP address, the reserved IP address in the reserved IP address list that is the same as the verification IP address can be determined as the reserved IP address to be bound, and the first virtual network card is determined as the virtual network card to be bound. In some cases, there may not be a qualified reserved IP address in the reserved IP address list, in which case there is no need to establish a binding relationship.
[0131] Step S306: Establish a binding relationship between the reserved IP address to be bound and the virtual network card to be bound.
[0132] For specific details, please refer to the relevant contents in Example 1 and will not be repeated here.
[0133] Step S307: Return the corresponding bound virtual network card in response to the user's reserved IP address search request based on the binding relationship.
[0134] It can be understood that when a reserved IP address search request is received, the virtual network card currently bound to the reserved IP address corresponding to the reserved IP address search request can be returned according to the binding relationship. For details, please refer to steps S206 to S208 in embodiment 2, which will not be repeated here.
[0135] In the above embodiment 3, steps S301 to S307 may be executed sequentially or simultaneously, which is not limited in this embodiment.
[0136] When receiving the user's available address pair storage operation, the first available address pair is stored in the first virtual network card to determine it as a verification IP address, thereby determining the reserved IP address to be bound in the reserved IP address list according to the verification IP address, and determining the first virtual network card as the virtual network card to be bound, thereby establishing a binding relationship. When the user searches for the reserved IP address, the virtual network card that has a binding relationship with the user and the reserved IP address in the search request can be returned according to the current binding relationship, thereby ensuring that the user can more accurately understand the specific allocation of the reserved IP address relative to the virtual network card.
[0137] The above-mentioned Embodiment 1, Embodiment 2 and Embodiment 3 are the corresponding processing flows of the cloud platform in the three cases when receiving a user's active binding request, when a user creates a reserved IP address and when a user creates an available address pair.
[0138] After the above processing, the binding relationship between the virtual network card and the reserved IP address in the cloud platform can be as follows Figure 4 As shown, it is an example diagram of the binding relationship between a reserved IP address and a virtual network card according to an embodiment of the present invention. As shown in the figure, there may be multiple subnets in the cloud platform, and there are a certain number of reserved IP addresses and virtual network cards in each subnet. These reserved IP addresses and virtual network cards can establish a binding relationship in combination with the actual situation according to the relevant content about establishing a binding relationship in the above embodiment. Specifically, the subnet is essentially a combination of network and subnet in neutron, which are respectively a layer 2 network and a layer 3 network. In the cloud platform, a subnet is a union composed of a network under neutron and multiple subnets under it, which can be used by a variety of other cloud resources such as cloud hosts, routers, cloud physical machines, etc., and virtual network cards can be added to them, addresses can be allocated, etc. When there is a binding relationship between a reserved IP address and a virtual network card, it means that there is an available address pair with the same IP address and the reserved IP address in the virtual network card, that is, the reserved IP address is assigned to the virtual network card, and the user can view the specific binding status of each reserved IP address on the client.
[0139] In order to ensure that the binding relationship can truly reflect the specific allocation of the reserved IP addresses, that is, for each reserved IP address, there are related available address pairs in those virtual network cards. Therefore, when releasing the binding relationship, deleting the reserved IP address, and deleting the available address pair, it is necessary to perform corresponding processing according to the specific situation to ensure that the binding relationship can truly reflect the allocation of the reserved IP address and achieve better management of the available address pairs.
[0140] In another embodiment, after establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound according to the relevant content in the above embodiment, when the cloud platform receives the reserved IP address deletion operation, the specific processing method is as follows:
[0141] When receiving a deletion operation of the target reserved IP address by the user, obtaining K virtual network cards that are bound to the target reserved IP address in the virtual network card list;
[0142] According to the MAC address corresponding to each virtual network card in the K virtual network cards and the target reserved IP address, determine the address pairs to be deleted corresponding to each of the K virtual network cards;
[0143] In response to the user's deletion operation, the target reserved IP address in the reserved IP address list and the to-be-deleted address pairs corresponding to the K virtual network cards are deleted.
[0144] It can be understood that when the cloud platform receives a deletion operation for a target reserved IP address, it is necessary to first determine several virtual network cards that have a binding relationship with the target reserved IP address in the virtual network card list, that is, in the virtual network card list, obtain K virtual network cards that have a binding relationship with the target reserved IP address.
[0145] In some cases, when K is 0, that is, there is no corresponding bound virtual network card for the target reserved IP address, the target reserved IP address can be directly deleted without performing subsequent judgment operations.
[0146] After obtaining K virtual network cards that are bound to the target reserved IP address, the address pairs to be deleted corresponding to each virtual network card are determined respectively. That is, the address pairs to be deleted corresponding to each virtual network card are determined according to the target reserved IP address to be deleted and the MAC addresses corresponding to each of the K virtual network cards.
[0147] For example, the target reserved IP address to be deleted is A, and the MAC addresses corresponding to the K virtual network cards are B, C, D, etc., then the available address pairs to be deleted corresponding to each virtual network card are: AB, AC, AD, etc.
[0148] When the target reserved IP address in the reserved IP address list is deleted in response to the user's deletion operation, the address pairs to be deleted in the available address pairs corresponding to each virtual network card are deleted at the same time.
[0149] When receiving a user's deletion operation on the target reserved IP address, based on the target reserved IP address and the MAC addresses corresponding to the several virtual network cards currently bound to it, the available address pairs to be deleted corresponding to the various virtual network cards that have a binding relationship with the target reserved IP address are generated; thereby, in response to the user's deletion operation, the target reserved IP address and the available address pairs to be deleted in each virtual network card are deleted, and the corresponding available address pairs in each virtual network card can be quickly deleted according to the binding relationship, thereby avoiding the inefficiency of manually deleting the available address pairs and improving the maintenance efficiency of the available address pairs.
[0150] In another embodiment, after establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound according to the relevant content in the above embodiment, when the cloud platform receives the reserved IP address deletion operation, the specific processing method is as follows:
[0151] Upon receiving a deletion operation of the target available address pair in the target virtual network card by the user, determining whether the MAC address in the target available address pair is the same as the MAC address of the target virtual network card;
[0152] If they are the same, obtain N reserved IP addresses that are bound to the target virtual network card in the reserved IP address list;
[0153] Determine, according to the IP address in the target available address pair, a reserved IP address to be unbound from the N reserved IP addresses;
[0154] In response to the user's deletion operation, the target available address pair in the target virtual network card is deleted, and the binding relationship between the target virtual network card and the reserved IP address to be unbound is released;
[0155] Based on the current binding relationship, the user's reserved IP address retrieval request returns the corresponding bound virtual network card.
[0156] It can be understood that when the user deletes the target available address pair in the target virtual network card, the cloud platform will determine the specific situation of the target available address pair that the user wants to delete. First, it needs to determine whether the MAC address in the target available address pair is the same as the MAC of the target virtual network card. Only when the two are the same, subsequent judgment operations are required, because only when the MAC addresses of the two are the same, the available address pair may contain a reserved IP address to be unbound that needs to be unbound.
[0157] When the two are the same, determine N reserved IP addresses that are bound to the target virtual network card in the reserved IP address list. If N is, it means that the target virtual network card does not have a corresponding bound reserved IP address, then you can directly delete the target available address pair without considering whether it needs to be unbound.
[0158] Then, the reserved IP address in the reserved IP address list that is the same as the target available address pair to be deleted is determined as the reserved IP address to be unbound. In response to the user's deletion operation, when the target available address pair is deleted, the binding relationship between the reserved IP address to be unbound and the target virtual network card is released. At the same time, when the user's reserved IP address retrieval request is received subsequently, feedback is provided based on the current binding relationship.
[0159] When receiving the user's target available address pair deletion operation for the target virtual network card, it is first determined whether the MAC address in the target available address pair is the same as the target virtual network card. If they are the same, the reserved IP address to be unbound in the reserved IP address bound to the target virtual network card is determined according to the IP address in the target available address pair. Then, when the target available address pair is deleted, the binding relationship is released, and the corresponding bound virtual network card is returned to the user's retrieval request according to the current binding relationship, so that the user can be guaranteed to understand the allocation of reserved IP addresses more accurately.
[0160] In another embodiment, after the binding relationship between the reserved IP address to be bound and the virtual network card to be bound is established according to the relevant content in the above embodiment, when the cloud platform receives the user's unbinding request information, the specific processing method is as follows:
[0161] Upon receiving the user's unbinding request information, according to the unbinding request information, determine the to-be-unbound virtual network card corresponding to the unbinding request information in the virtual network card list, and determine the to-be-unbound reserved IP address corresponding to the unbinding request information in the reserved IP address list;
[0162] Determine the available address pair to be deleted of the virtual network card to be unbound according to the virtual network card to be unbound and the reserved IP address to be unbound;
[0163] In response to the user's unbinding request information, the binding relationship between the virtual network card to be unbound and the reserved IP address to be unbound is released, and the available address pair to be deleted in the virtual network card to be unbound is deleted.
[0164] It can be understood that when receiving the user's unbinding request information, it is first necessary to determine which reserved IP address and which virtual network card the user wants to unbind based on the unbinding request information, that is, determine the virtual network card to be unbound and the reserved IP address to be unbound.
[0165] After determining the virtual network card to be unbound and the reserved IP address to be unbound, determine the available address pair to be deleted in the network card to be unbound. Specifically, the MAC address of the available address pair to be deleted is the same as the MAC address of the virtual network card to be unbound, and the IP address of the available address pair to be deleted is the same as the target reserved IP address.
[0166] In response to the user's unbinding request information, the binding relationship between the virtual network card to be unbound and the reserved IP address to be unbound is released, and the available address pair to be deleted in the virtual network card to be unbound is deleted.
[0167] After receiving the user's unbinding request information, the available address pair to be deleted in the virtual network card to be unbound is determined according to the reserved IP address to be unbound and the virtual network card to be unbound in the unbinding request information, so that when the binding relationship between the virtual network card to be unbound and the reserved IP address to be unbound is contacted, the available address pair to be deleted in the virtual network card to be unbound is deleted. The specific available address pair in the virtual network card can be quickly removed by unbinding the binding relationship, thereby achieving more efficient management of the available address pairs in the virtual network card.
[0168] The above three examples are respectively deleting a reserved IP address, deleting an available address pair, and releasing a binding relationship. The binding relationship and the available address pair are adaptively updated to ensure the real-time accuracy of the binding relationship and more conveniently manage the available address pairs in the virtual network card.
[0169] In another case, when a reserved IP address has a corresponding bound virtual network card, if the user modifies the reserved IP address, the available address pair in the corresponding bound virtual network card can be adaptively modified. For this purpose, another embodiment is provided, and the specific processing method is as follows:
[0170] When receiving a modification operation of the target reserved IP address by the user, obtaining M virtual network cards that are bound to the target reserved IP address in the virtual network card list;
[0171] According to the MAC address corresponding to each virtual network card in the M virtual network cards and the current target reserved IP address, the address pairs to be modified corresponding to each of the M virtual network cards are determined.
[0172] In response to the user's modification operation, the target reserved IP address in the reserved IP address list is modified, and at the same time, the to-be-modified address pairs corresponding to the M virtual network cards are updated according to the modified target reserved IP address.
[0173] It can be understood that when receiving the user's modification operation on the target reserved IP address, it is necessary to determine which virtual network cards are currently bound to the target reserved IP, and determine the address pairs that need to be modified in each of these virtual network cards, that is, the address pairs to be modified.
[0174] Assuming that the target reserved IP address is currently bound to M virtual network cards, determine the address pairs to be modified for each of the M virtual network cards. For each virtual network card, the corresponding address pair to be modified is determined in the following way: the IP address is the same as the target reserved IP address that has not been modified, and the MAC address is the same as the MAC address of the virtual network card.
[0175] After determining the address pairs to be modified corresponding to the M virtual network cards currently bound to the target reserved IP address, in response to the user's modification operation, when modifying the target reserved IP address in the reserved IP address list, the IP address in the address pair to be modified obtained above is modified according to the specific modification content.
[0176] When a user modifies a reserved IP address that has already been created, the relevant available address pairs that meet the conditions in each virtual network card bound to the reserved IP address are obtained, and they are determined as the available address pairs to be modified. These available address pairs to be modified are modified according to the modified reserved IP address, thereby realizing the update of the available address pairs in multiple virtual network cards, further facilitating the maintenance and management of the available address pairs of the virtual network cards.
[0177] The above-mentioned multiple embodiments and illustrative examples for deletion operations and unbinding operations are embodiments of a method for managing available address pairs provided according to the present invention in specific application scenarios. In some specific scenarios, adaptive adjustments are made according to the binding mechanism between the reserved IP address and the virtual network card provided by an embodiment of the present invention, which is not limited here.
[0178] The embodiment of the present invention is based on the fact that if different virtual network cards need to release the same IP address, that is, the available address pair created on the virtual network card, it is necessary to enter exactly the same IP address. If the virtual network card wants to release a certain IP, it is necessary to create a corresponding available address pair. If a certain IP is no longer needed to be released, such available address pair needs to be deleted. Based on this, if the reserved IP under the subnet is concretized as the IP on the available address pair, and then integrated into a strategy that supports binding multiple virtual network cards at the same time, user operations can be greatly facilitated, and the binding relationship visualization effect can also be achieved on the client. Users no longer need to invest too much operation to easily achieve the effect of releasing messages and supporting clear and visible queries on release data or binding policies.
[0179] By establishing a binding system between reserved IP addresses and virtual network cards, the data accuracy, environmental security, and system stability of reserved IP, virtual network card, and available address pairs are guaranteed, which is a backbone of traffic control in the cloud platform. Through flexible design, the reserved IP binding virtual network card automatic linkage control of available address pairs is made open and inclusive, with strong compatibility and flexibility.
[0180] In the traditional mode, the reserved IP address is only used to occupy the IP address under the subnet, and has no functional intersection with the virtual network card itself. Creating a reserved IP, creating an available address pair, deleting a reserved IP, deleting an available address pair, etc. are all separate operations, and the reserved IP and the available address pair are independent of each other and have no correlation. The available address pair is a sub-resource on the virtual network card, which is used to release the uplink and downlink messages that meet the conditions of the virtual network card. On a virtual network card, a large amount of available address pairs are often added to ensure data security for business needs. The management of these data has a large maintenance cost because they are under different virtual network cards and different virtual network cards independently control these available address pairs. Moreover, the virtual network card itself often has a large amount of data, which further increases the management pressure of the available address pairs of the virtual network card.
[0181] The embodiment of the present invention avoids the need for deep-level one-by-one operations to configure available address pairs in a single virtual network card in the traditional mode to allow multiple MAC / IP address pairs to pass through this virtual network card, greatly simplifying the operation and upgrading it to the subnet level. At the same time, a very strict linkage effect is formed in multiple business systems, so that there is a systematic and complete life cycle in the full-link closed loop. Users only need a small amount of activities to realize the distribution of addresses and communication release, as well as the convenient recovery of discarded data. In order to liberate the complex and cumbersome multi-point one-by-one control of discrete functions, a new data management idea is provided, and automatic linkage scheduling that supports multi-point entry is realized, so that users can achieve the effect of automatic processing of the whole body with a small amount of operations on either side, and finally all the resources involved can be automatically processed in the same direction.
[0182] In this embodiment, a management device for available address pairs is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0183] This embodiment provides a management device for available address pairs, such as Figure 5 As shown, including:
[0184] The list acquisition module 501 is used to acquire a reserved IP address list and a virtual network card list. The virtual network card list includes: at least one virtual network card and a MAC address corresponding to each virtual network card. The reserved IP address list includes at least one reserved IP address.
[0185] The user information processing module 502 is used to determine a reserved IP address to be bound from at least one reserved IP address and a virtual network card to be bound from at least one virtual network card according to the binding request information when receiving the binding request information from the user.
[0186] The available address pair generating module 503 is used to generate an available address pair according to the reserved IP address to be bound and the MAC address of the virtual network card to be bound, and store it in the virtual network card to be bound. The available address pair includes: an IP address and a MAC address.
[0187] The access data release module 504 is used to release the access message data received by the to-be-bound virtual network card according to the available address.
[0188] In some optional implementations, the access message release module 504, when releasing the access message data received by the bound virtual network card according to the available address, includes:
[0189] When the virtual network card to be bound receives the access message data, the destination IP address of the access message data is obtained;
[0190] Determine whether there is an available address pair in the virtual network card to be bound with the same IP address as the destination IP address;
[0191] If it exists, access to the message data is allowed.
[0192] In some optional implementations, the user information processing module 502 is further configured to, when receiving a reserved IP address creation operation from a user, create a first reserved IP address in the reserved IP address list according to the reserved IP address creation operation;
[0193] Generate a verification address pair corresponding to each virtual network card according to the first reserved IP address and the MAC address corresponding to each virtual network card in the virtual network card list;
[0194] Determine the virtual network card to be bound in the virtual network card list according to the check address pair corresponding to each virtual network card, and determine the first reserved IP address as the reserved IP address to be bound;
[0195] Establish a binding relationship between the reserved IP address to be bound and the virtual network card to be bound;
[0196] Upon receiving a reserved IP address retrieval request from a user, determining a reserved IP address to be retrieved according to the reserved IP address retrieval request;
[0197] Determine in the target virtual network card list the virtual network card that is currently bound to the reserved IP address to be retrieved;
[0198] In response to the user's reserved IP address retrieval request, a virtual network card that has a binding relationship between the user and the reserved IP address to be retrieved is returned.
[0199] In some optional implementations, the user information processing module 502 is further configured to, when receiving an available address pair storage operation from a user, store the first available address pair in the first virtual network card in the virtual network card list according to the available address pair storage operation;
[0200] Determine whether the MAC address in the first available address pair is the same as the MAC address of the first virtual network card;
[0201] If they are the same, the IP address in the first available address pair is determined as the verification IP address;
[0202] Determine the reserved IP address to be bound in the reserved IP address list according to the verified IP address, and determine the first virtual network card as the virtual network card to be bound;
[0203] Establish a binding relationship between the reserved IP address to be bound and the virtual network card to be bound;
[0204] Based on the binding relationship, the corresponding bound virtual network card is returned in response to the user's reserved IP address retrieval request.
[0205] In some optional implementations, after establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound, the user information processing module 502 is further configured to, upon receiving a deletion operation of the target reserved IP address by the user, obtain K virtual network cards that have a binding relationship with the target reserved IP address in the virtual network card list;
[0206] According to the MAC address corresponding to each virtual network card in the K virtual network cards and the target reserved IP address, determine the address pairs to be deleted corresponding to each of the K virtual network cards;
[0207] In response to the user's deletion operation, the target reserved IP address in the reserved IP address list and the to-be-deleted address pairs corresponding to the K virtual network cards are deleted.
[0208] In some optional implementations, after establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound, the user information processing module 502 is further used to determine whether the MAC address in the target available address pair and the MAC address of the target virtual network card are the same when receiving a deletion operation of the target available address pair in the target virtual network card by the user;
[0209] If they are the same, obtain N reserved IP addresses that are bound to the target virtual network card in the reserved IP address list;
[0210] Determine, according to the IP address in the target available address pair, a reserved IP address to be unbound from the N reserved IP addresses;
[0211] In response to the user's deletion operation, the target available address pair in the target virtual network card is deleted, and the binding relationship between the target virtual network card and the reserved IP address to be unbound is released;
[0212] Based on the current binding relationship, the corresponding bound virtual network card is returned in response to the user's reserved IP address retrieval request.
[0213] In some optional implementations, after establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound, the user information processing module 502 is further used to determine, when receiving the user's unbinding request information, the virtual network card to be unbound corresponding to the unbinding request information in the virtual network card list, and determine the reserved IP address to be unbound corresponding to the unbinding request information in the reserved IP address list according to the unbinding request information;
[0214] Determine the available address pair to be deleted of the virtual network card to be unbound according to the virtual network card to be unbound and the reserved IP address to be unbound;
[0215] In response to the user's unbinding request information, the binding relationship between the virtual network card to be unbound and the reserved IP address to be unbound is released, and the available address pair to be deleted in the virtual network card to be unbound is deleted.
[0216] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0217] The management device for available address pairs in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0218] The embodiment of the present invention also provides a computer device having the above Figure 5 The available address pairs are shown for management devices.
[0219] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0220] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0221] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0222] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0223] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0224] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0225] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0226] An embodiment of the present invention provides a computer program product. The computer program product includes computer instructions. The computer instructions are used to enable a computer to execute a method according to any embodiment of the present invention.
[0227] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0228] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for managing available address pairs, applied to a cloud platform, characterized in that: The method comprises: Obtain a reserved IP address list and a virtual network card list, wherein the virtual network card list includes: at least one virtual network card and a MAC address corresponding to each virtual network card, and the reserved IP address list includes at least one reserved IP address; Upon receiving the user's binding request information, determining the reserved IP address to be bound from the at least one reserved IP address and determining the virtual network card to be bound from the at least one virtual network card according to the binding request information; Generate an available address pair according to the reserved IP address to be bound and the MAC address of the virtual network card to be bound, and store it in the virtual network card to be bound, wherein the available address pair includes: an IP address and a MAC address; The access message data received by the virtual network card to be bound is released according to the available address.
2. The method according to claim 1, characterized in that The releasing the access message data received by the virtual network card to be bound according to the available address includes: When the virtual network card to be bound receives the access message data, obtaining the destination IP address of the access message data; Determine whether there is an available address pair in the virtual network card to be bound with the same IP address as the destination IP address; If it exists, the access message data is allowed to pass.
3. The method according to claim 1, characterized in that After obtaining the reserved IP address list and the virtual network card list, the method further includes: When receiving a reserved IP address creation operation from a user, creating a first reserved IP address in the reserved IP address list according to the reserved IP address creation operation; Generate a verification address pair corresponding to each virtual network card according to the first reserved IP address and the MAC address corresponding to each virtual network card in the virtual network card list; Determine the virtual network card to be bound in the virtual network card list according to the check address pair corresponding to each virtual network card, and determine the first reserved IP address as the reserved IP address to be bound; Establishing a binding relationship between the reserved IP address to be bound and the virtual network card to be bound; Upon receiving a reserved IP address retrieval request from a user, determining a reserved IP address to be retrieved according to the reserved IP address retrieval request; Determine in the target virtual network card list the virtual network card that is currently bound to the reserved IP address to be retrieved; In response to the user's reserved IP address retrieval request, a virtual network card that has a binding relationship between the user and the reserved IP address to be retrieved is returned.
4. The method according to claim 1, characterized in that: After obtaining the reserved IP address list and the virtual network card list, the method further includes: When receiving an available address pair storage operation from a user, storing a first available address pair in a first virtual network card in the virtual network card list according to the available address pair storage operation; Determine whether the MAC address in the first available address pair is the same as the MAC address of the first virtual network card; If they are the same, determining the IP address in the first available address pair as the verification IP address; Determine the reserved IP address to be bound in the reserved IP address list according to the verified IP address, and determine the first virtual network card as the virtual network card to be bound; Establishing a binding relationship between the reserved IP address to be bound and the virtual network card to be bound; Based on the binding relationship, the corresponding bound virtual network card is returned in response to the user's reserved IP address retrieval request.
5. The method according to any one of claims 3-4, characterized in that: After establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound, the method further includes: When receiving a deletion operation of the target reserved IP address by the user, obtaining K virtual network cards that are bound to the target reserved IP address in the virtual network card list; Determine the address pairs to be deleted corresponding to each of the K virtual network cards according to the MAC addresses corresponding to each of the K virtual network cards and the target reserved IP address; In response to a deletion operation by the user, the target reserved IP address in the reserved IP address list and the to-be-deleted address pairs corresponding to each of the K virtual network cards are deleted.
6. The method according to any one of claims 3-4, characterized in that: After establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound, the method further includes: Upon receiving a deletion operation of a target available address pair in a target virtual network card from a user, determining whether a MAC address in the target available address pair is the same as a MAC address of the target virtual network card; If they are the same, obtain N reserved IP addresses in the reserved IP address list that are bound to the target virtual network card; Determine, according to the IP address in the target available address pair, a reserved IP address to be unbound from among the N reserved IP addresses; In response to a deletion operation by the user, deleting the target available address pair in the target virtual network card, and releasing the binding relationship between the target virtual network card and the reserved IP address to be unbound; Based on the current binding relationship, the user's reserved IP address retrieval request returns the corresponding bound virtual network card.
7. The method according to any one of claims 3 to 4, characterized in that: After establishing the binding relationship between the reserved IP address to be bound and the virtual network card to be bound, the method further includes: Upon receiving the user's unbinding request information, according to the unbinding request information, determining the to-be-unbound virtual network card corresponding to the unbinding request information in the virtual network card list, and determining the to-be-unbound reserved IP address corresponding to the unbinding request information in the reserved IP address list; Determine the available address pair to be deleted of the virtual network card to be unbound according to the virtual network card to be unbound and the reserved IP address to be unbound; In response to the user's unbinding request information, the binding relationship between the virtual network card to be unbound and the reserved IP address to be unbound is released, and the available address pair to be deleted in the virtual network card to be unbound is deleted.
8. A device for managing available address pairs, characterized in that: The device comprises: A list acquisition module, used to acquire a reserved IP address list and a virtual network card list, wherein the virtual network card list includes: at least one virtual network card and a MAC address corresponding to each virtual network card, and the reserved IP address list includes at least one reserved IP address; A user information processing module, configured to, upon receiving binding request information from a user, determine a reserved IP address to be bound from the at least one reserved IP address and determine a virtual network card to be bound from the at least one virtual network card according to the binding request information; An available address pair generating module, used to generate an available address pair according to the reserved IP address to be bound and the MAC address of the virtual network card to be bound, and store it in the virtual network card to be bound, wherein the available address pair includes: an IP address and a MAC address; The access data release module is used to release the access message data received by the virtual network card to be bound according to the available address.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for managing available address pairs according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for managing available address pairs according to any one of claims 1 to 7.
Citation Information
Patent Citations
Management method and device for virtual machine IP addresses
CN109327557A
IP address allocation method of virtual machine, terminal device and DHCP server
CN111427662A
Method and device for allocating IP address, computer equipment and storage medium
CN117278531A
System and method for partitioning a network
US9363141B1
