CN101534329B - IP address assignment method and system - Google Patents

IP address assignment method and system Download PDF

Info

Publication number
CN101534329B
CN101534329B CN2009100824566A CN200910082456A CN101534329B CN 101534329 B CN101534329 B CN 101534329B CN 2009100824566 A CN2009100824566 A CN 2009100824566A CN 200910082456 A CN200910082456 A CN 200910082456A CN 101534329 B CN101534329 B CN 101534329B
Authority
CN
China
Prior art keywords
address
subnet
sub
terminal
dhcp
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.)
Expired - Fee Related
Application number
CN2009100824566A
Other languages
Chinese (zh)
Other versions
CN101534329A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2009100824566A priority Critical patent/CN101534329B/en
Publication of CN101534329A publication Critical patent/CN101534329A/en
Application granted granted Critical
Publication of CN101534329B publication Critical patent/CN101534329B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the invention provides an IP address assignment method, DHCP truck equipment, a DHCP server and an IP address assignment system; wherein, an IP address assignment method comprises: receiving an IP address request message from the dynamic host configuration protocol (DHCP) of the terminal, and obtaining the subvlan to which the terminal belongs and the IP address subnet section corresponding to the subvlan; according to the IP address subnet section, determining the subnet section mark corresponding to the same, transmitting the subnet section mark to the DHCP server so that the DHCP server can assign the IP addresses in the IP address subnet section for the terminal. The IP address of the terminal and the subvlan to which the terminal belongs have good management relation which facilitates the identification of the subvlan to which the terminal belongs by the IP address of the terminal, thus improving the elaboration of the IP address management.

Description

