IP address allocation method for master-slave network, apparatus, and system
AssigneeHuawei Technologies Co., Ltd.
InventorsChong Zhu, Xin Lv, Jun Yang
Life of this patent
Estimating the term…
Abstract
The present invention provides an IP address allocation method for a master-slave network, an apparatus, and a system. A master device generates an IP address sub-segment group, and separately sends at least one IP address sub-segment in the IP address sub-segment group to at least one slave device, so that the slave device can use a received IP address sub-segment as a DHCP server address and allocate an IP address to a user device. In this way, the slave device can directly allocate the IP address to the user device, so that an IP address allocation time is reduced.
Claims13
An Internet Protocol (IP) address allocation method for a master-slave network, wherein the master-slave network comprises a master device and at least one slave device in a management area of the master device, and the method comprises:
- generating, by the master device, an IP address sub-segment group, wherein the IP address sub-segment group comprises a plurality of IP address sub-segments, and each IP address sub-segment of the plurality of IP address sub-segments comprises at least one IP address, and wherein generating the IP address sub-segment group comprises:
- dividing an IP address segment into the plurality of IP address sub-segments, and
- grouping the plurality of IP address sub-segments into the IP address sub-segment group;
- separately sending, by the master device, at least one IP address sub-segment of the plurality of IP address sub-segments in the IP address sub-segment group to the at least one slave device, wherein the at least one IP address sub-segment is used as a Dynamic Host Configuration Protocol (DHCP) server address, on which an IP address is allocated to a user device based;
- sending, by the master device, a reclaiming message to the at least one slave device, wherein the reclaiming message is used for requesting the at least one slave device to return the IP address sub-segment required by the master device to the master device;
- and
- receiving, by the master device, a returning response message sent by the at least one slave device according to the reclaiming message, wherein the returning response message carries identifiers of all or some of IP address sub-segments that are required by the master device and returned by the at least one slave device, or the returning response message indicates that the at least one slave device does not have the IP address sub-segment required by the master device.
A master device, wherein the master device belongs to a master-slave network, the master-slave network comprises the master device and at least one slave device in a management area of the master device, and the master device comprises:
- at least one processor;
- a non-transitory computer-readable storage medium coupled to the at least one processor and storing programming instructions for execution by the at least one processor, the programming instructions instruct the at least one processor to generate an Internet Protocol (IP) address sub-segment group, wherein the IP address sub-segment group comprises a plurality of IP address sub-segments, and each IP address sub-segment of the plurality of IP address sub-segments comprises at least one IP address, and wherein generating the IP address sub-segment group comprises:
- dividing an IP address segment into the plurality of IP address sub-segments, and
- grouping the plurality of IP address sub-segments into the IP address sub-segment group;
- a transmitter, configured to:
- separately send at least one IP address sub-segment of the plurality of IP address sub-segments in the IP address sub-segment group to the at least one slave device, wherein the at least one IP address sub-segment is used as a Dynamic Host Configuration Protocol (DHCP) server address, on which an IP address is allocated to a user device based;
- and
- send a reclaiming message to the at least one slave device, wherein the reclaiming message is used for requesting the at least one slave device to return the IP address sub-segment required by the master device to the master device;
- and
- a receiver, configured to receive a returning response message sent by the at least one slave device according to the reclaiming message, wherein the returning response message carries identifiers of all or some of IP address sub-segments that are required by the master device and returned by the at least one slave device, or the returning response message indicates that the at least one slave device does not have the IP address sub-segment required by the master device.
A slave device, wherein the slave device belongs to a master-slave network, the master-slave network comprises a master device and at least one slave device in a management area of the master device, and the slave device comprises:
- a transmitter;
- a receiver, configured to:
- receive an IP address sub-segment of a plurality of IP address sub-segments in an IP address sub-segment group sent by the master device, wherein an IP address segment has been divided into the plurality of IP address sub-segments by the master device, and wherein the plurality of IP address sub-segments have been grouped into the IP address sub-segment group by the master device;
- at least one processor;
- and
- a non-transitory computer-readable storage medium coupled to the at least one processor and storing programming instructions for execution by the at least one processor, the programming instructions instruct the at least one processor to:
- use the IP address sub-segment of the plurality of IP address sub-segments as a Dynamic Host Configuration Protocol (DHCP) server address, wherein the IP address sub-segment comprises at least one IP address;
- and
- wherein the programming instructions instruct the at least one processor to allocate an IP address to a user device according to the DHCP server address;
- wherein the receiver is further configured to receive a reclaiming message sent by the master device, wherein the reclaiming message is used for requesting the slave device to return the IP address sub-segment required by the master device to the master device;
- wherein the programming instructions instruct the at least one processor to query whether the DHCP server address comprises the IP address sub-segment required by the master device;
- and
- wherein the transmitter is further configured to:
- send a returning response message to the master device in response to determining that the DHCP server address comprises all or some of IP address sub-segments required by the master device, wherein the returning response message carries identifiers of all or some of the IP address sub-segments that are comprised in the DHCP server address and required by the master device;
- or
- send a returning response message to the master device in response to determining that the DHCP server address does not comprise the IP address sub-segment required by the master device, wherein the returning response message notifies the master device that the slave device does not have the IP address sub-segment required by the master device.
Dependencies are inferred from the claim text.