SRv6 Network Programming Self-study Series | IPv6 Address Planning

Book source: "SRv6 Network Programming: Opening a New Era of IP Networks"

This book has been published for many years, but I read it again many years later because of work needs. In addition to reviewing, I found that I have learned more knowledge. Organize the reading notes while studying, and share them with everyone. If the copyright is violated, it will be deleted. Thank you for your support!

Attach a summary post: SRv6 Network Programming Self-study Series | Summary_COCOgsta's Blog-CSDN Blog


If IPv6 has been deployed in the network and the IPv6 network segment has been planned in advance, then only one of the reserved network segments needs to be selected as the SRv6 Locator to allocate the Locator in the network, and the original IPv6 address planning does not need to be done. any changes.

If IPv6 has not been deployed in the network, and no IPv6 network segment has been planned, then the IPv6 address planning can be carried out through the following steps: clarify the IPv6 address planning principles of the network; determine the IPv6 address allocation method; carry out IPv6 address one by one level assignment.

8.2.1 Principles of IPv6 address planning

On an SRv6 network, the following principles are recommended for IPv6 address planning.

  • The principle of uniformity: All IPv6 addresses in the entire network are uniformly planned, including business addresses, platform addresses, network addresses, etc.

  • The principle of uniqueness: each address is unique across the entire network.

  • Separation principle: Plan service addresses and network addresses separately to facilitate routing control and traffic security control at the edge of the network; plan SRv6 Locator network segments, loopback interface addresses, and link addresses separately. These parts do not overlap each other, which is convenient for routing control and management .

  • Hierarchical and aggregatable principles: address planning should be able to perform route aggregation when advertising between IGP/BGP domains, so as to facilitate the introduction of routes.

    • It is recommended to allocate a separate network segment for each IP backbone network.

    • It is recommended to allocate a separate network segment for each MAN.

    • It is recommended to allocate a separate subnet segment for each pair of metro aggregation devices from the network segment of the metropolitan area network to facilitate route aggregation when publishing routes between different aggregation domains in the metropolitan area.

    • It is recommended to allocate a separate subnet segment for each MAN access domain from the network segment of the convergence device to facilitate route aggregation when different access domains import routes from each other.

    • It is recommended to allocate a separate subnet segment for each access device from the network segment to which the MAN access domain belongs.

      A typical allocation example is shown in Figure 8-11. Separate network segments are planned for the two backbone bearer networks, separate network segments are planned for all devices connected to the MAN, and separate network segments are planned for all devices connected to each pair of AGGs. Plan a separate network segment, and plan a separate network segment for each access IGP domain.

      Figure 8-11 An allocation example of IPv6 network segment planning

      Note: RDC is Regional Data Center, regional data center.

  • Security principle: The source of the address can be quickly traced, and the traffic can be easily filtered by address.

  • Evolvability principle: When planning addresses, a certain address space should be reserved in each address segment for future business development.

8.2.2 Allocation method of IPv6 address

The allocation methods of IPv6 addresses generally include the following types: sequential allocation, discrete allocation, optimal allocation and random allocation.

  1. sequential allocation

Allocate addresses from right to left according to the same mask in the address block. This allocation method is simple, but it is necessary to fully consider the scalability when allocating, and reserve enough addresses in advance to avoid the inability to aggregate after adding addresses later, resulting in routing Too many.

As shown in Figure 8-12, for the source address block of 2001:db8:1a::/48, if it is to be divided into multiple address blocks with a mask of 52, the first address block is assigned in order 2001:db8:1a::/52, the second address block is allocated as 2001:db8:1a:1000::/52 (note that the hexadecimal expression is used here, and 1 in 1000 represents the 48th to 52nd 0001 in bits), and so on.

Figure 8-12 Sequential allocation of IPv6 addresses

  1. discrete allocation

The address blocks are allocated sequentially according to the same mask, but are allocated from left to right. The initially allocated data blocks are discrete, but address aggregation can still be performed after subsequent address expansion.