IP address allocation method and system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a system for allocating an IP address.
Background
VLAN aggregation (Virtual Local Area Network aggregation), which is a management technology for optimizing an IP address, includes a subvlan (subnet) and a supervlan (super Network). As shown in fig. 1, VLAN3 is a supernet VLAN, VLANs 1 and VLAN2 are subnets subvlan, and VLANs 1 and VLAN2 include terminals such as PCs. All sub-networks subvlan in the extranet subvlan share one IP gateway address and one IP address network segment. And the VLAN aggregation technology is used for networking to distribute IP addresses, so that the number of the IP addresses can be effectively saved.
Currently, in VLAN aggregation technology networking, a DHCP (Dynamic host configuration Protocol) mode is usually used to allocate an IP address to a terminal according to a network segment. For example, an IP Address of a vlan if (virtual local area network) interface of a supervlan is referred to as a Giaddr (Gateway IP Address), a DHCP Server (Dynamic host configuration Protocol Server) configures one IP Address pool for all terminals in the supervlan according to an IP Address network segment where the IP Gateway Address is located, and an IP Address allocated to each terminal is any one of the Address pools.
All the subnet subvlans in the extranet subvlans share one IP gateway address and one IP address network segment, and each subnet subvlans form an independent broadcast domain. Terminals in the same subnet perform two-layer intercommunication by searching for a Media Access Control (MAC) address, and terminals in different subnets subnet perform intercommunication by an ARP Proxy.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
since the IP address is allocated to each terminal according to the IP address network segment where the IP gateway address of the extranet supervlan is located, the IP address of each terminal in each subnet subvlan is allocated arbitrarily, that is, there is no good management relationship between the IP address of the terminal and the subnet subvlan to which the terminal belongs, it is inconvenient to identify the subnet subvlan to which the terminal belongs by the IP address of the terminal, and it is not advantageous to refine the terminal IP address management.
Disclosure of Invention
The embodiment of the invention provides an IP address allocation method, DHCP relay equipment, a DHCP server and an IP address allocation system, and increases the refinement of IP address management.
The embodiment of the invention provides an IP address allocation method, which comprises the following steps:
receiving a Dynamic Host Configuration Protocol (DHCP) IP address request message from a terminal, and obtaining a subvlan to which the terminal belongs and an IP address subnet section corresponding to the subvlan;
and determining a corresponding subnet segment identifier according to the IP address subnet segment, and sending the subnet segment identifier to a DHCP server so that the DHCP server allocates an IP address for the terminal in the IP address subnet segment.
Based on the IP address allocation method, an embodiment of the present invention further provides a DHCP relay device, including:
the device comprises an IP address sub-network segment confirmation unit, a network segment identification unit and a network segment identification unit, wherein the IP address sub-network segment confirmation unit is used for receiving a dynamic host configuration protocol (DHCPIP) address request message from a terminal and acquiring a sub-network subvlan to which the terminal belongs and an IP address sub-network segment corresponding to the subvlan;
and the sub-network segment identification confirming unit is used for confirming the sub-network segment identification corresponding to the IP address sub-network segment according to the IP address sub-network segment, and sending the sub-network segment identification to a DHCP server so that the DHCP server allocates the IP address for the terminal in the IP address sub-network segment.
The embodiment of the invention also provides an IP address allocation method, which comprises the following steps:
receiving a DHCP IP address request message to obtain a sub-network segment identifier;
and confirming the IP address sub-network segment corresponding to the sub-network segment identification, and allocating an IP address for the terminal in an IP address pool of the IP address sub-network segment.
Based on the IP address allocation method, an embodiment of the present invention further provides a DHCP server, including:
a sub-network segment identification receiving unit, which is used for receiving DHCP IP address request message and obtaining sub-network segment identification;
and the IP address allocation unit is used for confirming the IP address sub-network segment corresponding to the sub-network segment identification and allocating an IP address for the terminal in an IP address pool of the IP address sub-network segment.
An embodiment of the present invention further provides an IP address allocation system, including:
the DHCP relay equipment is used for receiving a DHCP IP address request message from a terminal, confirming a subnet subvlan to which the terminal belongs and an allocated IP address subnet section, determining a subnet section identifier corresponding to the subnet section identifier according to the IP address subnet section, and sending the subnet section identifier to a DHCP server so that the DHCP server allocates an IP address for the terminal in the IP address subnet section;
and the DHCP server is used for receiving the sub-network segment identification, confirming the IP address sub-network segment corresponding to the sub-network segment identification, and distributing an IP address for the terminal in an IP address pool of the IP address sub-network segment.
It can be seen from the technical solutions provided in the embodiments of the present invention that, the DHCP relay device obtains the corresponding subnet section identifier by confirming the subvlan to which the terminal belongs and the IP address subnet section corresponding to the subvlan, and the DHCP server allocates the IP address to the terminal in the IP address subnet section corresponding to the subnet section identifier, so that the IP addresses of the terminals belonging to the same subvlan are allocated in the corresponding IP address subnet section, and the IP address of the terminal has a good management relationship with the subnet subvlan to which the terminal belongs, thereby facilitating identification of the subnet to which the terminal belongs by the IP address of the terminal, and thus increasing refinement of IP address management.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a schematic diagram of a VLAN aggregation networking architecture in the prior art;
FIG. 2 is a flowchart of an IP address allocation method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a DHCP relay device according to an embodiment of the present invention;
FIG. 4 is a block diagram of a DHCP relay device according to an embodiment of the present invention;
FIG. 5 is a flowchart of a method for allocating IP addresses according to an embodiment of the present invention;
FIG. 6 is a block diagram of a DHCP server according to an embodiment of the present invention;
FIG. 7 is a block diagram of a DHCP server according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating an IP address assignment system according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating the dynamic host configuration protocol DHCP option77 according to an embodiment of the present invention;
fig. 10 is a schematic diagram illustrating the DHCP option82 according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to overcome the defects that in the background art, the IP address of each terminal in each subnet sublan is randomly allocated, the IP address of the terminal and the subnet sublan to which the terminal belongs do not have a good management relationship, the subnet sublan to which the terminal belongs is not convenient to identify through the IP address of the terminal, and the refinement of the terminal IP address management is not facilitated, embodiments of the present invention provide an IP address allocation method, a DHCP relay device, a DHCP server, and an IP address allocation system, which achieve the purpose that the IP addresses of terminals belonging to the same subnet are allocated within corresponding IP address subnet sections, the IP addresses of the terminals have a good management relationship with the subnet sublan to which the terminal belongs, and the subnet sublan to which the terminal belongs is convenient to identify through the IP address of the terminal, thereby increasing the refinement of the IP address management.
As shown in fig. 2, an embodiment of the present invention provides an IP address allocation method, including:
step 1: receiving a Dynamic Host Configuration Protocol (DHCP) IP address request message from a terminal, and obtaining a subvlan to which the terminal belongs and an IP address subnet section corresponding to the subvlan;
step 2: and determining a corresponding subnet segment identifier according to the IP address subnet segment, and sending the subnet segment identifier to a DHCP server so that the DHCP server allocates an IP address for the terminal in the IP address subnet segment.
In the IP address allocation method, the execution subject may be a DHCP Relay device (Dynamic host configuration Protocol Relay).
The DHCP relay equipment acquires the corresponding subnet section identification by confirming the subnet subvlan to which the terminal belongs and the allocated IP address subnet section, and the DHCP server allocates the IP address for the terminal in the IP address subnet section corresponding to the subnet section identification, so that the IP address of the terminal belonging to the same subnet subvlan is allocated in the corresponding IP address subnet section, and the IP address of the terminal has a good management relation with the subnet subvlan to which the terminal belongs, thereby being convenient for identifying the subnet to which the terminal belongs through the IP address of the terminal and further increasing the refinement of IP address management.
Before the IP address sub-network segment corresponding to the subnet subvlan is obtained in step 1, the method further includes configuring a correspondence between the subnet subvlan and the IP address sub-network segment in advance, where the configuring a correspondence between the subnet subvlan and the IP address sub-network segment is to allocate one IP address sub-network segment to one or more subnet subvlans within the IP address network segment of the extranet subvlan.
In step 2, sending the subnet section identifier to the DHCP server is specifically,
the subnet segment identifier is loaded through a DHCP user grouping information option (option77) of a DHCP IP address request message and is sent to the DHCP server; or,
any IP address in the IP address sub-network segment is borne by a link selection sub-option5 in a DHCP relay agent information option (option82) of a DHCP IP address request message and is sent to the DHCP server.
Referring to fig. 9 and 10, the configuration of the DHCP subscriber group information option (option77) and the DHCP relay agent information option (option82) will not be described herein.
The IP address allocation method further includes:
after configuring the corresponding relation between the subnet subvlan and the IP address subnet section, storing a binding table based on the IP address subnet section, wherein the binding table comprises the binding relation between the IP address subnet section and the corresponding subnet subvlan and is used for confirming the corresponding subnet subvlan through the IP address subnet section to which the IP address of the terminal belongs;
or after the DHCP server allocates an IP address to the terminal in the IP address subnet section, storing a binding table based on the terminal, where the binding table includes a binding relationship between a port of the terminal accessing to the subnet subvlan, the corresponding subnet subvlan, the IP address of the terminal, and the MAC physical address of the terminal, and is used to confirm the corresponding MAC physical address through the IP address of the terminal.
The binding table based on the IP address sub-network segment comprises the binding relation between the IP address sub-network segment and the corresponding sub-network subvlan. In this case, the terminals belonging to different subnets subvlan still exchange visits through the ARP Proxy, but the ARP request message does not need to be broadcast to the terminals of all subnets subvlan, and since the subnet subvlan to which the destination terminal belongs can be known through the I P address of the destination terminal, only the subnet subvlan (which may be one or more) to which the IP address of the destination terminal belongs needs to be broadcast, and only the data message of the terminal in the subnet subvlan (which may be one or more) is allowed to pass through, thereby preventing attacks such as spoofing IP addresses and the like, and enhancing network security.
The binding table based on the terminal comprises the binding relation among the port of the terminal accessing the subnet subvlan, the corresponding subnet subvlan, the IP address of the terminal and the MAC physical address of the terminal. Under the condition, the terminals belonging to different sub-subnets subvlan mutually access without ARP Proxy, namely, without broadcasting ARP request IP address request message, and the terminals of different sub-subnets subvlan can mutually access as long as finding out the corresponding MAC address according to the terminal IP address in the binding table.
Therefore, the binding table can be used for security check of subsequent data messages, attack such as IP address impersonation and the like is prevented, network security is enhanced, and the defect that in the technical scheme provided by the background technology, terminals of different sub-networks subvlan need to be communicated through ARP Proxy, if the number of the sub-networks subvlan is large, forwarding and processing of ARP request and response messages are too much, and network expansibility is poor is caused is avoided.
As shown in fig. 3, corresponding to the IP address allocation method, an embodiment of the present invention provides a DHCP relay device, including:
an IP address subnet section confirming unit 10, configured to receive a dynamic host configuration protocol DHCP IP address request message from a terminal, and obtain a subnet subvlan to which the terminal belongs and an IP address subnet section corresponding to the subnet subvlan;
a subnet section identifier confirming unit 20, configured to determine, according to the IP address subnet section, a subnet section identifier corresponding to the IP address subnet section, and send the subnet section identifier to a DHCP server, so that the DHCP server allocates an IP address to the terminal in the IP address subnet section.
As shown in fig. 4, the DHCP relay device may further include:
an IP address subnet section allocating unit 30, configured to allocate an IP address subnet section to one or more subnet subvlans within an IP address subnet section of the extranet supervlan;
a subnet section identifier allocating unit 40, configured to configure a subnet section identifier for each IP address subnet section.
Specifically, after the IP address subnet section allocating unit 30 allocates an IP address subnet section to the subnet subvlan, the subnet section identifier allocating unit 40 configures a subnet section identifier for the IP address subnet section. After the IP address subnet section confirming unit 10 obtains the subnet subvlan to which the terminal belongs and the corresponding IP address subnet section, the subnet section identification confirming unit 20 determines the subnet section identification corresponding to the IP address subnet section to which the terminal belongs from the subnet section identifications configured by the subnet section identification allocating unit 40 according to the IP address subnet section to which the terminal belongs, so that the subnet section identification confirming unit 20 loads the subnet section identification through the DHCP user group information option (option77) of the DHCP IP address request message and sends it to the DHCP server.
Or, the IP address subnet section allocating unit 30 allocates an IP address subnet section to the subnet sublan, and after the IP address subnet section confirming unit 10 obtains the subnet sublan to which the terminal belongs and the corresponding IP address subnet section, the subnet section identification confirming unit 20 determines any IP address in the IP address subnet section to which the terminal belongs as a subnet section identification, so that any IP address in the IP address subnet section is carried by a link selection sub-option5 in a DHCP relay agent information option (option82) of a DHCP IP address request message and sent to the DHCP server.
Further, the DHCP relay device may further include:
a binding table storage unit 50, configured to store a binding table based on an IP address subnet section after configuring a corresponding relationship between the subnet subvlan and the IP address subnet section, where the binding table includes the binding relationship between the IP address subnet section and the corresponding subnet subvlan, and is used to determine the corresponding subnet subvlan through the IP address subnet section to which the IP address of the terminal belongs;
or after the DHCP server allocates an IP address to the terminal in the IP address subnet section, the DHCP server is configured to store a binding table based on the terminal, where the binding table includes a binding relationship between a port of the terminal accessing the subnet subvlan, the corresponding subnet subvlan, the IP address of the terminal, and the MAC physical address of the terminal, and is configured to confirm the corresponding MAC physical address through the IP address of the terminal.
It can be seen from the technical solutions provided by the embodiments of the present invention that the DHCP relay device obtains the corresponding subnet identifier by confirming the subnet subvlan to which the terminal belongs and the allocated IP address subnet segment, and the DHCP server allocates the IP address to the terminal in the IP address subnet segment corresponding to the subnet segment identifier. Therefore, the IP addresses of the terminals belonging to the same subnet subvlan are distributed in the corresponding IP address subnet sections, and the IP addresses of the terminals have good management relation with the subnet subvlan to which the terminals belong, so that the subnet to which the terminals belong can be identified conveniently through the IP addresses of the terminals, and the refinement of IP address management is increased. Moreover, the binding table is established, so that the method can be used for security check of subsequent data messages, attacks such as IP address impersonation and the like are prevented, and the network security and the expandability are enhanced.
As shown in fig. 5, an embodiment of the present invention further provides an IP address allocation method, including:
and step 3: receiving a DHCP IP address request message to obtain a sub-network segment identifier;
and 4, step 4: and confirming the IP address sub-network segment corresponding to the sub-network segment identification, and allocating an IP address for the terminal in an IP address pool of the IP address sub-network segment.
The main execution body of the IP address allocation method may be a DHCP Server (Dynamic host configuration Protocol Server), which receives a DHCP IP address request message sent by a DHCP relay device to obtain a subnet segment identifier.
The method further comprises the following steps: and allocating an IP address pool for an IP address sub-network segment, wherein the IP address sub-network segment is configured with a sub-network segment identifier.
It can be known that, corresponding to the correspondence between the subnet sublans of the DHCP relay device and the IP address subnet section, preferably, the DHCP server allocates an IP address pool to the IP address subnet section, and the IP address subnet section corresponds to a subnet section identifier, so that, after the IP address subnet section corresponding to the subnet section identifier is confirmed by receiving the DHCP IP address request message in the above steps 3 and 4, the IP address can be allocated in the IP address pool for the terminal according to the IP address pool of the IP address subnet section.
Specifically, the obtaining of the subnet section identifier specifically includes:
acquiring the sub-network segment identification from the DHCP IP address request message DHCP user grouping information option (option 77); or,
and obtaining the subnet segment identification from a link selection sub-option5 of a DHCP relay agent information option (option82) of the DHCP IP address request message.
That is, the subnet section identification is obtained through the DHCP user grouping information option (option77), and the corresponding IP address subnet section is confirmed, so as to allocate an IP address for the terminal in the IP address pool of the IP address subnet section; or,
the sub-network segment identification is obtained through a link selection sub-item (link selection sub-option 5) of a DHCP relay agent information option (option82), and the link selection sub-item (link selection sub-option 5) is any IP address in an IP address sub-network segment to which the terminal belongs, so that the IP address sub-network segment corresponding to the IP address is confirmed, and the IP address is distributed to the terminal in an IP address pool of the IP address sub-network segment.
It can be seen that the IP addresses of the terminals belonging to the same subnet are allocated in the corresponding IP address subnet section, and there is a good management relationship between the IP address of the terminal and the subnet to which the terminal belongs, so that the subnet to which the terminal belongs is identified by the IP address of the terminal, thereby increasing the refinement of the IP address management.
As shown in fig. 6, corresponding to the IP address allocation method, an embodiment of the present invention provides a DHCP server, including:
a subnet section identifier receiving unit 60, configured to receive a DHCP IP address request message and obtain a subnet section identifier;
and an IP address allocating unit 70, configured to determine an IP address sub-network segment corresponding to the sub-network segment identifier, and allocate an IP address to the terminal in an IP address pool of the IP address sub-network segment.
As shown in fig. 7, further, the server may further include:
and an IP address pool allocation unit 80, configured to allocate an IP address pool to an IP address sub-network segment, where the IP address sub-network segment is configured with a sub-network segment identifier.
It can be seen that the IP addresses of the terminals belonging to the same subnet are allocated in the corresponding IP address subnet section, and there is a good management relationship between the IP address of the terminal and the subnet to which the terminal belongs, so that the subnet to which the terminal belongs is identified by the IP address of the terminal, thereby increasing the refinement of the IP address management.
As shown in fig. 8, based on the DHCP relay device and the DHCP server, an embodiment of the present invention provides an IP address allocation system, including:
the DHCP relay equipment is used for receiving a DHCP IP address request message from a terminal, confirming a subnet subvlan to which the terminal belongs and an allocated IP address subnet section, determining a subnet section identifier corresponding to the subnet section identifier according to the IP address subnet section, and sending the subnet section identifier to a DHCP server so that the DHCP server allocates an IP address for the terminal in the IP address subnet section;
and the DHCP server is used for receiving the sub-network segment identification, confirming the IP address sub-network segment corresponding to the sub-network segment identification, and distributing an IP address for the terminal in an IP address pool of the IP address sub-network segment.
It can be seen from the technical solutions provided by the embodiments of the present invention that the terminal in the subnet subvlan allocates the IP address in the address pool of the IP address subnet section corresponding to the subnet subvlan. The DHCP relay equipment acquires a corresponding subnet section identifier by confirming the subnet subvlan to which the terminal belongs and the allocated IP address subnet section, and the DHCP server allocates an IP address for the terminal in the IP address subnet section corresponding to the subnet section identifier. Therefore, the IP addresses of the terminals belonging to the same subnet subvlan are distributed in the corresponding IP address subnet sections, and the IP addresses of the terminals have good management relation with the subnet subvlan to which the terminals belong, so that the subnet to which the terminals belong can be identified conveniently through the IP addresses of the terminals, and the refinement of IP address management is increased.
Example one
Referring to fig. 2, in a VLAN aggregation group network, an IP address allocation method is provided according to the principle that a DHCP Dynamic Host Configuration Protocol (DHCP) allocates an IP address to a terminal according to a network segment, and an execution main body is combined below to allocate an IP address subnet by each subnet, and a DHCP relay device, for example, transmits an IP address allocation method to a DHCP server by using a DHCP user group information option77 of a DHCP IP address request packet to carry a subnet identifier:
it can be known that a virtual local area network needs to be constructed on a DHCP relay device, a extranet supervlan and each subnet sublan are configured, then the subnet sublan is added into the extranet supervlan, and a virtual local area network interface, such as a vlan if interface, is configured for the extranet supervlan.
11. The DHCP relay equipment allocates IP address sub-network segments for each subnet subvlan in the IP address network segment of the supernetwork subvlan, and each IP address sub-network segment corresponds to a DHCP user grouping information option 77;
12. the DHCP relay equipment stores a binding table based on the IP address sub-network segment, wherein the binding table comprises the IP address sub-network segment and a corresponding sub-subnet vlan binding relation and is used for confirming the corresponding sub-subnet vlan through the IP address sub-network segment to which the IP address of the terminal belongs;
13. the DHCP relay equipment receives a DHCP IP address request message from the terminal, and confirms a subnet subvlan to which the terminal belongs, an IP address sub-network segment corresponding to the subnet subvlan and a DHCP user grouping information Option Option77 corresponding to the IP address sub-network segment;
14. the DHCP relay device inserts the DHCP user packet information Option77 into the DHCP IP address request message and sends the DHCP IP address request message to the DHCP server.
It can be seen from the technical solutions provided by the embodiments of the present invention that the IP addresses of the terminals belonging to the same subnet are allocated in the corresponding IP address subnet sections, and there is a good management relationship between the IP address of the terminal and the subnet subvlan to which the terminal belongs, so that the subnet to which the terminal belongs is identified by the IP address of the terminal, thereby increasing the refinement of the IP address management. And the binding table can be used for security check of subsequent data messages by storing the binding table, so that the network security is enhanced.
Example two
Referring to fig. 3 and 4, corresponding to the IP address allocation method in the first embodiment, an embodiment of the present invention provides a DHCP relay device, where an IP address subnet is allocated to each subnet subvlan, and the DHCP relay device, for example, bears any one of the IP address subnet through a link selection sub-option5 in a DHCP relay agent information option82 of a DHCP IP address request message and sends the IP address subnet to a DHCP server, which illustrates the DHCP relay device, and the step of constructing a virtual local area network is not described here:
11. the IP address subnet section allocating unit 30 allocates an IP address subnet section for each subnet subvlan in the IP address subnet section of the extranet subvlan;
12. the binding table storage unit 50 stores a binding table based on an IP address subnet section, the binding table including an IP address subnet section and a corresponding subnet subvlan binding relationship, and configured to determine the corresponding subvlan through the IP address subnet section to which the IP address of the terminal belongs;
13. the IP address subnet section confirming unit 10 receives a DHCP IP address request message from the terminal, and confirms the subnet subvlan to which the terminal belongs and the corresponding IP address subnet section;
14. the subnet section identification confirming unit 20 selects any IP address from the IP address subnet section to confirm as the link selection sub-option5 in the DHCP relay agent information option82, inserts the link selection sub-option5 in the DHCP relay agent information option82 into the DHCP IP address request message, and sends the DHCP IP address request message to the DHCP server.
It can be seen from the technical solutions provided by the embodiments of the present invention that the IP addresses of the terminals belonging to the same subnet are allocated in the corresponding IP address subnet sections, and there is a good management relationship between the IP address of the terminal and the subnet subvlan to which the terminal belongs, so that the subnet to which the terminal belongs is identified by the IP address of the terminal, thereby increasing the refinement of the IP address management.
Moreover, the binding table can be used for security check of subsequent DHCP IP address request messages, attack such as IP address impersonation and the like is prevented, and network security and expandability are enhanced.
EXAMPLE III
Referring to the IP address allocation method using the DHCP relay device as the execution subject, an embodiment of the present invention further provides an IP address allocation method, as shown in fig. 5, in the following, in combination with the execution subject, taking an example that the DHCP server receives the DHCP IP address request message and obtains the subnet segment identifier in the DHCP user packet information Option77, the IP address allocation method is specifically described:
15. the DHCP server receives a DHCP IP address request message DHCP user grouping information Option Option 77;
16. and the DHCP server confirms the corresponding IP address sub-network segment according to the DHCP user grouping information Option Option77, and allocates an IP address in an IP address pool of the IP address sub-network segment for the terminal.
An IP address pool needs to be allocated to an IP address sub-network segment, and the IP address sub-network segment is configured with a sub-network segment identifier.
It can be seen from the technical solutions provided by the embodiments of the present invention that the IP addresses of the terminals belonging to the same subnet are allocated in the corresponding IP address subnet sections, and there is a good management relationship between the IP address of the terminal and the subnet subvlan to which the terminal belongs, so that the subnet to which the terminal belongs is identified by the IP address of the terminal, thereby increasing the refinement of the IP address management.
Example four
Corresponding to the IP address allocation method provided in the third embodiment and referring to the DHCP relay device provided in the second embodiment, an embodiment of the present invention provides a DHCP server, referring to fig. 6, taking an example that the DHCP server receives a DHCP IP address request message and obtains the subnet segment identifier from the link selection sub-option5 of the DHCP relay agent information option82, which specifically describes that the DHCP server:
15. the subnet section identification receiving unit 60 receives a link selection sub-option5 of a DHCP IP address request message DHCP relay agent information option82, where the link selection sub-option is any IP address in an IP address subnet section corresponding to a subnet subvlan to which the terminal belongs;
16. the IP address allocating unit 70 determines the IP address sub-network segment to which the IP address belongs according to the IP address corresponding to the link selection sub-item, and allocates an IP address in the IP address pool of the IP address sub-network segment for the terminal.
The IP address pool allocation unit 80 needs to allocate an IP address pool to an IP address sub-network segment, where the IP address sub-network segment is configured with a sub-network segment identifier.
It can be seen from the technical solutions provided by the embodiments of the present invention that the IP addresses of the terminals belonging to the same subnet are allocated in the corresponding IP address subnet sections, and there is a good management relationship between the IP address of the terminal and the subnet subvlan to which the terminal belongs, so that the subnet to which the terminal belongs is identified by the IP address of the terminal, thereby increasing the refinement of the IP address management.
EXAMPLE five
In the following, the IP address assignment method is described by taking the example that the DHCP relay device carries the subnet segment identifier to be sent to the DHCP server through the DHCP user group information option77 of the DHCPIP address request message, and the step of constructing the virtual local area network on the DHCP relay device is not described herein again:
11. the DHCP relay equipment allocates IP address sub-network segments for each subnet subvlan in the IP address network segment of the supernetwork subvlan, and each IP address sub-network segment corresponds to a DHCP user grouping information option 77;
12. the DHCP relay equipment stores a binding table based on the IP address sub-network segment, wherein the binding table comprises the IP address sub-network segment and a corresponding sub-vlan binding relation and is used for confirming the corresponding sub-vlan through the IP address sub-network segment to which the IP address of the terminal belongs;
13. the DHCP relay equipment receives a DHCP IP address request message from the terminal, and confirms a subnet subvlan to which the terminal belongs, an IP address sub-network segment corresponding to the subnet subvlan and a DHCP user grouping information Option Option77 corresponding to the IP address sub-network segment;
14. the DHCP relay device inserts the DHCP user packet information Option77 into the DHCP IP address request message and sends the DHCP IP address request message to the DHCP server.
15. The DHCP server receives a user grouping information Option 77;
16. the DHCP server confirms the corresponding IP address sub-network segment according to the user grouping information Option Option77, and allocates IP addresses in the IP address pool of the IP address sub-network segment for the terminal;
17. the DHCP server feeds back the IP address of the terminal to be successfully allocated to the DHCP relay equipment;
18. and the DHCP relay equipment stores the binding relation among the subnet subvlan port accessed by the terminal, the corresponding subnet subvlan, the IP address of the terminal and the MAC physical address of the terminal in a binding table based on the terminal.
Terminals belonging to different sub-networks and subvlan can mutually visit, the sub-network subvlan to which the terminal belongs can be known according to the IP address of the target terminal through a binding table based on the IP address and the subnet network segment, and only ARP Proxy needs to be broadcasted in the sub-network subvlan to which the IP address of the target terminal belongs;
or, the terminals belonging to different sub-subnets and the sub-vlans can mutually access, and the terminals of different sub-subnets and the sub-vlans can mutually access by finding the corresponding MAC address according to the IP address of the target terminal through the binding table based on the terminals.
It can be seen from the technical solutions provided by the embodiments of the present invention that the IP addresses of the terminals belonging to the same subnet are allocated in the corresponding IP address subnet sections, and there is a good management relationship between the IP address of the terminal and the subnet subvlan to which the terminal belongs, so that the subnet to which the terminal belongs is identified by the IP address of the terminal, thereby increasing the refinement of the IP address management.
Moreover, the binding table can be used for security check of subsequent DHCP IP address request messages, attack such as IP address impersonation and the like is prevented, and network security and expandability are enhanced.
EXAMPLE six
The following describes an IP address allocation method by using a link selection sub-item of a DHCP relay agent information option82 for the DHCP relay device sending a sub-network segment identifier through a DHCPIP address request message and a DHCP server receiving the DHCP IP address request message as an example, in combination with the DHCP relay device and the DHCP server:
11. the DHCP relay equipment distributes an IP address sub-network segment for each subnet subvlan in the IP address network segment of the supernetwork subvlan;
12. the DHCP relay equipment stores a binding table based on the IP address sub-network segment, wherein the binding table comprises the IP address sub-network segment and a corresponding sub-vlan binding relation and is used for confirming the corresponding sub-vlan through the IP address sub-network segment to which the IP address of the terminal belongs;
13. the DHCP relay equipment receives a DHCP IP address request message from the terminal and confirms a subnet sublan to which the terminal belongs and a corresponding IP address subnet section;
14. the DHCP relay equipment selects any IP address from the IP address subnet section to confirm as a link selection sub-item 5 in the DHCP relay agent information Option82, inserts the DHCP user grouping information Option77 into the DHCP IP address request message and sends the DHCP IP address request message to a DHCP server.
15. A DHCP server receives a link selection sub-option5 of a DHCP IP address request message DHCP relay agent information option82, wherein the link selection sub-option is any one IP address in an IP address sub-network segment corresponding to a subnet subvlan to which a terminal belongs;
16. the IDHCP server confirms the IP address sub-network segment to which the IP address belongs according to the IP address and allocates the IP address for the terminal in the IP address pool of the IP address sub-network segment;
17. the DHCP server feeds back the IP address of the terminal to be successfully allocated to the DHCP relay equipment;
18. and the DHCP relay equipment stores the binding relation among the subnet subvlan port accessed by the terminal, the corresponding subnet subvlan, the IP address of the terminal and the MAC physical address of the terminal in a binding table based on the terminal.
Terminals belonging to different sub-networks and subvlan can mutually visit, the sub-network subvlan to which the terminal belongs can be known according to the IP address of the target terminal through a binding table based on the IP address and the subnet network segment, and only ARP Proxy needs to be broadcasted in the sub-network subvlan to which the IP address of the target terminal belongs;
or, the terminals belonging to different sub-subnets and the sub-vlans can mutually access, and the terminals of different sub-subnets and the sub-vlans can mutually access by finding the corresponding MAC address according to the IP address of the target terminal through the binding table based on the terminals.
It can be seen from the technical solutions provided by the embodiments of the present invention that the IP addresses of the terminals belonging to the same subnet are allocated in the corresponding IP address subnet sections, and there is a good management relationship between the IP address of the terminal and the subnet subvlan to which the terminal belongs, so that the subnet to which the terminal belongs is identified by the IP address of the terminal, thereby increasing the refinement of the IP address management.
Moreover, the binding table can be used for security check of subsequent DHCP IP address request messages, attack such as IP address impersonation and the like is prevented, and network security and expandability are enhanced.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. An IP address assignment method, comprising:
the method comprises the steps that DHCP relay equipment receives a Dynamic Host Configuration Protocol (DHCP) IP address request message from a terminal, and obtains a subvlan to which the terminal belongs and an IP address subnet section corresponding to the subvlan;
the DHCP relay equipment determines a corresponding subnet section identifier according to the IP address subnet section, and sends the subnet section identifier to a DHCP server so that the DHCP server allocates an IP address for the terminal in the IP address subnet section;
before the IP address sub-network segment corresponding to the subvlan is obtained, the method further includes that the DHCP relay device pre-configures a corresponding relationship between the subvlan and the IP address sub-network segment, and the configuring the corresponding relationship between the subvlan and the IP address sub-network segment specifically allocates one IP address sub-network segment for one or more subvlans within the IP address network segment of the extranet subvlan.
2. The IP address allocation method according to claim 1, wherein the sending the subnet fragment identification to a DHCP server is specifically,
the subnet section identification is carried by a DHCP user grouping information option of a DHCP IP address request message and is sent to the DHCP server; or,
and any IP address in the IP address sub-network segment is borne by a link selection sub-item in a DHCP relay agent information option of a DHCP IP address request message and is sent to the DHCP server.
3. The IP address assignment method of claim 1, wherein the method further comprises:
after configuring the corresponding relation between the subvlan and the IP address subnet section, storing a binding table based on the IP address subnet section, wherein the binding table comprises the binding relation between the IP address subnet section and the corresponding subvlan and is used for confirming the corresponding subvlan through the IP address subnet section to which the IP address of the terminal belongs;
or after the DHCP server allocates the IP address to the terminal in the IP address sub-network segment, storing a binding table based on the terminal, wherein the binding table comprises a port of the terminal accessing the subvlan, a corresponding subvlan, the IP address of the terminal and the binding relation of the MAC physical address of the terminal, and is used for confirming the corresponding MAC physical address through the IP address of the terminal.
4. A DHCP relay device, comprising:
the device comprises an IP address sub-network segment confirmation unit, a network segment identification unit and a network segment identification unit, wherein the IP address sub-network segment confirmation unit is used for receiving a dynamic host configuration protocol (DHCPIP) address request message from a terminal and acquiring a sub-network subvlan to which the terminal belongs and an IP address sub-network segment corresponding to the subvlan;
a subnet section identifier confirming unit, configured to determine a subnet section identifier corresponding to the IP address subnet section according to the IP address subnet section, and send the subnet section identifier to a DHCP server, so that the DHCP server allocates an IP address to the terminal in the IP address subnet section;
the IP address sub-network segment allocation unit is used for allocating an IP address sub-network segment for one or more subvlans in the IP address network segment of the supernet vlan;
and the sub-network segment identifier distribution unit is used for configuring a sub-network segment identifier for each IP address sub-network segment.
5. The DHCP relay device of claim 4, wherein the relay device further comprises:
a binding table storage unit, configured to store a binding table based on an IP address subnet section after configuring a corresponding relationship between a subvlan and the IP address subnet section, where the binding table includes the binding relationship between the IP address subnet section and the corresponding subvlan, and is used to determine the corresponding subvlan through the IP address subnet section to which the IP address of the terminal belongs;
or after the DHCP server allocates an IP address to the terminal in the IP address sub-network segment, the DHCP server is configured to store a binding table based on the terminal, where the binding table includes a binding relationship between a port through which the terminal accesses the subvlan, the corresponding subvlan, the IP address of the terminal, and the MAC physical address of the terminal, and is configured to confirm the corresponding MAC physical address through the IP address of the terminal.
6. An IP address assignment method, comprising:
receiving a DHCP IP address request message sent by a DHCP relay device to obtain a sub-network segment identifier;
and confirming the IP address sub-network segment corresponding to the sub-network segment identifier, and allocating an IP address for the terminal in an IP address pool of the IP address sub-network segment, wherein the IP address sub-network segment corresponds to the subvlan to which the terminal belongs.
7. The IP address assignment method of claim 6, further comprising assigning a pool of IP addresses to an IP address sub-segment, wherein the IP address sub-segment is configured with a sub-segment identifier.
8. The IP address allocation method according to claim 6 or 7, wherein the obtaining of the subnet fragment identifier is specifically:
acquiring the sub-network segment identifier from the DHCP IP address request message DHCP user grouping information option; or
And acquiring the sub-network segment identification from a link selection sub-item of the DHCP IP address request message DHCP relay agent information option.
9. A DHCP server, comprising:
the sub-network segment identification receiving unit is used for receiving a DHCP IP address request message sent by the DHCP relay equipment and obtaining a sub-network segment identification;
and the IP address allocation unit is used for confirming the IP address sub-network segment corresponding to the sub-network segment identifier and allocating an IP address for the terminal in an IP address pool of the IP address sub-network segment, wherein the IP address sub-network segment corresponds to the subvlan to which the terminal belongs.
10. The DHCP server of claim 9, wherein the server further comprises:
and the IP address pool allocation unit is used for allocating an IP address pool to the IP address sub-network segment, and the IP address sub-network segment is configured with a sub-network segment identifier.
11. An IP address assignment system, comprising:
the DHCP relay device according to any one of claims 1 to 3, configured to receive a DHCP IP address request packet from a terminal, determine a subnet subvlan to which the terminal belongs and an allocated IP address subnet segment, determine a subnet segment identifier corresponding to the subnet segment identifier according to the IP address subnet segment, and send the subnet segment identifier to a DHCP server, so that the DHCP server allocates an IP address to the terminal in the IP address subnet segment;
the DHCP server according to claim 9 or 10, configured to receive a subnet segment identifier, identify an IP address subnet segment corresponding to the subnet segment identifier, and allocate an IP address to the terminal in an IP address pool of the IP address subnet segment.
CN2009100824566A 2009-04-16 2009-04-16 IP address assignment method and system Expired - Fee Related CN101534329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100824566A CN101534329B (en) 2009-04-16 2009-04-16 IP address assignment method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100824566A CN101534329B (en) 2009-04-16 2009-04-16 IP address assignment method and system

