Disclosure of Invention
In view of the above, the present invention provides a method and a system for distributing virtualized network addresses in a data center, and a directory server, which can reduce address information sent by the directory server to multiple network virtual boundaries, and save network bandwidth.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides a method for distributing a virtualized network address of a data center, which comprises the following steps:
the directory server receives and stores a network address registration message which is sent by the network virtual boundary and carries the tenant identification and the network address information, and when the network address information is distributed to the network virtual boundary, the network address information is only distributed to the network virtual boundary related to the tenant identification.
In the foregoing solution, the network address information includes: address information of the virtual machine, address information of a source network virtual boundary and address information of a destination network virtual boundary;
the address information of the virtual machine includes: a Media Access Control (MAC) address of the virtual machine, or a virtual MAC address of the virtual machine, or an IP address of the virtual machine, or a virtual IP address of the virtual machine.
In the above scheme, the receiving and storing, by the directory server, the network address registration message carrying the tenant identifier and the network address information sent by the network virtual boundary includes: when the directory server is a centralized server, the directory server receives a network address registration message which is sent by a network virtual boundary and carries tenant identification and network address information, and stores the network address information and the tenant identification in the network address registration message in a mapping entry form.
In the above scheme, the receiving and storing, by the directory server, the network address registration message carrying the tenant identifier and the network address information sent by the network virtual boundary includes: when the directory server is a distributed server, the directory server receiving the network address registration message searches the directory server for storing the mapping entries corresponding to the tenant identities according to a distributed algorithm, the network address information and the tenant identities in the network address registration message are sent to the searched directory server through messages, and the searched directory server stores the network address information and the tenant identities in the form of mapping entries.
In the above solution, when distributing the network address information to the network virtual boundary, the distributing the network address information only to the network virtual boundary related to the tenant identifier includes: and for the condition that the directory server works in a Push mode, after the directory server stores the network address information and the tenant identification in the network address registration message in the form of mapping entries, the directory server distributes the network address information to a network virtual boundary related to the tenant identification in the data center network through a notification message.
In the above solution, when distributing the network address information to the network virtual boundary, the distributing the network address information only to the network virtual boundary related to the tenant identifier includes: when the directory server works in a Pull mode, the directory server receives a network address request (request) message which is sent by a network virtual boundary and carries a tenant identification, searches a corresponding mapping entry according to the tenant identification carried in the network address request message, and distributes the network address information in the mapping entry to the network virtual boundary through a reply (reply) message.
In the above scheme, the method further comprises: after a virtual machine is started, an attachment message is sent to a network virtual boundary, wherein the attachment message carries address information and tenant identification of the virtual machine;
and after receiving the attachment message, the network virtual boundary locally stores the address information and the tenant identification of the virtual machine and sends a network address registration message carrying the tenant identification and the network address information to a directory server.
In the above scheme, the method further comprises: and the network virtual boundary which receives the network address information distributed by the directory server takes the address information of the target network virtual boundary in the network address information as an outer layer target address, and encapsulates the data message sent by the virtual machine, wherein the encapsulated data message is forwarded and routed by a router of the overlay network depending on the outer layer target address.
The invention provides a distribution system of a data center virtualization network address, which comprises: network virtual boundaries, directory servers; wherein,
the network virtual boundary is used for sending a network address registration message carrying the tenant identification and the network address information to the directory server and receiving the network address information distributed by the directory server;
and the directory server is used for receiving and storing the network address registration message which is sent by the network virtual boundary and carries the tenant identification and the network address information, and only distributing the network address information to the network virtual boundary related to the tenant identification when distributing the network address information to the network virtual boundary.
In the foregoing solution, the network address information includes: address information of the virtual machine, address information of a source network virtual boundary and address information of a destination network virtual boundary;
the address information of the virtual machine includes: the MAC address of the virtual machine, or the virtual MAC address of the virtual machine, or the IP address of the virtual machine, or the virtual IP address of the virtual machine.
In the above scheme, the system further comprises: the virtual machine is used for sending an attachment message to a network virtual boundary after being started, wherein the attachment message carries address information and tenant identification of the virtual machine;
the network virtual boundary is specifically configured to, after receiving the attach message, locally store address information and a tenant identifier of the virtual machine, and send a network address registration message carrying the tenant identifier and the network address information to the directory server.
In the above solution, the system further includes a router of the overlay network, configured to transmit the data packet between the virtual boundaries of the network.
In the above solution, the directory server includes: the system comprises an address registration module and an address distribution module; wherein,
the address registration module is used for receiving and storing a network address registration message which is sent by the network virtual boundary and carries the tenant identification and the network address information;
and the address distribution module is used for distributing the network address information to the network virtual boundary related to the tenant identification only when distributing the network address information to the network virtual boundary.
In the foregoing solution, when the directory server is a centralized server, the address registration module is specifically configured to receive a network address registration message that is sent by a network virtual boundary and carries a tenant identifier and network address information, and store the network address information and the tenant identifier in the network address registration message in the form of a mapping entry.
In the above solution, when the directory server is a distributed server, the address registration module of the directory server that receives the network address registration message is specifically configured to search, according to a distributed algorithm, the directory server that stores the mapping entry corresponding to the tenant identifier, and send the network address information and the tenant identifier in the network address registration message to the searched directory server through a message;
the address registration module of the directory server is specifically configured to store the network address information and the tenant identifier in the form of a mapping entry.
In the foregoing solution, the address distribution module is specifically configured to, when the address distribution module works in a Push mode, distribute, through a notification message, network address information to a network virtual boundary related to a tenant identity in a data center network after the address registration module stores the network address information and the tenant identity in a network address registration message in the form of a mapping entry.
In the foregoing solution, the address distribution module is specifically configured to receive a network address request message carrying a tenant identifier sent by a network virtual boundary under the Pull mode, find a corresponding mapping entry according to the tenant identifier carried in the network address request message, and distribute network address information in the mapping entry to the network virtual boundary through a response message.
The invention provides a directory server, which comprises: the system comprises an address registration module and an address distribution module; wherein,
the address registration module is used for receiving and storing a network address registration message which is sent by the network virtual boundary and carries the tenant identification and the network address information;
and the address distribution module is used for distributing the network address information to the network virtual boundary related to the tenant identification only when distributing the network address information to the network virtual boundary.
The invention provides a method and a system for distributing a virtualized network address of a data center and a directory server, wherein the directory server receives and stores a network address registration message which is sent by a network virtual boundary and carries a tenant identification and network address information, and only distributes the network address information to the network virtual boundary related to the tenant identification when distributing the network address information to the network virtual boundary; therefore, the address information sent by the directory server to the plurality of network virtual boundaries can be reduced, and the network bandwidth can be saved.
Detailed Description
The basic idea of the invention is: the directory server receives and stores a network address registration message which is sent by the network virtual boundary and carries the tenant identification and the network address information, and when the network address information is distributed to the network virtual boundary, the network address information is only distributed to the network virtual boundary related to the tenant identification.
The invention is further described in detail below with reference to the figures and the specific embodiments.
The invention realizes a distribution method of a data center virtualization network address, as shown in fig. 2, the method comprises the following steps:
step 101: the directory server receives and stores a network address registration message which is sent by a network virtual boundary and carries tenant identification and network address information;
specifically, the network address information includes: address information of the virtual machine, address information of a source network virtual boundary and address information of a destination network virtual boundary;
the address information of the virtual machine includes: a MAC address of a virtual machine, or a virtual MAC address of a virtual machine, or an IP address of a virtual machine, or a virtual IP address of a virtual machine, or the like;
the address information of the source network virtual boundary is the IP address of the network virtual boundary for sending the network address registration message;
the address information of the destination network virtual boundary is generally the IP address of the destination network virtual boundary;
the tenant identification can be the name, or the number, or the serial number, etc. of the tenant;
when the directory server is a centralized server, one data center is provided with one or more directory servers which are redundant and backup with each other, the directory server receives a network address registration message which is sent by a network virtual boundary and carries tenant identification and network address information, and the network address information and the tenant identification in the network address registration message are stored in a mapping item form; further, when the directory server has saved the mapping entry corresponding to the tenant identifier, the directory server updates the saved mapping entry according to the network address information and the tenant identifier in the network address registration message;
when the directory servers are distributed servers, one data center is provided with a plurality of directory servers, the mapping items are stored among the servers in a distributed storage mode, the nearby directory servers receive network address registration messages which are sent by a network virtual boundary and carry tenant identification and network address information, the directory servers used for storing the mapping items corresponding to the tenant identification are searched according to a distributed algorithm, the network address information and the tenant identification in the network address registration messages are sent to the searched directory servers through messages, and the searched directory servers store the network address information and the tenant identification in a mapping item mode; the distributed algorithm includes a Distributed Hash (DHT) algorithm, etc.
Before this step, still include: after a virtual machine is started, an attachment message is sent to a network virtual boundary, wherein the attachment message carries address information and tenant identification of the virtual machine;
and after receiving the attachment message, the network virtual boundary locally stores the address information and the tenant identification of the virtual machine and sends a network address registration message carrying the tenant identification and the network address information to a directory server.
Further, when the virtual machine leaves the network, for example, when the virtual machine migrates, the virtual machine sends a detach message to the network virtual boundary; after receiving the detaching message, the network virtual boundary sends a de-registration message to a directory server, and the directory server de-registers the mapping item related to the virtual machine according to the de-registration message; here, the detach message carries address information and tenant identification of the virtual machine; the deregistration message includes: network address information and tenant identification.
In this step, the network virtual boundary may be an independent ethernet switch device, or may be embedded in the terminal server as a functional block, and if the functional block is embedded in the terminal server, the attachment and detachment operations between the virtual machine and the network virtual boundary do not need a standardized protocol;
the directory server may be a single server device, or may be a functional block residing in a network device such as an ethernet switch or a router of the data center network.
Step 102: when the directory server distributes the network address information to the network virtual boundary, the directory server only distributes the network address information to the network virtual boundary related to the tenant identification;
specifically, under the condition that the directory server works in a Push mode, the directory server distributes network address information to a network virtual boundary related to a tenant identification in a data center network through a notification message after storing the network address information and the tenant identification in a network address registration message in the form of a mapping entry; here, the notification packet carries a tenant identity and is only distributed to a network virtual boundary related to the tenant identity, so that the range of network address information notification is reduced; the network virtual boundary related to the tenant identification is as follows: when the tenant identification is 100, all network virtual boundaries supporting the tenant identification as 100 are network virtual boundaries related to the tenant identification;
when the directory server works in a Pull mode, the directory server receives a network address request (request) message which is sent by a network virtual boundary and carries a tenant identification, searches a corresponding mapping entry according to the tenant identification carried in the network address request message, and distributes the network address information in the mapping entry to the network virtual boundary through a reply (reply) message.
The method further comprises the following steps: and the network virtual boundary which receives the network address information distributed by the directory server takes the address information of the target network virtual boundary in the network address information as an outer layer target address, and encapsulates the data message sent by the virtual machine, wherein the encapsulated data message is forwarded and routed by a router of the overlay network depending on the outer layer target address.
In order to implement the foregoing method, the present invention further provides a distribution system of a data center virtualized network address, as shown in fig. 3, where the system includes: a network virtual boundary 11, a directory server 12; wherein,
a network virtual boundary 11, configured to send a network address registration message carrying a tenant identifier and network address information to the directory server 12, and receive the network address information distributed by the directory server 12;
the directory server 12 is configured to receive and store a network address registration message that is sent by the network virtual boundary 11 and carries a tenant identifier and network address information, and when distributing the network address information to the network virtual boundary 11, only distribute the network address information to the network virtual boundary 11 related to the tenant identifier.
The network address information includes: address information of the virtual machine, address information of a source network virtual boundary and address information of a destination network virtual boundary;
the address information of the virtual machine includes: a MAC address of a virtual machine, or a virtual MAC address of a virtual machine, or an IP address of a virtual machine, or a virtual IP address of a virtual machine, or the like;
the address information of the source network virtual boundary is the IP address of the network virtual boundary for sending the network address registration message;
the address information of the destination network virtual boundary is generally an IP address of the destination network virtual boundary.
The system further comprises: the virtual machine 13 is configured to send an attachment message to the network virtual boundary 11 after being started, where the attachment message carries address information and a tenant identifier of the virtual machine;
the network virtual boundary 11 is specifically configured to, after receiving the attach message, locally store address information and a tenant identifier of the virtual machine, and send a network address registration message carrying the tenant identifier and the network address information to the directory server 12.
The system also includes routers 14 of the overlay network for transmitting data packets between the network virtual boundaries 11.
The directory server 12 includes: an address registration module 121, an address distribution module 122; wherein,
an address registration module 121, configured to receive and store a network address registration message that is sent by the network virtual boundary 11 and carries a tenant identifier and network address information;
an address distribution module 122, configured to, when distributing network address information to the network virtual boundary 11, distribute network address information only to the network virtual boundary 11 related to the tenant identity;
when the directory server 12 is a centralized server, the address registration module 121 is specifically configured to receive a network address registration message that is sent by the network virtual boundary 11 and carries a tenant identifier and network address information, and store the network address information and the tenant identifier in the network address registration message in the form of a mapping entry;
further, when the directory server 12 already stores the mapping entry corresponding to the tenant identifier, the address registration module 121 is specifically configured to update the stored mapping entry according to the network address information and the tenant identifier in the network address registration message;
when the directory server 12 is a distributed server, the address registration module 121 of the nearby directory server is specifically configured to receive a network address registration message which is sent by the network virtual boundary 11 and carries a tenant identifier and network address information, search for a directory server for storing a mapping entry corresponding to the tenant identifier according to a distributed algorithm, and send the network address information and the tenant identifier in the network address registration message to the searched directory server through a message; the address registration module 121 of the found directory server is specifically configured to store the network address information and the tenant identifier in the form of a mapping entry; the distributed algorithm includes DHT algorithm, etc.
The address distribution module 122 is specifically configured to, when working in a Push mode, after the address registration module stores the network address information and the tenant identifier in the network address registration message in the form of a mapping entry, distribute the network address information to the network virtual boundary 11 in the data center network, which is associated with the tenant identifier, through a notification packet;
the address distribution module 122 is specifically configured to receive a network address request message carrying a tenant identifier sent by a network virtual boundary under the Pull mode, find a corresponding mapping entry according to the tenant identifier carried in the network address request message, and distribute network address information in the mapping entry to the network virtual boundary 11 through a response message.
Based on the above system, the present invention further provides a directory server, as shown in fig. 3, where the directory server 12 includes: an address registration module 121, an address distribution module 122; wherein,
an address registration module 121, configured to receive and store a network address registration message that is sent by the network virtual boundary 11 and carries a tenant identifier and network address information;
an address distribution module 122, configured to, when distributing network address information to the network virtual boundary 11, distribute network address information only to the network virtual boundary 11 related to the tenant identity;
when the directory server 12 is a centralized server, the address registration module 121 is specifically configured to receive a network address registration message that is sent by the network virtual boundary 11 and carries a tenant identifier and network address information, and store the network address information and the tenant identifier in the network address registration message in the form of a mapping entry;
further, when the directory server 12 already stores the mapping entry corresponding to the tenant identifier, the address registration module 121 is specifically configured to update the stored mapping entry according to the network address information and the tenant identifier in the network address registration message;
when the directory server 12 is a distributed server, the address registration module 121 of the nearby directory server is specifically configured to receive a network address registration message which is sent by the network virtual boundary 11 and carries a tenant identifier and network address information, search for a directory server for storing a mapping entry corresponding to the tenant identifier according to a distributed algorithm, and send the network address information and the tenant identifier in the network address registration message to the searched directory server through a message; the address registration module 121 of the found directory server is specifically configured to store the network address information and the tenant identifier in the form of a mapping entry; the distributed algorithm includes DHT algorithm, etc.
The address distribution module 122 is specifically configured to, when working in a Push mode, after the address registration module stores the network address information and the tenant identifier in the network address registration message in the form of a mapping entry, distribute the network address information to the network virtual boundary 11 in the data center network, which is associated with the tenant identifier, through a notification packet;
the address distribution module 122 is specifically configured to receive a network address request message carrying a tenant identifier sent by a network virtual boundary under the Pull mode, find a corresponding mapping entry according to the tenant identifier carried in the network address request message, and distribute network address information in the mapping entry to the network virtual boundary 11 through a response message.
The following detailed description of the implementation and principles of the method of the present invention is provided in connection with specific embodiments.
This embodiment is a flow of forwarding a first packet of data forwarding, where in this embodiment, a directory server works in a Pull mode, as shown in fig. 4, and includes the following steps:
step 201: the virtual machine VM1 sends a data message to a corresponding network virtual boundary NVE 1;
step 202: after receiving a data message sent by a virtual machine VM1, a network virtual boundary NVE1 searches an outer layer destination address corresponding to the data message locally, and when the outer layer destination address is not found in a local cache, confirms that the data message is a first packet, and sends a network address request message to a directory server, wherein the network address request message carries destination address information, tenant identification and the like of the virtual machine VM 1;
step 203: when receiving the network address request message, the directory server finds a corresponding mapping entry according to the tenant identifier in the network address request message, and sends network address information in the mapping entry to the network virtual boundary NVE1 through a response message, wherein the network address information includes an IP address of the network virtual boundary NVE 2;
step 204: after receiving the response message, the network virtual boundary NVE1 stores the network address information and tenant identification, encapsulates the data message sent by the virtual machine VM1 with the IP address of the network virtual boundary NVE2 in the network address information as an outer destination address, and sends the encapsulated data message to the network virtual boundary NVE2 by forwarding and routing by a router of the overlay network depending on the outer destination address;
step 205: the network virtual boundary NVE2 decapsulates the received data packet, and sends the decapsulated data packet to the virtual machine VM 2.
In this embodiment, in the forwarding process of the non-first packet, the network virtual edge NVE1 may locally find the outer destination address corresponding to the destination address of the non-first packet, and does not need to find the outer destination address to the directory server.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.