[go: up one dir, main page]

CN114301876B - Address allocation method, system, device and computer-readable storage medium - Google Patents

Address allocation method, system, device and computer-readable storage medium Download PDF

Info

Publication number
CN114301876B
CN114301876B CN202111593889.5A CN202111593889A CN114301876B CN 114301876 B CN114301876 B CN 114301876B CN 202111593889 A CN202111593889 A CN 202111593889A CN 114301876 B CN114301876 B CN 114301876B
Authority
CN
China
Prior art keywords
address
allocated
preset
network card
allocation
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
CN202111593889.5A
Other languages
Chinese (zh)
Other versions
CN114301876A (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.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology 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 Shenzhen Skyworth Digital Technology Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN202111593889.5A priority Critical patent/CN114301876B/en
Publication of CN114301876A publication Critical patent/CN114301876A/en
Application granted granted Critical
Publication of CN114301876B publication Critical patent/CN114301876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Small-Scale Networks (AREA)

Abstract

本发明公开了一种地址分配方法,所述地址分配方法包括以下步骤:获取待分配网卡的地址分配请求;根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡;判断所述待分配地址是否被所述待分配网卡接受;若未被所述待分配网卡接受,则根据第一预设调整规则获得新的待分配地址,并执行步骤:判断所述待分配地址是否被所述待分配网卡接受。本发明还公开了一种系统、设备及计算机可读存储介质。本发明大幅降低了多网卡设备获取地址的失败率。

The invention discloses an address allocation method. The address allocation method includes the following steps: obtaining an address allocation request for a network card to be allocated; obtaining an address to be allocated according to the address allocation request and preset allocation rules, and assigning the address to be allocated. Allocate the address to the network card to be allocated; determine whether the address to be allocated is accepted by the network card to be allocated; if not accepted by the network card to be allocated, obtain a new address to be allocated according to the first preset adjustment rule, And perform the step of: determining whether the address to be allocated is accepted by the network card to be allocated. The invention also discloses a system, equipment and computer-readable storage medium. The invention greatly reduces the failure rate of multi-network card equipment in obtaining addresses.

Description

地址分配方法、系统、设备及计算机可读存储介质Address allocation method, system, device and computer-readable storage medium

技术领域Technical field

本发明涉及互联网技术领域,尤其涉及一种地址分配方法、系统、设备及计算机可读存储介质。The present invention relates to the field of Internet technology, and in particular, to an address allocation method, system, equipment and computer-readable storage medium.

背景技术Background technique

目前我们多网卡的设备很常见,例如电脑,一般默认配置会支持一个无线网卡,一个有线网卡;或者支持多插一个有线/无线网卡从单网卡变成多网卡。对于这种多网卡的设备,每个网卡都可能会分配获取或保留一个IP地址。因此,设备自己会对多网卡进行IP地址冲突检测,以免因为地址冲突而导致上网异常。而在现有的DHCP(Dynamic HostConfiguration Protocol,动态主机配置协议)地址分配策略下,则有可能会导致地址获取失败,从而不能上网。例如,在网卡1处于断网/网卡处于禁用状态时,网卡2向DHCP服务器请求分配地址时,由于网卡1处于断网/网卡处于禁用状态时,不会回应DHCP服务器的ARP探测请求,因此DHCP服务器会认为网卡1的地址未被占用,从而分配至网卡2,引发地址冲突,导致多网卡设备获取地址失败。At present, our devices with multiple network cards are very common, such as computers. Generally, the default configuration will support one wireless network card and one wired network card; or it can support plugging in an additional wired/wireless network card to change from a single network card to multiple network cards. For devices with multiple network cards, each network card may be assigned or reserved an IP address. Therefore, the device itself will perform IP address conflict detection on multiple network cards to avoid abnormal Internet access due to address conflicts. Under the existing DHCP (Dynamic HostConfiguration Protocol, Dynamic Host Configuration Protocol) address allocation strategy, it may cause address acquisition failure, and thus the Internet cannot be accessed. For example, when network card 1 is disconnected/the network card is disabled, and network card 2 requests the DHCP server to allocate an address, since network card 1 is disconnected/the network card is disabled, it will not respond to the DHCP server's ARP detection request, so DHCP The server will think that the address of network card 1 is not occupied and assign it to network card 2, causing an address conflict and causing multiple network card devices to fail to obtain addresses.

上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art.

发明内容Contents of the invention

本发明的主要目的在于提供一种地址分配方法,旨在解决多网卡设备因地址冲突而导致获取地址失败的技术问题。The main purpose of the present invention is to provide an address allocation method, aiming to solve the technical problem that multiple network card devices fail to obtain addresses due to address conflicts.

为实现上述目的,本发明提供一种地址分配方法,所述地址分配方法包括以下步骤:In order to achieve the above object, the present invention provides an address allocation method, which includes the following steps:

获取待分配网卡的地址分配请求;Obtain the address allocation request of the network card to be allocated;

根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡;Obtain the address to be allocated according to the address allocation request and the preset allocation rules, and allocate the address to be allocated to the network card to be allocated;

判断所述待分配地址是否被所述待分配网卡接受;Determine whether the address to be allocated is accepted by the network card to be allocated;

若未被所述待分配网卡接受,则根据第一预设调整规则获得新的待分配地址,并执行步骤:判断所述待分配地址是否被所述待分配网卡接受。If it is not accepted by the network card to be allocated, obtain a new address to be allocated according to the first preset adjustment rule, and perform the step of: determining whether the address to be allocated is accepted by the network card to be allocated.

优选地,所述预设分配规则包括预设生成规则和第二预设调整规则,所述根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡的步骤包括:Preferably, the preset allocation rules include a preset generation rule and a second preset adjustment rule, and the address to be allocated is obtained according to the address allocation request and the preset allocation rule, and the address to be allocated is allocated to The steps to allocate a network card include:

根据所述地址分配请求和预设生成规则,获得预选地址;Obtain a preselected address according to the address allocation request and preset generation rules;

判断所述预选地址是否被占用;Determine whether the preselected address is occupied;

若所述预选地址未被占用,则将所述预选地址作为待分配地址;If the preselected address is not occupied, use the preselected address as the address to be allocated;

若所述预选地址被占用,则根据第二预设调整规则,生成新的预选地址,并执行步骤:判断所述预选地址是否被占用。If the preselected address is occupied, a new preselected address is generated according to the second preset adjustment rule, and the step of determining whether the preselected address is occupied is performed.

优选地,所述地址分配请求包括待分配网卡的MAC地址,所述预设生成规则包括预设地址算法,所述根据所述地址分配请求和预设生成规则,获得预选地址的步骤包括:Preferably, the address allocation request includes the MAC address of the network card to be allocated, the preset generation rules include a preset address algorithm, and the step of obtaining the preselected address according to the address allocation request and the preset generation rules includes:

根据所述待分配网卡的MAC地址和预设地址算法,生成地址参数;Generate address parameters according to the MAC address of the network card to be allocated and the preset address algorithm;

根据所述预设地址池的地址信息和所述地址参数,生成预选地址。A preselected address is generated according to the address information of the preset address pool and the address parameters.

优选地,所述根据所述地址分配请求和预设生成规则,获得预选地址的步骤包括:Preferably, the step of obtaining the preselected address according to the address allocation request and preset generation rules includes:

接收到所述地址分配请求后,获取预设地址池的范围信息;After receiving the address allocation request, obtain range information of the preset address pool;

根据所述范围信息,选取所述预设地址池的起始地址作为预选地址。According to the range information, the starting address of the preset address pool is selected as the preselected address.

优选地,所述第二预设调整规则包括第二预设调整参数,所述根据第二预设调整规则,生成新的预选地址的步骤包括:Preferably, the second preset adjustment rule includes a second preset adjustment parameter, and the step of generating a new preselected address according to the second preset adjustment rule includes:

根据第二预设调整参数对所述预选地址进行调整,生成新的预选地址。The preselected address is adjusted according to the second preset adjustment parameter to generate a new preselected address.

优选地,所述第一预设调整规则包括第一预设调整参数,所述若未被所述待分配网卡接受,根据第一预设调整规则获得新的待分配地址的步骤包括:Preferably, the first preset adjustment rule includes a first preset adjustment parameter, and if it is not accepted by the network card to be assigned, the step of obtaining a new address to be assigned according to the first preset adjustment rule includes:

根据第一预设调整参数对所述待分配地址进行调整,生成新的待分配地址。The address to be allocated is adjusted according to the first preset adjustment parameter to generate a new address to be allocated.

优选地,所述判断所述待分配地址是否被所述待分配网卡接受的步骤包括:Preferably, the step of determining whether the address to be assigned is accepted by the network card to be assigned includes:

统计在预设时长内所述待分配网卡地址分配请求的发送次数;Count the number of times the network card address allocation request to be allocated is sent within the preset time period;

判断所述发送次数是否超过预设次数;Determine whether the number of sending times exceeds the preset number;

若超过预设次数,则判定所述待分配地址未被所述待分配网卡接受。If the preset number of times is exceeded, it is determined that the address to be allocated is not accepted by the network card to be allocated.

此外,为实现上述目的,本发明还提供一种地址分配系统,所述地址分配系统包括:In addition, to achieve the above objectives, the present invention also provides an address allocation system, which includes:

接收模块,用于获取待分配网卡的地址分配请求;The receiving module is used to obtain the address allocation request of the network card to be allocated;

分配模块,用于根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡;An allocation module, configured to obtain an address to be allocated based on the address allocation request and preset allocation rules, and allocate the address to be allocated to the network card to be allocated;

判断模块,用于判断所述待分配地址是否被所述待分配网卡接受;A judgment module, used to judge whether the address to be assigned is accepted by the network card to be assigned;

调整模块,用于若未被所述待分配网卡接受,则根据第一预设调整规则获得新的待分配地址,并执行步骤:判断所述待分配地址是否被所述待分配网卡接受。The adjustment module is configured to obtain a new address to be allocated according to the first preset adjustment rule if it is not accepted by the network card to be allocated, and perform the step of: judging whether the address to be allocated is accepted by the network card to be allocated.

此外,为实现上述目的,本发明还提供一种地址分配设备,所述地址分配设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的地址分配程序,所述地址分配程序被所述处理器执行时实现如上任一项所述的地址分配方法的步骤。In addition, to achieve the above object, the present invention also provides an address allocation device. The address allocation device includes: a memory, a processor, and an address allocation program stored on the memory and executable on the processor. When the address allocation program is executed by the processor, the steps of the address allocation method as described in any one of the above items are implemented.

此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有地址分配程序,所述地址分配程序被处理器执行时实现如上任一项所述的地址分配方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, an address allocation program is stored on the computer-readable storage medium, and when the address allocation program is executed by a processor, any of the above items are implemented. The steps of the address allocation method.

本发明提出的一种地址分配方法,可以通过获取待分配网卡通过对应的多网卡设备发出的地址分配请求。然后,根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡,其中,所述可分配地址为处于预设地址池范围内且未被占用的地址。所述预设分配规则可以是上述DHCP地址分配策略,也可以是其他获取待分配地址用于分配的方法。在将所述待分配地址分配至所述待分配网卡后,判断所述待分配地址是否被所述待分配网卡接受。若所述待分配地址未被所述待分配网卡接受,则根据第一预设调整规则获得新的待分配地址,所述新的待分配地址为并执行步骤:判断所述待分配地址是否被所述待分配网卡接受。直至所述待分配地址被所述待分配网卡接受,从而规避了在多网卡设备无法接受分配的地址的情况下,DHCP Server始终分配同一地址导致获取地址失败无法连接网络的情况,因而大幅降低了多网卡设备获取地址的失败率。An address allocation method proposed by the present invention can obtain the address allocation request sent by the network card to be allocated through the corresponding multi-network card device. Then, according to the address allocation request and the preset allocation rules, an address to be allocated is obtained, and the address to be allocated is allocated to the network card to be allocated, wherein the allocable address is within the range of the preset address pool and Unoccupied address. The preset allocation rule may be the above-mentioned DHCP address allocation policy, or may be other methods of obtaining addresses to be allocated for allocation. After the address to be allocated is allocated to the network card to be allocated, it is determined whether the address to be allocated is accepted by the network card to be allocated. If the address to be allocated is not accepted by the network card to be allocated, a new address to be allocated is obtained according to the first preset adjustment rule, and the new address to be allocated is and the step is executed: determine whether the address to be allocated is The network card to be assigned is accepted. Until the address to be allocated is accepted by the network card to be allocated, this avoids the situation where the DHCP Server always allocates the same address when multiple network card devices cannot accept the allocated address, resulting in failure to obtain the address and being unable to connect to the network, thus significantly reducing the cost. The failure rate of multi-network card devices in obtaining addresses.

附图说明Description of the drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to describe the embodiments. Obviously, for those of ordinary skill in the art, without exerting creative labor, Under the premise, other drawings can also be obtained based on these drawings.

图1为本发明地址分配方法第一实施例的流程示意图;Figure 1 is a schematic flow chart of the first embodiment of the address allocation method of the present invention;

图2为本发明地址分配方法第二实施例的流程示意图;Figure 2 is a schematic flow chart of the second embodiment of the address allocation method of the present invention;

图3为本发明实施例方案涉及的地址分配系统的示意图;Figure 3 is a schematic diagram of an address allocation system involved in an embodiment of the present invention;

图4是本发明实施例方案涉及的硬件运行环境的设备结构示意图。Figure 4 is a schematic diagram of the equipment structure of the hardware operating environment involved in the embodiment of the present invention.

本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。通过上述附图,已示出本申请明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本申请构思的范围,而是通过参考特定实施例为本领域技术人员说明本申请的概念。The realization of the purpose, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Through the above-mentioned drawings, clear embodiments of the present application have been shown, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present application's concepts in any way, but are intended to illustrate the application's concepts for those skilled in the art with reference to specific embodiments.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the appended claims.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素,此外,本申请不同实施例中具有同样命名的部件、特征、要素可能具有相同含义,也可能具有不同含义,其具体含义需以其在该具体实施例中的解释或者进一步结合该具体实施例中上下文进行确定。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, the application may be implemented differently. Components, features, and elements with the same names in the examples may have the same meaning or may have different meanings. Their specific meanings need to be determined based on their interpretation in the specific embodiment or further combined with the context of the specific embodiment.

应当理解,尽管在本文可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本文范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语"如果"可以被解释成为"在……时"或"当……时"或"响应于确定"。再者,如同在本文中所使用的,单数形式“一”、“一个”和“该”旨在也包括复数形式,除非上下文中有相反的指示。应当进一步理解,术语“包含”、“包括”表明存在所述的特征、步骤、操作、元件、组件、项目、种类、和/或组,但不排除一个或多个其他特征、步骤、操作、元件、组件、项目、种类、和/或组的存在、出现或添加。本申请使用的术语“或”、“和/或”、“包括以下至少一个”等可被解释为包括性的,或意味着任一个或任何组合。例如,“包括以下至少一个:A、B、C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A和B和C”,再如,“A、B或C”或者“A、B和/或C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A和B和C”。仅当元件、功能、步骤或操作的组合在某些方式下内在地互相排斥时,才会出现该定义的例外。It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this article, the first information may also be called second information, and similarly, the second information may also be called first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to determining." Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms "comprising" and "including" indicate the presence of stated features, steps, operations, elements, components, items, categories, and/or groups, but do not exclude one or more other features, steps, operations, The presence, occurrence, or addition of elements, components, items, categories, and/or groups. The terms "or", "and/or", "including at least one of the following", etc. used in this application may be interpreted as inclusive or mean any one or any combination. For example, "including at least one of the following: A, B, C" means "any of the following: A; B; C; A and B; A and C; B and C; A and B and C"; another example is, " A, B or C" or "A, B and/or C" means "any of the following: A; B; C; A and B; A and C; B and C; A and B and C". Exceptions to this definition occur only when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some manner.

应该理解的是,虽然本申请实施例中的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although each step in the flow chart in the embodiment of the present application is displayed in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least some of the steps in the figure may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and their execution order is not necessarily sequential. may be performed in turn or alternately with other steps or sub-steps of other steps or at least part of stages.

取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if" or "if" as used herein may be interpreted as "when" or "when" or "in response to determination" or "in response to detection." Similarly, depending on the context, the phrase "if determined" or "if (stated condition or event) is detected" may be interpreted as "when determined" or "in response to determining" or "when (stated condition or event) is detected )" or "in response to detecting (a stated condition or event)".

