Joke Collection Website - Talk about mood - How to distinguish the types of IP, A B C D. Give me an IP. I can’t understand it. Can you tell me how to do it?
How to distinguish the types of IP, A B C D. Give me an IP. I can’t understand it. Can you tell me how to do it?
There are 5 categories of IP addresses, Class A to Class E, each used in different types of networks. The address classification reflects the size of the network and whether the packet is unicast or multicast.
Class A through C addresses are used in the single-point addressing method, but each class represents a different network size.
Class A addresses (1.0.0.0-126.255.255.255) are used in the largest networks, which can have up to 16,777,216 nodes.
Class B addresses (128.0.0.0-191.255.255.255) are used for medium-sized networks with up to 65,536 nodes.
Class C addresses (192.0.0.0-223.255.255.255) are used for single-point network communication in small networks with less than 256 nodes.
Class D addresses do not reflect the size of the network, but are only used for multicast to specify the assigned node group that receives multicast. This node group is composed of multicast subscription members. The range of Class D addresses is 224.0.0.0-239.255.255.255.
Class E (240.0.0.0-255.255.255.254) addresses are used for testing.
According to the regulations of IPv4 currently in use, some reserved addresses are forcibly defined for IP addresses, namely: "network address" and "broadcast address". The so-called "network address" refers to the IP address when the "host number" is all "0", such as: 125.0.0.0 (Class A address); and the "broadcast address" refers to the IP when the "host number" is all "255" Address, such as: 125.255.255.255 (Class A address). The subnet mask is used to identify whether two IP addresses belong to the same subnet. It is also a set of 32-bit long binary values, and the value on each bit represents a different meaning: if it is "1", it means that the bit is a network bit; if it is "0", it means that the bit is a host bit. Like IP addresses, people also use "dotted decimal" to represent subnet masks, such as: 255.255.0.0. If the bitwise AND calculation of two IP addresses with the same subnet mask yields the same result, it means that the two IP addresses are in the same subnet. In other words, the two computers using these two IP addresses are like different departments in the same organization. Although their roles, functions, and even geographical locations may be different, they are all on the same network. Subnet mask calculation method Since various types of networks have been put into various applications, the network has expanded at an incredible speed on a large scale. The IPv4 currently in use has gradually exposed its shortcomings, namely: network number occupancy Too many and too few host numbers. One of the most commonly used solutions at present is to subdivide a higher category IP address into multiple subnets, and then provide different subnets to user groups of different sizes. When using this method, in order to effectively improve the utilization of IP addresses, it is mainly by taking out the high-order part of the "host number" in the IP address as the subnet number, and expanding or compressing it from the usual "network number" boundaries. Subnet mask is used to create a certain number of subnets of a certain type of IP address. Of course, as more subnets are created, the number of available host addresses on each subnet decreases accordingly. To calculate the subnet mask of a certain IP address, the following two situations can be considered respectively. The first case: IP addresses that do not need to be divided into subnets. Generally speaking, it is very simple to calculate the subnet mask of the IP address at this time, and it can be written according to its definition. For example: if an IP address is 12.26.43.0, there is no need to divide the subnet. According to the definition, we can know that it is a class A address, and its subnet mask should be 255.0.0.0; if this IP address is a class B address, Then its subnet mask should be 255.255.0.0; if it is a Class C address, its subnet mask should be 255.255.255.0. Other analogies. The second case: IP addresses to be divided into subnets.
In this case, how to easily and quickly divide an IP address and accurately calculate the mask of each subnet, the choice of method is very important. Below I introduce two more convenient methods: Of course, before finding the subnet mask, you must first know the number of subnets to be divided, and the required number of hosts in each subnet. Method 1: Calculate using the number of subnets. 1. First, convert the number of subnets from decimal numbers to binary numbers; 2. Then, count the number of digits in the binary number obtained from "1", and set it to N; 3. Finally, first find the address corresponding to this IP address. Category subnet mask. Then set all the first N bits of the host address part (that is, the "host number") of the obtained subnet mask to 1, so that the subnet mask of the subnet divided by the IP address can be obtained.
For example: Class B IP address 167.194.0.0 needs to be divided into 28 subnets: 1) (28)10=(11100)2; 2) The number of digits in this binary is 5, then N=5 ;3) This IP address is a Class B address, and the subnet mask of the Class B address is 255.255.0.0, and the host address of the Class B address is the last 2 digits (i.e. 0-255.1-254). So by setting all the first five bits of the host address in the subnet mask 255.255.0.0 to 1, you can get 255.255.248.0, and this set of values ??is the subnet mask of the Class B IP address 167.194.0.0 divided into 28 subnets. . Method 2: Calculate using the number of hosts. 1. First, convert the host number from decimal number to binary number; 2. Then, if the number of hosts is less than or equal to 254 (note: the two reserved IP addresses should be removed), count the number of binary digits obtained from "1" and set it to N; if the number of hosts is greater than 254, then Ngt; 8, which means that the host address will exceed 8 bits; 3. Finally, use 255.255.255.255 to set all the host address digits of this type of IP address to 1, and then set all the N bits to 0 in "back to front" order. The resulting value is the desired subnet. Mask value. For example: Class B IP address 167.194.0.0 needs to be divided into several subnets, and there are 500 hosts in each subnet: 1) (500) 10 = (111110100) 2; 2) The number of digits in this binary is 9, then N =9; 3) Set all the host addresses of the subnet mask 255.255.0.0 of the Class B address to 1 to obtain 255.255.255.255. Then set the last 9 positions to 0 from back to front to get: 11111111. 11111111.11111110.00000000, which is 255.255.254.0. This set of values ??is the subnet mask of the Class B IP address 167.194.0.0 divided into 500 hosts.
- Related articles
- Talk about the cure suitable for sad people; Learn to give up so that we can have a more relaxed start.
- What do you think of Liuwa's copy?
- Boyfriend doesn't want to fall in love openly in the circle of friends, does he?
- The day after tomorrow is my birthday, but a classmate I invited and I are going to sing a chorus. How to ask the teacher for leave?
- It's cold to eat ice cream
- Excerpts from good words and sentences in children's learning
- Talking about hair bands in rainy days
- Sentence 2 1
- Talk to your best friend.
- Seek a very sad and cruel romance novel.