CN107547684B - IPv6 address allocation method and device - Google Patents

IPv6 address allocation method and device Download PDF

Info

Publication number
CN107547684B
CN107547684B CN201710698272.7A CN201710698272A CN107547684B CN 107547684 B CN107547684 B CN 107547684B CN 201710698272 A CN201710698272 A CN 201710698272A CN 107547684 B CN107547684 B CN 107547684B
Authority
CN
China
Prior art keywords
ipv6 address
ipv6
interface
address
distributed
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
CN201710698272.7A
Other languages
Chinese (zh)
Other versions
CN107547684A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710698272.7A priority Critical patent/CN107547684B/en
Publication of CN107547684A publication Critical patent/CN107547684A/en
Application granted granted Critical
Publication of CN107547684B publication Critical patent/CN107547684B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides an IPv6 address allocation method and device, wherein the method comprises the following steps: after receiving a DHCPv6 request message sent by a terminal device, generating a relay forwarding message, wherein a source IPv6 address of the relay forwarding message is an IPv6 address of a management interface of the distributed gateway, and an appointed field of the relay forwarding message carries an IPv6 address of a VSI interface of the distributed gateway; sending the relay forwarding message to a DHCPv6 server, and receiving a relay response message sent by the DHCPv6 server, wherein the destination IPv6 address of the relay response message is the IPv6 address of the management interface of the distributed gateway, and the relay response message carries the IPv6 address distributed by the DHCPv6 server to the terminal device according to the IPv6 address of the VSI interface of the distributed gateway; and sending the IPv6 address allocated to the terminal device. By the technical scheme, the IPv6 address can be successfully distributed to the terminal equipment.

Description