需要说明的是,在本文中,采用了诸如S100、S200等步骤代号,其目的是为了更清楚简要地表述相应内容,不构成顺序上的实质性限制,本领域技术人员在具体实施时,可能会先执行S200后执行S100等,但这些均应在本申请的保护范围之内。It should be noted that in this article, step codes such as S100 and S200 are used for the purpose of describing the corresponding content more clearly and concisely, and do not constitute a substantial restriction on the sequence. Those skilled in the art may S200 will be executed first and then S100, etc., but these should be within the protection scope of this application.

应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.

在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或者“单元”的后缀仅为了有利于本申请的说明,其本身没有特定的意义。因此,“模块”、“部件”或者“单元”可以混合地使用。In the subsequent description, the use of suffixes such as "module", "component" or "unit" used to represent elements is only to facilitate the description of the present application and has no specific meaning in itself. Therefore, "module", "component" or "unit" may be used interchangeably.

目前的DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)地址分配策略一般按DHCP地址池范围顺序分配,分配前进行ARP(Address ResolutionProtocol,地址解析协议)探测,若ARP探测到该地址有ARP回应,则将下一个未分配出去的地址分配出去。例如,DHCP地址池范围是192.168.1.20至192.168.1.200,则从192.168.1.20开始分配地址,若ARP探测192.168.1.20有ARP回应,则说明192.168.1.20已被占用,进而ARP探测192.168.1.21,直到找到可用的地址分给相应的网卡,并标识为已分配,或地址池中的地址均被占满则分配地址失败。这种方法对于多网卡的设备来说,如果所分配的地址被认为不可用而不接受时,则会重复请求可用地址,但该设备没有办法把这种情况反馈给DHCP Server(DHCP服务器,如网关),导致DHCP Server认为该地址可用一直分配该地址,而该设备则认为网卡之间的地址不合理一直不接受,从而导致设备获取地址失败。The current DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) address allocation strategy is generally allocated in order of the DHCP address pool range. ARP (Address Resolution Protocol) detection is performed before allocation. If ARP detects that the address has an ARP response, Then the next unallocated address will be allocated. For example, if the DHCP address pool range is 192.168.1.20 to 192.168.1.200, addresses will be allocated starting from 192.168.1.20. If there is an ARP response from ARP detection 192.168.1.20, it means that 192.168.1.20 has been occupied, and then ARP detection 192.168.1.21 will be sent. Until an available address is found and allocated to the corresponding network card and marked as allocated, or the addresses in the address pool are all occupied, the address allocation fails. For devices with multiple network cards, this method will repeatedly request available addresses if the assigned address is considered unavailable and not accepted, but the device has no way to feedback this situation to the DHCP Server (DHCP server, such as gateway), causing the DHCP Server to think that the address is available and keep allocating it, while the device thinks that the address between the network cards is unreasonable and refuses to accept it, causing the device to fail to obtain the address.