Publications (2)

Publication Number Publication Date
CN101534329A CN101534329A (en) 2009-09-16
CN101534329B true CN101534329B (en) 2012-05-02

Family

ID=41104716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100824566A Expired - Fee Related CN101534329B (en) 2009-04-16 2009-04-16 IP address assignment method and system

Country Status (1)

Country Link
CN (1) CN101534329B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209643A (en) * 2016-07-14 2016-12-07 杭州华三通信技术有限公司 Message forwarding method and device

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101980488B (en) * 2010-10-22 2015-09-16 中兴通讯股份有限公司 The management method of ARP and three-tier switch
CN102143247B (en) * 2010-12-31 2014-07-30 华为技术有限公司 Method for allocating and configuring address, address allocation server and host machine
CN102957752A (en) * 2011-08-19 2013-03-06 中兴通讯股份有限公司 System and method for identification and gateway address distribution
CN102413203A (en) * 2011-12-01 2012-04-11 中兴通讯股份有限公司 IP (Internet Protocol) address allocation method and device
CN103840995B (en) * 2012-11-26 2017-10-24 华为技术有限公司 IP message processing methods, device and network system
CN103888551B (en) 2012-12-19 2017-09-12 华为技术有限公司 Internet Protocol address acquisition methods, trunking and system in a kind of network
CN104378222A (en) * 2013-08-15 2015-02-25 海尔集团公司 Communication parameter configuration method, server and intelligent network system
CN103957288A (en) * 2014-04-28 2014-07-30 福建星网锐捷网络有限公司 Method, device and equipment for IP address dynamic allocation
CN105472048B (en) * 2014-07-14 2019-05-10 华为技术有限公司 A kind of address distribution method, information aggregation method and relevant device
CN104135545A (en) * 2014-07-24 2014-11-05 清华大学 Method of sharing public network address in IPv4 (Internet Protocol version 4) network through dividing port sections
CN104104747B (en) * 2014-07-28 2017-08-08 新华三技术有限公司 Message transmitting method and device
CN105610669A (en) * 2015-12-28 2016-05-25 湖南基石通信技术有限公司 Address distribution method and device for Supervlan flattened network
CN105657081B (en) * 2016-04-07 2019-01-18 华为技术有限公司 The method, apparatus and system of DHCP service are provided
CN105872126B (en) * 2016-05-05 2019-09-06 成都西加云杉科技有限公司 A kind of method and gateway for distributing IP address
CN106254574B (en) * 2016-09-09 2019-09-17 新华三技术有限公司 A kind of address distribution method and device
CN106357838B (en) * 2016-09-26 2019-08-06 新华三信息技术有限公司 A kind of distribution method and device of IP address
CN106878481B (en) * 2016-12-30 2020-08-18 瑞斯康达科技发展股份有限公司 Method, device and system for acquiring Internet Protocol (IP) address
CN107979658B (en) * 2017-12-20 2020-10-20 北京格林伟迪科技股份有限公司 Method and device for allocating IPv4 address for PTN end-to-end tunnel
CN108063837A (en) * 2017-12-25 2018-05-22 锐捷网络股份有限公司 Dynamic IP addressing distribution method and device
CN109905336B (en) * 2019-03-13 2021-04-16 武汉星耀科技有限公司 SuperVLAN implementation method and system of distributed virtual switch
CN111835880A (en) * 2020-06-23 2020-10-27 新浪网技术(中国)有限公司 IP address allocation method and system
US11456987B1 (en) 2021-05-07 2022-09-27 State Farm Mutual Automobile Insurance Company Systems and methods for automatic internet protocol address management
CN117579598B (en) * 2023-11-13 2024-09-17 全讯汇聚网络科技(北京)有限公司 Method, device, equipment and medium for distributing IP address based on physical network card

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6539019B1 (en) * 1999-05-24 2003-03-25 3Com Corporation Methods and apparatus for automatically connecting a dynamic host configuration protocol (DHCP) client network device to a virtual local area network (VLAN)
CN1716967A (en) * 2004-06-28 2006-01-04 埃兹布罗网络株式会社 Device for enabling intra-edge routing-less premises internet protocol communication and communication method using the same
CN1949784A (en) * 2005-10-12 2007-04-18 华为技术有限公司 IP address requesting method for DHCP client by DHCP repeater
CN101159758A (en) * 2007-10-30 2008-04-09 中兴通讯股份有限公司 Classification associated dynamic host machine configuring protocol option distribution method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6539019B1 (en) * 1999-05-24 2003-03-25 3Com Corporation Methods and apparatus for automatically connecting a dynamic host configuration protocol (DHCP) client network device to a virtual local area network (VLAN)
CN1716967A (en) * 2004-06-28 2006-01-04 埃兹布罗网络株式会社 Device for enabling intra-edge routing-less premises internet protocol communication and communication method using the same
CN1949784A (en) * 2005-10-12 2007-04-18 华为技术有限公司 IP address requesting method for DHCP client by DHCP repeater
CN101159758A (en) * 2007-10-30 2008-04-09 中兴通讯股份有限公司 Classification associated dynamic host machine configuring protocol option distribution method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209643A (en) * 2016-07-14 2016-12-07 杭州华三通信技术有限公司 Message forwarding method and device
CN106209643B (en) * 2016-07-14 2019-08-06 新华三技术有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
CN101534329A (en) 2009-09-16

Similar Documents

Publication Publication Date Title
CN101534329B (en) IP address assignment method and system
CN102143247B (en) Method for allocating and configuring address, address allocation server and host machine
CN100502413C (en) IP address requesting method for DHCP client by DHCP repeater
US8875233B2 (en) Isolation VLAN for layer two access networks
CN109586972B (en) Access method and system of user terminal equipment and broadband network gateway
CN102461073B (en) Method and apparatus for accommodating duplicate MAC addresses
CN102647486B (en) Address distribution method, equipment and system
JP4773987B2 (en) Terminal affiliation switching system
US10218671B2 (en) Dynamic media access control address allocation and leasing for wireless network
CN101883158B (en) Method and client for acquiring VLAN (Virtual Local Area Network) IDs (Identifiers) and network protocol addresses
US8862705B2 (en) Secure DHCP processing for layer two access networks
CN100583904C (en) Automatic configuration method for host address in IPV6 network
CN106101617B (en) Message transmission method, device and system
CN102118453B (en) Method, service device, client and communication system for automatic configuration of IP address
CN102025798A (en) Address allocation processing method, device and system
CN102413203A (en) IP (Internet Protocol) address allocation method and device
CN102752413B (en) Dynamic Host Configuration Protocol server system of selection and the network equipment
WO2015085788A1 (en) Method and apparatus for processing dynamic host configuration protocol message
CN105245629A (en) DHCP-based host communication method and device
CN105635327A (en) Method and device of address distribution
CN105472048A (en) Address allocating method, information aggregation method and related equipment
CN107517129B (en) Method and device for configuring uplink interface of equipment based on OpenStack
CN106878481B (en) Method, device and system for acquiring Internet Protocol (IP) address
CN101656724A (en) Anti-attack method and dynamic host configuration protocol server
US20120054865A1 (en) Device and Method for Preventing Internet Protocol Version 6 (IPv6) Address Being Fraudulently Attacked

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120502

Termination date: 20190416

CF01 Termination of patent right due to non-payment of annual fee