Understanding IPv4 address
IP (Internet Protocol) addresses act as an identifier for a specific machine on a particular network.
- IPv4 addresses are the set of four numbers — an example address might be 184.108.40.206.
- Each number contains one to three digits that are separated with a single dot (.)
- Each number in the set can range from 0 to 255. So, the full IPv4 addressing range goes from 0.0.0.0 to 255.255.255.255
- IPv4 addresses are 32 bits long (4 Byte) and the maximum value of a 32-bit number is 2³²=4,294,967,296. So the maximum number of IPv4 addresses is about 4.3 billion.
The 32 bit IP address is divided into five sub-classes.
- Class A, Class B, Class C, Class D, Class E.
- Classes A, B, C are commonly used, and Class D is only used for multicast, and class E is reserved exclusively for experimental purposes.
Class A Network:
- IP range is (1–127) 220.127.116.11 to 18.104.22.168
- An example of a Class A address is 22.214.171.124.
- Here, “102” helps you identify the network, and 168.212.226 identifies the host.
- Supports 16 million (2²⁴)hosts on each of 127 networks.
- Used for a large number of hosts.
Class B Network:
- IP range is (128 to 191) 126.96.36.199 to 188.8.131.52
- An example of a Class B IP address is 184.108.40.206.
- Here “168.212” identifies the network and “226.204” helps you identify the network host.
- Supports 65,000 (2¹⁶) hosts on each of 16,000 networks.
- Used for medium-size networks.
Class C Network:
- IP range is (192 to 223) 220.127.116.11 to 18.104.22.168
- An example of a Class C IP address is 192.168.178.67
- Here “192.168.178” identifies the network and “67” helps you identify the network host.
- Supports 254 hosts on each of 2 million networks.
- Used for local area network.
Class D Network:
- IP range is (224 to 239) 22.214.171.124 to 126.96.36.199
- An example of a Class D IP address is 188.8.131.52
- Reserve for multi-tasking and never used for regular networking operations.
Class E Network:
- IP range is (240 to 254) 240.0.0.0 to 254.255.255.254
- An example of a Class E IP address is 243.164.89.28
- Reserved for future use, or research and development purposes
IPv4 address breakdown
The binary representation of IP address: 255.255.255.255
From the above picture, it is clear that
- IPv4 addresses always are in a decimal format that humans can read and remember, and IP addresses that are in binary format computers can understand.
- The first octet is always 8 bits or 1 byte and the IPv4 address is made of 4 bytes.
Now let’s understand how 255 = 11111111?
- MSB stands for the most significant bit, while LSB is the least significant bit.
- The positional value of bits is determined by 2 raised to a power (position-1)
- For example, the value of a bit 1 at position 6 is 2^(6–1) that is 2⁵ that is 32.
This was all about the IPv4 address.