例如WINDOWS系统的电脑,网卡1的地址为192.168.1.20,且处于断网/网卡禁用状态时,网卡2来获取地址,DHCP Server认为192.168.1.20为可用地址且ARP探测192.168.1.20没有回应,则该地址可分配出去,将192.168.1.20分给网卡2,WINDOWS系统会认为这个地址与网卡1冲突而不接受192.168.1.20,继续请求可用地址,如果继续分配192.168.1.20给电脑,网卡2会一直因为不接受该地址而导致电脑不能上网。For example, in a computer with WINDOWS system, the address of network card 1 is 192.168.1.20, and when the network card is disconnected or the network card is disabled, network card 2 obtains the address. The DHCP Server considers 192.168.1.20 to be an available address and there is no response from ARP detection 192.168.1.20. This address can be allocated. 192.168.1.20 will be assigned to network card 2. The WINDOWS system will consider that this address conflicts with network card 1 and will not accept 192.168.1.20. It will continue to request available addresses. If 192.168.1.20 continues to be allocated to the computer, network card 2 will continue to be assigned. The computer cannot access the Internet because the address is not accepted.

参照图1,本发明第一实施例提供一种地址分配方法,所述地址分配方法包括以下步骤:Referring to Figure 1, a first embodiment of the present invention provides an address allocation method. The address allocation method includes the following steps:

步骤S100,获取待分配网卡的地址分配请求;Step S100, obtain the address allocation request of the network card to be allocated;

具体地,所述待分配网卡可以为多网卡设备中内置或者可拆卸的网卡,。所述待分配网卡需要在获得相应的IP地址(Internet Protocol Address,互联网协议地址)后才可以连接网络,以使对应的多网卡设备实现上网功能。获取待分配网卡通过对应的多网卡设备发出的地址分配请求。Specifically, the network card to be allocated may be a built-in or detachable network card in a multi-network card device. The network card to be allocated needs to obtain a corresponding IP address (Internet Protocol Address) before it can connect to the network, so that the corresponding multi-network card device can realize the Internet access function. Obtain the address allocation request sent by the network card to be allocated through the corresponding multi-network card device.

步骤S200,根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡;Step S200: Obtain an address to be allocated according to the address allocation request and preset allocation rules, and allocate the address to be allocated to the network card to be allocated;

具体地,所述预设分配规则可以是上述DHCP地址分配策略,也可以是其他获取待分配地址用于分配的方法。根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡,其中,所述可分配地址为处于预设地址池范围内且未被占用的地址。Specifically, the preset allocation rule may be the above-mentioned DHCP address allocation policy, or may be other methods of obtaining addresses to be allocated for allocation. According to the address allocation request and the preset allocation rules, an address to be allocated is obtained, and the address to be allocated is allocated to the network card to be allocated, wherein the allocable address is within the range of the preset address pool and has not been allocated yet. occupied address.

更进一步地,所述预设分配规则包括预设生成规则和第二预设调整规则,所述步骤S200包括以下步骤:Furthermore, the preset allocation rules include preset generation rules and second preset adjustment rules, and step S200 includes the following steps:

步骤S210,根据所述地址分配请求和预设生成规则,获得预选地址;Step S210: Obtain the preselected address according to the address allocation request and the preset generation rules;

步骤S220,判断所述预选地址是否被占用;Step S220, determine whether the preselected address is occupied;

步骤S221,若所述预选地址未被占用,则将所述预选地址作为待分配地址;Step S221, if the preselected address is not occupied, use the preselected address as the address to be allocated;

步骤S222,若所述预选地址被占用,则根据第二预设调整规则,生成新的预选地址,并执行步骤S220。Step S222: If the preselected address is occupied, generate a new preselected address according to the second preset adjustment rule, and execute step S220.

具体地,所述预设分配规则包括预设生成规则和第二预设调整规则,所述预设生成规则为用于生成预设地址池范围内地址的规则。所述第二预设调整规则为用于调整所述预选地址,以获得未被占用的预选地址作为待分配地址。根据所述地址分配请求和预设生成规则,获得预设地址池范围内的预选地址。然后针对所述预选地址执行ARP(AddressResolution Protocol,地址解析协议)探测操作,根据所述预选地址是否有ARP回应,用于判断所述预选地址是否被占用。所述预选地址没有ARP回应,则说明所述预选地址未被占用。若所述预选地址未被占用,则将所述预选地址作为待分配地址,并将所述待分配地址分配至所述待分配网卡;所述预选地址有ARP回应,则说明所述预选地址被占用。若所述预选地址被占用,则根据第二预设调整规则,生成新的预选地址,并执行步骤S220,经过所述第二预设调整规则调整后生成的新的预选地址未被占用,则将所述预选地址作为待分配地址,并将所述待分配地址分配至所述待分配网卡。Specifically, the preset allocation rules include a preset generation rule and a second preset adjustment rule, and the preset generation rule is a rule for generating addresses within a preset address pool range. The second preset adjustment rule is used to adjust the preselected address to obtain an unoccupied preselected address as an address to be allocated. According to the address allocation request and the preset generation rules, a preselected address within the preset address pool range is obtained. Then, an ARP (Address Resolution Protocol, Address Resolution Protocol) detection operation is performed on the preselected address, and whether there is an ARP response from the preselected address is used to determine whether the preselected address is occupied. If there is no ARP response for the preselected address, it means that the preselected address is not occupied. If the preselected address is not occupied, the preselected address is used as the address to be assigned, and the address to be assigned is assigned to the network card to be assigned; if there is an ARP response to the preselected address, it means that the preselected address is occupied. If the preselected address is occupied, a new preselected address is generated according to the second preset adjustment rule, and step S220 is executed. If the new preselected address generated after adjustment by the second preset adjustment rule is not occupied, then The preselected address is used as an address to be allocated, and the address to be allocated is allocated to the network card to be allocated.

更进一步地,步骤S210包括以下步骤:Furthermore, step S210 includes the following steps:

步骤a1,接收到所述地址分配请求后,获取预设地址池的范围信息;Step a1: After receiving the address allocation request, obtain the range information of the preset address pool;

