CN103957288A - Method, device and equipment for IP address dynamic allocation - Google Patents

Method, device and equipment for IP address dynamic allocation Download PDF

Info

Publication number
CN103957288A
CN103957288A CN201410174692.1A CN201410174692A CN103957288A CN 103957288 A CN103957288 A CN 103957288A CN 201410174692 A CN201410174692 A CN 201410174692A CN 103957288 A CN103957288 A CN 103957288A
Authority
CN
China
Prior art keywords
address
message
subvlan
mark
arp
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
CN201410174692.1A
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.)
Fujian Star Net Communication Co Ltd
Original Assignee
Fujian Star Net Communication 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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN201410174692.1A priority Critical patent/CN103957288A/en
Publication of CN103957288A publication Critical patent/CN103957288A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method, device and equipment for IP address dynamic allocation. During IP address dynamic allocation, conflict of allocated IP addresses is avoided. Network equipment stores an address allocation table in an auxiliary storage. The address allocation table is used for recording IP addresses allocated for client side equipment by the network equipment during a dynamic host configuration DHCP process. The method comprises the steps that after the network equipment is restarted, the IP addresses in the address allocation table are read respectively; according to the read addresses, a first address resolution protocol (ARP) message is established and broadcast; if the response message of the first ARP message is received, the IP addresses are marked as being allocated; if the response message of the first ARP message is not received, the IP addresses are marked as not being allocated; and when an IP address allocation request is received, IP addresses are selected from IP addresses which are not allocated and are allocated.

Description

