CN111405078A - Method, terminal and server for allocating IP address - Google Patents

Method, terminal and server for allocating IP address Download PDF

Info

Publication number
CN111405078A
CN111405078A CN202010147983.7A CN202010147983A CN111405078A CN 111405078 A CN111405078 A CN 111405078A CN 202010147983 A CN202010147983 A CN 202010147983A CN 111405078 A CN111405078 A CN 111405078A
Authority
CN
China
Prior art keywords
terminal
bmc
dhcp
allocation
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010147983.7A
Other languages
Chinese (zh)
Inventor
余文杰
施小辉
李天河
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202010147983.7A priority Critical patent/CN111405078A/en
Publication of CN111405078A publication Critical patent/CN111405078A/en
Pending legal-status Critical Current

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/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables

Abstract

The invention discloses a method, a terminal and a server for allocating IP addresses.A DHCP server receives a DHCP DISCOVER data packet sent by the terminal, wherein the DHCP DISCOVER data packet carries a terminal identifier for uniquely identifying the terminal; reading a terminal identifier in a DHCP DISCOVER data packet, and distributing BMC IP according to the terminal identifier; and after the allocation is finished, feeding back the allocated BMC IP. Therefore, the invention can distribute the BMC IP to the terminal in batch and large scale according to the terminal identification.

Description