步骤a2,根据所述范围信息,选取所述预设地址池的起始地址作为预选地址。Step a2: Select the starting address of the preset address pool as the preselected address according to the range information.

具体地,在接收到待分配网卡通过对应的多网卡设备发出的地址分配请求,获取预设地址池的范围信息,所述预设地址池为可用于分配的地址的集合。所述预设地址池的范围信息包括可用于分配的地址的范围,根据所述范围信息,选取所述预设地址池的起始地址作为预选地址。例如,所述预设地址池的范围为192.168.1.20至192.168.1.200,则可用于分配的地址则为192.168.1.20、192.168.1.21、192.168.1.22……直至192.168.1.200。则所述预设地址池的起始地址则为192.168.1.20,将192.168.1.20作为预选地址。Specifically, after receiving an address allocation request sent by the network card to be allocated through the corresponding multi-network card device, the range information of the preset address pool is obtained, and the preset address pool is a set of addresses available for allocation. The range information of the preset address pool includes a range of addresses that can be used for allocation. According to the range information, the starting address of the preset address pool is selected as the preselected address. For example, if the preset address pool ranges from 192.168.1.20 to 192.168.1.200, then the addresses available for allocation are 192.168.1.20, 192.168.1.21, 192.168.1.22... until 192.168.1.200. Then the starting address of the preset address pool is 192.168.1.20, and 192.168.1.20 is used as the preselected address.

更进一步地,所述第二预设调整规则包括第二预设调整参数,步骤S222包括以下步骤Furthermore, the second preset adjustment rule includes a second preset adjustment parameter, and step S222 includes the following steps:

步骤b,根据第二预设调整参数对所述预选地址进行调整,生成新的预选地址。Step b: Adjust the preselected address according to the second preset adjustment parameter to generate a new preselected address.

具体地,所述第二预设调整规则包括第二预设调整参数,所述第二预设调整参数用于调整预选地址进行调整,以生成新的预选地址。所述第二预设调整参数可以为根据具体需求选用的值,如1、2、3等。例如,所述第二预设调整参数为1,当预选地址192.168.1.20被占用时,则生成新的预选地址192.168.1.21。而后执行步骤:判断所述预选地址是否被占用,以使最终获得的新的预选地址未被占用,则将所述预选地址作为待分配地址,并将所述待分配地址分配至所述待分配网卡。Specifically, the second preset adjustment rule includes a second preset adjustment parameter, and the second preset adjustment parameter is used to adjust the preselected address to generate a new preselected address. The second preset adjustment parameter may be a value selected according to specific needs, such as 1, 2, 3, etc. For example, the second preset adjustment parameter is 1, and when the preselected address 192.168.1.20 is occupied, a new preselected address 192.168.1.21 is generated. Then perform the step of: judging whether the preselected address is occupied, so that the new preselected address finally obtained is not occupied, then the preselected address is used as the address to be allocated, and the address to be allocated is allocated to the address to be allocated. network card.

步骤S300,判断所述待分配地址是否被所述待分配网卡接受;Step S300, determine whether the address to be assigned is accepted by the network card to be assigned;

具体地,在将所述待分配地址分配至所述待分配网卡后,可以记录待分配地址和所述待分配网卡的标识信息(如MAC地址,Media Access Control Address,物理地址)的对应关系,然后若是同一个地址在一定时间内分配给同一待分配网卡的次数超过预设次数又或者所述待分配网卡在分配后依旧在发送地址分配请求,则说明所述待分配地址未被所述待分配网卡接受。Specifically, after the address to be allocated is allocated to the network card to be allocated, the corresponding relationship between the address to be allocated and the identification information (such as MAC address, Media Access Control Address, physical address) of the network card to be allocated can be recorded, Then, if the same address is allocated to the same network card to be allocated more than the preset number of times within a certain period of time, or the network card to be allocated is still sending address allocation requests after allocation, it means that the address to be allocated is not the address to be allocated. Assigned network card accepted.

更进一步地,在另一实施例中,步骤S300还包括以下步骤:Furthermore, in another embodiment, step S300 also includes the following steps:

步骤S310,统计在预设时长内所述待分配网卡地址分配请求的发送次数;Step S310: Count the number of times the network card address allocation request to be allocated is sent within a preset time period;

步骤S320,判断所述发送次数是否超过预设次数;Step S320, determine whether the number of sending times exceeds a preset number;

步骤S321,若超过预设次数,则判定所述待分配地址未被所述待分配网卡接受。Step S321: If the preset number of times is exceeded, it is determined that the address to be allocated is not accepted by the network card to be allocated.

具体地,可以统计在预设时长内(如20秒、30秒或40秒等)所述待分配网卡地址分配请求的发送次数。然后判断所述发送次数是否超过预设次数(如3次、4次或5次等)。若所述发送次数超过预设次数,则判定所述待分配地址未被所述待分配网卡接受。若所述发送次数未超过预设次数,则说明所述待分配地址被所述待分配网卡接受,地址分配成功,无需执行其他操作。Specifically, the number of times the network card address allocation request to be allocated is sent within a preset time period (such as 20 seconds, 30 seconds, or 40 seconds, etc.) can be counted. Then it is determined whether the number of sending times exceeds a preset number (such as 3 times, 4 times or 5 times, etc.). If the number of sending times exceeds the preset number, it is determined that the address to be allocated is not accepted by the network card to be allocated. If the number of sending times does not exceed the preset number, it means that the address to be allocated is accepted by the network card to be allocated, the address is allocated successfully, and no other operations are required.

步骤S400,若未被所述待分配网卡接受,则根据第一预设调整规则获得新的待分配地址,并执行步骤:判断所述待分配地址是否被所述待分配网卡接受。Step S400, if it is not accepted by the network card to be allocated, obtain a new address to be allocated according to the first preset adjustment rule, and perform the step of: determining whether the address to be allocated is accepted by the network card to be allocated.

具体地,若所述待分配地址未被所述待分配网卡接受,根据第一预设调整规则获得新的待分配地址,所述新的待分配地址为并执行步骤:判断所述待分配地址是否被所述待分配网卡接受。其中,所述新的可分配地址为处于预设地址池范围内且未被占用的地址。所述第一预设调整规则为用于调整所述待分配地址,以获得其他处于预设地址池范围内且未被占用的待分配地址作为新的待分配地址。若所述待分配地址被所述待分配网卡接受,则说明地址分配成功,无需执行其他操作。Specifically, if the address to be allocated is not accepted by the network card to be allocated, a new address to be allocated is obtained according to the first preset adjustment rule, and the new address to be allocated is and the step is performed: judging the address to be allocated Whether it is accepted by the network card to be assigned. Wherein, the new allocable address is an address that is within the range of a preset address pool and is not occupied. The first preset adjustment rule is used to adjust the address to be allocated to obtain other unoccupied addresses to be allocated within the range of the preset address pool as new addresses to be allocated. If the address to be allocated is accepted by the network card to be allocated, it means that the address allocation is successful and no other operations need to be performed.

更进一步地,所述第一预设调整规则包括第一预设调整参数,所述步骤S400包括以下步骤:Furthermore, the first preset adjustment rule includes a first preset adjustment parameter, and step S400 includes the following steps:

步骤S410,根据第一预设调整参数对所述待分配地址进行调整,生成新的待分配地址。Step S410: Adjust the address to be allocated according to the first preset adjustment parameter to generate a new address to be allocated.

具体地,所述第一预设调整规则包括第一预设调整参数,所述第一预设调整参数用于调整待分配地址进行调整,以生成新的待分配地址。所述第以预设调整参数可以为根据具体需求选用的值,如1、2、3等。其中,所述第一预设调整参数可以与第二预设调整参数相同,也可以不同。例如,所述第一预设调整参数为1,当待分配地址192.168.1.23未被所述待分配网卡接受时,则生成新地址192.168.1.24,并在所述新地址处于预设地址池范围内且未被占用时,将所述新地址作为新的待分配地址。而后执行步骤:判断所述待分配地址是否被所述待分配网卡接受。Specifically, the first preset adjustment rule includes a first preset adjustment parameter, and the first preset adjustment parameter is used to adjust the address to be allocated to generate a new address to be allocated. The first preset adjustment parameter may be a value selected according to specific needs, such as 1, 2, 3, etc. The first preset adjustment parameter may be the same as the second preset adjustment parameter, or may be different. For example, the first preset adjustment parameter is 1, and when the address to be allocated 192.168.1.23 is not accepted by the network card to be allocated, a new address 192.168.1.24 is generated, and the new address is within the preset address pool range. When it is within the address and is not occupied, the new address is used as the new address to be allocated. Then perform the step of: determining whether the address to be assigned is accepted by the network card to be assigned.

