Home >Common Problem >What does an IP address consist of?
An IP address consists of a network ID (identifying a network) and a host ID (identifying a specific device). The network ID is expressed as a dotted decimal number, such as 192.168.1.1, where the first three digits are the network ID and the last digit is the host ID. A subnet mask (such as 255.255.255.0) specifies the length of the network ID and host ID. There are types of IP addresses: IPv4, IPv6, private, and public.
Composition of an IP address
An IP address (Internet Protocol address) is a unique numeric label for Identify devices connected to the Internet. It consists of the following two parts:
1. Network ID
Network ID specifies the network to which the device belongs. It differentiates one network from another.
2. Host ID
Host ID specifies the address of a specific device on the network. It distinguishes different devices on the same network.
Representation of IP address
IP address is usually represented in dotted decimal format, where each number represents an 8-bit byte value. For example, 192.168.1.1 is a valid IP address where:
Subnet mask
The subnet mask is used to specify the IP address in the network ID and the length of the host ID. The subnet mask is also a dotted decimal representation, such as 255.255.255.0. It is logically ANDed with the IP address to extract the network ID.
Types of IP Addresses
There are many types of IP addresses, including:
The above is the detailed content of What does an IP address consist of?. For more information, please follow other related articles on the PHP Chinese website!