In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Example 1: this example 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 network segment of 172.16.0.0plus 16, which is assigned to each subsidiary and its department.
Idea: since there are 12 subsidiaries, it is necessary to divide 12 sub-network segments, but each subsidiary has 4 departments, so it is necessary to divide 4 subnets in the network segment to which each subsidiary belongs and assign them to each department.
Steps:
a. First divide the network segment of each subsidiary.
If there are 12 subsidiaries, then there is a minimum value of 2 to the nth power of ≥ 12 minus n = 4. Therefore, the network bit needs to borrow 4 bits from the host bit. Then it is possible to draw 2 to the fourth power = 16 subnets from the large network segment 172.16.0.0Universe 16.
Detailed process:
First, 172.16.0.0 ram 16 is represented in binary.
10101100.00010000.00000000.00000000/16
After borrowing 4 bits (16 subnets can be divided):
1) 10101100.00010000.00000000.000000Universe 20 [172.16.0.0amp20]
2) 10101100.00010000.000100000000020 [172.16.16.0Universe 20]
3) 10101100.00010000.00100000.000000Universe 20 [172.16.32.0lap20]
4) 10101100.00010000.00110000.000000Universe 20 [172.16.48.0lap20]
5) 10101100.00010000.01000000.000000lap20 [172.16.64.0Universe 20]
6) 10101100.00010000.01010000.000000lap20 [172.16.80.0amp20]
7) 10101100.00010000.01100000.000000swap 20 [172.16.96.0 Universe 20]
8) 10101100.00010000.01110000.000000Universe 20 [172.16.112.0 Universe 20]
9) 10101100.00010000.10000000.000000Universe 20 [172.16.128.0 Universe 20]
10) 10101100.00010000.10010000.000000Universe 20 [172.16.144.0Accord 20]
11) 10101100.00010000.10100000.000000swap 20 [172.16.160.0 Universe 20]
12) 10101100.00010000.10110000.0000000.20 [172.16.176.0]
13) 10101100.00010000.11000000.000000swap 20 [172.16.192.0 Universe 20]
14) 10101100.00010000.11010000.000000Universe 20 [172.16.208.0 Universe 20]
15) 10101100.00010000.11100000.000000swap 20 [172.16.224.0 Universe 20]
16) 10101100.00010000.11110000.000000Universe 20 [172.16.240.0 Universe 20]
We can choose 12 of these 16 subnets and distribute the first 12 to the following subsidiaries. Each subsidiary can accommodate a maximum of 2 to the power of 12-2mm 4094.
b. Then divide the network segments of each department of the subsidiary company
Take Company An as an example, the division network segment of other subsidiaries is the same as that of Company A.
If there are four departments, then there is a minimum of 2 to the nth power of ≥ 4 and n = 2. Therefore, the network bit needs to borrow 2 bits from the host bit. Then it is possible to draw a further 2 to the power of 2 = 4 subnets from the network segment 172.16.0.0Universe 20, which meets the requirements.
Detailed process:
First, 172.16.0.0 ram 20 is represented in binary.
10101100.00010000.00000000.00000000/20
After borrowing 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]
These four network segments can be distributed to the four departments of Company A. Each department can accommodate a maximum of 2 to the power of 10-2mm 1024.
Example 2: this example subnets by calculating the number of hosts.
A group company assigned an IP address 192.168.5.0 to subsidiary A, which now has a two-story office building (1st floor and 2nd floor), which is connected to the public network from the router on the first floor. There are 100 computers connected to the Internet on the first floor and 53 computers on the second floor. If you are the network manager of the company, how do you plan this IP?
According to the requirements, draw the following simple topology. 192.168.5.0Compact 24 is divided into three network segments, one network segment on the first floor with at least 101available IP addresses, one network segment on the second floor with at least 54 available IP addresses, and one network segment for the interconnection of routers on the first and second floors, which requires two IP addresses.
Idea: we give priority to the maximum number of hosts when subnetting. In this example, we will first use the maximum number of hosts to subnet. If there are 101 available IP addresses, make sure that at least 7 bits of host bits are available (m to the power of 2-2 ≥ 101 min = 7). If 7 host bits are reserved, only two network segments can be delineated, and the remaining one will not be able to be delineated. But we only need 2 IP addresses for the remaining network segment and only 54 available IP for the network segment on the second floor, so we can choose one of the two network segments designated for the first time to continue to divide the network segment on the second floor and the network segment used by the router interconnection.
Steps:
a. First subnetting according to the requirement of large number of hosts
To ensure that there are at least 101 available IP addresses on the first floor network segment, the host bits should be reserved for at least 7 bits.
First, 192.168.5.0Universe 24 is represented in binary:
11000000.10101000.00000101.00000000/24
The host bit is reserved for 7 bits, that is, on the existing basis, the network bit borrows 1 bit from the host bit (which 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]
The first floor network segment can choose one of these two sub-network segments, and we choose 192.168.5.0swap 25.
The network segment used for the interconnection of the network segment on the second floor and the router is re-divided from 192.168.5.128Universe 25.
b. Then divide the network segments used on the second floor
The network segment used on the second floor is subnetted again from the 192.168.5.128Universe 25 subnet. Because there must be at least 54 available IP addresses on the second floor, the host bits should be reserved for at least 6 bits (the minimum value of 2 to the power of m-2 ≥ 54, m = 6).
First, 192.168.5.128ax 25 is represented in binary:
11000000.10101000.00000101.10000000/25
The host bit is reserved for 6 bits, that is, on the existing basis, the network bit borrows 1 bit from the host bit (which 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]
The network segment on the second floor can choose one of these two sub-network segments, and we choose 192.168.5.128Comp26.
The network segment used by the router interconnection is redivided from 192.168.5.192 xx26.
c. Finally, the network segments used by router interconnection are divided.
The network segment used by the router interconnection is obtained from the subnetting of the 192.168.5.192 xx26 subnetwork. Because only two available IP addresses are needed, the host bit can be reserved as long as 2 bits (m to the power of 2-2 ≥ 2 minimum m = 2).
First, 192.168.5.192 bind 26 is expressed in binary:
11000000.10101000.00000101.11000000/26
The host bit retains 2 bits, that is, on the existing basis, the network bit borrows 4 bits from the host bit (which 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]
In the Internet segment of the router, we can choose one of these 16 subnets, and we will choose 192.168.5.252Comp30.
d. Sort out the planned address of this example
1 / F:
Network address: [192.168.5.0ax 25]
Host IP address: [192.168.5.1Comp25-192.168.5.126Universe 25]
Broadcast address: [192.168.5.127Universe 25]
2 / F:
Network address: [192.168.5.128Universe 26]
Host IP address: [192.168.5.129 Universe 26-192.168.5.190 Universe 26]
Broadcast address: [192.168.5.191 Universe 26]
Router interconnection:
Network address: [192.168.5.252Universe 30]
Two IP addresses: [192.168.5.253 Universe 30, 192.168.5.254 Universe 30]
Broadcast address: [192.168.5.255Universe 30]
Quickly subnetting to determine IP
Let's take example 2 as an example:
The topic requires us to divide the network address 192.168.5.0tic24 into subnets that can hold hosts on 101-54-2. Therefore, we should first determine the host bit, then determine the network bit according to the host bit, and finally determine the detailed IP address.
① determines the host bit
Arrange the number of hosts needed from large to small: 101-54-2, and then determine the host bit of each subnet according to the number of IP owned by the network: if 2 to the nth power-2 ≥ the number of IP of the network segment, then the host bit is equal to n. So, get: 7-6-2.
② determines the network bit according to the host bit
Subtract the host bits from 32 and the remaining value is the network bits, which is 25-26-30.
③ determines the detailed IP address
In binary, the network bit value is used to mask the corresponding number of bits in front of the IP, followed by the IP bit. Select the first IP of each subnet as the network address, the last one as the broadcast address, and the valid IP in between. Get:
[network address] [valid IP] [broadcast address]
[192.168.5.0] [192.168.5.1] [192.168.5.1] [192.168.5.126] [192.168.5.127]
[192.168.5.128Compact 26] [192.168.5.129Compact 26-192.168.5.190mm26] [192.168.5.191Compact 26]
[192.168.5.192 Universe 30] [192.168.5.1931 Charact30-192.168.5.194Charact30] [192.168.5.195Unix30]
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.