在本发明第一实施例中,可以通过获取待分配网卡通过对应的多网卡设备发出的地址分配请求。然后,根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡,其中,所述可分配地址为处于预设地址池范围内且未被占用的地址。所述预设分配规则可以是上述DHCP地址分配策略,也可以是其他获取待分配地址用于分配的方法。在将所述待分配地址分配至所述待分配网卡后,判断所述待分配地址是否被所述待分配网卡接受。若所述待分配地址未被所述待分配网卡接受,则根据第一预设调整规则获得新的待分配地址,所述新的待分配地址为并执行步骤:判断所述待分配地址是否被所述待分配网卡接受。直至所述待分配地址被所述待分配网卡接受,从而规避了在多网卡设备无法接受分配的地址的情况下,DHCP Server始终分配同一地址导致获取地址失败无法连接网络的情况,因而大幅降低了多网卡设备获取地址的失败率。In the first embodiment of the present invention, the address allocation request issued by the corresponding multi-network card device can be obtained by obtaining the network card to be allocated. Then, according to the address allocation request and the preset allocation rules, an address to be allocated is obtained, and the address to be allocated is allocated to the network card to be allocated, wherein the allocable address is within the range of the preset address pool and Unoccupied address. The preset allocation rule may be the above-mentioned DHCP address allocation policy, or may be other methods of obtaining addresses to be allocated for allocation. After the address to be allocated is allocated to the network card to be allocated, it is determined whether the address to be allocated is accepted by the network card to be allocated. If the address to be allocated is not accepted by the network card to be allocated, a new address to be allocated is obtained according to the first preset adjustment rule, and the new address to be allocated is and the step is executed: determine whether the address to be allocated is The network card to be assigned is accepted. Until the address to be allocated is accepted by the network card to be allocated, this avoids the situation where the DHCP Server always allocates the same address when multiple network card devices cannot accept the allocated address, resulting in failure to obtain the address and being unable to connect to the network, thus significantly reducing the cost. The failure rate of multi-network card devices in obtaining addresses.

进一步地,参照图2,本发明第二实施例提供一种地址分配方法,基于上述图1所示的实施例,所述地址分配请求包括待分配网卡的MAC地址,所述预设生成规则包括预设地址算法,步骤S210包括以下步骤:Further, referring to Figure 2, a second embodiment of the present invention provides an address allocation method. Based on the embodiment shown in Figure 1, the address allocation request includes the MAC address of the network card to be allocated, and the preset generation rules include Default address algorithm, step S210 includes the following steps:

步骤S211,根据所述待分配网卡的MAC地址和预设地址算法,生成地址参数;Step S211: Generate address parameters based on the MAC address of the network card to be allocated and the preset address algorithm;

步骤S212,根据所述预设地址池的地址信息和所述地址参数,生成预选地址。Step S212: Generate a preselected address based on the address information of the preset address pool and the address parameters.

具体地,所述地址分配请求可以包括待分配网卡的MAC地址(Media AccessControl Address,物理地址)。在对分配的地址没有要求的情况下,可以根据所述地址分配请求中待分配网卡的MAC地址和预设地址算法。其中,所述预设地址算法用于对所述MAC地址进行计算获得对应的地址参数,所述MAC地址与所述地址参数一一对应。所述预设地址算法可以是SDBM哈希算法、DJB哈希算法或Lose lose哈希算法等算法。Specifically, the address allocation request may include the MAC address (Media AccessControl Address, physical address) of the network card to be allocated. When there is no requirement for the allocated address, the MAC address of the network card to be allocated and the preset address algorithm in the address allocation request may be used. Wherein, the preset address algorithm is used to calculate the MAC address to obtain corresponding address parameters, and the MAC address corresponds to the address parameters one-to-one. The preset address algorithm may be an SDBM hash algorithm, a DJB hash algorithm, a Lose lose hash algorithm, or other algorithms.

例如,对MAC地址采用SDBM哈希算法,则相应的代码为:For example, if the SDBM hash algorithm is used for the MAC address, the corresponding code is:

for(j=0,i=0;i<hw_len;i++)for(j=0,i=0;i<hw_len;i++)

j+=hwaddr[i]+(j<<6)+(j<<16)-j;j+=hwaddr[i]+(j<<6)+(j<<16)-j;

通过预设地址算法根据所述MAC地址进行计算后,获得与之对应的地址参数j,假设,所述预设地址池范围是192.168.1.20到192.168.1.80,则获得对应的预选地址为192.168.1.X,X=20+j%(80-20+1),若所述地址已被占用,则可以调整所述预选地址,如预选地址192.168.1.(X+1),直至获得的预选地址不被占用,则将未被占用的预选地址作为待分配地址。其中还可以对预设地址池的范围取模,以免计算得出的所述预选地址超出预设地址池的范围。此外,例如,DJB哈希算法的代码为:After calculation based on the MAC address through the preset address algorithm, the corresponding address parameter j is obtained. Assuming that the preset address pool range is 192.168.1.20 to 192.168.1.80, the corresponding preselected address is 192.168. 1.X, If the preselected address is not occupied, the unoccupied preselected address will be used as the address to be allocated. The range of the preset address pool can also be modulo, so as to prevent the calculated preselected address from exceeding the range of the preset address pool. Furthermore, for example, the code for the DJB hashing algorithm is:

for(j=0,i=0;i<hw_len;i++)for(j=0,i=0;i<hw_len;i++)

j=j*33+(int)hwaddr[i];j=j*33+(int)hwaddr[i];

例如,Lose lose哈希算法的代码为:For example, the code for the Lose lose hash algorithm is:

for(j=0,i=0;i<hw_len;i++)for(j=0,i=0;i<hw_len;i++)

j+=(int)hwaddr[i];j+=(int)hwaddr[i];

本领域技术人员可知,具体的预选地址算法的选择可以根据实际需求进行选择。Those skilled in the art know that the specific preselected address algorithm can be selected according to actual needs.

本实施例中,通过根据所述地址分配请求中待分配网卡的MAC地址和预设地址算法,然后根据所述预设地址池的地址信息和所述地址参数,生成预选地址。其中,所述MAC地址与计算得出的所述地址参数一一对应。从而使得待分配网卡的MAC地址与所述预选地址一一对应,从而降低了预选地址重复的可能性,保证多网卡设备获取地址的成功率。In this embodiment, a preselected address is generated based on the MAC address of the network card to be allocated in the address allocation request and a preset address algorithm, and then based on the address information of the preset address pool and the address parameters. Wherein, the MAC address corresponds to the calculated address parameter one-to-one. Thereby, the MAC address of the network card to be allocated corresponds to the preselected address one-to-one, thereby reducing the possibility of duplication of the preselected address and ensuring the success rate of multiple network card devices in obtaining addresses.

如图3所示,图3为本发明实施例方案涉及的地址分配系统的示意图,本发明一实施例中提出一种地址分配系统,所述地址分配系统包括:As shown in Figure 3, Figure 3 is a schematic diagram of an address allocation system involved in an embodiment of the present invention. In one embodiment of the present invention, an address allocation system is proposed. The address allocation system includes:

接收模块10,用于获取待分配网卡的地址分配请求;The receiving module 10 is used to obtain the address allocation request of the network card to be allocated;

分配模块20,用于根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡;The allocation module 20 is used to obtain the address to be allocated according to the address allocation request and the preset allocation rules, and allocate the address to be allocated to the network card to be allocated;

判断模块30,用于判断所述待分配地址是否被所述待分配网卡接受;Determination module 30, used to determine whether the address to be assigned is accepted by the network card to be assigned;

调整模块40,用于若未被所述待分配网卡接受,则根据第一预设调整规则获得新的待分配地址,并执行步骤:判断所述待分配地址是否被所述待分配网卡接受。The adjustment module 40 is configured to obtain a new address to be allocated according to the first preset adjustment rule if it is not accepted by the network card to be allocated, and perform the step of: determining whether the address to be allocated is accepted by the network card to be allocated.

更进一步地,所述地址分配系统还包括:Furthermore, the address allocation system also includes:

分配模块20,还用于根据所述地址分配请求和预设生成规则,获得预选地址;The allocation module 20 is also used to obtain the preselected address according to the address allocation request and the preset generation rules;

分配模块20,还用于判断所述预选地址是否被占用;The allocation module 20 is also used to determine whether the preselected address is occupied;