Method, terminal and server for allocating IP address
Technical Field
The present invention relates to the technical field of IP configuration, and in particular, to a method, a terminal, and a server for allocating an IP address.
Background
A Baseboard Management Controller (BMC) is a dedicated microcontroller embedded in a server motherboard, and supports an Intelligent Platform Management Interface (IPMI). The current batch server BMC IP configuration schemes mainly include two types: one is static configuration of BMC IP by administrator one by one; another method is that an administrator sets up a Dynamic Host Configuration Protocol (DHCP) to configure the BMC IP in bulk.
However, the scheme for statically configuring the BMC IP address is inefficient, and is difficult to cope with the situation of large-scale BMC configuration of the data center; for the scheme of dynamically configuring the BMC IP address by the DHCP, since the DHCP randomly allocates an IP from the IP address pool to the BMC, the DHCP server can only see the mapping relationship between the BMC MAC address and the IP, which makes it difficult for an administrator to intuitively know the correspondence between the server and the BMC IP.
Disclosure of Invention
The embodiment of the invention provides a method, a terminal and a server for allocating an IP address, aiming at solving the problems of the existing BMC IP configuration scheme.
According to a first aspect of the present invention, there is provided a method for allocating an IP address, which is applied to a DHCP server, the method including: receiving a DHCP DISCOVER data packet, wherein the DHCP DISCOVER data packet carries a terminal identifier for uniquely identifying a terminal; reading a terminal identifier in the DHCP DISCOVER data packet; distributing BMCIP according to the terminal identification; and after the allocation is finished, feeding back the allocated BMC IP.
According to an embodiment of the invention, the method further comprises: and after the allocation is finished, recording the mapping relation table of the terminal identification and the allocated BMC IP.
According to an embodiment of the present invention, the allocating the BMC IP according to the terminal identifier includes: determining whether the distribution mode is from a predefined address mapping table or not according to the configuration file; if the determined distribution mode is distribution from a predefined address mapping table, the BMC IP is distributed from the predefined address mapping table according to the terminal identification.
According to an embodiment of the invention, the method further comprises: and if the determined distribution mode is not the distribution from the predefined address mapping table, carrying out the random distribution of the BMC IP according to the terminal identification.
According to a second aspect of the present invention, there is also provided a method for allocating an IP address, which is applied to a terminal, where a DHCP client is installed on the terminal, and the method includes: reading a terminal identifier through the DHCP client; sending a DHCP DISCOVER data packet, wherein the DHCP DISCOVER data packet carries the terminal identification so as to indicate that the BMC IP is allocated according to the terminal identification; an assigned BMC IP is received.
According to a third aspect of the present invention, there is provided a DHCP server, comprising: the receiving module is used for receiving a DHCP DISCOVER data packet, and the DHCP DISCOVER data packet carries a terminal identifier; a reading module, configured to read a terminal identifier in the DHCP DISCOVER packet; the IP allocation module is used for allocating BMC IP according to the terminal identification; and the sending module is used for feeding back the allocated BMC IP after the allocation is finished by the IP allocation module.
According to an embodiment of the present invention, the server further includes: and the recording module is used for recording the mapping relation table of the terminal identification and the allocated BMC IP after the IP allocation module finishes allocation.
According to an embodiment of the present invention, the IP allocation module is specifically configured to determine whether an allocation manner is to be allocated from a predefined address mapping table according to a configuration file; if the determined distribution mode is distribution from a predefined address mapping table, the BMC IP is distributed from the predefined address mapping table according to the terminal identification.
According to an embodiment of the present invention, the IP allocation module is further configured to perform a random allocation of the BMC IP according to the terminal identifier if it is determined that the allocation manner is not allocated from a predefined address mapping table.
According to a fourth aspect of the present invention, there is provided a terminal, where a DHCP client is installed on the terminal, and the terminal includes: the reading module is used for reading the terminal identification through the DHCP client; a sending module, configured to send a DHCP DISCOVER packet, where the DHCP DISCOVER packet carries the terminal identifier, so as to indicate that BMC IP is allocated according to the terminal identifier; and the receiving module is used for receiving the allocated BMC IP.
The method, the terminal and the server for allocating the IP address in the embodiment of the invention are characterized in that firstly, a DHCP DISCOVER data packet sent by the terminal is received by a DHCP DISCOVER server, and the DHCP DISCOVER data packet carries a terminal identification for uniquely identifying the terminal; reading a terminal identifier in a DHCP DISCOVER data packet, and distributing BMC IP according to the terminal identifier; and after the allocation is finished, feeding back the allocated BMC IP. Therefore, the method can distribute the BMCIP to the terminal in batches and in a large scale according to the terminal identification. Further, after the allocation is completed, the DHCP server records the terminal identifier and the mapping relationship table of the allocated BMC IP in real time, so that an administrator can clearly acquire and view the allocation condition of the BMC IP.
It is to be understood that the teachings of the present invention need not achieve all of the above-described benefits, but rather that specific embodiments may achieve specific technical results, and that other embodiments of the present invention may achieve benefits not mentioned above.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
FIG. 1 is a schematic diagram of system interaction for assigning IP addresses according to an embodiment of the present invention;
fig. 2 is a first flowchart illustrating an implementation flow of a method for allocating an IP address according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating an implementation of a method for allocating IP addresses according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a format of a DHCP DISCOVER packet according to an embodiment of the present invention;
FIG. 5 is a system architecture diagram illustrating assignment of IP addresses according to yet another embodiment of the present invention;
FIG. 6 illustrates a table of mappings of the application instance server specific attributes and the assigned BMC IP of FIG. 5;
fig. 7 is a schematic diagram illustrating a flow chart of implementing the method for allocating an IP address according to the embodiment of the present invention;
FIG. 8 is a diagram illustrating a structure of a DHCP server according to an embodiment of the present invention;
fig. 9 is a schematic diagram illustrating a configuration of a terminal according to an embodiment of the present invention.
Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given only to enable those skilled in the art to better understand and to implement the present invention, and do not limit the scope of the present invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
Fig. 1 is a schematic diagram illustrating interaction of a system for allocating an IP address according to an embodiment of the present invention.
Referring to fig. 1, a system for allocating an IP address according to an embodiment of the present invention includes a DHCP Server (DHCP Server) and a DHCP Client (DHCP Client); firstly, after reading a terminal identifier from uefi, a DHCP client sends a DHCP DISCOVER data packet with the terminal identifier to a DHCP server; secondly, the DHCP server reads the terminal identification in the DHCP DISCOVER data packet and allocates BMC IP according to the terminal identification, wherein the DHCP server determines whether to allocate BMC IP from a predefined address mapping table or randomly according to a switch in a configuration file; after the allocation is completed, the DHCP server feeds back the allocated BMC IP to the DHCP client. In addition, after the allocation is finished, the DHCP server also records the mapping relation table of the terminal identification and the BMC IP in real time.
The terminal identifier belongs to identification information for uniquely identifying the terminal. The terminal identification may be, for example, a server-specific attribute predefined by the server for the batch of terminals, such as predefined location information. For example, host a, host B, and host C correspond to server specific attribute 1 cabinet 19U, 2 cabinet 7U, and 2 cabinet 21U, respectively. The terminal identifier may also be a physical characteristic of the terminal itself, such as a model, a product number when leaving a factory, and the like.
Fig. 2 is a first flowchart illustrating an implementation flow of a method for allocating an IP address according to an embodiment of the present invention; FIG. 3 is a flow chart illustrating an implementation of a method for allocating IP addresses according to an embodiment of the present invention; FIG. 4 is a diagram illustrating a format of a DHCPDISCOVER packet according to an embodiment of the present invention; FIG. 5 is a system architecture diagram illustrating assignment of IP addresses according to yet another embodiment of the present invention; FIG. 6 illustrates a table of mappings of the application instance server specific attributes and assigned BMC IP of FIG. 5.
Referring to fig. 2, the method for allocating an IP address by a DHCP server according to an embodiment of the present invention includes: operation 101, receiving a DHCPDISCOVER packet; operation 102, reading a terminal identifier in a DHCP DISCOVER packet; operation 103, allocating BMC IP according to the terminal identifier; and operation 104, after the allocation is completed, feeding back the allocated BMC IP.
In operation 101, the DHCP DISCOVER packet carries a terminal identifier for uniquely identifying the terminal. Referring to fig. 3, after the terminal reads the terminal identifier from the uefi through the DHCP client, the DHCP DISCOVER packet with the terminal identifier is sent to the DHCP server, so that the terminal server receives the DHCPDISCOVER packet with the terminal identifier for uniquely identifying the terminal.
The terminal identifier belongs to identification information for uniquely identifying the terminal. The terminal identification may be, for example, a server-specific attribute predefined by the server for the batch of terminals, such as predefined location information. For example, host a, host B, and host C correspond to server specific attribute 1 cabinet 19U, 2 cabinet 7U, and 2 cabinet 21U, respectively. The terminal identifier may also be a physical characteristic of the terminal itself, such as a model, a product number when leaving a factory, and the like.
Here, the format of the DHCP DISCOVER packet carrying the terminal identifier for uniquely identifying the terminal is as shown in fig. 4. Wherein, op: the type of operation of the message. The request message value is 1, and the response message value is 2; htype: the type of network hardware. The value is 1, the type of the Ethernet MAC address is represented; hlen: the hardware address length. The length of the Ethernet MAC address is 6 bytes, namely the hlen value is 6; and (4) hops: hop count, the number of relays through which the DHCP message passes, the field will be increased by 1 each time it passes through one router, if it does not pass through the router, the value is 0 (in the same network); xid: the transaction ID. The random number selected when the client initiates a request is used for identifying a primary address request process; secs: the time elapsed by the DHCP client from the acquisition of the IP address or the provisioning process to the present time is in seconds. This field is always 0 until no IP address is obtained; flags: the BOOTP flag bit is used for identifying whether the DHCP server response message is sent by unicast or broadcast. Wherein, ciaddr: the IP address of the DHCP client is only displayed in an ACK message sent by the DHCP server, and is displayed as 0 in other messages; yiaddr: the IP address allocated to the client by the DHCP server is only displayed in the Offer and ACK message sent by the DHCP server, and other messages are displayed as 0; siaddr: allocating other DHCP server IP addresses of information such as IP addresses to the DHCP client, and displaying the IP addresses only in the DHCPOffer and DHCP ACK messages, wherein the IP addresses are displayed as 0 in other messages; giaddr: forwarding proxy (gateway) IP address, the IP address of the first DHCP relay passed by the DHCP client after sending the request message, if not, displaying as 0; chaddr: the MAC address of the DHCP client is displayed in each message, and the MAC address of the corresponding DHCP client is displayed in each message; and (5) name: allocating server names of IP addresses for the client, only displaying the DHCP server names of the sent messages in the DHCP Offer messages and the DHCP ACK messages, and displaying other messages as 0; file: the DHCP server displays the name and the path information of the starting configuration file appointed by the DHCP client only in the DHCP Offer message, and displays the starting configuration file name and the path information in other messages as null; options: the option is selectable in the format "code + length + data".
In operation 102-103, the DHCP server reads the terminal identifier in the DHCP DISCOVER packet, and performs BMC IP allocation according to the terminal identifier.
Specifically, in operation 103, referring to fig. 3, specifically includes: determining whether the distribution mode is from a predefined address mapping table or not according to the configuration file; if the determined distribution mode is to distribute from a predefined address mapping table, distributing the BMC IP from the predefined address mapping table according to the terminal identifier; and if the determined distribution mode is not the distribution from the predefined address mapping table, randomly distributing the BMC IP according to the terminal identification. The predefined address mapping table at least includes related information of selectable BMC IP corresponding to each terminal identifier.
In operation 104, after the DHCP server completes the allocation, the allocated BMC IP is fed back to the terminal.
In an implementation manner, as shown in fig. 3, the method according to the embodiment of the present invention further includes: and operation 105, after the allocation is completed, recording the mapping relationship table between the terminal identifier and the allocated BMC IP.
In an application example, referring to fig. 5 and 6, three terminals, host a, host B and host C, allocate BMC IP through a DHCP server. The server specific attributes (i.e., predefined location information) as the terminal identifiers of the host a, the host B, and the host C are 1 cabinet 19U, 2 cabinet 7U, and 2 cabinet 21U, respectively. The DHCP server allocates the BMC IPs 192.168.10.2, 192.168.10.3, and 192.168.10.4 to the three terminals according to 1 cabinet 19U, 2 cabinet 7U, and 2 cabinet 21U, respectively, and records a mapping relationship table between the server specific attribute and the BMC IP as shown in fig. 6.
The method for allocating the IP address comprises the steps that firstly, a DHCP server receives a DHCPDISCOVER data packet sent by a terminal, and the DHCP DISCOVER data packet carries a terminal identification for uniquely identifying the terminal; reading a terminal identifier in a DHCP DISCOVER data packet, and distributing BMC IP according to the terminal identifier; and after the allocation is finished, feeding back the allocated BMC IP. Therefore, the invention can distribute the BMC IP to the terminal in batch and large scale according to the terminal identification. Further, after the allocation is completed, the DHCP server records the terminal identifier and the mapping relationship table of the allocated BMC IP in real time, so that an administrator can clearly acquire and view the allocation condition of the BMC IP.
Fig. 7 is a schematic diagram illustrating an implementation flow of the method for allocating an IP address according to the embodiment of the present invention.
Referring to fig. 7, the method for allocating an IP address by a terminal according to the embodiment of the present invention includes: operation 201, reading a terminal identifier through a DHCP client; operation 202, sending a DHCP DISCOVER packet, where the DHCP DISCOVER packet carries the terminal identifier to indicate that BMC IP is allocated according to the terminal identifier; at operation 203, an assigned BMC IP is received.
In operation 201-202, referring to fig. 3, after the terminal reads the terminal identifier from the uefi through the DHCP client, the terminal sends a DHCP DISCOVER packet with the terminal identifier to the DHCP server, so that the terminal server receives the DHCP DISCOVER packet with the terminal identifier for uniquely identifying the terminal.
The terminal identifier belongs to identification information for uniquely identifying the terminal. The terminal identification may be, for example, a server-specific attribute predefined by the server for the batch of terminals, such as predefined location information. For example, host a, host B, and host C correspond to server specific attribute 1 cabinet 19U, 2 cabinet 7U, and 2 cabinet 21U, respectively. The terminal identifier may also be a physical characteristic of the terminal itself, such as a model, a product number when leaving a factory, and the like.
In operation 203, the terminal receives a BMC IP fed back by the DHCP server after completion of BMC IP allocation.
Therefore, after the terminal identification is read from the uefi through the DHCP client side of the terminal, the DHCP DISCOVER data packet with the terminal identification is sent to the DHCP server, so that the DHCP server can distribute BMC IP for the terminal in batches and on a large scale according to the terminal identification.
Further, based on the method for allocating an IP address shown in fig. 2, an embodiment of the present invention further provides a DHCP server, and as shown in fig. 8, the DHCP server 80 includes: a receiving module 801, configured to receive a DHCP DISCOVER packet, where the DHCP DISCOVER packet carries a terminal identifier; a reading module 802, configured to read a terminal identifier in a DHCP DISCOVER packet; an IP allocation module 803, configured to allocate BMC IP according to the terminal identifier; and a sending module 804, configured to feed back the allocated BMC IP after the allocation is completed by the IP allocation module.
According to an embodiment of the present invention, as shown in fig. 8, the server 80 further includes: the recording module 805 is configured to record the mapping relationship table between the terminal identifier and the allocated BMC IP after the allocation is completed by the IP allocation module.
According to an embodiment of the present invention, the IP allocating module 803 is specifically configured to determine whether an allocation manner is to be allocated from a predefined address mapping table according to a configuration file; if the determined distribution mode is distribution from a predefined address mapping table, the BMC IP is distributed from the predefined address mapping table according to the terminal identification.
According to an embodiment of the present invention, the IP allocating module 803 is further configured to perform a random allocation of the BMC IP according to the terminal identifier if it is determined that the allocation manner is not allocated from a predefined address mapping table.
Here, it should be noted that: the above description of the DHCP server embodiment is similar to the description of the method embodiments shown in fig. 2 to 6, and has similar beneficial effects to the method embodiments shown in fig. 2 to 6, and therefore, the description is omitted. For technical details that are not disclosed in the DHCP server embodiment of the present invention, please refer to the description of the method embodiments shown in fig. 2 to 6 of the present invention for understanding, and therefore, for brevity, will not be described again.
Similarly, based on the method for allocating an IP address shown in fig. 7, an embodiment of the present invention further provides a terminal, and as shown in fig. 9, a DHCP client is installed on the terminal, where the terminal 90 includes: a reading module 901, configured to read a terminal identifier through a DHCP client; a sending module 902, configured to send a DHCP DISCOVER packet, where the DHCP DISCOVER packet carries the terminal identifier, so as to indicate that BMC IP is allocated according to the terminal identifier; a receiving module 903, configured to receive the allocated BMC IP.
Here, it should be noted that: the above description of the terminal embodiment is similar to the description of the method embodiment shown in fig. 7, and has similar beneficial effects to the method embodiment shown in fig. 7, and therefore, the description is omitted here for brevity. For technical details that are not disclosed in the terminal embodiment of the present invention, please refer to the description of the method embodiment shown in fig. 6 of the present invention for understanding, and therefore, for brevity, will not be described again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. 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 apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for allocating IP addresses, which is applied to a Dynamic Host Configuration Protocol (DHCP) server, and comprises the following steps:
receiving a DHCP DISCOVER data packet, wherein the DHCP DISCOVER data packet carries a terminal identifier for uniquely identifying a terminal;
reading a terminal identifier in the DHCP DISCOVER data packet;
allocating BMC IP according to the terminal identification;
and after the allocation is finished, feeding back the allocated BMC IP.
2. The method of claim 1, further comprising:
and after the allocation is finished, recording the mapping relation table of the terminal identification and the allocated BMC IP.
3. The method according to claim 1 or 2, wherein the allocating the BMC IP according to the terminal identifier comprises:
determining whether the distribution mode is from a predefined address mapping table or not according to the configuration file;
if the determined distribution mode is distribution from a predefined address mapping table, the BMC IP is distributed from the predefined address mapping table according to the terminal identification.
4. The method of claim 3, further comprising:
and if the distribution mode is determined not to be the distribution from the predefined address mapping table, carrying out the random distribution of the BMCIP according to the terminal identification.
5. A method for allocating IP addresses is applied to a terminal, a Dynamic Host Configuration Protocol (DHCP) client is installed on the terminal, and the method comprises the following steps:
reading a terminal identifier through the DHCP client;
sending a DHCP DISCOVER data packet, wherein the DHCP DISCOVER data packet carries the terminal identification so as to indicate that the allocation of BMC IP is carried out according to the terminal identification;
an assigned BMC IP is received.
6. A dynamic host configuration protocol, DHCP, server, the server comprising:
the receiving module is used for receiving a DHCP DISCOVER data packet, and the DHCP DISCOVER data packet carries a terminal identifier;
a reading module, configured to read a terminal identifier in the DHCP DISCOVER packet;
the IP allocation module is used for allocating BMC IP according to the terminal identification;
and the sending module is used for feeding back the allocated BMC IP after the allocation is finished by the IP allocation module.
7. The server of claim 6, further comprising:
and the recording module is used for recording the mapping relation table of the terminal identification and the allocated BMC IP after the IP allocation module finishes allocation.
8. The server according to claim 6 or 7,
the IP distribution module is specifically used for determining whether the distribution mode is distributed from a predefined address mapping table according to the configuration file; if the determined distribution mode is distribution from a predefined address mapping table, the BMC IP is distributed from the predefined address mapping table according to the terminal identification.
9. The server according to claim 8,
the IP allocation module is further used for randomly allocating the BMC IP according to the terminal identifier if the allocation mode is determined not to be allocated from a predefined address mapping table.
10. A terminal is characterized in that a Dynamic Host Configuration Protocol (DHCP) client is installed on the terminal, and the terminal comprises:
the reading module is used for reading the terminal identification through the DHCP client;
a sending module, configured to send a DHCP DISCOVER packet, where the DHCP DISCOVER packet carries the terminal identifier, so as to indicate that BMC IP is allocated according to the terminal identifier;
and the receiving module is used for receiving the allocated BMC IP.
CN202010147983.7A 2020-03-05 2020-03-05 Method, terminal and server for allocating IP address Pending CN111405078A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010147983.7A CN111405078A (en) 2020-03-05 2020-03-05 Method, terminal and server for allocating IP address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010147983.7A CN111405078A (en) 2020-03-05 2020-03-05 Method, terminal and server for allocating IP address

