xxxis a value from 0 to 255. But another way to express them is as a 4-tuple of octets, which is an 8-bit segment since 2⁸=256. Here is the same IPv4 address in both dot-notation and 4-tuple octet.
xxxxis a hexadecimal value. We can express them as an 8-tuple of 16-bit segments. Here is the same IPv6 address as an 8-tuple of 16 bits.
0.In dot-notation, this is the range
127.255.255.255. The first 8 bits represent the network prefix and the rest represents the host identifier. For example,
127.42.13.69has network prefix
127and host identifier
10. In dot-notation, this is the range
184.108.40.206. The first 16 bits represent the network prefix and the rest represent the host identifier. For example,
220.127.116.11has network prefix
129.42and host identifier
110. In dot-notation, this is the range
18.104.22.168. The first 24 bits represent the network prefix and the rest represent the host identifier. For example,
22.214.171.124has network prefix
196.13.42and host identifier
1110. In dot-notation, this is the range
126.96.36.199. These addresses are used for multi-casting protocols (ie. when a single packet can be sent to multiple hosts in one action)
1111. In dot-notation, this the range
255.255.255.255. These addresses are reserved for future and experimental use.
127.255.255.255is reserved for looping back, which is when a host sends a network request to itself. Sometimes we want a program on a host to connect back to itself for debugging or development purposes.
10.0.0.0 — 10.xxx.xxx.xxx,
172.16.0.0 — 172.31.xxx.xxx, and
192.168.0.0 — 192.168.xxx.xxxare designated private network addresses, meaning they can be assigned to computers which must go through the Network Address Translation (NAT) protocol to connect to the Internet. It’s private IPs that make it possible for over 8 billion devices to connect with only about 4 billion IPv4 address (2³² =~ 4 billion).
1for every position that corresponds to a network prefix, and
0otherwise. In other words, we get the network prefix through bit-wise multiplication of the IP address and the netmask.
11111111 00000000 00000000 00000000as binary or
11111111 11111111 00000000 00000000as binary or
11111111 11111111 11111111 00000000as binary or