分配模块20,还用于若所述预选地址未被占用,则将所述预选地址作为待分配地址;The allocation module 20 is also configured to use the preselected address as the address to be allocated if the preselected address is not occupied;

分配模块20,还用于若所述预选地址被占用,则根据第二预设调整规则,生成新的预选地址,并执行步骤:判断所述预选地址是否被占用。The allocation module 20 is also configured to generate a new preselected address according to the second preset adjustment rule if the preselected address is occupied, and perform the step of determining whether the preselected address is occupied.

更进一步地,所述地址分配请求包括待分配网卡的MAC地址,所述预设生成规则包括预设地址算法,所述地址分配系统还包括:Furthermore, the address allocation request includes the MAC address of the network card to be allocated, the preset generation rules include a preset address algorithm, and the address allocation system also includes:

分配模块20,还用于根据所述待分配网卡的MAC地址和预设地址算法,生成地址参数;The allocation module 20 is also used to generate address parameters according to the MAC address of the network card to be allocated and the preset address algorithm;

分配模块20,还用于根据所述预设地址池的地址信息和所述地址参数,生成预选地址。The allocation module 20 is also configured to generate a preselected address according to the address information of the preset address pool and the address parameters.

更进一步地,所述地址分配系统还包括:Furthermore, the address allocation system also includes:

分配模块20,还用于接收到所述地址分配请求后,获取预设地址池的范围信息;The allocation module 20 is also configured to obtain the range information of the preset address pool after receiving the address allocation request;

分配模块20,还用于根据所述范围信息,选取所述预设地址池的起始地址作为预选地址。The allocation module 20 is also configured to select the starting address of the preset address pool as the preselected address according to the range information.

更进一步地,所述第二预设调整规则包括第二预设调整参数,所述地址分配系统还包括:Furthermore, the second preset adjustment rule includes a second preset adjustment parameter, and the address allocation system further includes:

分配模块20,还用于根据第二预设调整参数对所述预选地址进行调整,生成新的预选地址。The allocation module 20 is also configured to adjust the preselected address according to the second preset adjustment parameter and generate a new preselected address.

更进一步地,所述第一预设调整规则包括第一预设调整参数,所述地址分配系统还包括:Furthermore, the first preset adjustment rule includes a first preset adjustment parameter, and the address allocation system further includes:

调整模块40,还用于根据第一预设调整参数对所述待分配地址进行调整,生成新的待分配地址。The adjustment module 40 is also configured to adjust the address to be allocated according to the first preset adjustment parameter and generate a new address to be allocated.

更进一步地,所述地址分配系统还包括:Furthermore, the address allocation system also includes:

判断模块30,还用于统计在预设时长内所述待分配网卡地址分配请求的发送次数;The judgment module 30 is also used to count the number of times the network card address allocation request to be allocated is sent within a preset time period;

判断模块30,还用于判断所述发送次数是否超过预设次数;The judgment module 30 is also used to judge whether the number of sending times exceeds the preset number;

判断模块30,还用于若超过预设次数,则判定所述待分配地址未被所述待分配网卡接受。The determination module 30 is also configured to determine that the address to be allocated is not accepted by the network card to be allocated if the preset number of times is exceeded.

如图4所示,图4是本发明实施例方案涉及的硬件运行环境的设备结构示意图。As shown in Figure 4, Figure 4 is a schematic diagram of the equipment structure of the hardware operating environment involved in the embodiment of the present invention.

如图4所示,该设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in Figure 4, the device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize connection communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). The optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

可选地,该设备还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示屏的亮度,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Optionally, the device may also include a camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio circuit, WiFi module, etc. Among them, sensors such as light sensors, motion sensors and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen and turn off the display screen and/or the backlight according to the brightness of the ambient light. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes). It can detect the magnitude and direction of gravity when stationary, and can be used to identify mobile terminal posture applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., here No longer.

本领域技术人员可以理解,图4中示出的设备结构并不构成对地址分配设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the device structure shown in Figure 4 does not constitute a limitation on the address allocation device, and may include more or less components than shown, or combine certain components, or arrange different components.

如图4所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及地址分配应用程序。As shown in Figure 4, memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and an address allocation application program.

在图4所示的装置中,处理器1001可以用于调用存储器1005中存储的地址分配程序,并执行以下操作:In the device shown in Figure 4, the processor 1001 can be used to call the address allocation program stored in the memory 1005, and perform the following operations:

获取待分配网卡的地址分配请求;Obtain the address allocation request of the network card to be allocated;

根据所述地址分配请求和预设分配规则,获得待分配地址,并将所述待分配地址分配至所述待分配网卡;Obtain the address to be allocated according to the address allocation request and the preset allocation rules, and allocate the address to be allocated to the network card to be allocated;

判断所述待分配地址是否被所述待分配网卡接受;Determine whether the address to be allocated is accepted by the network card to be allocated;

若未被所述待分配网卡接受,则根据第一预设调整规则获得新的待分配地址,并执行步骤:判断所述待分配地址是否被所述待分配网卡接受。If it is not accepted by the network card to be allocated, obtain a new address to be allocated according to the first preset adjustment rule, and perform the step of: determining whether the address to be allocated is accepted by the network card to be allocated.

更进一步地,处理器1001还可以用于调用存储器1005中存储的地址分配程序,并执行以下操作:Furthermore, the processor 1001 can also be used to call the address allocation program stored in the memory 1005 and perform the following operations:

根据所述地址分配请求和预设生成规则,获得预选地址;Obtain a preselected address according to the address allocation request and preset generation rules;

判断所述预选地址是否被占用;Determine whether the preselected address is occupied;

若所述预选地址未被占用,则将所述预选地址作为待分配地址;If the preselected address is not occupied, use the preselected address as the address to be allocated;

若所述预选地址被占用,则根据第二预设调整规则,生成新的预选地址,并执行步骤:判断所述预选地址是否被占用。If the preselected address is occupied, a new preselected address is generated according to the second preset adjustment rule, and the step of determining whether the preselected address is occupied is performed.

更进一步地,所述地址分配请求包括待分配网卡的MAC地址,所述预设生成规则包括预设地址算法,处理器1001还可以用于调用存储器1005中存储的地址分配程序,并执行以下操作:Furthermore, the address allocation request includes the MAC address of the network card to be allocated, and the preset generation rules include a preset address algorithm. The processor 1001 can also be used to call the address allocation program stored in the memory 1005 and perform the following operations. :

根据所述待分配网卡的MAC地址和预设地址算法,生成地址参数;Generate address parameters according to the MAC address of the network card to be allocated and the preset address algorithm;

根据所述预设地址池的地址信息和所述地址参数,生成预选地址。A preselected address is generated according to the address information of the preset address pool and the address parameters.

更进一步地,处理器1001还可以用于调用存储器1005中存储的地址分配程序,并执行以下操作:Furthermore, the processor 1001 can also be used to call the address allocation program stored in the memory 1005 and perform the following operations:

接收到所述地址分配请求后,获取预设地址池的范围信息;After receiving the address allocation request, obtain range information of the preset address pool;

根据所述范围信息,选取所述预设地址池的起始地址作为预选地址。According to the range information, the starting address of the preset address pool is selected as the preselected address.

更进一步地,所述第二预设调整规则包括第二预设调整参数,处理器1001还可以用于调用存储器1005中存储的地址分配程序,并执行以下操作:Furthermore, the second preset adjustment rule includes a second preset adjustment parameter. The processor 1001 can also be used to call the address allocation program stored in the memory 1005 and perform the following operations:

根据第二预设调整参数对所述预选地址进行调整,生成新的预选地址。The preselected address is adjusted according to the second preset adjustment parameter to generate a new preselected address.

更进一步地,所述第一预设调整规则包括第一预设调整参数,处理器1001还可以用于调用存储器1005中存储的地址分配程序,并执行以下操作:Furthermore, the first preset adjustment rule includes the first preset adjustment parameter. The processor 1001 can also be used to call the address allocation program stored in the memory 1005 and perform the following operations:

根据第一预设调整参数对所述待分配地址进行调整,生成新的待分配地址。The address to be allocated is adjusted according to the first preset adjustment parameter to generate a new address to be allocated.

更进一步地,处理器1001还可以用于调用存储器1005中存储的地址分配程序,并执行以下操作:Furthermore, the processor 1001 can also be used to call the address allocation program stored in the memory 1005 and perform the following operations:

统计在预设时长内所述待分配网卡地址分配请求的发送次数;Count the number of times the network card address allocation request to be allocated is sent within the preset time period;