A kind of method, device and equipment of dynamic IP address allocation
Technical field
The present invention relates to ethernet network switched communication technical field, relate in particular to a kind of method, device and equipment of dynamic IP address allocation.
Background technology
VLAN (VLAN, Virtual Local Area Network) is on physical network, to divide logical network out, and effect is the same with common local area network (LAN).Clean culture, the broadcast and multicast frame of the second layer forward, spread in a VLAN, and can directly not enter among other VLAN.If so the main process equipment that port connects is wanted must not pass through a three-layer equipment in the main process equipment communication of same VLAN with other.
Supervlan, i.e. super vlan, also cries vlan polymerization, and its principle is that the IP of a certain network segment is given to different Sub-VLAN (Sub VLAN), and these Sub VLAN belong to same Super VLAN.And each Sub VLAN is broadcast domain independently, two layers of isolation mutually between different Sub VLAN.In the time that the user in Sub VLAN need to carry out three layers of communication, using the IP address of the virtual interface of use Super VLAN as gateway address, multiple like this VLAN share an Internet protocol (IP, Internet Protocol) address, thereby have saved IP address resource.
Meanwhile, in order to realize three layer intercommunications between different Sub VLAN and the intercommunication of Sub VLAN and other networks, need to utilize address resolution protocol (ARP, Address Resolution Protocol) agent functionality.Can carry out forwarding and the processing of ARP request and response message by ARP proxy, thereby realize three layer intercommunications between two layers of isolated port.Be illustrated in fig. 1 shown below the operation principle schematic diagram that it is supervlan.In Fig. 1, pc1 and pc2 will reach the object of two layers of isolation, and communication can only be passed through three layers of route.Traditional way need to configure respectively the gateway address of pc1 and pc2 in device A, needs 2 IP addresses.Adopt after supervlan technology, network equipment A only need to configure a supervlan address.As shown in Figure 1, device A is enabled supervlan5, and configuration of IP address is 10.1.1.1.Below supervlan5, comprise 2 subvlan2 and subvlan3, pc1 belongs to subvlan2, distributing IP address 10.1.1.2/24, and gateway is the IP (10.1.1.1) of supervlan5; Pc2 belongs to subvlan3, distributing IP address 10.1.1.3/24, and gateway is the IP (10.1.1.1) of suervlan5.Pc1 and pc2 can not directly carry out double layered communication, can only carry out three layers of communication by gateway.
Pc1 sends request pc2 medium access control (MAC, Media Access Control) the ARP request message of address, device A will be replied the MAC Address of self after receiving by ARP proxy function, pc1 thinks that device A is exactly pc2, sends communication message to device A.In like manner, pc2 thinks that device A is exactly pc1, sends communication message to device A.Pc1 and pc2, by device A, have realized three layers of communication.
DHCP (DHCP, Dynamic Host Configuration Protocol), comprises two parts: one is server end, i.e. Server, and another is client, i.e. Client.Server, by the request of response Client, gives Client distributed network parameters, as IP address, subnet mask, gateway etc.By DHCP agreement, can realize the dynamic assignment online of client network parameter, alleviate network manager's burden.As shown in Figure 2, it is DHCP protocol theory figure, and it comprises following several stages:
1, the discovery stage, DHCP client computer is found the stage of Dynamic Host Configuration Protocol server.DHCP client computer sends DHCP DISCOVER discovery information with broadcast mode and finds Dynamic Host Configuration Protocol server, and on network, each main frame that ICP/IP protocol has been installed all can receive this broadcast message, but only has Dynamic Host Configuration Protocol server just can make response.
2, provide the stage, Dynamic Host Configuration Protocol server provides the stage of IP address.The Dynamic Host Configuration Protocol server that receives DHCP DISCOVER discovery information in network all can be made response, it selects one and distributes to DHCP client computer from the IP address of not yet hiring out, and the DHCP OFFER that sends an IP address that comprises taxi and other settings to DHCP client computer provides information.
3, the choice phase, DHCP client computer is selected the stage of the IP address that certain Dynamic Host Configuration Protocol server provides.If there is the DHCP OFFER that many Dynamic Host Configuration Protocol server are sent to DHCP client computer that information is provided, DHCP client computer receives only first DHCP OFFER receiving information is provided, then it just answers a DHCP REQUEST solicited message with broadcast mode, comprises the content to its selected Dynamic Host Configuration Protocol server IP address requesting in this information.Why will answer with broadcast mode, be in order to notify all Dynamic Host Configuration Protocol server, and he will select certain the IP address that Dynamic Host Configuration Protocol server provides.
4, the stage of recognition, Dynamic Host Configuration Protocol server is provided by the stage of the IP address providing.After Dynamic Host Configuration Protocol server is received the DHCP REQUEST solicited message of DHCP client computer answer, it just sends one to DHCP client computer and comprises IP address that it provides and the DHCP ACK confirmation of other settings, the IP address of telling DHCP client computer can use it to provide.Then DHCP client computer is just by the IP address and the network card binding that get, and in addition, except the server that DHCP client computer is chosen, other Dynamic Host Configuration Protocol server all will be regained the IP address once providing.
5, login again.Later DHCP client computer, at every turn again when logging in network, has not just needed to send DHCP DISCOVER again and has found information, but directly sends the DHCP REQUEST solicited message of the IP address once distributed before comprising.When Dynamic Host Configuration Protocol server is received after this information, it can attempt allowing DHCP client computer continue to use original IP address, and answers a DHCP ACK confirmation.If cannot reallocate (such as this IP address has been distributed to other DHCP client computer use) while use to original DHCP client computer in this IP address, Dynamic Host Configuration Protocol server is answered a DHCP NAK to DHCP client computer and is denied information.Receive this DHCP NAK when original DHCP client computer and deny after information, it just must resend DHCP DISCOVER discovery information and come the IP address that please look for novelty.
6, renew the lease.Generally there is a time limit of the lease IP address that Dynamic Host Configuration Protocol server is hired out to DHCP client computer, and after expiring, Dynamic Host Configuration Protocol server just can be regained the IP address of taxi.If DHCP client computer will extend its IP lease, must upgrade its IP lease.When DHCP client computer starts and the IP lease time limit cross a half, DHCP client computer all can send the information of its IP lease upgraded from trend Dynamic Host Configuration Protocol server.
At present, by supervlan technology, vlan isolation technology and dhcp technology can be set up a kind of flattening network.As shown in Figure 3, it is flattening network architecture schematic diagram.In Fig. 3, device A is for supporting supervlan, vlan, the three-layer network appliance of dhcp.In device A, open supervlan5, IP:1.1.1.1/24, it arranges 2 subvlan (subvlan2 and subvlan3), opens dhcp server, is the address of the client distribution 1.1.1.0/24 network segment under this supervlan.Access device B supports vlan to divide.Gi2 mouth belongs to vlan2, the lower pc1 that connects.Gi3 mouth belongs to vlan3, the lower pc2 that connects.Pc1 and pc2 are dhcp client device.Under normal circumstances, pc1 and pc2, by dhcp agreement, get respectively IP address device A, taking device A as gateway, carry out three layers of communication.
In the network architecture shown in Fig. 3, there are the following problems:
In the time that network equipment A is restarted, the client device of the client device of distributing IP address and unallocated IP address can produce IP address assignment conflict, causes part client device to surf the Net.
In Fig. 3, pc1 obtains IP address by DHCP, and at this moment A is restarted.Restart rear pc2 and obtain IP address by DHCP again, device A may be distributed to pc2 by the IP address 1.1.1.1 that distributes to pc1, the IP address conflict that causes pc2 and pc1 to distribute.For problem, current solution be device A in the time of distributing IP address, can first ping once whether exist this IP address, when ping is obstructed, just distribute address.But, because antivirus software or the fire compartment wall of PC end can filter ping message, cause device A to be judged by accident and the reallocation of IP address caused to IP address assignment conflict.
Summary of the invention
The embodiment of the present invention provides a kind of method, device and equipment of dynamic IP address allocation, in order to when the dynamic IP address allocation, avoids the IP address conflict distributing.
The embodiment of the present invention provides a kind of method of dynamic IP address allocation, and the network equipment is allocations of storage addresses table in additional storage, and described allocation tables is the IP address that client device distributes for recording the dynamic host configuration DHCP process network equipment;
Described method, comprising:
After the described network equipment is restarted, read respectively each the IP address in described allocation tables;
According to IP address architecture the first ARP message reading broadcast;
If receive the response message of a described ARP message, IP address is assigned with described in mark;
If do not receive the response message of a described ARP message, IP address is not assigned with described in mark;
In the time receiving IP address assignment request, in the IP address being never assigned with, select IP address and distribute.
The embodiment of the present invention provides a kind of device of dynamic IP address allocation, comprising:
ASU auxiliary storage unit, for allocations of storage addresses table, described allocation tables is the IP address that client device distributes for recording the dynamic host configuration DHCP process network equipment;
Reading unit, for after the network equipment is restarted, reads respectively each the IP address in described allocation tables;
ARP message structural unit, for IP address architecture the first ARP message the broadcast of reading according to described reading unit;
Indexing unit, in the time receiving the response message of a described ARP message, IP address is assigned with described in mark; In the time not receiving the response message of a described ARP message, IP address is not assigned with described in mark;
IP address assignment unit, in the time receiving IP address assignment request, selects IP address and distributes in the IP address being never assigned with.
The embodiment of the present invention provides a kind of network equipment, comprises the device of above-mentioned dynamic IP address allocation.
Method, device and the network equipment of the dynamic IP address allocation that the embodiment of the present invention provides, the IP address of distributing for client device in network equipment storage dhcp process, like this, after the network equipment is restarted, the network equipment is according to the IP address architecture ARP message of storing in allocation tables broadcast, if receive response message, confirm that this IP address is assigned with, otherwise confirm that this IP address is not assigned with, in the time receiving IP address assignment request, from unappropriated IP address, select IP address assignment, like this, avoided the conflict of IP address assignment.
Other features and advantages of the present invention will be set forth in the following description, and, partly from specification, become apparent, or understand by implementing the present invention.Object of the present invention and other advantages can be realized and be obtained by specifically noted structure in write specification, claims and accompanying drawing.
Brief description of the drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms a part of the present invention, and schematic description and description of the present invention is used for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is in prior art, SuperVlan operation principle schematic diagram;
Fig. 2 is in prior art, DHCP protocol theory figure;
Fig. 3 is in prior art, flattening network architecture schematic diagram;
Fig. 4 is in the embodiment of the present invention, the implementing procedure schematic diagram of the method for dynamic IP address allocation;
Fig. 5 is in the embodiment of the present invention, dynamic IP address allocation distribution method application scenarios schematic diagram;
Fig. 6 is in the embodiment of the present invention, the structural representation of the device of dynamic IP address allocation.
Embodiment
The present invention is directed in dhcp process, the network equipment is after being client device distributing IP address, be stored as the IP address of client distribution and the relevant information of other network parameters by forwarded table, because forwarded table is stored in internal memory, after the network equipment restarts, forwarded table is by deleted, like this, may cause subsequent allocations IP address conflict, propose a kind of method, device and network equipment of dynamic IP address allocation.
Below in conjunction with Figure of description, the preferred embodiments of the present invention are described, be to be understood that, preferred embodiment described herein is only for description and interpretation the present invention, be not intended to limit the present invention, and in the situation that not conflicting, the feature in embodiment and embodiment in the present invention can combine mutually.
Embodiment mono-
Memory can be divided into main storage and additional storage by its purposes, and main storage claims again built-in storage (abbreviation internal memory), and additional storage claims again external memory (abbreviation external memory).Additional storage is the memory that CPU can not directly access, and it need to pass through internal memory and CPU and I/O devices exchange information, a large amount of for depositing muchly, comprise the data that wouldn't use.As hard disk, CD, USB flash disk etc. all belong to additional storage.
In the embodiment of the present invention, the network equipment is allocations of storage addresses table in additional storage, when concrete enforcement, can be stored in the external memory that the network equipment carries, as hard disk, solid state hard disc, FLASH (flash) memory etc., also can be stored in outside mobile memory, as USB flash disk, portable hard drive, floppy disk (Floppy Disk), CD (Compact Disc), storage card etc., the present invention does not limit this.The network equipment passes through behind dhcp process distributing IP address, except upgrading forwarded table, and also can scheduler allocation table.
Preferably, as shown in table 1, a kind of possible structure for the forwarded table of network equipment storage:
Table 1
Sequence number port_id subvlan_id mac_pc ip_pc
? ? ? ? ?
Wherein, Field ID is for receiving the port-mark of port of message that client device sends, subvlan_id is the mark that sends the client device place Subvlan of message, mac_pc is the MAC Address that sends the client device of message, and ip_pc is the IP address that sends the client device of message.
As shown in table 2, a kind of possible structure for the allocation tables of network equipment storage:
Table 2
Sequence number supervlan_id port_id subvlan_id mac_pc ip_pc Other network parameter
? ? ? ? ? ? ?
In table 2, supervlan_id is the mark that receives the affiliated Supper VLAN of message, and other field is identical with table 1, repeats no more here.
Based on the allocation tables of storage, as shown in Figure 4, the implementing procedure schematic diagram of the method for the dynamic IP address allocation providing for the embodiment of the present invention, comprises the following steps:
S41, after the network equipment is restarted, read respectively each the IP address in the allocation tables of storage.
The IP address architecture ARP message that S42, basis read broadcast.
When concrete enforcement, the network equipment is for each the IP address in allocation tables, according to this IP address architecture ARP message broadcast.
Preferably, the network equipment can also be for each record in allocation tables, reads successively every terms of information (supervlan_id, port_id in table 2, subvlan_id, mac_pc, ip_pc) structure ARP message, concrete, supervlan_id is the three-layer network interface that sends ARP message, port_id is the port-mark that sends the port of ARP message, and subvlan_id is the vlan_id in ARP message, and ip_pc is the object IP address in ARP message; Mac_pc is the MAC Address that receives the client device of ARP message, and the ARP message constructing is only sent to the client device that mac_pc is corresponding.Like this, can reduce the quantity of the ARP message sending in network after the network equipment is restarted.
The ARP message of network equipment structure is sent by the interface at supervlan_id place, is sent to the vlan at subvlan_id place.
If S43 receives the response message of ARP message, this IP address of network equipment mark is assigned with, and performs step S45.
If S44 does not receive the response message of ARP message, this IP address of network equipment mark is not assigned with.
S45, in the time receiving IP address assignment request, in the IP address being never assigned with, select IP address and distribute.
When concrete enforcement, if receive the response message of ARP message, can also, according to the corresponding updating form 1 that records in table 2, extract (port_id, subvlan_id, mac_pc, the ip_pc) in corresponding record in table 2 and be added in table 1; If do not receive the response message of ARP message, the record of correspondence in delete list 2.
Preferably, after table 2 updating form 1, can also be at table 1 mark this be recorded as and create according to allocation tables.
When concrete enforcement, because the network equipment is after restarting, during structure ARP message transmission and wait client device return to ARP message, according in the process of table 2 updating form 1, client device can constantly send IP message to the network equipment, if when client device sends IP message, ARP message transmission phase not yet finishes, in table 1, there is not the network parameter information of this client device, the IP message that causes this client device to send is dropped, for fear of the problems referred to above, in the embodiment of the present invention, the network equipment is after receiving the IP message of client device transmission, extract the source IP address in message, mac address, the port-mark that the Subvlan of the Subvlan of transmission IP message identified and received the port of IP message mates with the record in table 2, if match identical record, according to the information updating table 1 extracting from IP message, the information that is about to extract is added in table 1 and E-Packets.
When concrete enforcement, also may there is following application scenarios, the network equipment after having distributed IP address, but before in this IP address is being written into table 2, restart, like this, may cause certain IP address to be assigned with, but but record not in table 2.Based on this, preferably, in the embodiment of the present invention, if after the network equipment receives the IP message of client device transmission, and when the information of extracting from IP message does not match relevant information in table 2, according to the information of extracting and receive port-mark updating form 1 and the table 2 of the port of IP message.Better, the abnormal IP flow in network is that IP message aggression causes, can also label table 1 and table 2 in be recorded as according to IP message and upgrade and obtain, and is set the effective time of this record.According to the information structuring ARP message extracting broadcast, if within the effective time arranging, do not receive the response message of this ARP message afterwards, delete record corresponding in allocation tables and forwarded table; If within the effective time arranging, receive the response message of the 2nd ARP message, cancel the effective time arranging.
Embodiment bis-
Also there is following problem in existing flattening network organization framework: cannot be access user segmentation IP address, thereby cannot adopt IP address field to carry out identifying user.In actual applications, network manager can be generally that different buildings distributes the different network segments, identifies client and manages with IP address.Such as the address of an A building distribution 1.1.1.0/24 network segment, B building distributes the address of the 2.2.2.0/24 network segment.But adopt supervlan technology, need a Yi Ge building Supervlan of configuration (needing accordingly an IP address field), just there will be the not enough problem of subvlan more than building, cause being with machine number of users few under a port; If any 10Dong building, configure 10 Supervlan, under average each Supervlan, can only be with 400 users (4k/10).In actual applications, client's number in each Lou Dong region can be so all even not limited.
In order to solve the not enough problem of subvlan, existing solution is to use multiport instead to be deployed under same Supervlan, and plan a large IP address field, but DHCP Server comes distributing IP address according to Supervlan gateway information, dhcp address distributes cannot be accurate to port and Subvlan.
Based on this, in the embodiment of the present invention, the network equipment can also be stored the IP address information table that this Subvlan is corresponding for each Subvlan, IP address information table comprises that the mark of this Subvlan, port-mark and the described network equipment of this Subvlan place port are that this Subvlan distributes the IP address field of answering, like this, can be one section of IP address field of each Subvlan distribution, and bind the physical port of this Subvlan configuration.Like this, can determine Subvlan according to port.
Based on this, the network equipment, in the time being client device distributing IP address in a certain Subvlan, can being searched the IP address field that this Subvlan is corresponding in secondary IP address information table, and select IP address assignment to this client device from this IP address field.
When concrete enforcement, in the IP address assignment request receiving in step S45, carry Subvlan mark, like this after the network equipment is restarted, the network equipment is according to after allocation tables structure ARP message, if while receiving the response message of ARP message, according to the Subvlan mark of carrying in IP address assignment request, from address information table, search this Subvlan and identify corresponding IP address field, from the IP address field finding, select the IP address not being assigned with and distribute.
Accordingly, in step S43, in all right mark IP address information table, this IP address that this Subvlan identifies in corresponding IP address field is assigned with; And in can also mark IP address information table in step S44, this IP address that this Subvlan identifies in corresponding IP address field be assigned with.
Embodiment for a better understanding of the present invention, below as an example of the network structure shown in Fig. 5 example, the specific implementation process to the embodiment of the present invention describes.
When initial, be device A configuration supervlan5, the IP address field 1 of distribution is 1.1.1.1/24, and IP address field 2 is 2.2.2.1/24 and subvlan2 and subvlan3.Device A is configured to dhcp server, store respectively its corresponding IP address information table for each the sub-subvlan configuring in device A, the IP address information table that subvlan2 is corresponding comprises following information: corresponding IP address field is 1.1.1.0/24, gateway information 1.1.1.1/24, other network parameters comprise (supervlan_id, port_id, subvlan_id)=(5,1,2).The IP address information table that subvlan3 is corresponding comprises following information: corresponding IP address field is 2.2.2.0/24, gateway information 2.2.2.1/24, and other network parameters comprise (supervlan_id, port_id, subvlan_id)=(5,1,3).
Each client device pc1 is connected with network equipment A by network equipment B with pc2, and wherein, the port that connects pc1 arranges vlan2, and the port that connects pc2 arranges vlan3.
After netinit completes, pc1 initiates dhcp process, device A arranges (supervlan_id, port_id, subvlan_id)=(5,1,2), device A is searched corresponding IP address information table, determines that its corresponding IP address field is 1.1.1.0/24, and device A is that pc1 distributes corresponding network parameter.Be assumed to be (ip address, gateway address)=(1.1.1.2/24,1.1.1.1).Device A updating form 1 is as follows:
Sequence number port_id subvlan_id mac_pc ip_pc
1 1 2 0000.0000.0001 1.1.1.2/24
Meanwhile, device A updating form 2 is as follows:
Equally, for behind pc2 distributing IP address and updating form 1 and table 2.
After device A is restarted, because table 1 is stored in internal memory, therefore device A is restarted rear table 1 by deleted, and table 2 is stored in hard disk, and therefore, device A still exists after restarting.Pc1 and pc2 still use the IP address of original distribution.
Device A, after restarting, reads table 2, structure ARP message, and the interface that sends ARP message is supervlan5-1.1.1.1, object IP address=1.1.1.2, ARP message is from vlan2, and port one sends.Pc1 receives ARP message, finds the ARP that it asks self, returns to the response message of ARP.
Device A is received the arp response message of pc1, the following information in updating form 1:
Sequence number port_id subvlan_id mac_pc ip_pc
1 1 2 0000.0000.0001 1.1.1.2/24
Meanwhile, device A identifies in the IP address information table that subvlan2 is corresponding, and the pc1 of mac=0000.0000.0001 has been distributed in the IP address of 1.1.1.2.
Follow-up, pc1 continues to send IP message, after device A is received the IP message of pc1 transmission, the source IP address .MAC address and vlan_id (vlan_id, port_id, the mac_pc that in the port-mark of the port of extraction reception IP message and IP message, carry, ip_pc)=(2,1,0000.0000.0001,1.1.1..2) mate with the relative recording in table 2.If. device A is found in coupling, updating form 1, and discovery table 1 information is upgraded, the effective time arranging in updating form 1.
In the method for above-mentioned dynamic IP address allocation, it cannot be the problem of different user assignment different IP addresses sections that the network equipment has solved by pre-stored IP address information table, dynamic IP addressing is distributed and can be accurate to port and Subvlan, than prior art, improve the flexibility of IP address assignment; On the other hand, by allocations of storage addresses table in hard disk, like this, after the network equipment restarts, according to the IP address architecture ARP message having distributed recording in allocation tables, if receive response message, determine that this IP address is assigned with, if do not receive response message, determine that this IP address is not assigned with, like this, follow-up in the time of distributing IP address, just can avoid IP address assignment conflict.
Based on same inventive concept, a kind of interface of mobile terminal icon arrangement device and mobile terminal are also provided in the embodiment of the present invention, because the principle that said apparatus and equipment are dealt with problems is similar to interface of mobile terminal icon arrangement method, therefore the enforcement of said apparatus and equipment can be referring to the enforcement of method, repeats part and repeat no more.
Embodiment tri-
As shown in Figure 6, the structural representation of the device of the dynamic IP address allocation providing for the embodiment of the present invention, comprising:
ASU auxiliary storage unit 61, can be for allocations of storage addresses table, and described allocation tables is the IP address that client device distributes for recording the dynamic host configuration DHCP process network equipment;
Reading unit 62, can be for after the network equipment be restarted, and reads respectively each the IP address in described allocation tables;
ARP message structural unit 63, can be for IP address architecture the first ARP message the broadcast of reading according to described reading unit;
Indexing unit 64, can be in the time receiving the response message of a described ARP message, and IP address is assigned with described in mark; In the time not receiving the response message of a described ARP message, IP address is not assigned with described in mark;
IP address assignment unit 65, can, in the time receiving IP address assignment request, select IP address and distribute in the IP address being never assigned with.
When concrete enforcement, the device of the dynamic IP address allocation that the embodiment of the present invention provides, can also comprise:
Extraction unit, can be for extracting Subvlan mark, the source IP address carrying in described the first arp response message and the port numbers that receives the port of described the first arp response message;
Updating block, can be for the information updating forwarded table extracting according to described extraction unit.
When concrete enforcement, the device of the dynamic IP address allocation that the embodiment of the present invention provides, can also comprise and search unit and message repeating unit, wherein:
Described extraction unit, can also be used in the time receiving the request of IP message repeating, the Subvlan mark of the Subvlan that extract the source IP address that carries in described IP message, sends described IP message and receive the port-mark of the port of described IP message;
Whether the described unit of searching, there is corresponding record allocation tables described in the information searching that can also be used for extracting from described IP message according to described extraction unit;
Described updating block, can also be used for when searching unit and finding corresponding record, upgrading described forwarded table according to the record finding described; And described when searching unit and not finding corresponding record, according to allocation tables described in the information updating of extracting and forwarded table;
Described message repeating unit, can, for after updating block upgrades forwarded table or allocation tables, forward described IP message.
When concrete enforcement, the device of the dynamic IP address allocation that the embodiment of the present invention provides, can also comprise set of time unit and delete cells, wherein:
Described set of time unit, can be for arranging the effective time of information corresponding record in described allocation tables and described forwarded table that described extraction unit extracts from IP message; And within the effective time arranging, do not receive the response message of the 2nd ARP message, cancel the effective time arranging;
ARP message structural unit 63, can also be used for extracting from IP message source IP address structure the 2nd ARP message the broadcast that information, comprise according to described extraction unit;
Delete cells, if can also be used for, within the effective time arranging, not receiving the response message of described the 2nd ARP message, deletes record corresponding in described allocation tables and forwarded table.
When concrete enforcement, ASU auxiliary storage unit 61, can also be used for storing for each sub-VLAN Subvlan the IP address information table that this Subvlan is corresponding, described IP address information table comprises that the mark of this Subvlan, port-mark and the described network equipment of this Subvlan place port are that this Subvlan distributes the IP address field of answering.
When concrete enforcement, in the IP address assignment request that the network equipment receives, carry Subvlan mark;
IP address assignment unit 65, the Subvlan that can also be used for carrying according to described IP address assignment request identifies, and searches this Subvlan and identify corresponding IP address field from described address information table; From the IP address field finding, select the IP address not being assigned with and distribute.
When concrete enforcement, indexing unit 64 can be in the time receiving the response message of a described ARP message, and in IP address information table, the described IP address that described Subvlan identifies in corresponding IP address field is assigned with described in mark; And at the response message that does not receive a described ARP message, in IP address information table, the described IP address that described Subvlan identifies in corresponding IP address field is not assigned with described in mark.
When concrete enforcement, delete cells, can also be used in the time not receiving the response message of a described ARP message, deletes in described allocation tables, record corresponding to described IP address.
For convenience of description, above each several part is divided into each module (or unit) according to function and describes respectively.Certainly, the function of each module (or unit) can be realized in same or multiple software or hardware implementing time of the present invention, the device of the dynamic IP address allocation providing as the embodiment of the present invention can be arranged in the network equipment.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the present invention can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) that wherein include computer usable program code.
The present invention is with reference to describing according to flow chart and/or the block diagram of the method for the embodiment of the present invention, equipment (system) and computer program.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction that makes to carry out by the processor of computer or other programmable data processing device produces the device for realizing the function of specifying at flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame on computer or other programmable devices.
Although described the preferred embodiments of the present invention, once those skilled in the art obtain the basic creative concept of cicada, can make other change and amendment to these embodiment.So claims are intended to be interpreted as comprising preferred embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if these amendments of the present invention and within modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.

