Computer network-subnetting (subnet address, broadcast address, subnet mask)

Subnetting

topic:

There is a computer in the office with an IP address of 192.45.165.243 and a subnet mask of 255.255.255.224. What type of network does the computer belong to? Is its network subnetted? If divided, how many networks are divided into and write down the number of each subnet? What are the subnet number and broadcast address of the modified machine?

analysis of idea:

Class A: 0~126 Default subnet mask: 255.0.0.0

Class B: 128~191 Default subnet mask: 255.255.0.0

Class C: 192~223 Default subnet mask: 255.255.255.0

Subnet address: network number (copy) + subnet number (copy) + host number (all 0)

Broadcast address: network number (copy) + subnet number (copy) + host number (all 1)

Subnet mask: network number (all 1) + subnet number (all 1) + host number (all 0)

Total number of IP addresses: calculated based on the number of digits in the host number

Total number of assignable IP addresses: number of hosts (total number of IP addresses - 2) (minus all 0s and all 1s, which are subnet addresses and broadcast addresses respectively)

Allocable IP address range: (subnet address ~ broadcast address)

AND operation: all 1s are 1, the rest are 0

Subnet address = AND operation of IP address and subnet mask

Find the minimum address and maximum address:

Network number (minimum address) = subnet address (copy) + host number (all changed to 0)
Broadcast address (maximum address) = subnet address (copy) + Host number (all changed to 1)

Host number=IP address-network address
Last host address = Last byte of direct broadcast address-1
First host address =The last digit of the network address+1
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

128 64 32 16 8 4 2 1

Topic analysis:

224 is converted into binary 11100000
Therefore, the network where the modification is made belongs to a Class C network. The network has been divided into subnets. If divided, it will be divided into 2^3=8 subnets. Network number (224 binary has 3 ones)

243 is converted into binary 11110011 (243=128+64+32+16+2+1)

Find the subnet number: AND the IP address and subnet mask
AND 224 and 243 (all 1s are 1, the rest are 0)
Obtain: 11100000 (converted to decimal 224)

So the subnet number of the modified machine is: 192.45.165.224

Find the broadcast address: (maximum address) = subnet address (copy) + host number (all changed to 1) All bits 0 are changed to 1->That is, 11111111=255, so the broadcast address of the modified machine is 192.45.165.255

8个子网
000 00000 ->0
001 00000->32
010 00000->64
011 00000->96
100 00000->128
101 00000->160
110 00000->192
111 00000->224

Tokoi Kogo:
192.45.165.0-192.45.165.31
192.45.165.32-192.45.165.63
192.45.165.64-192.45.165.95
192.45.165.96-192.45.165.127
192.45.165.128-192.45.165.159
192.45 .165.160-192.45.165.191
192.45.165.192-192.45.165.223
192.45.165.224-192.45.165.255

Guess you like

Origin blog.csdn.net/qq_42857603/article/details/107209391