Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

IPv4 of IP address

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

IPv4 of IP address

In the existing TCP/IP network, each node uses a 32-bit IPv4 address to identify itself.

The IPv4 address consists of a network part and a host part. The network part is uniformly assigned by the IANA to identify different networks, while the host part is assigned by the organization or organization that gets a network address to identify a specific host in a network. IANA divides IP addresses into five categories A, B, C, D and E. It is usually expressed in four dotted decimal systems.

1. Five types of IP addresses

① Class An address (network + master)

1.0.0.0--127.255.255.255

Represent the decimal class An address in 32-bit binary form:

00000001.00000000.00000000.00000000

01111111.11111111.11111111.11111111

The first eight bits of a class An address are the network part, and the last 24 bits are the host part. The first bit, as the class An address boot bit, must be 0.

The class An address 127.0.0.0murmur127.255.255.255 is an IP address used to diagnose whether the network protocol is working, so it is called a loopback address.

The network part is all "0" for the local network, and all "1" is used to reserve diagnostics.

The host part is all "0" to represent the network address of this subnet, and all "1" to represent the broadcast address of this subnet.

Therefore, the valid network range for Class An addresses is 1-126, and the maximum number of hosts per Class A network is 2 to the 24th power-2 (2 to the n-2).

② Class B address (network + network + master + master)

128.0.0.0--191.255.255.255

Represent the decimal class B address in 32-bit binary form:

10000000.00000000.00000000.00000000

10111111.11111111.11111111.11111111

The first sixteen bits of a class B address are the network part and the last sixteen bits are the host part. The first two bits are used as class B address boot bits, which must be 10.

The valid network range for Class B addresses is 128.0-191.255, and the maximum number of hosts per Class B network is 2 to the power of 16-2.

③ Class C address (network + master)

192.0.0.0--223.255.255.255

Represent the decimal class C address in 32-bit binary form:

11000000.00000000.00000000.00000000

11011111.11111111.11111111.11111111

The first 24 bits of a Class C address are the network part, and the last eight bits are the host part. The first three bits as class C address boot bits must be 110.

The valid network range for Class C addresses is 192.0.0-223.255.255, and the maximum number of hosts per Class C network is 2 to the power of 8-2.

④ Class D address

224.0.0.0--239.255.255.255

Class D address is the address used for multicast communication, which is not divided into network bits and host bits. The first four bits are used as class D address boot bits, which must be 1110.

The first eight bits are expressed in binary form:

11100000

11101111

The last 24 bits are used to distinguish between inaccessible multicast groups.

⑤ Class E address

240.0.0.0--254.255.255.255

Class E addresses are used for scientific research and are not divided into network bits and host bits. The first four bits are used as class E address boot bits, which must be 1111.

The first eight bits are expressed in binary form:

11110000

11111110

2. Category A, B, C private addresses

At present, only A, B and C addresses are used on Internet, and in order to meet the needs of enterprise users on Internet, some addresses are drawn from A, B and C addresses for use in the intranet, and these addresses are private addresses. Private addresses cannot be used on Internet.

① Class A Private address

10.0.0.0--10.255.255.255

② Class B Private address

172.16.0.0--172.31.255.255

③ Class C Private address

192.168.0.0--192.168.255.255

3. Special IP address

The host part of ① is all "0"

It represents the local subnet network address, which can be used when a host sends a message to other hosts on the same network segment, and the packet will not be forwarded by the router.

The host part of ② is all "1".

Direct broadcast address. It represents the broadcast address of the subnet. The host uses this address to send an IP Datagram to all devices on the local network segment, and the router forwards the Datagram to all hosts on a particular network. Note: this address can only be used as the destination address in the IP Datagram.

③ 0.0.0.0

This IP address can only be used as the source IP address in the IP Datagram, which occurs when the device boots without knowing its own IP address. It is common in the process of a client getting IP from a DHCP server.

④ 255.255.255.255

Restricted broadcast address. This address is used to define the entire Internet. If the device wants the IP Datagram to be received by the entire Internet, it sends a broadcast packet with a destination address of all 1, but this puts a catastrophic burden on the entire Internet. Therefore, all routers on the network prevent packets of this type from being forwarded, so that such broadcasts are limited to the local network segment.

⑤ loopback address

All addresses on the 127 network segment are called loopback addresses. The main function is to test whether the network protocol is working properly. 127.0.0.1 is called the native loopback address.

⑥ Multicast address

Class D address in the IP category. Multicast communication is to send data packets from a single source address to a group of destination devices. A class D address can only be used as a destination address, not as a source address in a packet. Impassable multicast addresses have different meanings. For example, 224.0.0.1 specifically refers to all hosts, and 224.0.0.2 refers to all routers.

⑦ 169.254.x.x

The IP address of the 169.254.x.x segment is bought out by Microsoft, which is mainly used for the Windows client to automatically assign an IP address of the 169.254.x.x segment when the IP address is not dynamically obtained.

⑧ private address

Private addresses of types A, B and C. Private addresses can only be used on intranets.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report