Claims (13)

1. a method for dynamic IP address allocation, is characterized in that, the network equipment is allocations of storage addresses table in additional storage, and described allocation tables is the IP address that client device distributes for recording the dynamic host configuration DHCP process network equipment;
Described method, comprising:
After the described network equipment is restarted, read respectively each the IP address in described allocation tables;
According to IP address architecture the first ARP message reading broadcast;
If receive the response message of a described ARP message, IP address is assigned with described in mark;
If do not receive the response message of a described ARP message, IP address is not assigned with described in mark;
In the time receiving IP address assignment request, in the IP address being never assigned with, select IP address and distribute.
2. the method for claim 1, is characterized in that, after receiving the response message of a described ARP message, also comprises:
The described network equipment extracts the port numbers of Subvlan mark, the source IP address carrying in described the first arp response message and the port that receives described the first arp response message and upgrades forwarded table.
3. method as claimed in claim 2, is characterized in that, also comprises:
In the time receiving the request of IP message repeating, the Subvlan of the source IP address carrying in extraction IP message, the Subvlan that sends described IP message identifies and receives the port-mark of the port of described IP message;
According to whether have corresponding record in allocation tables described in the information searching extracting from described IP message;
If so, turn transmitting IP packet after upgrading described forwarded table according to the record finding;
If not, according to turning transmitting IP packet after allocation tables described in the information updating of extracting and forwarded table.
4. method as claimed in claim 3, is characterized in that, according to after allocation tables described in the information updating of extracting and forwarded table, also comprises:
The effective time of the information that setting is extracted corresponding record in described allocation tables and described forwarded table;
According to extracting source IP address structure the 2nd ARP message the broadcast that comprise in information;
If within the effective time arranging, do not receive the response message of described the 2nd ARP message, delete record corresponding in described allocation tables and forwarded table;
If within the effective time arranging, receive the response message of described the 2nd ARP message, cancel the effective time arranging.
5. the method as described in claim as arbitrary in claim 1~4, it is characterized in that, the described network equipment stores for each sub-VLAN Subvlan the IP address information table that this Subvlan is corresponding, and described IP address information table comprises that the mark of this Subvlan, port-mark and the described network equipment of this Subvlan place port are that this Subvlan distributes the IP address field of answering.
6. method as claimed in claim 5, is characterized in that, carries Subvlan mark in described IP address assignment request;
Never in the IP address being assigned with, select IP address and distribute, specifically comprising:
According to the Subvlan mark of carrying in described IP address assignment request, from described address information table, search this Subvlan and identify corresponding IP address field;
From the IP address field finding, select the IP address not being assigned with and distribute.
7. a device for dynamic IP address allocation, is characterized in that, comprising:
ASU auxiliary storage unit, for allocations of storage addresses table, described allocation tables is the IP address that client device distributes for recording the dynamic host configuration DHCP process network equipment;
Reading unit, for after the network equipment is restarted, reads respectively each the IP address in described allocation tables;
ARP message structural unit, for IP address architecture the first ARP message the broadcast of reading according to described reading unit;
Indexing unit, in the time receiving the response message of a described ARP message, IP address is assigned with described in mark; In the time not receiving the response message of a described ARP message, IP address is not assigned with described in mark;
IP address assignment unit, in the time receiving IP address assignment request, selects IP address and distributes in the IP address being never assigned with.
8. device as claimed in claim 7, is characterized in that, also comprises:
Extraction unit, for extracting Subvlan mark, the source IP address that described the first arp response message carries and the port numbers that receives the port of described the first arp response message;
Updating block, for the information updating forwarded table extracting according to described extraction unit.
9. device as claimed in claim 8, is characterized in that, also comprise and search unit and message repeating unit, wherein:
Described extraction unit, also in the time receiving the request of IP message repeating, the Subvlan mark of the Subvlan that extract the source IP address that carries in described IP message, sends described IP message and receive the port-mark of the port of described IP message;
Whether the described unit of searching, also for there is corresponding record allocation tables described in the information searching extracting from described IP message according to described extraction unit;
Described updating block, also for when searching unit and finding corresponding record, upgrading described forwarded table according to the record finding described; And described when searching unit and not finding corresponding record, according to allocation tables described in the information updating of extracting and forwarded table;
Described message repeating unit, for after updating block upgrades forwarded table or allocation tables, forwards described IP message.
10. device as claimed in claim 9, is characterized in that, also comprises set of time unit and delete cells, wherein:
Described set of time unit, for arranging the effective time of information corresponding record described allocation tables and described forwarded table that described extraction unit extracts from IP message; And within the effective time arranging, do not receive the response message of the 2nd ARP message, cancel the effective time arranging;
Described ARP message structural unit, also for extracting from IP message source IP address structure the 2nd ARP message the broadcast that comprise information according to described extraction unit;
Delete cells, if also within the effective time arranging, do not receive the response message of described the 2nd ARP message, deletes record corresponding in described allocation tables and forwarded table.
Device as described in 11. claims as arbitrary in claim 7~10, is characterized in that,
Described ASU auxiliary storage unit, also, for storing for each sub-VLAN Subvlan the IP address information table that this Subvlan is corresponding, described IP address information table comprises that the mark of this Subvlan, port-mark and the described network equipment of this Subvlan place port are that this Subvlan distributes the IP address field of answering.
12. devices as claimed in claim 11, is characterized in that, carry Subvlan mark in described IP address assignment request;
Described IP address assignment unit, also the Subvlan mark for carrying according to described IP address assignment request is searched this Subvlan and is identified corresponding IP address field from described address information table; From the IP address field finding, select the IP address not being assigned with and distribute.
13. 1 kinds of network equipments, is characterized in that, comprise that the arbitrary power of claim 7~12 requires described device.
CN201410174692.1A 2014-04-28 2014-04-28 Method, device and equipment for IP address dynamic allocation Pending CN103957288A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410174692.1A CN103957288A (en) 2014-04-28 2014-04-28 Method, device and equipment for IP address dynamic allocation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410174692.1A CN103957288A (en) 2014-04-28 2014-04-28 Method, device and equipment for IP address dynamic allocation