Publications (1)

Publication Number Publication Date
CN111405078A true CN111405078A (en) 2020-07-10

Family

ID=71413932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010147983.7A Pending CN111405078A (en) 2020-03-05 2020-03-05 Method, terminal and server for allocating IP address

Country Status (1)

Country Link
CN (1) CN111405078A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460174A (en) * 2022-08-11 2022-12-09 珠海惠威科技有限公司 Method and system for automatically allocating terminal IP static address

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150358233A1 (en) * 2013-01-22 2015-12-10 Hangzhou H3C Technologies Co., Ltd. Item aggregation in shortest path bridging mac-in-mac mode (spbm) network
CN105472048A (en) * 2014-07-14 2016-04-06 华为技术有限公司 Address allocating method, information aggregation method and related equipment
CN106254571A (en) * 2016-08-05 2016-12-21 杭州华三通信技术有限公司 A kind of client ip address distribution method and device
CN106357838A (en) * 2016-09-26 2017-01-25 杭州昆海信息技术有限公司 Method and device for distributing IP (Internet protocol) address
CN106453681A (en) * 2016-10-10 2017-02-22 杭州昆海信息技术有限公司 IP address allocation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150358233A1 (en) * 2013-01-22 2015-12-10 Hangzhou H3C Technologies Co., Ltd. Item aggregation in shortest path bridging mac-in-mac mode (spbm) network
CN105472048A (en) * 2014-07-14 2016-04-06 华为技术有限公司 Address allocating method, information aggregation method and related equipment
CN106254571A (en) * 2016-08-05 2016-12-21 杭州华三通信技术有限公司 A kind of client ip address distribution method and device
CN106357838A (en) * 2016-09-26 2017-01-25 杭州昆海信息技术有限公司 Method and device for distributing IP (Internet protocol) address
CN106453681A (en) * 2016-10-10 2017-02-22 杭州昆海信息技术有限公司 IP address allocation method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460174A (en) * 2022-08-11 2022-12-09 珠海惠威科技有限公司 Method and system for automatically allocating terminal IP static address