判断所述发送次数是否超过预设次数;Determine whether the number of sending times exceeds the preset number;

若超过预设次数,则判定所述待分配地址未被所述待分配网卡接受。If the preset number of times is exceeded, it is determined that the address to be allocated is not accepted by the network card to be allocated.

此外,本发明实施例还提出一种计算机存储介质。In addition, embodiments of the present invention also provide a computer storage medium.

所述计算机存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述实施例提供的地址分配方法中的操作,具体的实施步骤可参照上述实施例,此处不再过多赘述。A computer program is stored on the computer storage medium. When the computer program is executed by the processor, the operations in the address allocation method provided in the above embodiment are implemented. The specific implementation steps can be referred to the above embodiment, and will not be described in detail here. .

可以理解,上述场景仅是作为示例,并不构成对于本申请实施例提供的技术方案的应用场景的限定,本申请的技术方案还可应用于其他场景。例如,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。It can be understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided by the embodiments of the present application. The technical solutions of the present application can also be applied to other scenarios. For example, those of ordinary skill in the art know that with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the methods of the embodiments of this application can be sequence adjusted, combined, and deleted according to actual needs.

本申请实施例设备中的单元可以根据实际需要进行合并、划分和删减。The units in the equipment of the embodiments of this application can be merged, divided, and deleted according to actual needs.

在本申请中,对于相同或相似的术语概念、技术方案和/或应用场景描述,一般只在第一次出现时进行详细描述,后面再重复出现时,为了简洁,一般未再重复阐述,在理解本申请技术方案等内容时,对于在后未详细描述的相同或相似的术语概念、技术方案和/或应用场景描述等,可以参考其之前的相关详细描述。In this application, the same or similar terms, concepts, technical solutions and/or application scenario descriptions are generally only described in detail the first time they appear. When they appear again later, for the sake of simplicity, they are generally not described again. When understanding the technical solutions and other content of this application, for the same or similar term concepts, technical solutions and/or application scenario descriptions that are not described in detail later, you can refer to the relevant previous detailed descriptions.

在本申请中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In this application, each embodiment is described with its own emphasis. For parts that are not detailed or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

