In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Division of subnet mask:
The purpose of the subnet mask is to distinguish between network bits and host bits.
If the host bits are all zero, they are: network address
The host bits are all 1: broadcast address
Subnetting mask is to divide a large network segment into several small network segments, in order to save the waste of lp addresses.
The ip address corresponding to subnet mask 1 is the network bit
The ip address corresponding to the subnet mask 0 is the host bit
Examples are as follows:
Suppose a company has two departments, each department has 90 hosts, to make it in a different network segment, if the finance department is vlan1, the technical part vlan2, ip 192.168.22.0Unix24 is subnetted.
Next, we're going to subnetting.
# configuration idea: first, find out that there are up to 90 computers, first determine the host bit, and then determine the subnet bit
# 2 to the nth power should be greater than or equal to 90
Make sure that the value of n is 7
The host bit is 7 bits, and the network is 32-7 bits.
That is, the subnet mask has 25 1s.
255.255.255.10000000
255.255.255.128 / / converted to binary
192.168.22.0 000 0000 / 25 / / equivalent to borrowing a bit from the host to become a network bit, the borrowed bit can be 0 or 1
192.168.22.0 000 0000 / 25-192.168.22.01111111 / / a network segment
192.168.22.1000 0000 / 25-192.168.22.11111111 / / another network segment
192.168.22.0 000 0000 / 25-192.168.22.0 111 1111 / 25 / / borrowing one bit from the host bit is equivalent to one more bit in the network
(network address) 192.168.22.0Universe 25-192.168.22.127 (broadcast address) / / convert the above binary to decimal
Available ip addresses are: 192.168.22.1-192.168.22.126
The subnet mask is 255.255.255.10000000 / / borrowed a bit from the host bit to become a network bit.
Subnet mask: 255.255.255.128 / / converted to binary
Similarly, another network segment: 192.168.22.1 0000000-192.168.22.1 1111111
(network address) 192.168.22.128-192.168.22.255 (broadcast address) / / convert the above binary to decimal
Available ip address: 192.168.22.129-192.168.22.254
Summary: two subnets can be divided, namely 192.168.22.0-192.168.22.127 and 192.168.22.128-192.168.22.255
Subnet: 2 network segments
N to the power of 2 hosts-2 valid addresses 128-2 = 126
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.