The subject matter herein generally relates to network routing, in particular to prefix processing in a root router.
A plurality of routers may be connected on Local Access Network (LAN) side of a root router to form more subnets. The root router may sub-delegate IPv6 prefixes to the routers on the LAN-side through a dynamic host configuration protocol for IPv6 (DHCPv6) server. However, the root router usually can only specify a same prefix length for all the routers on the LAN side, and cannot individually assign different prefix length for different routers. Moreover, when the DHCPv6 server renews IPv6 prefix of the root router, a network administrator needs to manually calculate delegated IPv6 prefixes for the routers on the LAN-side.
Implementations of the present technology will now be described, by way of example only, with reference to the attached figures, wherein:
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. Also, the description is not to be considered as limiting the scope of the embodiments described herein. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features of the present disclosure.
References to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one”.
In general, the word “module” as used hereinafter, refers to logic embodied in computing or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or computing modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives. The term “comprising”, when utilized, means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series, and the like.
In the embodiment, the root router 1 comprises a prefix delegation (hereinafter, PD) table, wherein the PD table is the means for storing a delegated IPv6 prefix of the root router 1, and a list of delegation information for the routers 3. Each entry of the list contains a router identifier and a bit boundary associated with the router identifier. The delegated IPv6 prefix has a specified prefix length. For example, a delegated IPv6 prefix “2001:b021:0015::/48” can have a delegated prefix length of 48, where the delegated IPv6 prefix and the prefix length are separated by a slash (/). The bit boundary is a decimal value that can be added to the delegated prefix length to obtain another prefix length for one of the routers 3. The root router 1 further comprises an address pool, which represents a plurality of contiguous and sequential IPv6 addresses available for allocation to the routers 3 according to the delegated IPv6 prefix.
The renewing module 301 renews the delegated IPv6 prefix of the root router 1 through the DHCPv6 server 2 and stores the delegated IPv6 prefix in the PD table.
The obtaining module 302 obtains a bit boundary from the PD table on a per-router identifier basis. There are at least two methods to configure the list of delegation information in the PD table. The methods are as follows.
The first method: the obtaining module 302 receives setting values for a router identifier and its associated bit boundary through a user interface, and stores the router identifier and the bit boundary in the PD table.
The second method: the obtaining module 302 receives a prefix delegation request from the router 3. In one embodiment, the prefix delegation request comprises the number of subnets the router 3 wants to create. The calculating module 303 then calculates a bit boundary according to the prefix delegation request and stores the bit boundary associated with the router identifier of the requesting router 3 in the PD table. The calculating module 303 calculates the bit boundary according to number of subnets requested of the router 3.
The calculating module 303 calculates the bit boundary according to the prefix delegation request following a preset rule. For example, the preset rule can calculate the bit boundary according to the following equation:
B=64−L−[log2N],
where B corresponds with an integer representing the bit boundary, L corresponds with the delegated prefix length of the root router 1, and N corresponds with the number specified in the prefix delegation request. For example, the obtaining module 302 receives the prefix delegation request from the router 3 which specifies the creation of 3 subnets. Taking the delegated prefix length of the root router 1 as 48 for example, the calculating module 304 calculates that the bit boundary is equal to 14 for the router 3, according to the preset rule.
The delegating module 304 reserves a continuous portion of addresses within the address pool and delegates a prefix for the router 3 according to the delegated IPv6 Prefix of the root router 1 and the list of delegation information in the PD table.
Returning to
Referring to
At block 402, the delegated IPv6 Prefix of the root router 1 is renewed by the DHCPv6 server 2.
At block 404, the bit boundary of the connected router 3 is obtained from the PD table based on the router identifier of the router 3.
At block 406, IPv6 prefixes to the connected routers 3 are delegated according to the delegated IPv6 prefix of the root router 1 and each bit boundary of the connected routers 3 is stored in the PD table.
Referring to
At block 512, a prefix delegation request is received from one of the connected routers 3.
At block 514, a bit boundary is calculated according to the prefix delegation request.
At block 516, the bit boundary is stored in the PD table based on a router identifier of the requesting router 3.
Referring to
At block 602, the delegated IPv6 prefix of the root router 1 is renewed by the DHCPv6 server 2.
At block 604, the root router 1 updates the address pool according to the new delegated IPv6 prefix. The router further updates the list of the delegation information in the PD table according to the new delegated IPv6 prefix if a new delegated prefix length is different from the old delegated prefix length. For example, the old delegated prefix length is 48 and the new delegated prefix length is 52, the root router 1 updates each bit boundary field in the PD table to minus (52−48) from its original value in order to keep the same prefix length that delegated to the connected router 3. Another example, the root router 1 checks each bit boundary in the PD table whether the bit boundary added to the new delegated prefix length is exceed 64 prefix bits constraint. If the bit boundary added to the new delegated prefix length is exceed 64 prefix bits constraint, the root router 1 decreases the bit boundary to form a 64 bits prefix length and updates the bit boundary in the PD table.
At block 606, IPv6 prefixes to the connected routers 3 are delegated according to the delegated IPv6 prefix of the root router 1 and each bit boundary of the connected routers 3 is stored in the PD table.
The root router 1 can flexibly sub-delegate different IPv6 prefixes to the connected routers 3, and automatically maintain IPv6 prefix delegation without intervention of a network administrator.
The embodiments shown and described above are only examples. Many details are often found in the art such as the other features of a device and method for prefix processing. Therefore, many such details are neither shown nor described. Even though numerous characteristics and advantages of the present technology have been set forth in the foregoing description, together with details of the structure and function of the present disclosure, the disclosure is illustrative only, and changes may be made in the detail, especially in matters of shape, size, and arrangement of the parts within the principles of the present disclosure, up to and including the full extent established by the broad general meaning of the terms used in the claims. It will therefore be appreciated that the embodiments described above may be modified within the scope of the claims.
Number | Date | Country | Kind |
---|---|---|---|
201710399326.X | May 2017 | CN | national |