Class a ip Address class a ip Address: The network number is identified by a variable 7-bit (BIT), and the variable 24-bit identifies the host number. The first one is "0 ", that is, the first segment of the Class A address ranges from 1 ~ In the range of 126. Class A addresses are generally provided for large networks. There are only 126 Class A networks in the world, and each class a network can connect up to 16777214 hosts. Class B ip Address class B IP Address: a network number can be identified by a variable of 14 bits, and a variable of 16 bits can be used to identify the host number. The first two bits are "10 ". The first segment of the B-type address ranges from 128 ~ Between 191 (the network number cannot begin with a number 127, and the number 127 is reserved for diagnosis, for example, 127.0.0.1 is the return address, used for loop testing ), the first and second parts are combined to indicate the network number. Class B addresses are suitable for medium-sized networks. There are about 16000 Class B networks worldwide, and each class B network can connect up to 65534 hosts. Class c ip Address class c ip Address: The network number is identified by a variable of 21 bits, and the variable eight bits identify the host number. The first three bits are "110 ". The first segment of the class C address is between 192 and ~ Between 223, the first, second, and third sections are combined to indicate the network number. The last section identifies the host number on the network. Class C addresses are suitable for small networks such as campus networks. Each Class C network can have a maximum of 254 hosts. From the above introduction, we know that the IP address represents the host on the network by the network number and host number. Only computers under a network number can "directly" interwork, computers with different network numbers can communicate with each other through gateways. However, such a division is not very flexible in some cases. Therefore, an IP network can be divided into smaller networks, called subnet, which generates a subnet mask. The subnet mask is used to determine whether any two IP addresses belong to the same sub-network. Only computers in the same subnet can "directly" interwork. So how to determine the subnet mask? As mentioned above, IP addresses are divided into network numbers and host numbers. A network must be divided into multiple subnets, so the network number will occupy the original host space. For example, for a class C address, it uses 21 bits to identify the network number. to divide it into two subnets, it takes up one original host identification space.
[Computer Network] IP Classification