As shown in Figure 8-13, for the source address block of 2001:db8:1a::/48, if it is to be divided into multiple address blocks with a mask of 52, according to the discrete allocation method, the first address block is allocated as 2001:db8:1a::/52, the second address block is allocated as 2001:db8:1a:8000::/52 (note that the hexadecimal expression is used here, and the 8 in 8000 represents the 48th to 52nd 1000 in bits), and so on.

Figure 8-13 Discrete allocation of IPv6 addresses

  1. best allocation

Similar to the CIDR technology of IPv4, the address allocation does not follow the same mask for next-level allocation, but in order of allocation, and allocates appropriate available address blocks according to address requirements.

As shown in Figure 8-14, for the source address block of 2001:db8:1a::/48, the first application scenario requires the number of addresses with a 52-bit mask, and the number of addresses with a 52-bit mask is allocated for the first application scenario The address segment (2001:db8:1a::/52), the second and third application scenarios are the same as it, and the fourth scenario requires the address number of 51-bit mask, then allocate a 51-bit mask for the fourth application address segment.

Figure 8-14 Optimal allocation of IPv6 addresses

  1. Randomly assigned

Randomly assign blocks of addresses. As shown in Figure 8-15, for the source address block of 2001:db8:1a::/48, define a random hexadecimal number ranging from 0 to 15. When an address block is allocated each time, a random number is generated, and if the corresponding address block has not been allocated, the address block is allocated.

For example, the random number generated at the first distribution is 5, the random number generated at the second distribution is 15 (shown as f in hexadecimal), and the random number generated at the third distribution is 8. Random allocation can be used in scenarios with high security requirements.

Figure 8-15 Random allocation of IPv6 addresses

These address allocation methods have their own advantages and disadvantages and applicable scenarios. When planning network addresses, different allocation methods can be selected at different levels. For example, sequential allocation is adopted in the IP backbone network, and optimal allocation is adopted in the metropolitan area network. .

8.2.3 Class-by-class allocation of IPv6 addresses

According to already defined principles and methods, IPv6 addresses can be assigned level by level. Figure 8-16 shows a sample of IPv6 address planning.

Figure 8-16 Example of IPv6 address planning

Figure 8-17 shows the address planning example in Figure 8-16 in a step-by-step expansion mode.

Separate multiple 27-bit network segments from the fixed prefix of the 24-bit mask and assign them to addresses with different attributes. If the address of one 27-bit network segment is not enough, multiple 27-bit network segments can be allocated, as shown in Figure 8 In -17, three 27-bit address blocks are allocated for user addresses. Finally, two 27 bit network segments are reserved for future expansion.

Figure 8-17 Address planning using level-by-level expansion

  • For Network (network address), multiple 30-bit network segments can be separated from the 27-bit mask prefix and assigned to different network types. Likewise, multiple 30 bit segments can be assigned to a network type. Continue to divide multiple 32-bit network segments in different network types and assign them to different address types, and then continue to divide multiple 38-bit network segments in different address types to assign them to different regions.
  • For the Service Platform (service platform address), multiple 29-bit network segments can be assigned to different services from the 27-bit mask prefix, and then 35-bit addresses can be further assigned to different regions.
  • For Users (user address), multiple 33-bit network segments can be allocated from the 27-bit mask prefix to different regions, and then multiple 35-bit addresses can be divided among users in each region to distinguish different priorities user.

Note: In actual network deployment, it is recommended to plan IPv6 addresses in units of 4 bits to facilitate subsequent operation and maintenance.

By determining the principles and allocation methods, and assigning IPv6 addresses level by level based on the principles and methods, a relatively reasonable IPv6 address planning result can be obtained, laying a solid foundation for subsequent IPv6 and SRv6 network design.

Guess you like

Origin blog.csdn.net/guolianggsta/article/details/130448284