本申请技术方案的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本申请记载的范围。The technical features of the technical solution of the present application can be combined in any way. In order to simplify the description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, all possible combinations can be used. It should be considered to be within the scope of description in this application.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,被控终端,或者网络设备等)执行本申请每个实施例的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology. The computer software product is stored in one of the above storage media (such as ROM/RAM, magnetic disk, optical disk), including several instructions to cause a terminal device (which can be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present application.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络,或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、存储盘、磁带)、光介质(例如,DVD),或者半导体介质(例如固态存储盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When computer program instructions are loaded and executed on a computer, processes or functions according to embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., computer instructions may be transmitted from a website, computer, server or data center via a wired link (e.g. Coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website, computer, server or data center. Computer-readable storage media can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or other integrated media that contains one or more available media. Available media may be magnetic media (eg, floppy disk, storage disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), etc.

以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of the present application may be directly or indirectly used in other related technical fields. , are all equally included in the patent protection scope of this application.

Claims (8)

1. An address allocation method, characterized in that the address allocation method comprises the steps of:
acquiring an address allocation request of a network card to be allocated;
obtaining an address to be allocated according to the address allocation request and a preset allocation rule, and allocating the address to be allocated to the network card to be allocated;
judging whether the address to be allocated is accepted by the network card to be allocated or not;
if not accepted by the network card to be allocated, a new address to be allocated is obtained according to a first preset adjustment rule, wherein the first preset adjustment rule is used for adjusting the address to be allocated so as to obtain other unoccupied addresses to be allocated which are in a preset address pool range as new addresses to be allocated, and the steps are executed: judging whether the address to be allocated is accepted by the network card to be allocated or not;
the preset allocation rule includes a preset generation rule and a second preset adjustment rule, and the steps of obtaining an address to be allocated according to the address allocation request and the preset allocation rule, and allocating the address to be allocated to the network card to be allocated include:
Obtaining a preselected address according to the address allocation request and a preset generation rule;
judging whether the pre-selected address is occupied or not;
if the pre-selected address is not occupied, the pre-selected address is used as an address to be allocated;
if the pre-selected address is occupied, generating a new pre-selected address according to a second preset adjustment rule, wherein the second preset adjustment rule is used for adjusting the pre-selected address to obtain an unoccupied pre-selected address as an address to be allocated, and executing the steps of: judging whether the pre-selected address is occupied or not;
the address allocation request comprises an MAC address of a network card to be allocated, the preset generation rule comprises a preset address algorithm, and the step of obtaining a preselected address according to the address allocation request and the preset generation rule comprises the following steps:
generating address parameters according to the MAC address of the network card to be allocated and a preset address algorithm, wherein the preset address algorithm is used for calculating the MAC address to obtain corresponding address parameters, and the MAC address corresponds to the address parameters one by one;
and generating a preselected address according to the address information of the preset address pool and the address parameter.
2. The address allocation method according to claim 1, wherein the step of obtaining a pre-selected address according to the address allocation request and a preset generation rule comprises:
After receiving the address allocation request, obtaining range information of a preset address pool;
and selecting a starting address of the preset address pool as a preselected address according to the range information.
3. The address allocation method of claim 1, wherein the second preset adjustment rule comprises a second preset adjustment parameter, and wherein the step of generating the new pre-selected address according to the second preset adjustment rule comprises:
and adjusting the pre-selected address according to a second preset adjustment parameter to generate a new pre-selected address.
4. The method for assigning addresses as set forth in claim 1, wherein the step of obtaining a new address to be assigned according to the first preset adjustment rule is accepted by the network card to be assigned, comprising:
and adjusting the address to be allocated according to a first preset adjustment parameter to generate a new address to be allocated.
5. The address allocation method according to any one of claims 1 to 4, wherein the step of determining whether the address to be allocated is accepted by the network card to be allocated comprises:
counting the number of times of sending the network card address allocation request to be allocated within a preset duration;
judging whether the sending times exceeds preset times or not;
If the number of times exceeds the preset number, the address to be allocated is judged not to be accepted by the network card to be allocated.
6. An address assignment system, said address assignment system comprising:
the receiving module is used for acquiring an address allocation request of the network card to be allocated;
the allocation module is used for obtaining an address to be allocated according to the address allocation request and a preset allocation rule, and allocating the address to be allocated to the network card to be allocated;
the judging module is used for judging whether the address to be allocated is accepted by the network card to be allocated or not;
the adjusting module is used for obtaining a new address to be allocated according to a first preset adjusting rule if the new address to be allocated is not accepted by the network card to be allocated, wherein the first preset adjusting rule is used for adjusting the address to be allocated to obtain other unoccupied addresses to be allocated which are in a preset address pool range as new addresses to be allocated, and the steps are executed: the step of judging whether the address to be allocated is accepted by the network card to be allocated by the address allocation system further comprises the following steps:
the distribution module is also used for obtaining a preselected address according to the address distribution request and a preset generation rule;
the distribution module is also used for judging whether the preselected address is occupied or not;
The distribution module is further used for taking the pre-selected address as an address to be distributed if the pre-selected address is not occupied;
the allocation module is further configured to generate a new pre-selected address according to a second preset adjustment rule if the pre-selected address is occupied, where the second preset adjustment rule is used to adjust the pre-selected address to obtain an unoccupied pre-selected address as an address to be allocated, and perform the steps of: judging whether the pre-selected address is occupied or not;
the address allocation request comprises an MAC address of a network card to be allocated, the preset generation rule comprises a preset address algorithm, and the address allocation system further comprises:
the distribution module is further configured to generate address parameters according to the MAC address of the network card to be distributed and a preset address algorithm, where the preset address algorithm is configured to calculate the MAC address to obtain corresponding address parameters, and the MAC address corresponds to the address parameters one by one:
and the distribution module is also used for generating a preselected address according to the address information of the preset address pool and the address parameter.
7. An address allocation apparatus, characterized in that the address allocation apparatus comprises: memory, a processor and an address allocation program stored on the memory and executable on the processor, which when executed by the processor implements the steps of the address allocation method according to any one of claims 1 to 5.
8. A computer-readable storage medium, on which an address assignment program is stored, which, when executed by a processor, implements the steps of the address assignment method according to any of claims 1 to 5.
CN202111593889.5A 2021-12-23 2021-12-23 Address allocation method, system, device and computer-readable storage medium Active CN114301876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111593889.5A CN114301876B (en) 2021-12-23 2021-12-23 Address allocation method, system, device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111593889.5A CN114301876B (en) 2021-12-23 2021-12-23 Address allocation method, system, device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN114301876A CN114301876A (en) 2022-04-08
CN114301876B true CN114301876B (en) 2023-11-21

Family

ID=80970567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111593889.5A Active CN114301876B (en) 2021-12-23 2021-12-23 Address allocation method, system, device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN114301876B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115834543A (en) * 2022-11-18 2023-03-21 浙江大华技术股份有限公司 Address setting method, device, storage medium and electronic device
CN116346784A (en) * 2023-03-01 2023-06-27 深圳市科陆电子科技股份有限公司 Address automatic adaptation method, device, system and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7281036B1 (en) * 1999-04-19 2007-10-09 Cisco Technology, Inc. Method and apparatus for automatic network address assignment
CN104486452A (en) * 2014-09-23 2015-04-01 华为技术有限公司 Address processing method and related equipment and system
EP2900041A2 (en) * 2014-01-28 2015-07-29 Gerard Lighting Pty Ltd DALI Short Address Conflict Detection
CN105635326A (en) * 2014-10-27 2016-06-01 国基电子(上海)有限公司 Network equipment and IP address assignment method
CN107071083A (en) * 2017-03-31 2017-08-18 广州慧睿思通信息科技有限公司 One kind is based on Embedded many board IP address generation methods and device
WO2017206572A1 (en) * 2016-05-30 2017-12-07 上海斐讯数据通信技术有限公司 Ip address management method for use in network environment having multiple dhcp servers, and dhcp client
CN108989476A (en) * 2018-06-12 2018-12-11 新华三技术有限公司 A kind of address distribution method and device
CN109151093A (en) * 2018-10-24 2019-01-04 郑州云海信息技术有限公司 A kind of method, apparatus, storage medium and computer equipment for distributing IP address
WO2019057167A1 (en) * 2017-09-22 2019-03-28 惠州Tcl移动通信有限公司 Method for obtaining ip address, device, and mobile terminal
CN110311994A (en) * 2019-08-05 2019-10-08 深圳创维数字技术有限公司 IP address allocation request method, device and readable storage medium
CN110311995A (en) * 2019-08-05 2019-10-08 深圳创维数字技术有限公司 IP address allocation method, device and computer-readable storage medium
CN110708400A (en) * 2019-08-27 2020-01-17 重庆雅讯电源技术有限公司 Network address allocation method, device, node equipment and storage medium
CN112261173A (en) * 2020-10-20 2021-01-22 四川天邑康和通信股份有限公司 DHCP server allocation address conflict detection method relating to convergence gateway
CN112995350A (en) * 2019-12-13 2021-06-18 中盈优创资讯科技有限公司 Network equipment address pool conflict detection method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040139226A1 (en) * 2002-12-13 2004-07-15 Dany Margalit Method for assigning an IP address to a network connectable device
DE10330596A1 (en) * 2003-07-07 2005-02-03 Siemens Ag Assignment of station addresses to communication users in a bus system
US7633855B2 (en) * 2005-11-03 2009-12-15 Cisco Technology, Inc. System and method for resolving address conflicts in a network
CN1992736A (en) * 2005-12-30 2007-07-04 西门子(中国)有限公司 IP address distribution method and use thereof
KR100992968B1 (en) * 2007-04-06 2010-11-08 삼성전자주식회사 Network switch and address conflict prevention method
EP2477361B1 (en) * 2009-09-11 2016-03-02 Huawei Technologies Co., Ltd. Ip address automatic assignment method, equipment and system
CN102025790B (en) * 2009-09-23 2013-12-18 中兴通讯股份有限公司 Address allocation method, device and system

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7281036B1 (en) * 1999-04-19 2007-10-09 Cisco Technology, Inc. Method and apparatus for automatic network address assignment
EP2900041A2 (en) * 2014-01-28 2015-07-29 Gerard Lighting Pty Ltd DALI Short Address Conflict Detection
CN104486452A (en) * 2014-09-23 2015-04-01 华为技术有限公司 Address processing method and related equipment and system
CN105635326A (en) * 2014-10-27 2016-06-01 国基电子(上海)有限公司 Network equipment and IP address assignment method
WO2017206572A1 (en) * 2016-05-30 2017-12-07 上海斐讯数据通信技术有限公司 Ip address management method for use in network environment having multiple dhcp servers, and dhcp client
CN107071083A (en) * 2017-03-31 2017-08-18 广州慧睿思通信息科技有限公司 One kind is based on Embedded many board IP address generation methods and device
WO2019057167A1 (en) * 2017-09-22 2019-03-28 惠州Tcl移动通信有限公司 Method for obtaining ip address, device, and mobile terminal
CN108989476A (en) * 2018-06-12 2018-12-11 新华三技术有限公司 A kind of address distribution method and device
CN109151093A (en) * 2018-10-24 2019-01-04 郑州云海信息技术有限公司 A kind of method, apparatus, storage medium and computer equipment for distributing IP address
CN110311994A (en) * 2019-08-05 2019-10-08 深圳创维数字技术有限公司 IP address allocation request method, device and readable storage medium
CN110311995A (en) * 2019-08-05 2019-10-08 深圳创维数字技术有限公司 IP address allocation method, device and computer-readable storage medium
CN110708400A (en) * 2019-08-27 2020-01-17 重庆雅讯电源技术有限公司 Network address allocation method, device, node equipment and storage medium
CN112995350A (en) * 2019-12-13 2021-06-18 中盈优创资讯科技有限公司 Network equipment address pool conflict detection method and device
CN112261173A (en) * 2020-10-20 2021-01-22 四川天邑康和通信股份有限公司 DHCP server allocation address conflict detection method relating to convergence gateway

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
"IDSDDIP: a secure distributed dynamic IP configuration scheme for mobile ad hoc networks ";Uttam Ghosh,et al;《INTERNATIONAL JOURNAL OF NETWORK MANAGEMENT 》;全文 *
Raid Daoud,et al."Neural Network Based of a New User IP Address Determination and Address Conflict Elimination".《Diyala Journal of Engineering Sciences》.2019,全文. *
一种新的传感器网络MAC地址分配算法;田野;盛敏;李建东;;西安电子科技大学学报(第05期);全文 *
企业内部IP地址的规划管理;马少恒;韦婧;;信息与电脑(理论版)(第07期);全文 *
无线传感器网络中的地址分配协议;杜治高;钱德沛;刘轶;;软件学报(第10期);全文 *
更换网卡后系统无法分配IP地址解决方法;本刊编辑;;计算机与网络(第11期);全文 *

Also Published As

Publication number Publication date
CN114301876A (en) 2022-04-08

Similar Documents

Publication Publication Date Title
CN113111018B (en) Bus device addressing method and computer readable storage medium
US8713212B1 (en) Electronic device, communication control method of electronic device, and information terminal device
US10743252B2 (en) Method for identifying access point and hotspot and terminal
US9781597B2 (en) Electronic device and network connection method of electronic device
CN114301876B (en) Address allocation method, system, device and computer-readable storage medium
CN108600529B (en) Information interaction method, device and computer-readable storage medium
TWI569147B (en) Apparatus, system and method for assigning identifiers to components of a control system
CN105488097A (en) Information sharing method and electronic device
CN110855534B (en) Method and apparatus for searching and controlling controllee in smart home system
KR20190140664A (en) Electronic device and method for controlling function of relaying wireless lan connection
CN106851758A (en) Communication network changing method and terminal device
JP7328675B2 (en) System, information processing device and program
CN108712513B (en) Network address setting method and device, terminal equipment and storage medium
CN103559091A (en) Data scheduling method and split type terminal system
CN110311994B (en) IP address allocation request method, device and readable storage medium
CN110311995B (en) IP address allocation method, device and computer readable storage medium
CN109951549B (en) Network page access method, device and computer-readable storage medium
CN110321251B (en) Data backup method, device, equipment and storage medium based on network block equipment
CN104954503A (en) Distribution apparatus and distribution method
CN106507434B (en) Data processing method and device
US11270666B1 (en) Synchronizing preferences between multiple displays
EP3843343B1 (en) Managing an application program priority
CN114416254A (en) Business card display method, intelligent terminal and storage medium
CN116155772B (en) Abnormality determination method and device, electronic equipment and storage medium
CN110460519A (en) Control method, device and computer-readable storage medium based on multi-protocol gateway

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
GR01 Patent grant
GR01 Patent grant