Publications (1)

Publication Number Publication Date
CN103957288A true CN103957288A (en) 2014-07-30

Family

ID=51334511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410174692.1A Pending CN103957288A (en) 2014-04-28 2014-04-28 Method, device and equipment for IP address dynamic allocation

Country Status (1)

Country Link
CN (1) CN103957288A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105610669A (en) * 2015-12-28 2016-05-25 湖南基石通信技术有限公司 Address distribution method and device for Supervlan flattened network
CN105933465A (en) * 2016-04-20 2016-09-07 北京小米移动软件有限公司 Method and device for accessing wireless network
CN106936944A (en) * 2017-03-31 2017-07-07 苏州科达科技股份有限公司 A kind of method and device for detecting and processing network address collision
CN107465769A (en) * 2017-07-31 2017-12-12 郑州云海信息技术有限公司 A kind of IP Address in LAN management method and device
CN107613042A (en) * 2017-09-22 2018-01-19 捷开通讯(深圳)有限公司 Obtain the method, device and mobile terminal of IP address
CN108183978A (en) * 2018-03-29 2018-06-19 北京环境特性研究所 A kind of communication equipment IP address configuration method and communication equipment
CN108289047A (en) * 2018-01-25 2018-07-17 郑州云海信息技术有限公司 A kind of RMT test methods and device
CN108712522A (en) * 2018-07-20 2018-10-26 新华三技术有限公司 IP address distribution method and device
CN109120738A (en) * 2018-08-17 2019-01-01 瑞斯康达科技发展股份有限公司 Dynamic Host Configuration Protocol server and its method for carrying out network-internal apparatus management
CN109151093A (en) * 2018-10-24 2019-01-04 郑州云海信息技术有限公司 A kind of method, apparatus, storage medium and computer equipment for distributing IP address
CN111064824A (en) * 2019-12-29 2020-04-24 苏州浪潮智能科技有限公司 Method, device, equipment and medium for verifying addition and deletion of IP address of port of switch
CN111402784A (en) * 2020-03-10 2020-07-10 苏州仰邦软件科技有限公司 Method for stabilizing L ED controller network operation and display screen control system thereof
CN112929241A (en) * 2021-03-26 2021-06-08 新华三信息安全技术有限公司 Network testing method and device
CN113194158A (en) * 2021-04-13 2021-07-30 杭州迪普科技股份有限公司 Information storage method, device, equipment and computer readable storage medium
CN114448932A (en) * 2021-12-29 2022-05-06 锐捷网络股份有限公司 Address allocation method and device and electronic equipment
CN115314468A (en) * 2022-08-05 2022-11-08 成都道客数字科技有限公司 IP address allocation method and system for container cloud platform

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035012A (en) * 2006-03-09 2007-09-12 上海博达数据通信有限公司 Ethernet multi-layer switcher secure protection method based on DHCP and IP
CN101453495A (en) * 2008-12-30 2009-06-10 杭州华三通信技术有限公司 Method, system and equipment for preventing authentication address resolution protocol information loss
CN101534329A (en) * 2009-04-16 2009-09-16 华为技术有限公司 IP address assignment method and system
CN101674338A (en) * 2009-10-16 2010-03-17 福建星网锐捷网络有限公司 Recovering method of IP address and DHCP server
CN101795300A (en) * 2009-11-11 2010-08-04 福建星网锐捷网络有限公司 IP (Internet Protocol) address recovery method and system, as well as DHCP (Dynamic Host Configuration Protocol) repeater and DHCP server
CN101977245A (en) * 2010-01-07 2011-02-16 中兴通讯股份有限公司 Method, network equipment and system for detecting IP (Internet Protocol) address conflict
CN101980488A (en) * 2010-10-22 2011-02-23 中兴通讯股份有限公司 Address resolution protocol (ARP) table entry management method and three-layer exchanger
CN102316101A (en) * 2011-08-09 2012-01-11 神州数码网络(北京)有限公司 Safe access method based on dynamic host configuration protocol (DHCP) SNOOPING
US20120131197A1 (en) * 2010-11-23 2012-05-24 Sensormatic Electronics, LLC Method and apparatus for automatically resolving conflicting devices on a network
CN102761499A (en) * 2011-04-26 2012-10-31 国基电子(上海)有限公司 Gateway and method for preventing same from being attacked
CN103546595A (en) * 2013-10-31 2014-01-29 烽火通信科技股份有限公司 Mainframe route maintaining method based on xPON

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035012A (en) * 2006-03-09 2007-09-12 上海博达数据通信有限公司 Ethernet multi-layer switcher secure protection method based on DHCP and IP
CN101453495A (en) * 2008-12-30 2009-06-10 杭州华三通信技术有限公司 Method, system and equipment for preventing authentication address resolution protocol information loss
CN101534329A (en) * 2009-04-16 2009-09-16 华为技术有限公司 IP address assignment method and system
CN101674338A (en) * 2009-10-16 2010-03-17 福建星网锐捷网络有限公司 Recovering method of IP address and DHCP server
CN101795300A (en) * 2009-11-11 2010-08-04 福建星网锐捷网络有限公司 IP (Internet Protocol) address recovery method and system, as well as DHCP (Dynamic Host Configuration Protocol) repeater and DHCP server
CN101977245A (en) * 2010-01-07 2011-02-16 中兴通讯股份有限公司 Method, network equipment and system for detecting IP (Internet Protocol) address conflict
CN101980488A (en) * 2010-10-22 2011-02-23 中兴通讯股份有限公司 Address resolution protocol (ARP) table entry management method and three-layer exchanger
US20120131197A1 (en) * 2010-11-23 2012-05-24 Sensormatic Electronics, LLC Method and apparatus for automatically resolving conflicting devices on a network
CN102761499A (en) * 2011-04-26 2012-10-31 国基电子(上海)有限公司 Gateway and method for preventing same from being attacked
CN102316101A (en) * 2011-08-09 2012-01-11 神州数码网络(北京)有限公司 Safe access method based on dynamic host configuration protocol (DHCP) SNOOPING
CN103546595A (en) * 2013-10-31 2014-01-29 烽火通信科技股份有限公司 Mainframe route maintaining method based on xPON

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105610669A (en) * 2015-12-28 2016-05-25 湖南基石通信技术有限公司 Address distribution method and device for Supervlan flattened network
CN105933465A (en) * 2016-04-20 2016-09-07 北京小米移动软件有限公司 Method and device for accessing wireless network
CN105933465B (en) * 2016-04-20 2019-04-30 北京小米移动软件有限公司 Access the method and device of wireless network
CN106936944A (en) * 2017-03-31 2017-07-07 苏州科达科技股份有限公司 A kind of method and device for detecting and processing network address collision
CN107465769A (en) * 2017-07-31 2017-12-12 郑州云海信息技术有限公司 A kind of IP Address in LAN management method and device
CN107613042A (en) * 2017-09-22 2018-01-19 捷开通讯(深圳)有限公司 Obtain the method, device and mobile terminal of IP address
WO2019057167A1 (en) * 2017-09-22 2019-03-28 惠州Tcl移动通信有限公司 Method for obtaining ip address, device, and mobile terminal
CN108289047A (en) * 2018-01-25 2018-07-17 郑州云海信息技术有限公司 A kind of RMT test methods and device
CN108183978B (en) * 2018-03-29 2021-01-22 北京环境特性研究所 Communication equipment IP address configuration method and communication equipment
CN108183978A (en) * 2018-03-29 2018-06-19 北京环境特性研究所 A kind of communication equipment IP address configuration method and communication equipment
CN108712522A (en) * 2018-07-20 2018-10-26 新华三技术有限公司 IP address distribution method and device
CN108712522B (en) * 2018-07-20 2021-06-29 新华三技术有限公司 IP address allocation method and device
CN109120738B (en) * 2018-08-17 2021-11-02 瑞斯康达科技发展股份有限公司 DHCP server and method for managing network internal equipment
CN109120738A (en) * 2018-08-17 2019-01-01 瑞斯康达科技发展股份有限公司 Dynamic Host Configuration Protocol server and its method for carrying out network-internal apparatus management
CN109151093A (en) * 2018-10-24 2019-01-04 郑州云海信息技术有限公司 A kind of method, apparatus, storage medium and computer equipment for distributing IP address
CN111064824A (en) * 2019-12-29 2020-04-24 苏州浪潮智能科技有限公司 Method, device, equipment and medium for verifying addition and deletion of IP address of port of switch
CN111064824B (en) * 2019-12-29 2022-05-13 苏州浪潮智能科技有限公司 Method, device, equipment and medium for verifying addition and deletion of IP address of port of switch
CN111402784A (en) * 2020-03-10 2020-07-10 苏州仰邦软件科技有限公司 Method for stabilizing L ED controller network operation and display screen control system thereof
CN111402784B (en) * 2020-03-10 2022-02-18 苏州仰邦软件科技有限公司 Method for stabilizing network operation of LED controller and display screen control system thereof
CN112929241A (en) * 2021-03-26 2021-06-08 新华三信息安全技术有限公司 Network testing method and device
CN112929241B (en) * 2021-03-26 2022-06-21 新华三信息安全技术有限公司 Network testing method and device
CN113194158A (en) * 2021-04-13 2021-07-30 杭州迪普科技股份有限公司 Information storage method, device, equipment and computer readable storage medium
CN114448932A (en) * 2021-12-29 2022-05-06 锐捷网络股份有限公司 Address allocation method and device and electronic equipment
CN115314468A (en) * 2022-08-05 2022-11-08 成都道客数字科技有限公司 IP address allocation method and system for container cloud platform

Similar Documents

Publication Publication Date Title
CN103957288A (en) Method, device and equipment for IP address dynamic allocation
US8631100B2 (en) Automatic assignment of hardware addresses within computer networks
US10091274B2 (en) Method, device, and system for controlling network device auto-provisioning
CN101951417A (en) Method, system and trunk equipment for assigning multiple server addresses
CN105245638A (en) Address distribution method, equipment and system
CN102377669B (en) Method for sending message and switch
CN102148879A (en) Port mapping method and device and communication system
CN102833363A (en) IP (Internet Protocol) address allocation method, device and system
CN104468368A (en) Method and device for allocating BGP neighbors
CN104333610A (en) IPv6 address allocation method and device
CN101494669A (en) Method and apparatus for distributing IP address for user terminal
CN104812021A (en) Method and device for accessing AC (access controller) by AP (access point)
CN107517129B (en) Method and device for configuring uplink interface of equipment based on OpenStack
US20060193330A1 (en) Communication apparatus, router apparatus, communication method and computer program product
US7940760B2 (en) Method and apparatus for discovering component in at least one sub-network
CN114448937A (en) Access request response method and device and storage medium
CN111683159A (en) IP address allocation method, device, system and storage medium
JP6764489B2 (en) Stacking network equipment
CN112003771A (en) Method for realizing intelligent network access of LAN side terminal
US20130086259A1 (en) Method for acquiring an ip address and network access device
CN110247778A (en) Installation method of operating system, device, electronic equipment and storage medium
CN110636149A (en) Remote access method, device, router and storage medium
CN107172229B (en) Router configuration method and device
CN116348852A (en) Managing Internet Protocol (IP) address assignments to tenants in a computing environment
US20140366018A1 (en) Method and system for automatic assignment and preservation of network configuration for a virtual machine

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140730

WD01 Invention patent application deemed withdrawn after publication