Two examples of subnetting

Source: Internet
Author: User
Tags ip number

Two examples of subnetting

Example 1: This example divides subnets by the number of subnets, regardless of the number of hosts.
A group company has 12 subsidiaries, and each subsidiary has 4 departments. The superior gives a 172.16.0.0/16 network segment, which is allocated to each subsidiary and the Department of the subsidiary.
idea : Since there are 12 subsidiaries, it is necessary to divide 12 sub-segments, but each subsidiary has 4 departments, and therefore in each subsidiary of the network segment divided into 4 sub-networks allocated to the departments.
Steps :
A. First Division of the respective subsidiaries of the network segment.
There are 12 subsidiaries, then there is a minimum value of 2 n-th square ≥12,n = 4. Therefore, the network bit needs to borrow 4 bits to the host bit. Then you can draw 2 from the large network segment of 172.16.0.0/16 4 square = 16 subnets.
Detailed process:
First, the 172.16.0.0/16 is expressed in binary notation
10101100.00010000. 00000000.00000000/16

after borrowing 4 bits (16 subnets can be divided):

1) 10101100.00010000 . 00000000.00000000/20 "172.16.0.0/20"2) 10101100.00010000 . 00010000.00000000/20 "172.16.16.0/20"3) 10101100.00010000 . 00100000.00000000/20 "172.16.32.0/20"4) 10101100.00010000 . 00110000.00000000/20 "172.16.48.0/20"5) 10101100.00010000 . 01000000.00000000/20 "172.16.64.0/20"6) 10101100.00010000 . 01010000.00000000/20 "172.16.80.0/20"7) 10101100.00010000 . 01100000.00000000/20 "172.16.96.0/20"8) 10101100.00010000 . 01110000.00000000/20 "172.16.112.0/20"9) 10101100.00010000 .0000.00000000/20 "172.16.128.0/20" 10101100.00010000 . 10010000.00000000/20 "172.16.144.0/20"One ) 10101100.00010000 . 10100000.00000000/20 "172.16.160.0/20" 10101100.00010000 . 10110000.00000000/20 "172.16.176.0/20" 10101100.00010000 . 11000000.00000000/20 "172.16.192.0/20" 10101100.00010000 . 11010000.00000000/20 "172.16.208.0/20" 10101100.00010000 . 11100000.00000000/20 "172.16.224.0/20" 10101100.00010000 . 11110000.00000000/20 "172.16.240.0/20"

We select 12 from these 16 subnets and divide the first 12 to the following subsidiaries. Each subsidiary accommodates up to 12 -2=4094 with a host number of 2.

    B. Re-division of subsidiaries of the respective departments of the network section
    to a company to obtain 172.16.0.0/20 as an example, the other subsidiaries of the Division division of the same company.
    has 4 departments, then there is a minimum value of 2 n-th square ≥4,n = 2. Therefore, the network bit needs to borrow 2 bits to the host bit. Then you can draw from the 172.16.0.0/20 this network segment 2 of the 2-time Square = 4 subnets, is in line with the requirements.
    Detailed procedure:
    first 172.16.0.0/20 in binary notation   

   10101100.00010000. 0000 0000.00000000/20
    Borrow 2 bits (4 subnets can be divided):
   ①10101100.00010000.00000000.00000000/22 "172.16.0.0/22"
   ② 10101100.00010000.00000100.00000000/22 "172.16.4.0/22"
   ③ 10101100.00010000.00001000.00000000/22 "172.16.8.0/22"
   ④ 10101100.00010000.00001100.00000000/22 "172.16.12.0/22"
    divide these 4 segments into 4 divisions of a company. Each department accommodates up to 10 -2=1024 with a host number of 2.

