CN106302861B - Address allocation method and device - Google Patents

Address allocation method and device Download PDF

Info

Publication number
CN106302861B
CN106302861B CN201610854328.9A CN201610854328A CN106302861B CN 106302861 B CN106302861 B CN 106302861B CN 201610854328 A CN201610854328 A CN 201610854328A CN 106302861 B CN106302861 B CN 106302861B
Authority
CN
China
Prior art keywords
address
information
vtep
identification information
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610854328.9A
Other languages
Chinese (zh)
Other versions
CN106302861A (en
Inventor
黄李伟
王伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201610854328.9A priority Critical patent/CN106302861B/en
Publication of CN106302861A publication Critical patent/CN106302861A/en
Application granted granted Critical
Publication of CN106302861B publication Critical patent/CN106302861B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses

Abstract

The embodiment of the invention provides an address allocation method and device, wherein the method comprises the following steps: sending address request information to a Dynamic Host Configuration Protocol (DHCP) server according to a request of a client; receiving address response information from a DHCP server, wherein the address response information comprises an address and identification information which are allocated by the DHCP server aiming at the request information; sending the address and the identification information to the client, and synchronizing to the second VTEP, so that the client communicates with the second VTEP according to the address and the identification information. The invention can enable a plurality of parks to share the same DHCP server, effectively improve the resource utilization rate, prevent resource waste and simultaneously improve the communication reliability and user experience between the parks.

Description

Address allocation method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an address allocation method and apparatus.
Background
DHCP (Dynamic Host Configuration Protocol) is a network Protocol of a local area network, and adopts a server/client architecture, and a DHCP server is mainly used for: and automatically allocating configuration information such as an IP address and the like for the DHCP client.
In the prior art, when addresses are allocated by using a DHCP server, the adopted scheme is as follows: a DHCP server is arranged in each park, and each DHCP server is only responsible for address allocation in the park to which the DHCP server belongs. In addition, when different parks own the DHCP server, in the process of allocating the IP by the DHCP server, a situation that VMs in different parks have the same IP may occur, and in such a situation, VMs in different parks cannot normally communicate.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide an address allocation method to improve resource utilization and reliability of inter-campus communication.
The embodiment of the invention discloses an address allocation method, which is applied to a VTEP (virtual local area network) of a terminal node of a VXLAN tunnel of a first extensible virtual local area network, and comprises the following steps:
sending address request information to a DHCP server according to a request of a client;
receiving address response information from a DHCP server, wherein the address response information comprises an address and identification information which are allocated by the DHCP server aiming at the request information;
sending the address and the identification information to the client, and synchronizing to the second VTEP, so that the client communicates with the second VTEP according to the address and the identification information.
The embodiment of the invention also discloses an address allocation method, which is applied to a DHCP server and comprises the following steps:
receiving address request information from a first extensible virtual local area network VXLAN tunnel terminal node VTEP, wherein the request information carries specific information;
acquiring specific information, determining target identification information corresponding to the specific information by retrieving the corresponding relation between the locally stored specific information and the identification information, and allocating an address for a client corresponding to the request information;
the address and the target identification information are sent to the first VTEP, so that the address and the target identification information are sent to the client through the first VTEP and are synchronized to the second VTEP.
The embodiment of the invention also discloses an address allocation device, which is applied to the first VTEP and comprises the following components:
the sending module is used for sending address request information to the DHCP server according to the request of the client;
the receiving module is used for receiving address response information from the DHCP server, wherein the address response information comprises an address and identification information which are distributed by the DHCP server aiming at the request information;
and the synchronization module is used for sending the address and the identification information to the client and synchronizing the address and the identification information to the second VTEP so that the client communicates with the second VTEP according to the address and the identification information.
The embodiment of the invention also discloses an address allocation device, which is applied to a DHCP server and comprises:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving address request information from a first extensible virtual local area network VXLAN tunnel terminal node VTEP, and the request information carries specific information;
the determining module is used for acquiring the specific information, determining target identification information corresponding to the specific information by retrieving the corresponding relation between the locally stored specific information and the identification information, and allocating an address for the client corresponding to the request information;
and the sending module is used for sending the address and the target identification information to the first VTEP, sending the address and the target identification information to the client through the first VTEP, and synchronizing the address and the target identification information to the second VTEP.
Thus, in the embodiment of the invention, the address request information is sent to the DHCP server according to the request of the client; receiving address response information from a DHCP server, wherein the address response information comprises an address and identification information which are allocated by the DHCP server aiming at the request information; sending the address and the identification information to the client, and synchronizing to the second VTEP, so that the client communicates with the second VTEP according to the address and the identification information. Thereby can make the same DHCP server of sharing between a plurality of gardens, improve resource utilization effectively and prevent the wasting of resources, can also promote the reliability and the user experience of communication between the gardens simultaneously.
Drawings
FIG. 1 is a flowchart illustrating the steps of an address assignment method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a network framework in an embodiment of the invention;
FIG. 3 is a block diagram of an address assignment embodiment of the present invention;
FIG. 4 is a block diagram of an address assignment embodiment of the present invention;
fig. 5 is a block diagram of an address assignment embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
One of the core concepts of the embodiments of the present invention is to provide an address allocation method and apparatus, so as to improve resource utilization and reliability of inter-campus communication.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of an address allocation method according to the present invention is shown, where the method is applied to a first VTEP, and specifically may include the following steps:
step 101, sending address request information to a DHCP server according to a request of a client.
Specifically, when the client needs to apply for an IP address from DHCP, the client sends a request to the VTEP connected to it. In an embodiment of the present invention, the first VTEP receives a request sent by a client, where the request includes, but is not limited to: MAC address of the client, etc.
The first VTEP acquires the information carried in the request of the client and sends address request information to the DHCP server. In the embodiment of the present invention, the address request information carries information such as the MAC address of the client.
And 102, receiving address response information from the DHCP server, wherein the address response information comprises an address and identification information which are allocated by the DHCP server aiming at the request information.
Specifically, the DHCP receives address request information from the first VTEP, and assigns an address and identification information to a corresponding client with respect to the address request information. The DHCP sends the assigned address and identification information to the first VTEP.
The first VTEP receives address response information from the DHCP server, wherein the address response information comprises an address allocated by DHCP and identification information.
And 103, sending the address and the identification information to the client and synchronizing the address and the identification information to the second VTEP so that the client communicates with the second VTEP according to the address and the identification information.
Specifically, the first VTEP receives the address response information and acquires the address and the identification information carried therein. The first VTEP then sends the address and identification information to the client. And after receiving the address and the identification information, the client stores the address and the identification information locally. The first VTEP also synchronizes address and identification information to a second VTEP, which in an embodiment of the present invention is another VTEP belonging to the same campus or a different campus as the first VTEP, so that the second VTEP receiving the address and identification information can communicate with the client according to the address and identification information.
In summary, in the technical solution of the embodiment of the present invention, address request information is sent to a DHCP server according to a request of a client; receiving address response information from a DHCP server, wherein the address response information comprises an address and identification information which are allocated by the DHCP server aiming at the request information; the address and the identification information are sent to the client side and are synchronously sent to the second VTEP, so that the client side communicates with the second VTEP according to the address and the identification information, the same DHCP server can be shared among a plurality of parks, the resource utilization rate is effectively improved, the resource waste is prevented, and when the DHCP servers are respectively arranged in the parks, the problem that the access conflict occurs to the plurality of client sides which are allocated with the same address due to the fact that the plurality of DHCP servers allocate the same address can be prevented, and the reliability and the user experience of communication among the parks are further improved.
In an embodiment of the present invention, step 101 may further specifically include:
inquiring whether a DHCP server exists in a park where the first VTEP is located;
if yes, sending the address request information to a DHCP server;
if not, selecting a target DHCP server from DHCP servers in other parks, and sending the address request information to the target DHCP server.
In an embodiment of the present invention, the step of selecting the target DHCP server from the DHCP servers in other parks may further include:
and if the situation that the DHCP server does not exist in the park where the first VTEP is located is inquired, selecting a target DHCP server according to the load state of the DHCP servers in other parks.
In a preferred embodiment of the present invention, when the DHCP server exists in the campus where the first VTEP is located, the user may also set a selection rule between the VTEP and the DHCP according to actual needs, so that the VTEP preferentially selects the DHCP server with a smaller load number (i.e., a better load state) in another campus as the target DHCP server. In another preferred embodiment of the present invention, the VTEP in each campus may send all address request information to the DHCP server in one of the campuses, and when all addresses in the address pool of the DHCP server are occupied, the VTEP may send address request information to another DHCP server, thereby further improving the resource utilization rate of the DHCP server. The user may set the selection rule in the VTEP according to actual needs, which is not limited by the present invention.
In an embodiment of the present invention, after step 102, that is, after the step of the first VTEP receiving the address response information from the DHCP server, the method may further include:
writing the address and the identification information into a forwarding table entry stored locally;
accordingly, step 101 further comprises: and synchronizing the forwarding table item to the second VTEP through the VXLAN tunnel between the first VTEP and the second VTEP so that the second VTEP can communicate with the client according to the forwarding table item. Wherein, in one embodiment of the invention, the VXLAN tunnel between the first VTEP and the second VTEP may be pre-established before the service starts. In another embodiment of the present invention, the VXLAN tunnel between the first VTEP and the second VTEP may also be reestablished before the first VTEP needs to communicate with the second VTEP, thereby increasing the flexibility of communication.
Referring to fig. 2, a flowchart of steps of an embodiment of an address assignment method according to the present invention is shown, where the method is applied in a DHCP server, and specifically includes the following steps:
step 201, receiving address request information from a first extensible virtual local area network VXLAN tunnel terminal node VTEP, where the request information carries specific information.
Specifically, in the embodiment of the present invention, when the client needs to apply for an address from the DHCP, the client sends a request to the VTEP connected to the client. In an embodiment of the present invention, the first VTEP receives a request sent by a client, where the request includes, but is not limited to: MAC address of the client, etc. The first VTEP acquires the information carried in the request of the client and sends address request information to the DHCP server.
In the embodiment of the present invention, the address request information sent by the first VTEP to the DHCP server may carry specific information. The DHCP server can distribute corresponding identification information for the client according to the specific information carried in the address request.
In a preferred embodiment of the present invention, the specific information may be MAC address information of the client, wherein the DHCP server may recognize a reception order of the received address request information according to the MAC address information. That is, the DHCP server may sort the received address request information by recognizing the MAC address information in the process of receiving a plurality of address request information. For example, the following steps are carried out: the MAC address of the client 1 is MAC1, the MAC address of the client B is MAC2, DHCP receives the address request information carrying MAC1 first, and then receives the address request information carrying MAC2, and then DHCP can sort the received address request information according to the MAC addresses.
In another preferred embodiment of the present invention, the specific information may also be tunnel identification information (i.e., tunnel ID) of the VXLAN tunnel between the first VTEP and DHCP.
In a further preferred embodiment of the invention, the specific information may also be IP address information of the first VTEP.
Step 202, obtaining the specific information, determining the target identification information corresponding to the specific information by retrieving the corresponding relationship between the locally stored specific information and the identification information, and allocating an address to the client corresponding to the request information.
Specifically, the DHCP obtains specific information from the address request information, and determines target identification information corresponding to the specific information by retrieving a correspondence between the locally stored specific information and the identification information. And the DHCP server dynamically allocates addresses to the clients corresponding to the request information.
As described above, the specific information may include multiple types, and for different types of specific information, corresponding entries are stored in the DHCP server, and the corresponding relationship between the specific information and the identification information is recorded in the entries. The specific correspondence between the specific information and the identification information and the assignment process of the identification information will be explained in detail in the following embodiments.
Step 203, sending the address and the target identification information to the first VTEP, so as to send the address and the target identification information to the client through the first VTEP, and synchronizing to the second VTEP.
Specifically, in the embodiment of the present invention, the DHCP sends the determined target identification information and the allocated address to the first VTEP. The first VTEP sends the received address and destination identification information to the client and synchronizes to the second VTEP. In an embodiment of the invention, the second VTEP is another VTEP belonging to the same campus or a different campus as the first VTEP, so that the second VTEP receiving the address and identification information can communicate with the client according to the address and identification information.
In a preferred embodiment of the present invention, when a plurality of DHCP servers exist in the system (the plurality of DHCP servers belong to the same campus or different campuses), the DHCP server further forwards the determined destination identification information and the assigned address to another DHCP server other than the DHCP server. After receiving the address and the target identifier, other DHCP servers can know that the address and the identifier are occupied and carry out corresponding marking, and the address and the identifier will not be reused in the subsequent process of allocating the address and the identifier.
In summary, according to the technical scheme in the embodiment of the present invention, a plurality of parks can share the same DHCP server, so that resource utilization is effectively improved and resource waste is prevented.
In order to better understand the address assignment method of the present invention, the following detailed description is made with reference to specific embodiments.
Referring to fig. 2, a network architecture diagram of an address assignment method of an embodiment of the present invention is shown. In fig. 2: the VMs 1 and 899 are connected to the VTEP1 and VTEP 9, respectively, where a VM (Virtual Machine) is a client in the embodiment of the present invention. And VTEP1-3 is divided within campus 1, VTEP4-6 is divided within campus 2, and VTEP7-9 is divided within campus 3. The pin node spine1-6 and the routers 1-3 are also included in fig. 2 and are connected in the connection manner shown in fig. 2. In addition, fig. 2 also includes a DHCP server 1 located in the campus 1 and a DHCP server 2 located in the campus 2. The garden planning and the connection mode in the embodiment of the invention are only used for better explaining the invention, and a user can divide a garden according to actual requirements and set a corresponding connection mode.
Referring to fig. 2, a VXLAN tunnel is established between the DHCP server 1 and the DHCP server 2 so that the DHCP server 1 and the DHCP server 2 can perform information synchronization through the VXLAN tunnel.
When VM1 comes online, VM1 will send request information to VTEP1 directly connected to it to apply for IP address and identification information from the DHCP server.
The VTEP1 receives the request information from the VM1 and inquires whether a DHCP server exists in the campus. When the VTEP1 inquires that the DHCP server 1 exists in the own campus, it sends address request information to the DHCP server 1. In a preferred embodiment of the present invention, the VTEP1 may also select DHCP servers in other campuses as target servers according to a preset selection rule, and the specific implementation will be described in detail below.
The DHCP server 1 receives the address request information and dynamically allocates an IP address to the VM1 (in this embodiment, the IP address allocated to the VM1 by the DHCP is 10.1.1.1). Also, the DHCP server will also assign corresponding identification information to VM1 to uniquely identify VM1 by IP address and identification information.
The specific way of the DHCP server to allocate the identification information is as follows:
(1) the DHCP server locally stores a table entry, and the table entry records the corresponding relation between the address request receiving sequence and the identification information. The DHCP server allocates identification information to the corresponding VMs according to the correspondence and according to the order of the received address request information. In the embodiment of the present invention, the DHCP server determines the order of receiving the address request information by identifying specific information (the characteristic information is MAC address information of the VM) carried in the address request information. For example, the following steps are carried out: DHCP1 receives address request 1, address request 2, address request 3 in order, and address requests 1-3 correspond to VM1, VM4, VM7, respectively. The DHCP1 acquires the MAC address information of the VM in the address request and recognizes the reception order by recording the MAC address information. In the representation of the DHCP1 server, 1 is recorded the identification information corresponding to the 1 st to 10 th received address request information, and 2 is recorded the identification information corresponding to the 11 th to 20 th received address request information. As can be seen from this, the identification information allocated to VM1, VM4, and VM7 by DHCP1 is all 1. If the MAC address carried in the 15 th address request message received by the DHCP1 is the MAC address of the VM3, the identification information allocated by the DHCP1 to the VM3 is 2.
In particular, in one embodiment, it is assumed that the available IP addresses of the DHCP1 server are 100, and the available IP addresses of the DHCP2 server are also 100. The DHCP1 server may set that the identification information corresponding to the first 100 address request information received in order is 1, and the DHCP2 server may set that the identification information corresponding to the first 100 address request information received in order is 2. DHCP servers 1 and 2 inform other devices of the absence of available addresses in the address pool through VXLAN tunnel with VTEP after receiving the 100 th address request message.
(2) The DHCP server locally stores an entry, and the entry records the corresponding relation between the VXLAN tunnel ID and the identification information. And the DHCP server allocates identification information for the corresponding VM according to the corresponding relation and according to the specific information (the characteristic information is VXLAN tunnel ID) carried in the received address request information. For example, the following steps are carried out: the VXLAN tunnel ID between the DHCP1 server and the VTEP1-3 is ID1, the VXLAN tunnel ID between the DHCP1 server and the VTEP4-6 is ID2, and the entry locally stored by the DHCP1 server has the identification information corresponding to ID1 of 1 and the identification information corresponding to ID2 of 2. Therefore, when the DHCP1 server receives the address request information carrying the specific information ID1, that is, the address request information comes from any one of the VTEPs 1-3, the identification information allocated to the VM corresponding to the address request information is 1. When the DHCP1 server receives the address request information carrying the specific information ID2, that is, the address request information comes from any one of the VTEPs 4-6, the identification information allocated to the VM corresponding to the address request information is 2.
(3) The DHCP server locally stores an entry, and the entry records the corresponding relation between the IP address of the VTEP and the identification information. And the DHCP server allocates identification information for the corresponding VM according to the corresponding relation and according to the specific information (the characteristic information is the IP address of the VTEP) carried in the received address request. For example, the following steps are carried out: IP addresses corresponding to the VTEP1-6 are respectively IP1-6, identification information corresponding to the IP1-3 is 1 and identification information corresponding to the IP4-6 is 2 are recorded in entries in the DHCP1 server. When the characteristic information carried in the address request information received by the DHCP1 server is IP1, the identification information allocated to the VM corresponding to the address request information is 1. When the characteristic information carried in the address request information received by the DHCP1 server is IP5, the identification information allocated to the VM corresponding to the address request information is 2.
In the embodiment of the invention, the entries in the DHCP server are preset by the user, and before the service starts, the entries are mutually synchronized through the VXLAN tunnel between the DHCP servers so as to mutually inform the entries set by the DHCP server, thereby avoiding collision.
In this embodiment, the 2 nd distribution method is taken as an example for detailed explanation. In embodiments of the present invention, as described above, the user has partitioned the campus for VTEP1-9, and the user can set an ID for the VXLAN tunnel between the VTEP and DHCP according to the campus where the VTEP is located. Suppose that: the tunnel ID of VTEP1-3 is 1, the tunnel ID of VTEP4-6 is 2, and the tunnel ID of VTEP7-9 is 3. The contents of the entries in the DHCP1 server are shown in table 1:
VXLAN tunnel ID Identification information
1 1
2 2
3 3
TABLE 1
With continued reference to fig. 2, the DHCP1 server sends address response information to the VTEP1, where the address response information includes, but is not limited to: the MAC address and IP address of the VM, and corresponding identification information (identification information is 1). In addition, in the embodiment of the present invention, the DHCP1 server forwards the allocated address and identification information to DHCP servers in other parks to inform other DHCP servers that the binding formed by the address and identification information is occupied.
VTEP1 receives the address response information, and writes the MAC address, IP address, and corresponding identification information of the VM therein into the forwarding table entry, and VTEP1 also sends the IP address information and identification information to the VM. The VM receives and stores the IP address and the identification information. In the embodiment of the present invention, the forwarding table entry is a corresponding relationship between the MAC address, the IP address, and the identification information of each VM. Specifically, the contents in the forwarding table entry are shown in table 2:
IP address MAC address Identification information
10.1.1.1 A-A-A 1
TABLE 2
Next, the VTEP1 encapsulates the MAC address, the IP address, and the identification information of the VM to form BGP routing information (i.e., BGP packet), and adds the identification information to the BGP routing information. In a preferred embodiment of the present invention, the identification information may be added in a designated field in the BGP routing information.
In this embodiment, if the identification information of the VM1 is 1, the specified field in the BGP routing information is modified to: 0001.
with continued reference to fig. 2, in this embodiment, both VTEP1 and VTEP2-9 establish a VXLAN tunnel. The VTEP1 may then send the grouped BGP routing information to other VTEPs through VXLAN tunnels with the other VTEPs.
The VTEP2-9 receives the BGP routing information sent by the VTEP1, and recognizes that the BGP routing information is from the VTEP in the set whose identification information is 1 by identifying the specific field in the BGP routing information. Detailed examples are given by VTEP 7: the VTEP7 receives the BGP routing information, and then parses the BGP routing information to obtain a forwarding entry included in the BGP routing information. The VTEP7 writes the MAC address, the IP address, and the identification information corresponding to the VM1 in the forwarding table into a local forwarding table, and issues the forwarding table to the VM directly connected to the VTEP7, where the VM stores the forwarding table.
When VM7 directly connected to VTEP7 needs to perform two-layer communication with other VMs, VTEP7 needs to match MAC addresses and identification information at the same time, and when both items are successfully matched, the two-layer communication is performed. Likewise, when VM7 needs to communicate with other VMs in three layers, VTEP7 needs to match IP addresses and identification information simultaneously.
Still referring to fig. 2, when VM4 goes online, VTEP4 receives the request information of VM4 and inquires that a DHCP server exists in the campus. At this time, the VTEP4 may directly send the address request information to the DHCP server 2 in the own campus. In this embodiment, VTEP4 may also send address request information to VTEP1 through a VXLAN tunnel according to preset selection rules, and then forward the address request information to the DHCP1 server through VTEP 1. Alternatively, VTEP4 may also send the address request information directly to the DHCP1 server through a VXLAN tunnel with the DHCP1 server.
In an embodiment of the present invention, the VTEPs in different parks may send the address request information to different DHCP servers according to the load status of the DHCP servers in each park, thereby implementing load balancing of the DHCP servers and improving the resource utilization rate. In other embodiments, the VTEPs in different parks may also send all address request information to the DHCP server 1, and when the addresses in the address pool of the DHCP server 1 are insufficient, forward the address request information to DHCP servers in other parks, thereby improving the resource utilization rate. Specifically, the user may set a rule for the VTEP to select the DHCP server according to actual requirements.
With continued reference to fig. 2, when VM7 within campus 3 comes online, VM7 sends IP request information to VTEP 7. After receiving the IP request message, the VTEP7 inquires that no DHCP server exists in the campus. The VTEP7 will query whether DHCP servers exist in other parks through the VXLAN tunnel, and the specific query process may be: the VTEP7 sends query messages to other VTEPs through a VXLAN tunnel, and if any VTEP responds to the query messages, the fact that a DHCP server exists in the park where the VTEP responds is determined. In other embodiments, the DHCP server may be queried by other querying methods, which is not limited in the present invention. In another embodiment of the present invention, VTEP7 may send the address request information directly to the selected DHCP server if a VXLAN tunnel exists between VTEP7 and the DHCP servers.
In this embodiment, the VTEP7 inquires that DHCP servers exist in both campus 1 and campus 2, and the VTEP7 selects a DHCP1 server as a target DHCP server according to the load states of the DHCP1 server and the DHCP2 server. The VTEP7 then sends the address request information to the DHCP1 server through a VXLAN tunnel with the DHCP1 server. The subsequent steps are the same as VM1 and will not be described herein.
In summary, in the technical solution of the embodiment of the present invention, address request information is sent to a DHCP server according to a request of a client; receiving address response information from a DHCP server, wherein the address response information comprises an address and identification information which are allocated by the DHCP server aiming at the request information; the address and the identification information are sent to the client side and are synchronously sent to the second VTEP, so that the client side communicates with the second VTEP according to the address and the identification information, the same DHCP server can be shared among a plurality of parks, the resource utilization rate is effectively improved, the resource waste is prevented, and when the DHCP servers are respectively arranged in the parks, the problem that the access conflict occurs to the plurality of client sides which are allocated with the same address due to the fact that the plurality of DHCP servers allocate the same address can be prevented, and the reliability and the user experience of communication among the parks are further improved.
Based on the same inventive concept as the method, the embodiment of the invention also provides an address allocation device, which is applied to the first VTEP. The address allocation means may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical means, the device is formed by reading corresponding computer program instructions in the nonvolatile memory through the processor of the routing device where the device is located. In terms of hardware, besides the processor and the nonvolatile memory, the routing device may also include other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing packets; in terms of hardware structure, the routing device may also be a distributed device, and may include a plurality of interface cards, so as to perform packet processing extension at a hardware level.
Referring to fig. 3, a block diagram of an address allocating apparatus according to an embodiment of the present invention is shown, which may specifically include the following modules:
the sending module 301 is configured to send address request information to a DHCP server according to a request of a client.
A receiving module 302, configured to receive address response information from the DHCP server, where the address response information includes an address and identification information allocated by the DHCP server for the request information.
And a synchronization module 303, configured to send the address and the identification information to the client, and synchronize to the second VTEP, so that the client communicates with the second VTEP according to the address and the identification information.
Referring to fig. 4, in an embodiment of the present invention, on the basis of fig. 3, the apparatus may further include:
the querying module 304 is configured to query whether a DHCP server exists in the campus where the first VTEP is located.
Accordingly, the sending module 301 may be further configured to send the address request information to the DHCP server if the querying module 304 queries that the DHCP server exists. And if the query module 304 queries that no DHCP server exists, selecting a target DHCP server from DHCP servers in other parks, and sending the address request information to the target DHCP server.
In an embodiment of the present invention, the sending module may be further configured to, when the querying module 304 queries that no DHCP server exists in the campus where the first VTEP is located, select a target DHCP server according to a load state of DHCP servers in other campuses.
With continued reference to fig. 4, in a preferred embodiment of the present invention, the apparatus may further comprise:
a writing module 305, configured to write the address and the identification information into a forwarding table entry stored locally.
Accordingly, the synchronizing module 303 is further configured to synchronize the forwarding table to the second VTEP through the VXLAN tunnel between the first VTEP and the second VTEP, so that the second VTEP communicates with the client according to the forwarding table.
The embodiment of the invention also provides an address allocation device which is applied to the DHCP server. The address allocation means may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical means, the device is formed by reading corresponding computer program instructions in the nonvolatile memory through the processor of the routing device where the device is located. In terms of hardware, besides the processor and the nonvolatile memory, the routing device may also include other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing packets; in terms of hardware structure, the routing device may also be a distributed device, and may include a plurality of interface cards, so as to perform packet processing extension at a hardware level.
Referring to fig. 5, a block diagram of an address allocating apparatus according to an embodiment of the present invention is shown, which may specifically include the following modules:
a receiving module 501, configured to receive address request information from a first extensible virtual local area network VXLAN tunnel termination node VTEP, where the request information carries specific information.
The determining module 502 is configured to obtain the specific information, determine target identification information corresponding to the specific information by retrieving a corresponding relationship between the locally stored specific information and the identification information, and allocate an address to the client corresponding to the request information.
A sending module 503, configured to send the address and the target identification information to the first VTEP, so as to send the address and the target identification information to the client through the first VTEP, and synchronize to the second VTEP.
In a preferred embodiment of the present invention, the apparatus may further comprise:
and a forwarding module (not shown in the figure) for forwarding the address and the target identification information to other DHCP servers belonging to different parks with the DHCP server.
In a preferred embodiment of the present invention, the specific information acquired by the determining module 502 is tunnel identification information of a VXLAN tunnel between the first VTEP and the DHCP.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In summary, according to the technical scheme in the embodiment of the present invention, a plurality of parks can share the same DHCP server, so that resource utilization is effectively improved, resource waste is prevented, and when the plurality of parks are respectively provided with the DHCP servers, the problem that access conflicts occur among a plurality of clients to which the same address is allocated due to the fact that the plurality of DHCP servers allocate the same address to different clients can be prevented, and thus reliability of communication among the parks and user experience are improved.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The address allocation method and apparatus provided by the present invention are described in detail above, and the principle and the implementation manner of the present invention are explained in this document by applying specific examples, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. An address allocation method applied to a first tunnel termination node (VTEP) of a scalable virtual local area network (VXLAN), the method comprising:
sending address request information to a Dynamic Host Configuration Protocol (DHCP) server according to a request of a client; wherein, the address request information comprises specific information; the specific information comprises any one of MAC address information of the client, VXLAN tunnel identification information and an IP address of VTEP;
receiving address response information from the DHCP server, wherein the address response information comprises an address and identification information which are allocated by the DHCP server aiming at the request information; the identification information and the specific information have a corresponding relation; the identification information and the allocated address are used for uniquely identifying the client; the address response information is forwarded to other DHCP servers belonging to different parks by the DHCP server;
and sending the allocated address and the identification information to the client, and synchronizing to a second VTEP, so that the client communicates with the second VTEP according to the allocated address and the identification information.
2. The method according to claim 1, wherein the step of sending address request information to the DHCP server specifically includes:
inquiring whether a DHCP server exists in the park where the first VTEP is located;
if yes, the address request information is sent to the DHCP server;
if not, selecting a target DHCP server from DHCP servers in other parks, and sending the address request information to the target DHCP server.
3. The method of claim 2, wherein the step of selecting the target DHCP server from among DHCP servers on other parks further comprises:
and if the DHCP server does not exist in the park where the first VTEP is inquired, selecting the target DHCP server according to the load state of the DHCP servers in other parks.
4. The method of claim 1, wherein after the step of receiving the address response information from the DHCP server, further comprising:
writing the distributed address and the identification information into a forwarding table entry stored locally;
correspondingly, the step of sending the allocated address and the identification information to the client and synchronizing to the second VTEP includes:
and synchronizing the forwarding table entry to a second VTEP through a VXLAN tunnel between the first VTEP and the second VTEP so that the second VTEP can communicate with the client according to the forwarding table entry.
5. An address allocation method, applied to a Dynamic Host Configuration Protocol (DHCP) server, the method comprising:
receiving address request information from a first extensible virtual local area network VXLAN tunnel terminal node VTEP, wherein the request information carries specific information; the specific information comprises any one of MAC address information of the client, VXLAN tunnel identification information and an IP address of VTEP;
acquiring the specific information, determining target identification information corresponding to the specific information by retrieving the corresponding relation between the locally stored specific information and the identification information, and allocating an address to a client corresponding to the request information; the target identification information and the allocated address are used for uniquely identifying the client;
sending the allocated address and the target identification information to the first VTEP, sending the allocated address and the target identification information to the client through the first VTEP, and synchronizing to a second VTEP;
the method further comprises:
and forwarding the allocated address and the target identification information to other DHCP servers belonging to different parks with the DHCP server.
6. The method of claim 5, wherein the specific information is tunnel identification information of a VXLAN tunnel between the first VTEP and the DHCP.
7. An address assignment apparatus applied to a first tunnel termination node, VTEP, of a VXLAN, a scalable virtual local area network, the apparatus comprising:
the sending module is used for sending address request information to a Dynamic Host Configuration Protocol (DHCP) server according to a request of a client; wherein, the address request information comprises specific information; the specific information comprises any one of MAC address information of the client, VXLAN tunnel identification information and an IP address of VTEP;
a receiving module, configured to receive address response information from the DHCP server, where the address response information includes an address and identification information allocated by the DHCP server for the request information; the identification information and the specific information have a corresponding relation; the identification information and the allocated address are used for uniquely identifying the client; the address response information is forwarded to other DHCP servers belonging to different parks by the DHCP server;
and the synchronization module is used for sending the allocated address and the identification information to the client and synchronizing the client to a second VTEP so that the client communicates with the second VTEP according to the allocated address and the identification information.
8. The apparatus of claim 7, further comprising:
the query module is used for querying whether a DHCP server exists in the park where the first VTEP is located;
correspondingly, the sending module is further configured to send the address request information to the DHCP server when the querying module queries that the DHCP server exists; and the number of the first and second groups,
and when the inquiry module inquires that the DHCP server does not exist, selecting a target DHCP server from the DHCP servers in other parks, and sending the address request information to the target DHCP server.
9. The apparatus of claim 8, wherein the sending module is further configured to select the target DHCP server according to a load status of DHCP servers in other campuses if the querying module queries that the DHCP server does not exist in the campus where the first VTEP is located.
10. The apparatus of claim 7, further comprising:
a write-in module, configured to write the allocated address and the identification information into a forwarding table entry stored locally;
correspondingly, the synchronization module is further configured to synchronize the forwarding table to the second VTEP through the VXLAN tunnel between the first VTEP and the second VTEP, so that the second VTEP communicates with the client according to the forwarding table.
11. An address allocation apparatus, applied to a Dynamic Host Configuration Protocol (DHCP) server, the apparatus comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving address request information from a first extensible virtual local area network VXLAN tunnel terminal node VTEP, and the request information carries specific information; the specific information comprises any one of MAC address information of the client, VXLAN tunnel identification information and an IP address of VTEP;
the determining module is used for acquiring the specific information, determining target identification information corresponding to the specific information by retrieving the corresponding relation between the locally stored specific information and the identification information, and allocating an address to the client corresponding to the request information; the identification information and the allocated address are used for uniquely identifying the client;
a sending module, configured to send the allocated address and the target identification information to the first VTEP, so as to send the allocated address and the target identification information to the client through the first VTEP, and synchronize to a second VTEP;
the apparatus further comprises:
and the forwarding module is used for forwarding the allocated address and the target identification information to other DHCP servers belonging to different parks with the DHCP server.
12. The apparatus of claim 11, wherein the specific information obtained by the determining module is tunnel identification information of a VXLAN tunnel between the first VTEP and the DHCP.
CN201610854328.9A 2016-09-27 2016-09-27 Address allocation method and device Active CN106302861B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610854328.9A CN106302861B (en) 2016-09-27 2016-09-27 Address allocation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610854328.9A CN106302861B (en) 2016-09-27 2016-09-27 Address allocation method and device

Publications (2)

Publication Number Publication Date
CN106302861A CN106302861A (en) 2017-01-04
CN106302861B true CN106302861B (en) 2020-04-17

Family

ID=57715388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610854328.9A Active CN106302861B (en) 2016-09-27 2016-09-27 Address allocation method and device

Country Status (1)

Country Link
CN (1) CN106302861B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547351B (en) * 2017-08-11 2020-07-07 新华三技术有限公司 Address allocation method and device
CN109831541B (en) * 2017-11-23 2022-02-22 中国电信股份有限公司 Equipment address allocation method, system and related equipment
CN108616456A (en) * 2018-03-20 2018-10-02 北京优帆科技有限公司 A kind of load-balancing method and load equalizer based on VXLAN
CN114697400A (en) * 2022-04-13 2022-07-01 中国电信股份有限公司 Service scheduling method, system and VTEP

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685270A (en) * 2012-05-25 2012-09-19 杭州华三通信技术有限公司 Method and equipment for distributing dynamic addresses
CN104378455A (en) * 2014-11-13 2015-02-25 杭州华三通信技术有限公司 IP address distribution method and device
EP3018864A1 (en) * 2013-09-12 2016-05-11 Mitsubishi Electric Corporation Ip address distribution system, switch apparatus and ip address distribution method
CN105763671A (en) * 2016-04-27 2016-07-13 杭州华三通信技术有限公司 IP address distribution method and apparatus

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101116303A (en) * 2005-02-03 2008-01-30 西门子公司 Method for routing internet connections via network gateways
CN101009635A (en) * 2006-01-27 2007-08-01 上海贝尔阿尔卡特股份有限公司 A message forwarding method for the dynamic host configuration protocol and its network device
US9374294B1 (en) * 2013-11-05 2016-06-21 Cisco Technology, Inc. On-demand learning in overlay networks
CN104104747B (en) * 2014-07-28 2017-08-08 新华三技术有限公司 Message transmitting method and device
CN104283980B (en) * 2014-10-09 2018-02-09 新华三技术有限公司 A kind of address resolution protocol pickup method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685270A (en) * 2012-05-25 2012-09-19 杭州华三通信技术有限公司 Method and equipment for distributing dynamic addresses
EP3018864A1 (en) * 2013-09-12 2016-05-11 Mitsubishi Electric Corporation Ip address distribution system, switch apparatus and ip address distribution method
CN104378455A (en) * 2014-11-13 2015-02-25 杭州华三通信技术有限公司 IP address distribution method and device
CN105763671A (en) * 2016-04-27 2016-07-13 杭州华三通信技术有限公司 IP address distribution method and apparatus

Also Published As

Publication number Publication date
CN106302861A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN108924268B (en) Container cloud service system and pod creation method and device
CN106302861B (en) Address allocation method and device
US9003002B2 (en) Efficient port management for a distributed network address translation
CN106453681B (en) IP address allocation method and device
EP3451592B1 (en) Packet transmission between vxlan domains
CN108737224B (en) Message processing method and device based on micro-service architecture
US9584481B2 (en) Host providing system and communication control method
CN104378455A (en) IP address distribution method and device
CN106878480B (en) DHCP service process sharing method and device
CN108429824B (en) Address allocation method and device
CN102143247A (en) Method for allocating and configuring address, address allocation server and host machine
CN107087041B (en) Method and device for statically binding IP address to DHCP client
CN108259218B (en) IP address allocation method and device
CN110769075B (en) Container communication method, system, controller and computer readable storage medium
CN111130838A (en) Method and device for dynamic expansion of process-level service instance and network bandwidth limitation
JP2020521398A (en) Transfer and control separation of CGN
CN105472048A (en) Address allocating method, information aggregation method and related equipment
CN111585887A (en) Communication method and device based on multiple networks, electronic equipment and storage medium
CN107547675B (en) User equipment migration method and device
CN107517129B (en) Method and device for configuring uplink interface of equipment based on OpenStack
WO2018161795A1 (en) Routing priority configuration method, device, and controller
CN104780232A (en) A resource allocating method, controller and system
CN106878052B (en) User migration method and device
CN107547247B (en) IP address allocation method and device for three-layer management network in intelligent elastic architecture
CN106878479B (en) Address allocation method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou science and Technology Development Zone, Zhejiang high tech park, No. six and road, No. 310

Applicant before: Huasan Communication Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant