Each of our computer network has a corresponding IP address, if the user does not know their own IP address, you can directly find the IP address on Baidu. Can make IP address so much, how do we identify IP. How to divide the IP address. This is what the small series is going to introduce today.
The current IP network uses 32-bit addresses, expressed in dotted decimal notation, such as 172.16.0.0. The address format is: IP address = Network address + host address or IP address = host address + subnet address + host address Subnet mask set follow certain rules, the same as the IP address, the length of the subnet mask is also 32 bits, the left is a network bit, with the binary number "1", the right is the host bit, with the binary number "0" Said
The division of subnets is actually the process of designing subnet masks. The subnet mask is primarily used to differentiate between the network ID and the host ID in the IP address, which is used to mask part of the IP address, separating the network ID from the IP address and the host ID. The subnet mask is a numeric value of 4 decimal digits "intermediate". Separate, as 255.255.255.0. If it is written as a binary form: 11111111.11111111.11111111.00000000, where the "1" bit separated the network ID, the "0" bit separated the host ID, that is, by the IP address and subnet mask "and" logical operation, to obtain the network number.
The subnet mask does not exist alone, and it is used in conjunction with an IP address. The role of a subnet mask is to divide an IP address into two parts, the network address and the host address. The IP address is divided into 5 types according to the network ID, Class A address, Class B address, Class C address, Class D address and Class E address. So how do you divide the IP address?
1. Class A IP address
A Class A IP address consists of 1-byte network address and 3-byte host address, the highest bit of network address must be "0", address range from 1.0.0.0 to 126.0.0.0. There are 126 available Class A networks, each of which can hold more than 100 million hosts.
2. Class B IP Address
A class B IP address consists of 2 bytes of network address and 2 bytes of host address, the highest bit of network address must be "10", address range from 128.0.0.0 to 191.255.255.255. There are 16,382 B-type networks available, and each network can hold more than 60,000 hosts.
3. Class C IP Address
A Class C IP address consists of a 3-byte network address and a 1-byte host address, and the highest bit of the network address must be "110". range from 192.0.0.0 to 223.255.255.255. C-Class network can reach more than 2.09 million, each network can accommodate 254 hosts.
4. Class D addresses are used for multicast (multicast).
Class D IP Address the first byte begins with "Lll0", which is a specially reserved address. It does not point to a particular network, which is currently used in multicast (multicast). Multicast addresses are used to address a group of computers at once, identifying a group of computers that share the same protocol.
5. Class E IP Address
Start with "llll0" and use reservations for the future. The full 0 ("0.0.0.0") address corresponds to the current host. The IP address of the full "1" ("255.255.255.255") is the broadcast address of the current subnet.
In the IP address 3 main types, each reserved 3 areas as a private address, that is, the more commonly used IP address. Its address range is as follows:
Class A address: 10.0.0.0~10.255.255.255
Class B Address: 172.16.0.0~172.31.255.255
Class C Address: 192.168.0.0~192.168.255.255
(1) Class A address
A class address has a representation range of: 0.0.0.0~126.255.255.255, the default netmask is: 255.0.0.0,a class network uses the first set of numbers to represent the address of the network itself, followed by three sets of digits as the address of the host connected to the network, that is, the high-end bit 0, the next 7 bits represent the network ID, the remaining Machine ID. A type of address is assigned to a network with a large number of hosts (direct personal users) and a small number of local area networks. such as IBM's network.
A class address is suitable for the network less and more nodes, the number of networks is 128, each network to the node number of 1600.
(2) Class B Address
Class B address range is: 128.0.0.0~223.255.255.255, the default netmask is: 255.0.0.0. Class B addresses are assigned to a typical medium network. Class B networks use the first to second set of numbers to represent the address of the network, followed by two sets of digits representing the host address on the network, namely high-end bit 10, the next 14 digits representing the network ID, and the remaining 16 digits representing the host ID.
The Class B address is suitable for the network number and the number of nodes is moderate, the network number is 16,000, each network node number is 64,000.
(3) Class C Address
Class C address range is: 192.0.0.0.~223.255.255.255, the default netmask is: 255.255.255.0; C-Class address assigned to small networks, such as the general LAN and campus network, it can connect the number of hosts is the least, the user is divided into a number of network segments for management. Class C networks Use the first three groups of digits to represent the address of the network, the last set of numbers as the host address on the network, the high-end bit 110, the next 21 digits represent the network ID, and the remaining 8 digits represent the host ID.
The C class address is suitable for the network number and the node is few, the network number is 2 million, each network node number is 256.
For example, you said, "131.108.1.56 Subnet mask 255.255.255.0 This IP and subnet mask is unified, you can say that the address belongs to B and the mask belongs to C?" is not appropriate. The subnet mask is a category that is not part of an IP address.