Background
IPv6 (internet Protocol version 6) is a new IP Protocol used as a substitute for the existing IPv4 Protocol, and it solves the problem of insufficient IPv4 address space, and also provides improvements in other aspects, such as routing, address auto-configuration, and mobility support.
Fig. 1 is a related art address prefix allocation method of a bridging Mode (bridge Mode) home Gateway (RG). As shown, the method comprises the following steps:
step S101, configuring a link local address by User Equipment (UE);
step S102, the user equipment sends a Router Solicitation (RS) message to an access node (Access node, AD) by taking the link local address as a source address to request configuration information;
step S103, the access node inserts port number information into the router request message;
step S104, the access node sends the router request message carrying the port number information to a Broadband Network Gateway (BNG);
step S105, the broadband network gateway distributes prefixes according to the port number information in the received router request message;
step S106, the broadband network gateway sends a Router Advertisement (RA) message to the access node, wherein the RA message comprises the prefix and the port number information;
step S107, the access node removes the port number information in the received router advertisement message;
step S108, the access node sends a router notification message without port number information to the user equipment;
step S109, the ue adds the interface identifier of the ue to the prefix in the router advertisement message, and automatically configures the global IPv6 address.
In the process of implementing the invention, the inventor finds that the prior art has the following problems: the access node must insert port number information in a received router request message sent from user equipment, and then remove the port number information in a router advertisement message, so that the processing process is complex, and thus the existing prefix allocation method has a high requirement on processing resource overhead of network equipment when configuring a global IPv6 address.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide an IPv6 prefix allocation method, system and device thereof, so as to reduce the overhead of prefix configuration.
To achieve the above object, an embodiment of the present invention provides an IPv6 prefix allocation method, including the following steps:
the method comprises the steps that network node equipment receives a router advertisement message sent by a broadband network gateway, wherein the router advertisement message comprises uplink port prefix information;
the network node equipment determines a corresponding downlink port prefix according to the uplink port prefix information in the router advertisement message and the corresponding relation between the uplink port prefix and the downlink port prefix in the locally pre-obtained port configuration information;
and the network node equipment sends a router advertisement message carrying the corresponding downlink port prefix.
Accordingly, an embodiment of the present invention provides a network node device, including:
a first receiving module, configured to receive a router advertisement message sent by the broadband network gateway, where the router advertisement message includes uplink port prefix information;
a first determining module, configured to determine a corresponding downlink port prefix according to uplink port prefix information in the router advertisement message received by the first receiving module and a correspondence between an uplink port prefix and a downlink port prefix in locally pre-obtained port configuration information;
and a sending module, configured to send a router advertisement packet carrying the corresponding downlink port prefix determined by the first determining module.
Correspondingly, an embodiment of the present invention provides an IPv6 prefix allocation system, including a broadband network gateway, the above network node device, and a user device, where the broadband network gateway is configured to configure port information of the network node device and send the configured port information to the network node device; the network node equipment is used for receiving port information sent by the broadband network gateway and sending a router advertisement message carrying a prefix to the user equipment according to the port information; the user equipment is used for configuring a global IPv6 address according to a router advertisement message which is sent by the network node equipment and carries a prefix.
Compared with the prior art, the IPv6 prefix allocation method, the system and the equipment thereof determine the downlink port prefix through the obtained port configuration information, and then send the router advertisement message carrying the downlink port prefix to the user equipment so as to realize the configuration of the global IPv6 address, and no new option needs to be inserted in the whole process, thereby reducing the expense of prefix configuration.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Fig. 2 is a flowchart of an embodiment of an IPv6 prefix assignment method according to the present invention, where the network node device is an access node. As shown in fig. 2, the method includes:
step S210, an access node receives a router advertisement message sent by a broadband network gateway, wherein the router advertisement message comprises prefix information of an uplink port;
step S220, the access node determines a corresponding downlink port prefix according to the uplink port prefix information in the router advertisement message and the corresponding relation between the uplink port prefix and the downlink port prefix in the locally pre-obtained port configuration information;
step S230, the access node sends a router advertisement packet carrying the corresponding downlink port prefix to a user equipment.
It can be seen from the above that, in the present invention, a new option does not need to be inserted when configuring the global IPv6 address, and the downlink port prefix is determined only by the obtained port configuration information, and then the router advertisement packet carrying the downlink port prefix is sent to the user equipment, thereby implementing global IPv6 address configuration, and thus reducing the overhead of address configuration.
Further, the method further includes, before step S210, the steps of:
and the access node receives and stores port configuration information of the access node, which is sent by the broadband network gateway, wherein the port configuration information comprises a corresponding relation between the uplink port prefix and the downlink port prefix.
Preferably, the access node may receive, through an access node control protocol or a network management protocol, port configuration information of the access node sent by the broadband network gateway.
In this embodiment, the port configuration information of the access node, which is received by the access node and sent by the broadband network gateway, may be port configuration information of all ports of the access node.
Wherein, the prefix of the uplink port and the prefix of the downlink port in the port configuration information are both formed by prefix length and prefix address defined by the prefix length. The downlink port prefix may be an extension of the uplink port prefix, that is, a prefix address of the downlink port prefix is extended on the basis of keeping a prefix address of the uplink port prefix unchanged. Fig. 2A is a schematic diagram of the port configuration information, which describes the configuration information of the broadband network gateway for the port 10 and the port 20 of the access node. As shown in FIG. 2A, the prefix of the upstream port of the port 10 is 2001: d8b:: 39, wherein the prefix address is 2001: d8b:: the prefix length is 39 bits; the prefix of the downstream port is 2001: d8b:0:800/56, wherein the prefix address is 2001: d8b:0:800, and the prefix length is 56 bits. The address content of the first 39 bits in the prefix address 2001: d8b:0:800 is the same as the address content of the prefix address 2001: d8 b:. The port configuration information of the port 20 is similar to the configuration information of the port 10 and will not be described in detail.
Before the access node receives a router advertisement message sent by a broadband network gateway, the user equipment can actively send a router request message to the broadband network gateway, so that the time that the access node waits for the actively provided router advertisement message can be saved. Of course, if not limited by time, the access node may wait to receive an unsolicited router advertisement packet sent by the broadband network gateway.
Further, the step of sending, by the access node, the router advertisement packet carrying the corresponding downlink port prefix to the user equipment specifically includes:
the access node modifies the received uplink port prefix information in the router advertisement message sent by the broadband network gateway into the corresponding downlink port prefix;
and the access node sends the modified router advertisement message to the user equipment.
It can be seen from the above that, in this embodiment, when configuring the global IPv6 address, it is not necessary to insert a new option, and it is only necessary to modify the received uplink port prefix information in the router advertisement message sent by the broadband network gateway into the corresponding downlink port prefix, so that the overhead of configuring the address is reduced.
Further, the method further comprises, before step S230, the steps of:
and when the access node determines that a plurality of corresponding downlink port prefixes exist, the access node determines the corresponding downlink port prefixes according to the downlink port numbers selected in advance locally.
It should be noted that, if the access node does not inquire the downlink port prefix corresponding to the downlink port number preselected locally and the uplink port prefix information in the router advertisement message according to the port configuration information, the access node directly forwards the router advertisement message sent by the broadband network gateway to the user equipment through the downlink port with the downlink port number.
Further, before the access node receives the configuration information of the access node sent by the broadband network gateway, the method further includes the following steps:
the access node receives a digital subscriber line synchronization signal (DSL Synch) message sent by a home gateway. At this point, the home gateway has been powered up. Understandably, the access node can also receive an initial message sent by the home gateway;
and the access node sends a message carrying the port number of the access node to the broadband network gateway. The port number of the access node is any port number of the access node, for example, port number 10. Then, the broadband network gateway configures the port 10 of the access node according to the received message carrying the port 10 of the access node, so as to obtain the configuration information of the port 10 of the access node. Since the port number is determined by the access node, the broadband network gateway can implement separate prefix configuration for a specific port of the access node. The access node receives and stores the configuration information of the port with the port number of the access node sent by the broadband network gateway, for example, the access node receives and stores the configuration information of the port with the port number 10 of the access node sent by the broadband network gateway.
Preferably, the information carrying the PORT number of the access node sent by the access node may be a PORT opening packet (PORT _ UP). At this time, the configuration information of the PORT having the PORT number of the access node, which is received and stored by the access node, may be a PORT management packet (PORT _ MNGT).
In this embodiment, the locally pre-obtained port configuration information may be reconfiguration information. In this case, the access node may wait for an unsolicited router advertisement packet sent by the broadband network gateway without suppressing the unsolicited router advertisement packet. Receiving, by the access node, the information of the access node reconfiguration from the broadband network gateway, where the access node can implement prefix reconfiguration (prefix reconfiguration) for a port. Understandably, the access node deletes the prefix of the downlink port with the life cycle of 0.
The IPv6 prefix allocation method according to the embodiment of the present invention is described above by using an access node only, and it should be noted that the Network node device may be an access node, or may also be an Optical Line Terminal (OLT), an Optical Network Terminal (ONT), or an Optical Network Unit (ONU).
Fig. 3 is a block diagram of a network node device according to the present invention. As shown in fig. 3, the network node apparatus includes a first receiving module 750, a first determining module 760, and a sending module 770. The first receiving module 750 is configured to receive a router advertisement message sent by the broadband network gateway, where the router advertisement message includes uplink port prefix information. The first determining module 760 is configured to determine a corresponding downlink port prefix according to the uplink port prefix information in the router advertisement message received by the first receiving module 750 and a corresponding relationship between an uplink port prefix and a downlink port prefix in locally pre-obtained port configuration information. The sending module 770 is configured to send a router advertisement packet carrying the corresponding downlink port prefix determined by the first determining module 760.
The network node device of the present invention determines the corresponding downstream port prefix through the first determining module 760 according to the router advertisement packet received by the first receiving module 750 and the locally pre-obtained port configuration information, and then the sending module 770 sends the router advertisement packet carrying the corresponding downstream port prefix to the user device, thereby implementing global IPv6 address configuration, and no new option needs to be inserted in the whole process, thereby reducing the overhead of address configuration.
Further, the network node device further includes a second receiving module 730 and a saving module 740. The second receiving module 730 is configured to receive port configuration information of the network node device, where the port configuration information includes a correspondence between the uplink port prefix and the downlink port prefix, where the correspondence is sent by the broadband network gateway. The saving module 740 is configured to save the port configuration information received by the second receiving module 730.
The second receiving module 730 may receive the port configuration information sent by the broadband network gateway through an access node control protocol or a network management protocol.
Further, as shown in fig. 4, the sending module 770 may include a modifying unit 771 and a sending unit 772. The modifying unit 771 is configured to modify the uplink port prefix information in the router advertisement message received by the first receiving module 750 into the corresponding downlink port prefix determined by the first determining module 760. The sending unit 772 is configured to send the router advertisement packet modified by the modifying unit 771.
As shown in fig. 5, the network node device includes a second determining module 790, where the second determining module 790 is configured to determine, when a plurality of corresponding downlink port prefixes determined by the first determining module 760 are determined, corresponding downlink port prefixes according to a locally preselected downlink port number. At this time, the sending module 770 is configured to send a router advertisement packet carrying the corresponding downlink port prefix determined by the second determining module 790.
Further, as shown in fig. 6, the network node device may further include a third receiving module 710 and a first sending module 720. The third receiving module 710 is configured to receive a digital subscriber line synchronization signal message or an initial message sent by a home gateway. The first sending module 720 is configured to send, to the broadband network gateway, a message carrying the port number of the network node device after the third receiving module 710 receives the dsl synchronization signal message or the initial message. The port configuration information of the network node device received by the second receiving module 730 is the port configuration information of the port number of the network node device.
The message sent by the first sending module 720 and carrying the port number of the network node device is a port opening message, and the port configuration information of the port number of the network node device received by the second receiving module 730 is a port management message.
The locally pre-obtained port configuration information may be reconfiguration information. In this case, the first receiving module 750 may wait for the unsolicited router advertisement packet without suppressing the unsolicited router advertisement packet sent by the broadband network gateway. The first determining module 760 can implement prefix reprogramming (prefix) of the port through the locally pre-obtained reconfiguration information.
The network node equipment is an access node.
Optionally, the network node device includes an optical line terminal and an optical network terminal. The port configuration information includes an Optical line terminal identifier, a Passive Optical Network (PON) port number of the Optical line terminal, an Optical Network terminal identifier, a port number of the Optical Network terminal, an upstream port prefix of the Optical Network terminal, and a downstream port prefix of the Optical Network terminal.
Fig. 7 is a schematic diagram of an IPv6 prefix assignment system according to the present invention. As shown in fig. 7, the IPv6 prefix allocation system includes a broadband network gateway 830, a network node device 820, and a user device 810, where the broadband network gateway 830 is configured to configure port information of the network node device 820 and send the port information to the network node device 820. The network node device 820 is configured to receive the port information sent by the broadband network gateway 830 and send a router advertisement packet carrying a prefix to the user device 830 according to the port information. The user equipment 810 is configured to configure a global IPv6 address according to a router advertisement message carrying a prefix sent by the network node equipment 820. The IPv6 prefix allocation system of the present invention configures the port information of the network node device 820 through the broadband network gateway 830, and then the network node device 820 sends a router advertisement message carrying a prefix to the user device 830 according to the port information sent by the broadband network gateway 830, thereby implementing global IPv6 address configuration, and no new option needs to be inserted in the entire process, thereby reducing the overhead of address configuration.
Wherein the network node device may be an access node.
Optionally, the network node device may include an optical line terminal and an optical network terminal.
The foregoing is a preferred embodiment of the present invention, and it should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications should fall within the protection scope of the appended claims.