Example 2: This example divides subnets by calculating the number of hosts.
A group of companies to subordinate subsidiaries a assigned an IP address 192.168.5.0/24, now a company has two-storey office building (1 floor and 2 floor), unified from the 1 floor of the router on the public network. There are 100 computers connected on the 1 floor, and 53 computers are connected on the 2 floor. If you are the company's network management, how should you plan this IP?
According to the requirements, draw the following simple topology. The 192.168.5.0/24 is divided into 3 network segments, 1 floor A network segment, at least 101 available IP addresses, 2 floor a network segment, at least 54 available IP addresses, 1 floor and 2 floor router interconnection with a network segment, requires 2 IP addresses.

 

    idea: We divide the subnet by prioritizing the maximum number of hosts. In this case, we will first use the maximum number of hosts to divide the subnets. 101 Available IP addresses, it is necessary to ensure that at least 7 bits of the host bit is available (2 m- -2≥101,m minimum value =7). If you keep the 7-bit master, you can only draw two segments, and the rest of the network segment will not be drawn out. But we only need 2 IP addresses for the rest of the network segment, and the 2 floor segment requires only 54 available IPs, so we can select a network segment from the first two segments to continue dividing the network segment of the 2 floor and the router interconnection.
    steps:
    A. First, according to the large number of host needs, the network of networks
    because to ensure that the 1 floor segment has at least 101 IP addresses available, Therefore, the host bit must be kept at least 7 bits.
    192.168.5.0/24 in binary notation:
    11000000.10101000.00000101.00000000/24
    host bit reserved 7 bits, that is, on the existing base network bit to the host bit to borrow 1 bits (can be divided into 2 subnets):
   ① 11000000.10101000.00000101.00000000/25 "192.168.5.0/25"
   ② 11000000.10101000.00000101.10000000/25 "192.168.5.128/25"
    1 Floor Network Segment Select one of these two subnet segments, We choose 192.168.5.0/25. The network segments used by the
    2 floor network segment and router interconnection are again divided from the 192.168.5.128/25.

B. Re-dividing the network segment used on the 2 floor
The network segment used on the 2 floor is again partitioned from the 192.168.5.128/25 subnet segment to obtain the subnet. Because there must be at least 54 IP addresses available on the 2 floor, the host bit must be at least 6 bits (2 m- -2≥54,m minimum =6).
First, the 192.168.5.128/25 is expressed in binary notation:
11000000.10101000.00000101.10000000/25
Host bit reserved 6 bits, that is, on the existing basis, the network bit to the host bit to borrow 1 bits (can be divided into 2 subnets):
①11000000.10101000.00000101.10000000/26 "192.168.5.128/26"
②11000000.10101000.00000101.11000000/26 "192.168.5.192/26"
2 Floor Network Segment Choose one of these two sub-segments, we choose 192.168.5.128/26.
The network segments used by the routers are again partitioned from the 192.168.5.192/26.

C. Finally dividing the network segment used by the router interconnection
The network segment used by the router interconnect is obtained again from the subnet segment of 192.168.5.192/26. Because only 2 available IP addresses are required, the host bit is reserved for 2 bits (the minimum value of =2 for the 2 m-time -2≥2,m).
First, the 192.168.5.192/26 is expressed in binary notation:
11000000.10101000.00000101.11000000/26
Host bit reserved 2 bits, that is, on the existing basis, the network bit to the host bit to borrow 4 bits (can be divided into 16 subnets):
①11000000.10101000.00000101.11000000/30 "192.168.5.192/30"
②11000000.10101000.00000101.11000100/30 "192.168.5.196/30"
③11000000.10101000.00000101.11001000/30 "192.168.5.200/30"
.......................................
④11000000.10101000.00000101.11110100/30 "192.168.5.244/30"
⑤11000000.10101000.00000101.11111000/30 "192.168.5.248/30"
⑥11000000.10101000.00000101.11111100/30 "192.168.5.252/30"
Router Internet segment We select one of these 16 subnets and we choose 192.168.5.252/30.

D. Organize the planning address for this example
1 Floor:
Network address: "192.168.5.0/25"
Host IP Address: "192.168.5.1/25-192.168.5.126/25"
Broadcast address: "192.168.5.127/25"
2 Floor:
Network address: "192.168.5.128/26"
Host IP Address: "192.168.5.129/26-192.168.5.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
Let's take example 2 for example:
The topic requires that we divide the 192.168.5.0/24 network address into subnets that can accommodate 101/54/2 hosts. Therefore, we need to determine the host location, and then determine the network bit based on the host bit, and finally determine the detailed IP address.
① determining the host bit
Set the number of hosts that you need to be arrogant and small: 101/54/2, and then determine the host bit for each subnet based on the number of IP IPs the network has: if 2 n times -2≥ The IP number of that segment, then the host bit equals N. So, get: 7/6/2.
② determines network bit based on host bit
With 32 minus the host bit the remaining value is the network bit, get: 25/26/30.
③ Determining the detailed IP address
In binary, the network bit value is used to mask the corresponding number of digits in front of IP, and then the IP bit is followed. Select the first IP for each subnet as the network address, the last one for the broadcast address, and the valid IP between the two. Get:
"Network Address" "Valid IP" "broadcast address"
"192.168.5.0/25" "192.168.5.1/25-192.168.5.126/25" "192.168.5.127/25"
"192.168.5.128/26" "192.168.5.129/26-192.168.5.190/26" "192.168.5.191/26"
"192.168.5.192/30" "192.168.5.193/30-192.168.5.194/30" "192.168.5.195/30"

Two examples of subnetting

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.