IPv6 address allocation method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to an IPv6 address allocation method and apparatus.
Background
With the rapid development of Internet applications, the number of Internet users is increasing, and the network address resources of IPv4(Internet Protocol Version 4) addresses are limited, which severely restricts the application and development of the Internet. Therefore, the IPv6(Internet Protocol Version 6) address can be used for replacing the IPv4 address, so that the problem of limited network address resources is solved.
In the IPv6 network, a DHCPv6(Dynamic Host Configuration Protocol for IPv6, which supports the Dynamic Host Configuration Protocol of IPv 6) server may be deployed, and the DHCPv6 server allocates an IPv6 address to the terminal device. When the terminal device and the DHCPv6 server are not in the same network segment, the IPv6 network further comprises a DHCPv6 Relay, after the DHCPv6 Relay receives a DHCPv6 request message sent by the terminal device, the DHCPv6 request message is converted into a Relay-Forward message, the Relay-Forward message is sent to a DHCPv6 server, the DHCPv6 server distributes an IPv6 address to the terminal device according to the Relay-Forward message, the IPv6 address is sent to the DHCPv6 Relay, the DHCPv6 Relay sends the IPv6 address to the terminal device, and then the IPv6 address can be successfully distributed to the terminal device.
However, in a distributed gateway networking based on VXLAN (Virtual eXtensible Local Area Network), an IPv6 address cannot be successfully assigned to a terminal device.
Disclosure of Invention
The application provides an IPv6 address allocation method, which is applied to a distributed gateway and comprises the following steps:
after receiving a DHCPv6 request message sent by a terminal device, generating a relay forwarding message, wherein a source IPv6 address of the relay forwarding message is an IPv6 address of a management interface of the distributed gateway, and an appointed field of the relay forwarding message carries an IPv6 address of a VSI interface of the distributed gateway;
sending the relay forwarding message to a DHCPv6 server, and receiving a relay response message sent by the DHCPv6 server, wherein the destination IPv6 address of the relay response message is the IPv6 address of the management interface of the distributed gateway, and the relay response message carries the IPv6 address distributed by the DHCPv6 server to the terminal device according to the IPv6 address of the VSI interface of the distributed gateway;
and sending the IPv6 address allocated to the terminal device.
The application provides an IPv6 address allocation method, which is applied to a DHCPv6 server and comprises the following steps:
receiving a relay forwarding message sent by a distributed gateway, wherein a source IPv6 address of the relay forwarding message is an IPv6 address of a management interface of the distributed gateway, and a designated field of the relay forwarding message carries an IPv6 address of a VSI interface of the distributed gateway;
distributing an IPv6 address for the terminal equipment according to the IPv6 address of the VSI interface;
and sending a relay response message to the distributed gateway, wherein the target IPv6 address of the relay response message is the IPv6 address of the management interface, and the relay response message carries the IPv6 address distributed for the terminal equipment, so that the distributed gateway sends the IPv6 address distributed for the terminal equipment to the terminal equipment.
The application provides an IPv6 address allocation device, which is applied to a distributed gateway and comprises:
the generating module is used for generating a relay forwarding message after receiving a DHCPv6 request message sent by a terminal device, wherein a source IPv6 address of the relay forwarding message is an IPv6 address of a management interface of the distributed gateway, and a designated field of the relay forwarding message carries an IPv6 address of a VSI interface of the distributed gateway;
the sending module is used for sending the relay forwarding message to the DHCPv6 server;
a receiving module, configured to receive a relay response packet sent by the DHCPv6 server, where a destination IPv6 address of the relay response packet is an IPv6 address of a management interface of the distributed gateway, and the relay response packet carries an IPv6 address, which is allocated to the terminal device by the DHCPv6 server according to an IPv6 address of a VSI interface of the distributed gateway;
the sending module is further configured to send the IPv6 address allocated to the terminal device.
The application provides an IPv6 address allocation device, which is applied to a DHCPv6 server and comprises the following components:
a receiving module, configured to receive a relay forwarding packet sent by a distributed gateway, where a source IPv6 address of the relay forwarding packet is an IPv6 address of a management interface of the distributed gateway, and a specified field of the relay forwarding packet carries an IPv6 address of a VSI interface of the distributed gateway;
the distribution module is used for distributing an IPv6 address to the terminal equipment according to the IPv6 address of the VSI interface;
and the sending module is used for sending a relay response message to the distributed gateway, wherein the target IPv6 address of the relay response message is the IPv6 address of the management interface, and the relay response message carries the IPv6 address distributed for the terminal equipment, so that the distributed gateway sends the IPv6 address distributed for the terminal equipment to the terminal equipment.
Based on the above technical solution, in the embodiment of the present application, when the distributed gateway sends the relay forwarding packet to the DHCPv6 server, the source IPv6 address of the relay forwarding packet is the IPv6 address of the management interface of the distributed gateway, so that the DHCPv6 server can send the relay response packet to the distributed gateway according to the IPv6 address of the management interface of the distributed gateway. And the appointed field of the relay forwarding message carries the IPv6 address of the VSI interface of the distributed gateway, so that the DHCPv6 server allocates an IPv6 address to the terminal device according to the IPv6 address of the VSI interface of the distributed gateway. Based on the manner, in the VXLAN-based distributed gateway networking, the IPv6 address can be successfully allocated to the terminal device, and the IPv6 address allocated to the terminal device is sent to the terminal device, so that the terminal device can access the network by using the IPv6 address.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present application;
FIG. 2 is a flow diagram of an IPv6 address assignment method in one embodiment of the present application;
fig. 3 is a block diagram of an IPv6 address assignment device according to an embodiment of the present application;
FIG. 4 is a hardware block diagram of a distributed gateway in one embodiment of the present application;
fig. 5 is a block diagram of an IPv6 address assigning apparatus according to another embodiment of the present application;
fig. 6 is a hardware configuration diagram of the DHCPv6 server according to an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the application provides an IPv6 address allocation method, which can be applied to a system comprising a plurality of distributed gateways, wherein the distributed gateways can be distributed gateways supporting VXLAN. Referring to fig. 1, which is a schematic view of an application scenario of an embodiment of the present application, functions of the distributed gateways in fig. 1 are the same.
In a networking scene adopting a centralized gateway, traffic among different VXLANs and traffic of a VXLAN accessing an external network are processed by the centralized gateway, and the pressure of the centralized gateway is higher, so that the consumption of network bandwidth resources is increased. Therefore, a networking scenario of the distributed gateways is provided, that is, a plurality of distributed gateways are deployed, each distributed gateway forwards the traffic of the local site, and the processing pressure of the gateway is shared.
In an actual networking scenario, the distributed gateway may be a VTEP (VXLAN Tunneling End Point, VXLAN tunnel endpoint) device, or a Leaf node, a Spine node, or the like, and the device type of the distributed gateway is not limited. For example, referring to fig. 1, distributed gateway 111, distributed gateway 112, and distributed gateway 113 may all be VTEP devices; alternatively, the distributed gateways 111, 112 may be Leaf nodes, while the distributed gateway 113 is a Spine node.
In a networking scenario of distributed gateways, each distributed gateway supports VXLAN, and a Virtual Switch Interface (VSI) Interface is created, the same VSI Interface on different distributed gateways configures the same IPv6 address, and the IPv6 address is used as a gateway address of a terminal device in VXLAN.
For example, in order to implement message transmission among terminal device 131, terminal device 133, and terminal device 134, the same VLAN100 and VXLAN1000 may be divided for terminal device 131, terminal device 133, and terminal device 134, and the correspondence between VLAN100 and VXLAN1000 may be recorded on distributed gateway 111, distributed gateway 112, and distributed gateway 113. A VSI interface a is created on the distributed gateway 111, an IPv6 address a is allocated to the VSI interface a, and the corresponding relationship between the VXLAN1000 and the VSI interface a is recorded. And creating a VSI (virtual local area network) interface A on the distributed gateway 112, distributing an IPv6 address A for the VSI interface A, and recording the corresponding relation between the VXLAN1000 and the VSI interface A. A VSI interface a is created on the distributed gateway 113, an IPv6 address a is allocated to the VSI interface a, and the correspondence between the VXLAN1000 and the VSI interface a is recorded.
Distribution gateway 111 notifies terminal device 131 of IPv6 address a of VSI interface a as a gateway address, so that terminal device 131 accesses terminal device 133 or terminal device 134 according to the gateway address. Distribution gateway 112 notifies terminal device 133 of IPv6 address a of VSI interface a as a gateway address, so that terminal device 133 accesses terminal device 131 or terminal device 134 according to the gateway address. Distribution gateway 113 notifies terminal device 134 of IPv6 address a of VSI interface a as a gateway address, so that terminal device 134 accesses terminal device 131 or terminal device 133 according to the gateway address.
For another example, in order to implement message transmission between the terminal device 132 and the terminal device 135, the same VLAN101 and VXLAN1001 may be divided for the terminal device 132 and the terminal device 135, and the correspondence relationship between the VLAN101 and the VXLAN1001 may be recorded in the distributed gateways 111 and 113. VSI interface B is created on distributed gateway 111, IPv6 address B is assigned to VSI interface B, and the correspondence between VXLAN1001 and VSI interface B is recorded. VSI interface B is created on distributed gateway 113, IPv6 address B is assigned to VSI interface B, and the correspondence between VXLAN1001 and VSI interface B is recorded.
Further, distributed gateway 111 may use IPv6 address B of VSI interface B as a gateway address and notify terminal device 132 of it, so that terminal device 132 accesses terminal device 135 according to the gateway address. Distributed gateway 113 may take IPv6 address B of VSI interface B as a gateway address and notify terminal device 135 of it, so that terminal device 135 accesses terminal device 132 according to the gateway address.
In one example, in the process of allocating the IPv6 address, if the terminal device (i.e., the DHCPv6 client) is not in the same network segment as the DHCPv6 server, the distributed gateway may also be determined as the DHCPv6 Relay (Relay) of the terminal device. For example, the distributed gateway 111 serves as the DHCPv6 relay for the terminal device 131 and the terminal device 132, the distributed gateway 112 serves as the DHCPv6 relay for the terminal device 133, and the distributed gateway 113 serves as the DHCPv6 relay for the terminal device 134 and the terminal device 135.
In the application scenario, referring to fig. 2, which is a flowchart of an IPv6 address allocation method provided in the embodiment of the present application, the IPv6 address allocation method may include the following steps:
step 201, after receiving the DHCPv6 request message sent by the terminal device, the distributed gateway generates a relay forwarding message. The source IPv6 address of the relay forwarding message is the IPv6 address of the management interface of the distributed gateway, and the designated field of the relay forwarding message carries the IPv6 address of the VSI interface of the distributed gateway.
For example, when the terminal device 131 needs to apply for an IPv6 address, a DHCPv6 request message (e.g., a DHCPv6Solicit message) may be sent, and the DHCPv6 request message may be a broadcast-type message. Based on this, the distributed gateway 111 may receive the DHCPv6 request message sent by the terminal device 131.
After receiving the DHCPv6 request message sent by the terminal device 131, the distributed gateway 111 may determine the VXLAN corresponding to the DHCPv6 request message, determine the VSI interface corresponding to the VXLAN, and then obtain the IPv6 address of the VSI interface, where this IPv6 address is the IPv6 address of the VSI interface of the distributed gateway, and is the IPv6 address that needs to be added to the designated field of the relay forwarding message.
For example, after receiving the DHCPv6 request message, the distribution gateway 111 may first obtain a VLAN (that is, VLAN100) of the DHCPv6 request message, determine that the VLAN100 corresponds to the VXLAN1000 by querying a correspondence between the VLAN and the VXLAN, determine that the VXLAN1000 corresponds to the VXLAN1000 by querying a correspondence between the VXLAN and the VSI interface, and then obtain an IPv6 address a corresponding to the VSI interface a, that is, an IPv6 address a is carried in a designated field of the relay forwarding message.
The process of acquiring the VLAN of the DHCPv6 request packet for the distributed gateway 111 may include: after receiving the DHCPv6 request message, the distributed gateway 111 parses the VLAN of the DHCPv6 request message from the DHCPv6 request message. Or, after receiving the DHCPv6 request message through an interface, the distributed gateway 111 determines the VLAN corresponding to the interface as the VLAN of the DHCPv6 request message.
For example, the access switch 121 is configured with a corresponding relationship between the interface 1211 and the VLAN100, and after receiving the DHCPv6 request message sent by the terminal device 131 through the interface 1211, the access switch 121 adds the VLAN100 corresponding to the interface 1211 to the DHCPv6 request message, and sends the DHCPv6 request message to the distribution gateway 111. Based on this, after receiving the DHCPv6 request message, the distributed gateway 111 may parse the VLAN of the DHCPv6 request message from the DHCPv6 request message.
For another example, the distribution gateway 111 is configured with a correspondence relationship between the interface 1112 and the VLAN102, and after receiving the DHCPv6 request message sent by the terminal device 136 through the interface 1112, the distribution gateway 111 determines the VLAN102 corresponding to the interface 1112 as the VLAN of the DHCPv6 request message.
After acquiring the IPv6 address (i.e., IPv6 address a) of the VSI interface, the distributed gateway 111 may generate a Relay forwarding message (e.g., a Relay-Forward message), where a source IPv6 address of the Relay forwarding message is an IPv6 address of the management interface of the distributed gateway, a destination IPv6 address of the Relay forwarding message is an IPv6 address of the DHCPv6 server, and a specified field (e.g., a Link address field of the Relay forwarding message) of the Relay forwarding message carries the IPv6 address of the VSI interface of the distributed gateway.
In one example, the IPv6 addresses of the management interfaces of the distributed gateways have uniqueness, that is, the IPv6 addresses of the management interfaces of different distributed gateways are different, that is, one distributed gateway can be uniquely represented by the IPv6 address of the management interface. Since the IPv6 address of the Loopback interface (Loopback interface) has uniqueness, the IPv6 address of the management interface may include, but is not limited to, the IPv6 address of the Loopback interface.
Of course, the management interface may be other types of interfaces as long as the IPv6 address of the management interface has uniqueness. For example, in practical applications, the VSI interface of the distributed gateway is a user traffic type VSI interface, and the distributed gateway may further configure a management type VSI interface, where an IPv6 address of the management type VSI interface has uniqueness, and therefore, the management interface may also be a management type VSI interface.
In one example, the IPv6 addresses of the VSI interfaces of the distributed gateways are not unique, and the IPv6 addresses of the same VSI interface of different distributed gateways may be the same. For example, the IPv6 address of VSI interface a of distributed gateway 111, the IPv6 address of VSI interface a of distributed gateway 112, and the IPv6 address of VSI interface a of distributed gateway 113 are the same, and are all IPv6 addresses a.
Step 202, the distributed gateway sends the relay forwarding message to the DHCPv6 server.
For example, since the destination IPv6 address of the relay forwarding packet is the IPv6 address of the DHCPv6 server, the distributed gateway 111 may send the relay forwarding packet to the DHCPv6 server.
In step 203, the DHCPv6 server receives the relay forwarding message sent by the distributed gateway.
The source IPv6 address of the relay forwarding packet is an IPv6 address of a management interface of the distributed gateway, and the designated field of the relay forwarding packet carries an IPv6 address of a VSI interface of the distributed gateway.
In step 204, the DHCPv6 server allocates an IPv6 address to the terminal device according to the IPv6 address of the VSI interface (i.e., the IPv6 address of the VSI interface of the distributed gateway carried in the designated field of the relay forwarding packet).
After receiving the relay forwarding message, the DHCPv6 server analyzes the IPv6 address of the VSI interface of the distributed gateway from the designated field of the relay forwarding message, and allocates an IPv6 address to the terminal device by using the IPv6 address of the VSI interface, instead of allocating an IPv6 address by using the source IPv6 address of the relay forwarding message.
In one example, the process for the DHCPv6 server to assign an IPv6 address to the terminal device according to the IPv6 address of the VSI interface includes, but is not limited to: the DHCPv6 server determines an IPv6 prefix corresponding to the IPv6 address of the VSI interface, and allocates an IPv6 address corresponding to the IPv6 prefix to the terminal equipment.
As described in the foregoing process, the IPv6 address of the VSI interface of the distributed gateway can be used as the gateway address of the terminal device, and in general, the IPv6 prefix of the IPv6 address of the terminal device is the same as the IPv6 prefix of the gateway address of the terminal device, that is, the IPv6 prefix of the IPv6 address of the terminal device is the same as the IPv6 prefix of the IPv6 address of the VSI interface of the distributed gateway, so that the DHCPv6 server can allocate the IPv6 address to the terminal device according to the IPv6 prefix of the IPv6 address of the VSI interface.
For example, if the IPv6 prefix of the IPv6 address of the VSI interface is IPv6 prefix a, the DHCPv6 server selects an IPv6 address from the idle IPv6 addresses corresponding to the IPv6 prefix a (the IPv6 prefix of the idle IPv6 address is IPv6 prefix a), and allocates the selected IPv6 address to the terminal device.
In step 205, the DHCPv6 server sends a relay response packet to the distributed gateway, where a destination IPv6 address of the relay response packet may be an IPv6 address of a management interface of the distributed gateway (i.e., a source IPv6 address of the relay forwarding packet), and the relay response packet carries an IPv6 address allocated to the terminal device.
In an example, after the DHCPv6 server allocates an IPv6 address to the terminal device according to the IPv6 address of the VSI interface, a Relay-response packet (Relay-Reply packet) may be generated and sent to the distributed gateway. Wherein, the destination IPv6 address of the relay response packet is the source IPv6 address of the relay forwarding packet, that is, the IPv6 address of the management interface of the distributed gateway; the source IPv6 address of the relay response packet is the destination IPv6 address of the relay forwarding packet, that is, the IPv6 address of the DHCPv6 server. In addition, the relay response message may also carry an IPv6 address allocated by the DHCPv6 server to the terminal device.
For example, since the destination IPv6 address of the relay response packet is the IPv6 address of the management interface of the distributed gateway 111, but not the IPv6 address (e.g., IPv6 address a) of the VSI interface of the distributed gateway 111, the relay response packet may be successfully sent to the distributed gateway 111, and then the IPv6 address may be successfully allocated to the terminal device, without the problem that the IPv6 address cannot be successfully allocated to the terminal device.
As shown in fig. 1, if the source IPv6 address of the relay forwarding packet is the IPv6 address a of the VSI interface a of the distributed gateway 111, the destination IPv6 address of the relay response packet sent by the DHCPv6 server is the IPv6 address a of the VSI interface a. When the relay response packet reaches the distribution gateway 113, because the destination IPv6 address is the IPv6 address a of the VSI interface a, that is, the IPv6 address of the VSI interface a local to the distribution gateway 113, the distribution gateway 113 does not continue to send the relay response packet to the distribution gateway 111, but directly discards the relay response packet or forwards the relay response packet to the access switch 123, so that the IPv6 address cannot be successfully allocated to the terminal device 131.
Different from the foregoing manner, in the embodiment of the present application, the source IPv6 address of the relay forwarding packet is the IPv6 address of the management interface of the distributed gateway 111, and therefore, the destination IPv6 address of the relay response packet sent by the DHCPv6 server is the IPv6 address of the management interface of the distributed gateway 111. When the relay response message reaches the distributed gateway 113, since the destination IPv6 address is the IPv6 address of the management interface of the distributed gateway 111, and the IPv6 address has uniqueness, the distributed gateway 113 continues to send the relay response message to the distributed gateway 111, and finally successfully allocates the IPv6 address to the terminal device 131.
In step 206, the distributed gateway receives the relay response message sent by the DHCPv6 server.
The destination IPv6 address of the relay response packet is an IPv6 address of a management interface of the distributed gateway, and the relay response packet carries an IPv6 address allocated by the DHCPv6 server to the terminal device.
And step 207, the distributed gateway sends the IPv6 address allocated to the terminal device.
So far, the terminal device is successfully allocated with the IPv6 address, and the IPv6 address is sent to the terminal device.
Based on the above technical solution, in the embodiment of the present application, when the distributed gateway sends the relay forwarding packet to the DHCPv6 server, the source IPv6 address of the relay forwarding packet is the IPv6 address of the management interface of the distributed gateway, so that the DHCPv6 server can send the relay response packet to the distributed gateway according to the IPv6 address of the management interface of the distributed gateway. And the appointed field of the relay forwarding message carries the IPv6 address of the VSI interface of the distributed gateway, so that the DHCPv6 server allocates an IPv6 address to the terminal device according to the IPv6 address of the VSI interface of the distributed gateway. Based on the above manner, in a VXLAN-based distributed gateway networking scenario, an IPv6 address can be successfully allocated to the terminal device, and the IPv6 address allocated to the terminal device is sent to the terminal device, so that the terminal device can access the network by using the IPv6 address.
Based on the same application concept as the method, an IPv6 address allocation apparatus is also provided in the embodiment of the present application, where the IPv6 address allocation apparatus may be applied to a distributed gateway, as shown in fig. 3, and for a structure diagram of the IPv6 address allocation apparatus provided in the present application, the IPv6 address allocation apparatus may include:
a generating module 301, configured to generate a relay forwarding message after receiving a DHCPv6 request message sent by a terminal device, where a source IPv6 address of the relay forwarding message is an IPv6 address of a management interface of a distributed gateway, and a designated field of the relay forwarding message carries an IPv6 address of a VSI interface of the distributed gateway;
a sending module 302, configured to send the relay forwarding packet to a DHCPv6 server;
a receiving module 303, configured to receive a relay response packet sent by the DHCPv6 server, where a destination IPv6 address of the relay response packet is an IPv6 address of a management interface of the distributed gateway, and the relay response packet carries an IPv6 address, which is allocated to the terminal device by the DHCPv6 server according to an IPv6 address of a VSI interface of the distributed gateway;
the sending module 302 is further configured to send the IPv6 address allocated to the terminal device.
In one example, the IPv6 address assignment device further includes (not shown in the figure):
a determining module, configured to determine a VXLAN corresponding to the DHCPv6 request message; and determining a VSI corresponding to the VXLAN, and acquiring the IPv6 address of the VSI.
In one example, the IPv6 addresses of the management interfaces of different distributed gateways are different, and the IPv6 addresses of the same VSI interface of different distributed gateways are the same; the IPv6 address of the management interface includes: IPv6 address of loopback interface; the specified field includes: and the relay forwards the link address field of the message.
For the distributed gateway provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture may specifically refer to fig. 4. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the method is characterized in that the method is communicated with a machine-readable storage medium, reads and executes the instruction codes stored in the machine-readable storage medium, and realizes the IPv6 address allocation operation disclosed by the above example of the application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Based on the same application concept as the method, an IPv6 address allocation apparatus is also provided in the embodiment of the present application, where the IPv6 address allocation apparatus may be applied to a DHCPv6 server, as shown in fig. 5, and for a structure diagram of the IPv6 address allocation apparatus provided in the present application, the IPv6 address allocation apparatus may include:
a receiving module 501, configured to receive a relay forwarding packet sent by a distributed gateway, where a source IPv6 address of the relay forwarding packet is an IPv6 address of a management interface of the distributed gateway, and a specified field of the relay forwarding packet carries an IPv6 address of a VSI interface of the distributed gateway;
the allocating module 502 is configured to allocate an IPv6 address to the terminal device according to the IPv6 address of the VSI interface;
a sending module 503, configured to send a relay response packet to the distributed gateway, where a destination IPv6 address of the relay response packet is an IPv6 address of the management interface, and the relay response packet carries an IPv6 address allocated to the terminal device, so that the distributed gateway sends the IPv6 address allocated to the terminal device.
In an example, the allocating module 502 is specifically configured to, in a process of allocating an IPv6 address to a terminal device according to an IPv6 address of the VSI interface, determine an IPv6 prefix corresponding to an IPv6 address of the VSI interface, and allocate an IPv6 address corresponding to the IPv6 prefix to the terminal device.
The IPv6 addresses of the management interfaces of different distributed gateways are different, and the IPv6 addresses of the same VSI interface of different distributed gateways are the same; the IPv6 address of the management interface comprises an IPv6 address of a loopback interface of the distributed gateway; the designated field comprises a link address field of the relay forwarding message.
In the DHCPv6 server provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture may specifically refer to fig. 6. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the method is characterized in that the method is communicated with a machine-readable storage medium, reads and executes the instruction codes stored in the machine-readable storage medium, and realizes the IPv6 address allocation operation disclosed by the above example of the application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (9)

1. An IPv6 address allocation method applied to a distributed gateway, the method comprising:
after receiving a DHCPv6 request message sent by a terminal device, generating a relay forwarding message, wherein a source IPv6 address of the relay forwarding message is an IPv6 address of a management interface of the distributed gateway, and an appointed field of the relay forwarding message carries an IPv6 address of a VSI interface of the distributed gateway;
sending the relay forwarding message to a DHCPv6 server, and receiving a relay response message sent by the DHCPv6 server, wherein the destination IPv6 address of the relay response message is the IPv6 address of the management interface of the distributed gateway, and the relay response message carries the IPv6 address distributed by the DHCPv6 server to the terminal device according to the IPv6 address of the VSI interface of the distributed gateway; the DHCPv6 server determines an IPv6 prefix corresponding to the IPv6 address of the VSI interface, and allocates an IPv6 address corresponding to the IPv6 prefix to the terminal equipment; the IPv6 address of the VSI interface is used as the gateway address of the terminal equipment, and the IPv6 prefix of the IPv6 address of the terminal equipment is the same as the IPv6 prefix of the IPv6 address of the VSI interface;
and sending the IPv6 address allocated to the terminal device.
2. The method of claim 1,
after receiving the DHCPv6 request message sent by the terminal device, the method further includes:
determining VXLAN corresponding to the DHCPv6 request message;
and determining a VSI corresponding to the VXLAN, and acquiring the IPv6 address of the VSI.
3. The method of claim 1, wherein the IPv6 addresses of the management interfaces of different distributed gateways are different, and the IPv6 addresses of the same VSI interface of different distributed gateways are the same;
the IPv6 address of the management interface includes: IPv6 address of loopback interface;
the specified field includes: and the relay forwards the link address field of the message.
4. An IPv6 address allocation method applied to a DHCPv6 server comprises the following steps:
receiving a relay forwarding message sent by a distributed gateway, wherein a source IPv6 address of the relay forwarding message is an IPv6 address of a management interface of the distributed gateway, and a designated field of the relay forwarding message carries an IPv6 address of a VSI interface of the distributed gateway;
distributing an IPv6 address for the terminal equipment according to the IPv6 address of the VSI interface; the allocating an IPv6 address to the terminal device according to the IPv6 address of the VSI interface comprises the following steps: determining an IPv6 prefix corresponding to the IPv6 address of the VSI interface; allocating an IPv6 address corresponding to the IPv6 prefix for the terminal equipment; the IPv6 address of the VSI interface is used as the gateway address of the terminal equipment, and the IPv6 prefix of the IPv6 address of the terminal equipment is the same as the IPv6 prefix of the IPv6 address of the VSI interface;
and sending a relay response message to the distributed gateway, wherein the target IPv6 address of the relay response message is the IPv6 address of the management interface, and the relay response message carries the IPv6 address distributed for the terminal equipment, so that the distributed gateway sends the IPv6 address distributed for the terminal equipment to the terminal equipment.
5. The method of claim 4, wherein the IPv6 addresses of the management interfaces of different distributed gateways are different, and the IPv6 addresses of the same VSI interface of different distributed gateways are the same;
the IPv6 address of the management interface includes: an IPv6 address of a loopback interface of the distributed gateway;
the specified field includes: and the relay forwards the link address field of the message.
6. An IPv6 address allocation apparatus, for use in a distributed gateway, the apparatus comprising:
the generating module is used for generating a relay forwarding message after receiving a DHCPv6 request message sent by a terminal device, wherein a source IPv6 address of the relay forwarding message is an IPv6 address of a management interface of the distributed gateway, and a designated field of the relay forwarding message carries an IPv6 address of a VSI interface of the distributed gateway;
the sending module is used for sending the relay forwarding message to the DHCPv6 server;
a receiving module, configured to receive a relay response packet sent by the DHCPv6 server, where a destination IPv6 address of the relay response packet is an IPv6 address of a management interface of the distributed gateway, and the relay response packet carries an IPv6 address, which is allocated to the terminal device by the DHCPv6 server according to an IPv6 address of a VSI interface of the distributed gateway; the DHCPv6 server determines an IPv6 prefix corresponding to the IPv6 address of the VSI interface, and allocates an IPv6 address corresponding to the IPv6 prefix to the terminal equipment; the IPv6 address of the VSI interface is used as the gateway address of the terminal equipment, and the IPv6 prefix of the IPv6 address of the terminal equipment is the same as the IPv6 prefix of the IPv6 address of the VSI interface;
the sending module is further configured to send the IPv6 address allocated to the terminal device.
7. The apparatus of claim 6, further comprising:
a determining module, configured to determine a VXLAN corresponding to the DHCPv6 request message; determining a VSI corresponding to the VXLAN, and acquiring an IPv6 address of the VSI;
the IPv6 addresses of the management interfaces of different distributed gateways are different, and the IPv6 addresses of the same VSI interface of different distributed gateways are the same; the IPv6 address of the management interface includes: IPv6 address of loopback interface; the specified field includes: and the relay forwards the link address field of the message.
8. An IPv6 address allocation device, applied to a DHCPv6 server, comprising:
a receiving module, configured to receive a relay forwarding packet sent by a distributed gateway, where a source IPv6 address of the relay forwarding packet is an IPv6 address of a management interface of the distributed gateway, and a specified field of the relay forwarding packet carries an IPv6 address of a VSI interface of the distributed gateway;
the distribution module is used for distributing an IPv6 address to the terminal equipment according to the IPv6 address of the VSI interface; the allocation module is specifically configured to determine an IPv6 prefix corresponding to the IPv6 address of the VSI interface in a process of allocating an IPv6 address to the terminal device according to the IPv6 address of the VSI interface, and allocate an IPv6 address corresponding to the IPv6 prefix to the terminal device; the IPv6 address of the VSI interface is used as the gateway address of the terminal equipment, and the IPv6 prefix of the IPv6 address of the terminal equipment is the same as the IPv6 prefix of the IPv6 address of the VSI interface;
and the sending module is used for sending a relay response message to the distributed gateway, wherein the target IPv6 address of the relay response message is the IPv6 address of the management interface, and the relay response message carries the IPv6 address distributed for the terminal equipment, so that the distributed gateway sends the IPv6 address distributed for the terminal equipment to the terminal equipment.
9. The apparatus of claim 8,
the IPv6 addresses of the management interfaces of different distributed gateways are different, and the IPv6 addresses of the same VSI interface of different distributed gateways are the same; the IPv6 address of the management interface comprises an IPv6 address of a loopback interface of the distributed gateway; the designated field comprises a link address field of the relay forwarding message.
CN201710698272.7A 2017-08-15 2017-08-15 IPv6 address allocation method and device Active CN107547684B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710698272.7A CN107547684B (en) 2017-08-15 2017-08-15 IPv6 address allocation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710698272.7A CN107547684B (en) 2017-08-15 2017-08-15 IPv6 address allocation method and device

Publications (2)

Publication Number Publication Date
CN107547684A CN107547684A (en) 2018-01-05
CN107547684B true CN107547684B (en) 2021-01-26

Family

ID=60971467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710698272.7A Active CN107547684B (en) 2017-08-15 2017-08-15 IPv6 address allocation method and device

Country Status (1)

Country Link
CN (1) CN107547684B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108429822B (en) * 2018-02-12 2021-04-06 新华三技术有限公司 Communication system, IPv6 address allocation method and device and distributed gateway
CN112911026A (en) * 2019-12-03 2021-06-04 北京华为数字技术有限公司 Address application method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763671A (en) * 2016-04-27 2016-07-13 杭州华三通信技术有限公司 IP address distribution method and apparatus
CN106209643A (en) * 2016-07-14 2016-12-07 杭州华三通信技术有限公司 Message forwarding method and device
CN106982225A (en) * 2017-04-28 2017-07-25 新华三技术有限公司 Anti-attack method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9374294B1 (en) * 2013-11-05 2016-06-21 Cisco Technology, Inc. On-demand learning in overlay networks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763671A (en) * 2016-04-27 2016-07-13 杭州华三通信技术有限公司 IP address distribution method and apparatus
CN106209643A (en) * 2016-07-14 2016-12-07 杭州华三通信技术有限公司 Message forwarding method and device
CN106982225A (en) * 2017-04-28 2017-07-25 新华三技术有限公司 Anti-attack method and device

Also Published As

Publication number Publication date
CN107547684A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN108632074B (en) Service configuration file issuing method and device
CN108924268B (en) Container cloud service system and pod creation method and device
CN108737224B (en) Message processing method and device based on micro-service architecture
JP5663549B2 (en) Method, apparatus and system for assigning public IP addresses
CN106453681B (en) IP address allocation method and device
CN108667888B (en) Load balancing method and device
CN109194525B (en) Network node configuration method and management node
CN107580079B (en) Message transmission method and device
CN108259218B (en) IP address allocation method and device
CN107547665B (en) Method, equipment and system for allocating DHCP (dynamic host configuration protocol) address
CN106506515B (en) Authentication method and device
CN102404418A (en) Method, device and system for distributing IP (internet protocol) address for user terminal
CN108600407B (en) IP address allocation method, device, equipment and machine readable storage medium
CN115460175B (en) IPv6 address generation method and device, electronic equipment and storage medium
CN107070719B (en) Equipment management method and device
CN107547675B (en) User equipment migration method and device
WO2019037664A1 (en) Address allocation
US20160028628A1 (en) Communication system, control apparatus, address allocation method, and program
CN107547684B (en) IPv6 address allocation method and device
CN106302861B (en) Address allocation method and device
WO2018161795A1 (en) Routing priority configuration method, device, and controller
CN108390811B (en) GRE tunnel establishment method and equipment thereof
CN106878479B (en) Address allocation method and device
US10044672B2 (en) IPv6 address assignment method and apparatus
CN106375489B (en) Method and device for processing Media Access Control (MAC) address

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