CN108243078B - Address allocation method and device - Google Patents

Address allocation method and device Download PDF

Info

Publication number
CN108243078B
CN108243078B CN201611207807.8A CN201611207807A CN108243078B CN 108243078 B CN108243078 B CN 108243078B CN 201611207807 A CN201611207807 A CN 201611207807A CN 108243078 B CN108243078 B CN 108243078B
Authority
CN
China
Prior art keywords
dhcp
message
bgp
vpn
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611207807.8A
Other languages
Chinese (zh)
Other versions
CN108243078A (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201611207807.8A priority Critical patent/CN108243078B/en
Priority to PCT/CN2017/117932 priority patent/WO2018113768A1/en
Publication of CN108243078A publication Critical patent/CN108243078A/en
Application granted granted Critical
Publication of CN108243078B publication Critical patent/CN108243078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Abstract

The application provides an address allocation method and device. In the application, BGP plays a role of a bridge bearer between DHCP RELAY devices and DHCP SERVER, and DHCP RELAY device embeds VPN information (specifically, RD of VPN) accessed by a user into an Update message of BGP to help DHCP SERVER determine VPN information accessed by the user, so that interconnection interfaces of DHCP RELAY device and DHCP SERVER no longer bind VPN accessed by the user, thereby skillfully solving the problem that a large amount of VPN configurations do not need to be deployed between DHCP REALY devices and DHCP SERVER when a large amount of VPN users access, greatly reducing network deployment load, and simplifying network deployment.

Description

Address allocation method and device
Technical Field
The present application relates to network communication technologies, and in particular, to an address assignment method and apparatus.
Background
There are two ways to obtain the IP address by using a Dynamic Host Configuration Protocol (DHCP), one is to directly obtain the IP address from a DHCP SERVER (SERVER), and the other is to indirectly obtain the IP address from DHCP SERVER by using a DHCP RELAY (RELAY).
In the DHCP RELAY mode, a DHCP RELAY device access user generally accesses through a Virtual Private Network (VPN), so that the user access is Private and isolated. For a user accessed by the VPN, DHCP RELAY equipment binds the VPN accessed by the user at a user side interface, and after the DHCP RELAY equipment binds the VPN, to acquire an IP address for the user from DHCP SERVER, the address of DHCP SERVER needs to be seen in the VPN, so that the interconnection interfaces of DHCP RELAY equipment and DHCP SERVER also need to bind the VPN accessed by the user to complete the application of the IP address in the VPN by the user. Fig. 1 shows DHCP RELAY mode network application scene diagram.
Different users access DHCP RELAY devices through different VPNs, which in this case requires deployment of a large number of VPN configurations between DHCP REALY devices and DHCP SERVER, greatly burdening and increasing the difficulty of network deployment.
Disclosure of Invention
The application provides an address allocation method and device to solve the problem that interconnection interfaces between DHCP REALY equipment and DHCP SERVER deploy VPNs when a plurality of users access the VPNs.
The technical scheme provided by the application comprises the following steps:
an address allocation method, which is applied to a Dynamic Host Configuration Protocol (DHCP) RELAY RELAY device, comprises the following steps:
receiving a first DHCP protocol message which is sent by a local user and used for applying for an IP address, determining a Virtual Private Network (VPN) accessed by the user, packaging the first DHCP protocol message and a routing discriminator RD corresponding to the VPN into a first routing message, and sending the first routing message to DHCP SERVER;
receiving DHCP SERVER the second routing message, obtaining the second DHCP protocol message and RD from the second routing message, and sending the second DHCP protocol message to the user.
An address allocation method, which is applied to a Dynamic Host Configuration Protocol (DHCP) SERVER, SERVER, and comprises the following steps:
receiving DHCP RELAY a first routing message sent by equipment, and acquiring a first DHCP protocol message and RD from the received first routing message;
and encapsulating the second DHCP protocol message for responding to the first DHCP protocol message and the RD in a second routing message and sending the second routing message to DHCP RELAY equipment.
An address allocation device, which is applied to a Dynamic Host Configuration Protocol (DHCP) RELAY RELAY device, the device comprising:
a first receiving and processing unit, configured to receive a first DHCP protocol packet sent by a local user and used for applying for an IP address, determine a virtual private network VPN to which the user accesses, encapsulate the first DHCP protocol packet and a routing specifier RD corresponding to the VPN into a first routing packet, and send the first routing packet to DHCP SERVER;
and the second receiving and processing unit is configured to receive DHCP SERVER the second routing packet sent, obtain, from the received second routing packet, a second DHCP protocol packet of the second type and the RD, which are used to respond to the first DHCP protocol packet, and send the second DHCP protocol packet to the user.
An address allocation device, which is applied to a Dynamic Host Configuration Protocol (DHCP) SERVER (SERVER), the device comprises:
a receiving unit, configured to receive DHCP RELAY a first routing packet sent by a device, and obtain a first DHCP protocol packet and an RD from the received first routing packet;
and the response unit is used for encapsulating the second DHCP protocol message for responding to the first DHCP protocol message and the RD in a second routing message and sending the second routing message to the DHCP RELAY equipment.
It can be seen from the above technical solutions that, in the present invention, a routing protocol plays a role of a bridge bearer between DHCP RELAY devices and DHCP SERVER, and DHCP RELAY devices embed VPN information (specifically, RD of VPN) accessed by a user into a routing message to help DHCP SERVER determine the VPN information accessed by the user, so that interconnection interfaces of DHCPRELAY devices and DHCP SERVER no longer bind the VPN accessed by the user, and a problem that a large number of VPN configurations do not need to be deployed between DHCP REALY devices and DHCP SERVER when a large number of VPN users access is ingeniously solved, thereby greatly reducing network deployment load and simplifying network deployment.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 shows a DHCP RELAY-mode network application scenario diagram;
FIG. 2 is a flow chart of a method provided by the present invention;
FIG. 3 is a schematic diagram of an IP address application;
fig. 4 is a structural diagram of an Update message provided by the present invention;
FIG. 5 is a schematic diagram of an embodiment provided by the present invention;
FIG. 6 is a schematic view of the structure of the apparatus according to the present invention;
FIG. 7 is a diagram illustrating a hardware structure of the apparatus shown in FIG. 6 according to the present invention;
FIG. 8 is a schematic structural view of another apparatus according to the present invention;
fig. 9 is a schematic diagram of a hardware structure of the apparatus shown in fig. 8 according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Referring to fig. 2, fig. 2 is a flow chart of the method provided by the present invention. As shown in fig. 2, the process may include the following steps:
step 201, DHCP RELAY equipment receives a first kind of DHCP protocol message sent by a local user for applying for an IP address, determines a VPN accessed by the user, encapsulates the first kind of DHCP protocol message and a routing-Distinguisher (RD) corresponding to the VPN into a first routing message, and sends the first routing message to DHCP SERVER.
Here, the RD corresponding to the VPN is used to identify the VPN, and different VPNs are identified by different RDs.
Based on DHCP, the DHCP protocol messages sent by the user for applying for the IP address include a DHCP Discover (Discover) message sent in a discovery phase, a DHCP Request (Request) message sent in a selection phase, a DHCP Decline (Decline) message sent when the IP address is unavailable, and a DHCP Release (Release) message sent when the IP address is released. Fig. 3 is a simplified flow chart showing application of an IP address based on DHCP.
Based on this, the first-type DHCP protocol message in step 201 includes the DHCP Discover message, the DHCP Request message, the DHCP Decline message, and the DHCP Release message.
In step 202, DHCP SERVER receives a first routing message sent by DHCP RELAY device, and obtains a first DHCP protocol message and an RD from the received first routing message.
And when DHCP SERVER acquires the first DHCP protocol message and RD, storing the acquired RD and correspondingly processing the first DHCP protocol message.
Step 203, DHCP SERVER encapsulates the second DHCP protocol message for responding to the first DHCP protocol message and the obtained RD in a second routing message and sends the second routing message to DHCP RELAY device.
DHCP SERVER, determining a second type of DHCP protocol message returned by the user for responding to the first type of DHCP protocol message according to the processing of the first type of DHCP protocol message, specifically, when the first type of DHCP protocol message is a DHCP Discover message, the second type of DHCP protocol message provides an (Offer) message for DHCP, when the first type of DHCP protocol message is a DHCPRequest message, the second type of DHCP protocol message is a DHCP ACK/NACK message, when the first type of DHCP protocol message is a DHCP Decline message, the second type of DHCP protocol message is a DHCP Offer message, and when the first type of DHCP protocol message is a DHCP Release message, the second type of DHCP protocol message is a response message for responding to the DHCP Release message.
When DHCP SERVER determines the second DHCP protocol packet returned to the user, DHCP SERVER encapsulates the second DHCP protocol packet and the stored RD together in a second routing packet and sends the second routing packet to the DHCP RELAY device.
Step 204, the DHCP RELAY device receives DHCP SERVER the second routing packet, obtains the second DHCP protocol packet of the second type and the RD for responding to the first DHCP protocol packet from the received second routing packet, and sends the second DHCP protocol packet to the user.
Thus, the flow shown in fig. 2 is completed.
Finally DHCP SERVER allocates IP address to user through step 201 to step 204 in the flow shown in fig. 2, and allocates IP address to user accessed through VPN by using routing protocol. The routing protocol may be, for example, Border Gateway Protocol (BGP) or other routing protocols, and the present invention is not limited in particular. BGP is described below as an example.
To facilitate DHCP RELAY devices communicating with DHCP SERVER, BGP neighbors may be established between DHCP RELAY devices and DHCP SERVER based on the BGP protocol prior to performing the flow illustrated in fig. 2, as an embodiment of the invention.
The first routing message may be a first routing Update (Update) message in BGP, and the second routing message may be a second Update message in BGP.
It should be noted that, as an embodiment of the present invention, before the flow shown in fig. 2, it is further required to further include: DHCP RELAY device and DHCP SERVER negotiate with each other a capability set that includes at least whether extended features (applied to BGP, hereinafter BGP extended features) are supported, which include: and encapsulating the DHCP protocol message and the RD corresponding to the VPN to the characteristic of the Update message, and acquiring the characteristics of the DHCP protocol message and the RD corresponding to the VPN from the Update message. The flow shown in fig. 2 is performed on the premise that DHCP RELAY and DHCP SERVER, which are BGP neighbors of each other, support and enable the BGP extensions.
As an embodiment of the present invention, the DHCP RELAY device and DHCP SERVER mutually negotiating capability sets may include:
the DHCP RELAY device further advertises the capabilities set of the device to DHCP SERVER as a BGP neighbor and receives the capabilities set of DHCP SERVER as a DHCP SERVER advertisement of a BGP neighbor;
DHCP SERVER advertises the capabilities of its own server to DHCP RELAY devices that are BGP neighbors and receives the capabilities of DHCP RELAY devices that are advertised by DHCP RELAY devices that are BGP neighbors.
In the present invention, an DHCP RELAY device may extend an Open (Open) packet in a BGP to carry a capability set of a DHCP RELAY device, and based on this, the capability set of a DHCP RELAY device that the DHCP SERVER receives an announcement of a DHCP RELAY device serving as a BGP neighbor may include: DHCP SERVER, receiving an Open message sent by DHCP RELAY equipment as a BGP neighbor, and parsing out the capability set of DHCP RELAY equipment from the Open message.
Similarly, DHCP SERVER may extend an Open message in BGP to carry a capability set of DHCP SERVER, and based on this, receiving, by the DHCP RELAY device, a capability set of DHCP SERVER advertised as a BGP neighbor by DHCP SERVER may include: the DHCP RELAY device receives an Open message sent by DHCP SERVER as a BGP neighbor, and parses a DHCP SERVER capability set from the Open message.
As an embodiment of the present invention, applied to BGP, the step 201 of encapsulating the first DHCP protocol packet and the RD corresponding to the VPN into the first routing packet and sending the first routing packet to DHCP SERVER specifically includes: and packaging the first DHCP protocol message and RD corresponding to the VPN into a first Update message of the BGP, and sending the first Update message to DHCP SERVER serving as BGP neighbors.
The encapsulating the first DHCP protocol packet and the RD corresponding to the VPN into the first Update packet of the BGP and sending the first Update packet to DHCP SERVER serving as a BGP neighbor may include:
and adding a field of Network Layer Reachability Information (NLRI) in the first Update message and sending the NLRI to DHCP SERVER serving as a BGP neighbor, wherein the appointed NLRI field is used for carrying the first type of DHCP protocol message and the RD corresponding to the VPN. Fig. 4 shows the structure of the first Update message.
Similarly, in step 203, encapsulating the second DHCP protocol packet for responding to the first DHCP protocol packet and the RD in the second routing packet, and sending the second routing packet to the DHCP RELAY device specifically includes: and encapsulating a second DHCP protocol message and RD used for responding to the first DHCP protocol message in a second Update message and sending the second DHCP protocol message and RD to DHCPRELAY equipment serving as BGP neighbors.
Specifically, encapsulating the second DHCP protocol packet and the RD for responding to the first DHCP protocol packet in the second Update packet and sending the second Update packet to the DHCP RELAY device serving as the BGP neighbor may include:
and adding a designated field in the second Update message and sending the designated field to DHCP RELAY equipment serving as a BGP neighbor, wherein the designated NLRI field is used for carrying a second DHCP protocol message for responding to the first DHCP protocol message and the RD. The structure of the second Update message is similar to the structure shown in fig. 4.
The method provided by the present invention is described below by a specific embodiment, taking the routing protocol as BGP as an example:
referring to fig. 5, fig. 5 is a schematic diagram of an embodiment provided by the present invention. In fig. 5, user a accesses DHCP RELAY device through VPN X, whose RD is Y. It should be noted that the user is not the same as the user in the general sense, but is preferably an enterprise user rather than a single individual user.
As shown in fig. 5, a BGP neighbor is created between DHCP RELAY devices and DHCP SERVER. Here, DHCP RELAY device and DHCP SERVER belong to the same network segment, and the interworking between the two is reachable, and a BGP neighbor can be created between the two as long as the interworking between DHCP RELAY device and DHCP SERVER is reachable. The specific way of creating the BGP neighbor is similar to the existing BGP neighbor creating way, and is not described again.
As shown in fig. 5, in order to ensure the realizability of the present invention, capability sets (including at least whether the BGP extension feature is supported) are negotiated between DHCP RELAY devices and DHCP SERVER which are BGP neighbors, and it is a precondition for implementing the present invention that DHCP RELAY devices and DHCP SERVER support and enable the BGP extension feature. As described above, BGP extension features include: and encapsulating the DHCP protocol message and the RD corresponding to the VPN to the characteristic of the Update message, and acquiring the characteristics of the DHCP protocol message and the RD corresponding to the VPN from the Update message.
In fig. 5, if the DHCP RELAY devices and DHCP SERVER support and enable the BGP extension feature, when the user a applies for an IP address, the user a first sends a DHCP Discover (Discover) message in the discovery phase.
DHCP RELAY, the device receives a DHCP Discover message sent by a user a, determines that a VPN accessed by the user a is a VPN X, newly defines an NLRI field (denoted as NLRI field 1_1) containing RDY of the VPN X and the DHCP Discover message in the Update message, and for convenience of description, newly defines the Update message with the NLRI field 1_1 as Update message 1_ 1.
DHCP RELAY sends Update message 1_1 to DHCP SERVER.
DHCP SERVER receives Update message 1_1, and acquires DHCP Discover message and Y from NLRI field 1_1 of Update message 1_ 1.
DHCP SERVER saves Y, processes the DHCP Discover message, and determines to return the DHCP Offer message to the user A after completing the processing.
DHCP SERVER, an NLRI field (denoted as NLRI field 2_2) containing Y and DHCP Offer messages is newly defined in the Update message, and for convenience of description, the Update message newly defined with NLRI field 2_2 is denoted as Update message 2_ 2.
DHCP SERVER sends Update message 2_2 to DHCP RELAY device.
DHCP RELAY, the device receives Update message 2_2, obtains DHCP Offer message and Y from NLRI field 2_2 of Update message 2_2, processes DHCP Offer message, and returns processed DHCPOffer message to user a after completing the processing.
After receiving the DHCP Offer message, the user a sends a DHCP Request message.
DHCP RELAY, the device receives a DHCP Request message sent by a user a, determines that a VPN accessed by the user a is a VPN X, newly defines an RDY containing the VPN X and an NLRI field (denoted as NLRI field 3_3) of the DHCP Request message in the Update message, and for convenience of description, newly defines the NLRI field 3_3 of the Update message as Update message 3_ 3.
DHCP RELAY sends Update message 3_3 to DHCP SERVER.
DHCP SERVER, receiving Update message 3_3, and obtaining DHCP Request message and Y from NLRI field 3_3 of Update message 3_ 3.
DHCP SERVER, saving Y, processing DHCP Request message, and determining to return DHCP ACK/NACK message to user A after completing the processing.
DHCP SERVER, an NLRI field (denoted as NLRI field 4_4) containing Y and DHCP ACK/NACK messages is newly defined in the Update message, and for convenience of description, the Update message newly defined with NLRI field 4_4 is denoted as Update message 4_ 4.
DHCP SERVER sends Update message 4_4 to DHCP RELAY device.
DHCP RELAY, the device receives the Update message 4_4, obtains the DHCP ACK/NACK message and Y from the NLRI field 4_4 of the Update message 4_4, processes the DHCP ACK/NACK message, and returns the processed DHCP ACK/NACK message to the user A after completing the processing.
And after receiving the DHCP ACK/NACK message, the user A sends a DHCP Decline message. For the DHCP Decline message sent by the user a and the subsequent DHCP Release message sent by the user a, the processing mode is similar to the above-mentioned DHCPDiscover message and DHCP Request message, which are not described one by one here.
It can be seen from the foregoing embodiments that, in the present invention, BGP plays a role of a bridge bearer between DHCP RELAY devices and DHCP SERVER, and DHCP RELAY device embeds VPN information (specifically, RD of VPN) accessed by a user into an Update message of BGP to help DHCP SERVER determine VPN information accessed by the user, so that interconnection interfaces of DHCP RELAY device and DHCP SERVER no longer bind to VPN accessed by the user, and a problem that a large amount of VPN configurations do not need to be deployed between DHCP REALY device and DHCP SERVER when a large amount of VPN users access is solved skillfully, which greatly reduces network deployment load and simplifies network deployment.
The method provided by the present invention is described above. The following describes the apparatus provided by the present invention:
referring to fig. 6, fig. 6 is a structural view of the apparatus according to the present invention. The device is applied to DHCP RELAY equipment, as shown in fig. 6, the device comprises:
a first receiving and processing unit, configured to receive a first DHCP protocol packet sent by a local user and used for applying for an IP address, determine a virtual private network VPN to which the user accesses, encapsulate the first DHCP protocol packet and a routing specifier RD corresponding to the VPN into a first routing packet, and send the first routing packet to DHCP SERVER;
and the second receiving and processing unit is configured to receive DHCP SERVER the second routing packet sent, obtain, from the received second routing packet, a second DHCP protocol packet of the second type and the RD, which are used to respond to the first DHCP protocol packet, and send the second DHCP protocol packet to the user.
Preferably, as shown in fig. 6, the apparatus further comprises:
a negotiation unit for announcing DHCP SERVER the capability set of the present device; and, receiving DHCP SERVER an announced DHCP SERVER capability set;
the capability set includes at least whether extended features are supported, the extended features including: and encapsulating the DHCP protocol message and the RD corresponding to the VPN to the characteristics of the routing message, and acquiring the characteristics of the DHCP protocol message and the RD corresponding to the VPN from the routing message.
Preferably, the encapsulating, by the first receiving and processing unit, the first DHCP protocol packet of the first type and the RD corresponding to the VPN into the first routing packet and sending the first routing packet to DHCP SERVER includes:
and newly adding a designated network layer reachability information NLRI field in the first routing message and sending the NLRI field to DHCP SERVER, wherein the designated NLRI field is used for carrying the first-class DHCP protocol message and the RD corresponding to the VPN.
Thus, the hardware configuration of the apparatus shown in fig. 6 is completed.
Correspondingly, the invention also provides a hardware structure diagram of the device shown in FIG. 6. Referring to fig. 7, fig. 7 is a schematic diagram of a hardware structure of the apparatus shown in fig. 6 according to the present invention. As shown in fig. 7, the apparatus includes:
the memory is used for storing the program instruction operated by the first receiving and processing unit, the program instruction operated by the second receiving and processing unit and the program instruction operated by the negotiation unit;
and the processor is used for executing the program instruction operated by the first receiving processing unit, executing the program instruction operated by the second receiving processing unit and executing the program instruction operated by the negotiation unit. The processor executes the operation executed by the program instruction executed by the first receiving processing unit as the operation executed by the first receiving processing unit, the processor executes the operation executed by the program instruction executed by the second receiving processing unit as the operation executed by the second receiving processing unit, and the processor executes the operation executed by the program instruction executed by the negotiation unit as the operation executed by the negotiation unit.
As shown in fig. 7, the hardware architecture may also include a power component configured to perform power management of the device, a wired or wireless network interface configured to connect the device to a network, and an input-output (I/O) interface.
Up to this point, the description of the hardware configuration shown in fig. 7 is completed.
Referring to fig. 8, fig. 8 is a structural view of another apparatus provided in the present invention. The apparatus is applied DHCP SERVER, DHCP SERVER to establish BGP neighbors with DHCP RELAY devices based on the BGP protocol. As shown in fig. 8, the apparatus includes:
a receiving unit, configured to receive DHCP RELAY a first routing packet sent by a device, and obtain a first DHCP protocol packet and an RD from the received first routing packet;
and the response unit is used for encapsulating the second DHCP protocol message for responding to the first DHCP protocol message and the RD in a second routing message and sending the second routing message to the DHCP RELAY equipment.
Preferably, as shown in fig. 8, the apparatus further comprises:
a negotiation unit for informing DHCP RELAY the capability set of the server to the device; and, receiving DHCP RELAY a capability set of the DHCP RELAY device advertised by the device;
the capability set includes at least whether extended features are supported, the extended features including: and encapsulating the DHCP protocol message and the RD corresponding to the VPN to the characteristics of the routing message, and acquiring the characteristics of the DHCP protocol message and the RD corresponding to the VPN from the routing message.
Preferably, the sending, by the response unit, the second DHCP protocol packet and the RD packet, which are used for responding to the first DHCP protocol packet, in the second routing packet to the DHCP RELAY device includes:
and adding a new appointed network layer reachability information NLRI field in the second routing message and sending the new appointed network layer reachability information NLRI field to DHCP RELAY equipment, wherein the appointed NLRI field is used for carrying a second DHCP protocol message used for responding to the first DHCP protocol message and the RD.
Thus, the hardware configuration diagram of the apparatus shown in fig. 8 is completed.
Correspondingly, the invention also provides a hardware structure diagram of the device shown in FIG. 8. Referring to fig. 9, fig. 7 is a schematic diagram of a hardware structure of the apparatus shown in fig. 8 according to the present invention. As shown in fig. 9, the apparatus includes:
the memory is used for storing the program instruction operated by the receiving unit, the program instruction operated by the response unit and the program instruction operated by the negotiation unit;
and the processor is used for executing the program instruction operated by the receiving unit, the program instruction operated by the response unit and the program instruction operated by the negotiation unit. Wherein, the processor executes the operation executed by the program instruction executed by the receiving unit as the operation executed by the receiving unit, the processor executes the operation executed by the program instruction executed by the responding unit as the operation executed by the responding unit, and the processor executes the operation executed by the program instruction executed by the negotiating unit as the operation executed by the negotiating unit.
As shown in fig. 9, the hardware architecture may also include a power component configured to perform power management of the device, a wired or wireless network interface configured to connect the device to a network, and an input-output (I/O) interface.
To this end, the description of the hardware configuration shown in fig. 9 is completed.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (12)

1. An address allocation method, applied to a Dynamic Host Configuration Protocol (DHCP) RELAY RELAY device, includes:
receiving a first DHCP protocol message which is sent by a local user and used for applying for an IP address, determining a Virtual Private Network (VPN) accessed by the user, packaging the first DHCP protocol message and a routing discriminator RD corresponding to the VPN to a first BGP message, and sending the first BGP message to DHCP SERVER;
and receiving DHCP SERVER a second BGP message sent, acquiring a second DHCP protocol message and the RD used for responding to the first DHCP protocol message from the received second BGP message, and sending the second DHCP protocol message to the user.
2. The method of claim 1, further comprising:
advertising DHCP SERVER the capabilities set of the device;
receiving DHCP SERVER an announced DHCP SERVER capability set;
the capability set includes at least whether extended features are supported, the extended features including: packaging the DHCP protocol message and the RD corresponding to the VPN into the characteristics of the BGP message, and acquiring the characteristics of the DHCP protocol message and the RD corresponding to the VPN from the BGP message;
the method is performed on the premise that the present device and DHCP SERVER support and enable the extended features.
3. The method of claim 1, wherein encapsulating the first DHCP protocol packet and the RD corresponding to the VPN into a first BGP message and sending DHCP SERVER the first BGP message comprises:
and newly adding a designated network layer reachability information NLRI field in the first BGP message and sending the NLRI field to DHCP SERVER, wherein the designated NLRI field is used for carrying the first-class DHCP protocol message and the RD corresponding to the VPN.
4. An address allocation method, applied to a dynamic host configuration protocol DHCP SERVER, the method comprising:
receiving DHCP RELAY a first BGP message sent by equipment, and acquiring a first DHCP protocol message and RD from the received first BGP message;
and encapsulating the second DHCP protocol message for responding to the first DHCP protocol message and the RD in a second BGP message and sending the second BGP message to DHCP RELAY equipment.
5. The method of claim 4, further comprising:
advertising DHCP RELAY the capability set of the server to the device;
receiving DHCP RELAY a capability set of a DHCP RELAY device advertised by the device;
the capability set includes at least whether extended features are supported, the extended features including: packaging the DHCP protocol message and the RD corresponding to the VPN into the characteristics of the BGP message, and acquiring the characteristics of the DHCP protocol message and the RD corresponding to the VPN from the BGP message;
the method is performed on the premise that the server and DHCP RELAY devices support and enable the extended features.
6. The method of claim 4, wherein encapsulating the second DHCP protocol message for responding to the first DHCP protocol message and the RD in a second BGP message for transmitting DHCP RELAY to the device comprises:
and newly adding a designated network layer reachability information NLRI field in the second BGP message and sending the NLRI field to DHCP RELAY equipment, wherein the designated NLRI field is used for carrying a second DHCP protocol message for responding to the first DHCP protocol message and the RD.
7. An address allocation apparatus, applied to a dynamic host configuration protocol DHCP RELAY device, the apparatus comprising:
the first receiving and processing unit is configured to receive a first DHCP protocol packet sent by a local user and used for applying for an IP address, determine a virtual private network VPN to which the user accesses, encapsulate the first DHCP protocol packet and a routing specifier RD corresponding to the VPN into a first BGP packet, and send the first BGP packet to DHCP SERVER;
and a second receiving and processing unit, configured to receive DHCP SERVER the second BGP message sent, obtain, from the received second BGP message, a second DHCP protocol message of the second type and the RD, which are used to respond to the first DHCP protocol message, and send the second DHCP protocol message to the user.
8. The apparatus of claim 7, further comprising:
a negotiation unit for announcing DHCP SERVER the capability set of the present device; and, receiving DHCP SERVER an announced DHCP SERVER capability set;
the capability set includes at least whether extended features are supported, the extended features including: and encapsulating the DHCP protocol message and the RD corresponding to the VPN into the characteristics of the BGP message, and acquiring the characteristics of the DHCP protocol message and the RD corresponding to the VPN from the BGP message.
9. The apparatus of claim 7, wherein the first receiving and processing unit encapsulates the first DHCP protocol packet of the first type and the RD corresponding to the VPN into the first BGP message and sends DHCP SERVER the first BGP message, and includes:
and newly adding a designated network layer reachability information NLRI field in the first BGP message and sending the NLRI field to DHCP SERVER, wherein the designated NLRI field is used for carrying the first-class DHCP protocol message and the RD corresponding to the VPN.
10. An address allocation device, which is applied to a dynamic host configuration protocol, DHCP, SERVER, the device comprising:
the receiving unit is used for receiving DHCP RELAY a first BGP message sent by the equipment, and acquiring a first DHCP protocol message and RD from the received first BGP message;
and the response unit is used for encapsulating the second DHCP protocol message for responding to the first DHCP protocol message and the RD in a second BGP message and sending the second BGP message to the DHCP RELAY equipment.
11. The apparatus of claim 10, further comprising:
a negotiation unit for informing DHCP RELAY the capability set of the server to the device; and, receiving DHCP RELAY a capability set of the DHCP RELAY device advertised by the device;
the capability set includes at least whether extended features are supported, the extended features including: and encapsulating the DHCP protocol message and the RD corresponding to the VPN into the characteristics of the BGP message, and acquiring the characteristics of the DHCP protocol message and the RD corresponding to the VPN from the BGP message.
12. The apparatus of claim 10, wherein the responding unit encapsulates the second DHCP protocol message for responding to the first DHCP protocol message and the RD in the second BGP message and sends the second DHCP protocol message to the DHCP RELAY device, and wherein the responding unit further includes:
and newly adding a designated network layer reachability information NLRI field in the second BGP message and sending the NLRI field to DHCP RELAY equipment, wherein the designated NLRI field is used for carrying a second DHCP protocol message for responding to the first DHCP protocol message and the RD.
CN201611207807.8A 2016-12-23 2016-12-23 Address allocation method and device Active CN108243078B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611207807.8A CN108243078B (en) 2016-12-23 2016-12-23 Address allocation method and device
PCT/CN2017/117932 WO2018113768A1 (en) 2016-12-23 2017-12-22 Address allocation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611207807.8A CN108243078B (en) 2016-12-23 2016-12-23 Address allocation method and device

Publications (2)

Publication Number Publication Date
CN108243078A CN108243078A (en) 2018-07-03
CN108243078B true CN108243078B (en) 2020-01-03

Family

ID=62624616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611207807.8A Active CN108243078B (en) 2016-12-23 2016-12-23 Address allocation method and device

Country Status (2)

Country Link
CN (1) CN108243078B (en)
WO (1) WO2018113768A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075962A (en) * 2007-06-26 2007-11-21 中兴通讯股份有限公司 Method and apparatus for realizing DHCP repeater in two-layer network exchanger
CN101252509A (en) * 2007-02-21 2008-08-27 华耀环宇科技有限公司 Dynamic system and method for virtual private network (VPN) information packet level routing using dual-NAT method
CN103039059A (en) * 2011-08-08 2013-04-10 北京华为数字技术有限公司 IP address allocation method, system and device
CN105763671A (en) * 2016-04-27 2016-07-13 杭州华三通信技术有限公司 IP address distribution method and apparatus

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4773987B2 (en) * 2007-02-01 2011-09-14 アラクサラネットワークス株式会社 Terminal affiliation switching system
CN102684969B (en) * 2011-03-18 2015-03-04 日电(中国)有限公司 VPN (virtual private network) node, VPN node identification analysis agency and method, VPN server
CN103647855B (en) * 2013-12-23 2016-08-17 成都西加云杉科技有限公司 IP address distribution method, device and system in outgoing telecommunication
CN104253878B (en) * 2014-09-09 2018-04-17 烽火通信科技股份有限公司 The vlan information management system and method for DHCP RELAY termination sub-interfaces

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252509A (en) * 2007-02-21 2008-08-27 华耀环宇科技有限公司 Dynamic system and method for virtual private network (VPN) information packet level routing using dual-NAT method
CN101075962A (en) * 2007-06-26 2007-11-21 中兴通讯股份有限公司 Method and apparatus for realizing DHCP repeater in two-layer network exchanger
CN103039059A (en) * 2011-08-08 2013-04-10 北京华为数字技术有限公司 IP address allocation method, system and device
CN105763671A (en) * 2016-04-27 2016-07-13 杭州华三通信技术有限公司 IP address distribution method and apparatus

Also Published As

Publication number Publication date
CN108243078A (en) 2018-07-03
WO2018113768A1 (en) 2018-06-28

Similar Documents

Publication Publication Date Title
CN108307002B (en) DHCP message processing method and device
US8122113B2 (en) Dynamic host configuration protocol (DHCP) message interception and modification
JP5967173B2 (en) Network relay device, method for setting operation mode of packet relay processing unit included in network relay device, and computer program
RU2602971C2 (en) Dynamic ipv6 configuration method for home gateway
CN103580980A (en) Automatic searching and automatic configuration method and device of VN
US20120324063A1 (en) Method, network device, and system for automatically configuring network device in ipv6 network
WO2011147353A1 (en) Method and apparatus for message transmission
JP5907239B2 (en) Network relay device, method for setting operation mode of packet relay processing unit included in network relay device, and computer program
US20210044456A1 (en) Method for implementing gre tunnel, access point and gateway
CN105264835A (en) Gre tunnel implementation method, access device and convergence gateway
CN112654049B (en) Method, system, node and medium for configuring a wireless communication coverage extension system
JP2008306736A (en) Communication module and application program provided with the same
JP2011526710A (en) Method, apparatus, and software for a client application program to access a server application program instance over an Internet Protocol (IP) network
KR20110060895A (en) A method and a gateway for providing multiple internet access
WO2014056441A1 (en) Method and device for configuring ipv6 transition technique on cpe
CN104243628A (en) Continuous multi-port application method and device
US9438475B1 (en) Supporting relay functionality with a distributed layer 3 gateway
CN111163463B (en) Method, device, equipment and storage medium for wireless equipment to access router
CN106302845A (en) The Domain Name System addresses collocation method of data channel product and device
CN111669309B (en) VxLAN establishing method, wireless controller and switch
WO2017206575A1 (en) Communication protocol access method, apparatus and system
WO2015123947A1 (en) Method and apparatus for delivering local area network information
CN108259636B (en) Message processing method and device
CN108243078B (en) Address allocation method and device
WO2017000674A1 (en) 4in6 tunnel mode selection method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant