Home  >  Article  >  Software Tutorial  >  The difference between class a IP addresses and class b IP addresses will be understood in seconds: Detailed explanation of the distinction between IP addresses ABCDE class

The difference between class a IP addresses and class b IP addresses will be understood in seconds: Detailed explanation of the distinction between IP addresses ABCDE class

王林
王林forward
2024-02-06 11:48:241778browse

php editor Xigua brings you a detailed analysis of IP addresses. In network communications, IP address is the unique identifier of network equipment, which is divided into different types such as Class A and Class B. This article will focus on the difference between Class A and Class B IP addresses. Through concise explanations, it helps readers understand the characteristics and application scenarios of Class A and Class B IP addresses. Whether you are a beginner or a reader who already has some network knowledge, this article can provide you with valuable information. Let’s take a closer look at the differences between Class A and Class B IP addresses!

Every host that uses the TCP/IP protocol has an IP address, just like a city assigns an address number to every street, community, and household so that delivery people can find you. That's what IP addresses are for.

There are three classifications of IP addresses: Class A, Class B and Class C. It can be compared to the way a city is divided. Class A addresses are equivalent to divisions of the entire city, Class B addresses are equivalent to divisions of the city, and Class C addresses are equivalent to street communities.

The IP address is a 32-bit binary number, each 8 bits are represented as a byte, and the corresponding converted decimal range is 0-255. We usually use "dotted decimal notation" to represent IP addresses, that is, each 8-digit binary number is separated by English dots and converted into decimal representation.

a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解

2. Convert binary IP to decimal as shown in the figure below

a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解

3. The format of the IP address is: Network ID Host ID

Network ID: used to identify the network where the host is located;

Host ID: used to identify hosts in this network.

All hosts on the same network use the same network ID, so they are divided into: ADCDE addresses according to different network IDs.

a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解

4. First, look at the ABC class address, which defines which bits are used for the network ID and which classes are used for the host ID. Next The table shows the network ID and host ID fields in these three types of addresses.

a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解

5. Class A

The highest bit must be 0, and the remaining 7 bits constitute the network ID. The remaining 24 bits (the last three octets) are used to represent the host ID.

Address range: 1.0.0.1-126.155.255.254, which can form 126 networks. Each network can have approximately 17,000,000 IP addresses.

Where: 10.X.X.X is the private address (the address used in the local area network).

127.X.X.X is a reserved address and is used for loop testing.

Class B

The highest bit must be "10", and the remaining 14 bits constitute the network ID. The remaining 16 bits (the last two octets) are used to represent the host ID.

Address range
:128.0.0.0-191.255.255.255. There are 16,384 Class B networks available, and each network can have approximately 65,000 IP addresses.

Among them: 172.16.0.0-172.31.255.255 is a private address

169.254.X.X is a reserved address. IP addresses are automatically assigned when there is no Internet connection.

Category C

The highest bit must be "110". The remaining 21 bits constitute the network ID. The remaining 8 bits (the last octet) are used to represent the host ID.

Address range: 192.0.0.0-223.255.255.255. There are approximately 2.09 million Class C networks, and each network can accommodate 254 hosts. There are approximately 2,000,000 networks, each with 254 IP addresses.

Among them: 192.168.X.X is the private address.

a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解

6. Class D address is used for multicast

The highest bit of the Class D IP address must be "lll0" Start with a specifically reserved address. Does not point to a specific network and is used in multicast (Multicast). Multicast addresses are used to address a group of computers at a time, identifying the group of computers that share the same protocol.

Address range: 224.0.0.1—239.255.255.254

a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解

7. Class E address: the highest bit must be "11110"

Address range: 240.0.0.0 -240.255.255.254

a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解

8. IP address allocation follows the following principles:

The network ID cannot be 127, 127. X. It cannot be all 0, all 0 represents the network.

In the same network, the IP address must be unique

a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解a类ip地址和b类区别 秒懂:IP地址ABCDE类的区分详解

The above is the detailed content of The difference between class a IP addresses and class b IP addresses will be understood in seconds: Detailed explanation of the distinction between IP addresses ABCDE class. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tianxiajiu.com. If there is any infringement, please contact admin@php.cn delete