Two examples of subnet division

Source: Internet
Author: User


Example 1: In this example, the number of subnets is used to divide subnets without considering the number of hosts. A group company has 12 subsidiaries and each subsidiary has 4 Departments. The superior provides a CIDR block of 172.16.0.0/16 for each subsidiary and its departments to allocate CIDR blocks. Idea: Since there are 12 subsidiaries, We need to divide them into 12 sub-network segments, but each subsidiary has 4 Departments, therefore, it is necessary to divide the CIDR blocks of each subsidiary into four subnets and allocate them to each department.
Step: A. First divide the CIDR blocks of each subsidiary. There are 12 subsidiaries, so there are 2 n ≥12, and the minimum value of n is 4. Therefore, the network bit must borrow four digits from the host bit. In this case, we can draw a 4-to-16 subnet from the large CIDR Block 172.16.0.0/16. Detailed process: first use the binary representation of 172.16.0.0/16 10101100.0002.16.00000000.00000000/16
After four digits (16 subnets can be divided): 1) 10101100.0002.16.00000000.00000000/20 [172.16.0.0/20] 2) 10101100.0002.16.0002.16.00000000/20 [172.16.16.0/20] 3) listen/20 [172.16.32.0/20] 4) Then/20 [172.16.48.0/20] 5) Then/20 [172.16.64.0/20] 6) 10101100.00020.102.16.00000000/20 [172.16.80.0/20] 7) listen/20 [172.16.96.0/20] 8) Then/20 [172.16.112.0/20] 9) 10101100.0002.16.0000000.00000000/20 [172.16.128.0/20] 10) Then/20 [172.16.144.0/20] 11) listen/20 [172.16.160.0/20] 12) Then/20 [172.16.176.0/20] 13) Then/20 [172.16.192.0/20] 14) 10101100.0002.16.1102.16.00000000/20 [172.16.208.0/20] 15) 10101100.0002.16.112.160.00000000/20 [172.16.224.0/20] 16) 10101100.0002.16.11112.16.00000000/20 [172.16.240.0/20]
We can select 12 from the 16 sub-networks and then distribute the first 12 to the following sub-companies. Each subsidiary can accommodate up to 12 power-2 = 4094 of 2 hosts. B. Draw the CIDR blocks of various departments of the company. Take Company A's access to 172.16.0.0/20 as an example. The CIDR blocks of other subsidiaries are the same as those of Company. There are four departments, so there are 2 n-2 ≥ 4, and the minimum value of n is 3. Therefore, the network bit must borrow three from the host bit. Then, we can draw the 3rd power-2 = 6 subnets from the network segment 172.16.0.0/20.
Detailed process: first use the binary representation of 172.16.0.0/20 to 10101100.0002.16.00000000.00000000/20 by three digits (four subnets can be divided ): ① random/23 [172.16.0.0/23] ② 10101100.0000000.00000010.00000000/23 [172.16.2.0/23] ③ random/23 [172.16.4.0/23] ④ random/23 [172.16.6.0/23] the CIDR block is allocated to the four departments of Company. Each department can accommodate a maximum of 510 hosts. Example 2: This example divides subnets by calculating the number of hosts. A group company assigned a segment of IP address 192.168.5.0/24 to its subsidiary company A. Currently, Company A has two-storey office buildings (1 and 2), which are uniformly connected to the public network from the vro on the first floor. There are 100 computers connected to the Internet on the first floor, and 53 computers connected to the Internet on the second floor. If you are a network administrator of the company, how do you plan this IP address? Draw the following simple topology as needed. Divide 192.168.5.0/24 into three CIDR blocks. One CIDR block on the first floor has at least 101 Available IP addresses. One CIDR block on the second floor has at least 54 available IP addresses; vrouters on the first and second floors use a CIDR block. Two IP addresses are required.
Idea: we should prioritize the maximum number of hosts when dividing subnets. In this example, we will first use the maximum number of hosts to divide subnets. 101 Available IP addresses, it is necessary to ensure that at least 7-bit host space is available (2 to the power of m-2 ≥ 101, m minimum = 7 ). If the 7-bit host space is retained, only two network segments can be drawn out, and the remaining network segments cannot be drawn out. However, we only need two IP addresses for the remaining CIDR Block and 54 available IP addresses for the CIDR block on the second floor. Therefore, we can select a CIDR block from the first two CIDR blocks to continue to divide the CIDR blocks on the second floor and the CIDR blocks used by routers.
Step: A. First, based on the large number of hosts, divide the subnet because the first-floor network segment must have at least 101 Available IP addresses, so the host bit should be kept at least 7. First, use 192.168.5.0/24 in binary format: 111000000.10101000.00000101.00000000/24. The host bit is retained for 7 bits, that is, the network bit is borrowed from the host bit by 1 bits (two subnets can be divided ): ① 112.1600.10101000.00000101.00000000/25 [192.168.5.0/25] ② 112.1600.10101000.00000101.0000000/25 [192.168.5.128/25] The first floor network segment can be selected from the two subnet segments, we choose 192.168.5.0/25. The CIDR blocks used by the vro on the second floor are further divided from 192.168.5.128/25. B. Divide the CIDR blocks used on the second floor. The CIDR blocks used on the second floor are obtained from the subnet segments 192.168.5.128/25. Because there must be at least 54 available IP addresses on the second floor, the host space must be kept at least 6 bits (m power of 2-2 ≥ 54, m minimum value = 6 ). First, 192.168.5.128/25 is represented in binary format: 111000000.10101000.00000101.0000000/25 the host bit is retained for 6 bits, that is, the network bit on the basis of the existing one bits to the host bit (two subnets can be divided ): ① 112.1600.10101000.00000101.0000000/26 [192.168.5.128/26] ② mask/26 [192.168.5.192/26] select one of the two subnet segments. We will select 192.168.5.128/26. The CIDR blocks used for vro interconnection are further divided from 192.168.5.192/26. C. Finally, divide the CIDR blocks used by vro interconnection the CIDR blocks used by vro are obtained from the CIDR blocks 192.168.5.192/26. Because only two available IP addresses are required, you only need to reserve two locations for the host space (2 to the power of m-2 ≥ 2, and the minimum value of m is 2 ).
First, 192.168.5.192/26 is represented in binary format: 111000000.10101000.00000101.11000000/26 the host bit is retained for two places, that is, the network bit on the basis of the existing four places to the host bit (16 subnets can be divided ): ① random/30 [192.168.5.192/30] ② 111000000.10101000.00000101.11000100/30 [192.168.5.196/30] ③ random/30 [192.168.5.200/30 ]....................................... ④ Route/30 [192.168.5.244/30] ⑤ 111000000.10101000.00000101.111000/30 [192.168.5.248/30] ⑥ route/30 [192.168.5.252/30] The Internet segment of the router can be selected from this 16 subnet, select 192.168.5.252/30. D. sort out the planned address for this example. Floor 1: Network Address: [192.168.5.0/25] Host IP Address: [192.168.5.1/25-1900005.126/25] broadcast address: [192.168.5.127/25] Floor 2: network Address: [192.168.5.128/26] Host IP Address: [192.168.5.129/26-1900005.190/26] broadcast address: [192.168.5.191/26] router Interconnection: Network Address: [192.168.5.252/30] Two IP addresses: [192.168.5.253/30, 192.168.5.254/30] broadcast address: [192.168.5.255/30] Quickly divide subnets to determine IP addresses. Let's take Example 2: we need to divide the network address 192.168.5.0/24 into subnets that can hold 101/54/2 hosts. Therefore, we must first determine the host bit, then determine the network bit based on the host bit, and finally determine the detailed IP address. ① Determine the host bit to arrange the number of required hosts in an arrogant and small manner: 101/54/2, and then determine the host bit of each subnet based on the number of IP addresses in the network: if n-2 of 2 is greater than or equal to the number of IP addresses in the CIDR Block, the host bit is equal to n. So, we get: 7/6/2. ② The Network bit is determined based on the host bit. The value 32 minus the remaining host bit is the network bit. The value is 25/26/30. ③ Determine the detailed IP Address
In binary format, the network bit value is used to mask the corresponding number of digits before the IP address, followed by the IP address bit. Select the first IP address of each subnet as the network address, and the last IP address as the broadcast address. Get: [network address] [valid IP] [broadcast address] [192.168.5.0/25] [192.168.5.1/25-1900005.126/25] [192.168.5.127/25] [192.168.5.128/26] [192.168.5.129/26-1900005.190/26] [192.168.5.191/26] [192.168.5.192/30] [192.168.5.193/30-1900005.194/30] [192.168.5.195/30]
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.