Similar Documents

Publication Publication Date Title
US6587455B1 (en) Automatic discovery of nodes associated with a virtual subnet
US7263559B2 (en) Method for preventing IP address cheating in dynamic address allocation
US7152099B1 (en) Friend configuration and method for network devices
US8631100B2 (en) Automatic assignment of hardware addresses within computer networks
CN100527752C (en) DHCP address allocation method
EP2052494B1 (en) Techniques for exchanging dhcp information among dhcp relay agents and dhcp servers
CN102075591A (en) Method, device and system for acquiring media access control address
US7568048B2 (en) Method, apparatus, and system for assigning an IP address on a network
US7962584B2 (en) Usage of host generating interface identifiers in DHCPv6
CN101159758B (en) Classification associated dynamic host machine configuring protocol option distribution method and device
CN106453681B (en) IP address allocation method and device
EP2888863B1 (en) Method and apparatus for configuring dhcp client
WO2014101891A1 (en) Method and device for configuring ip address
CN101729314A (en) Method and device for recovering dynamic table entries and dynamic host configuration protocol snoopingsnooping equipment
CN111405078A (en) Method, terminal and server for allocating IP address
WO2016202016A1 (en) Device management method, apparatus and system
CN102025797A (en) Address prefix processing method, device, system and network equipment
CN106878479B (en) Address allocation method and device
US10389681B2 (en) Auto discovery of network elements by defining new extension in DHCP options for management server IP addresses
CN114338383A (en) Simplified configuration method and system for video equipment
JP2002300166A (en) Method for automatically setting ip address and computer name
CN115333932B (en) Automatic networking method of server, storage medium and electronic equipment
KR100687746B1 (en) Method and apparatus for preventing collision of address
CN112104764B (en) Method and system for classifying DHCP (dynamic host configuration protocol) client
JPH11355303A (en) Computer identification system and its method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200710