IPv4 and IPv6
IPv4 uses 32-bits for addresses;there are only 4.3 bilion unique addresses available.
IPv6 uses 128-bits for addresses; this allows for 3.4 * 10^38 unique addresses.
One reason IPv4 has not disappeared is there are widely-used ways t o effectively make many more addresses available by methods such as NAT(Network Address Translation). NAT enables sharing one IP address among many locally connected computers, each of which has a unique address only seen on the local network.
Decoding IPv4 Addresses
A 32-bit IPv4 address is divided into four 8-bit sections called octets
Octet is just another word for byte.
Class A Network Addresses
first bit of the first octet is always set to zero. As the use of the Internet expanded, B, C were added in order to accommodate the growing demand for independent networks.
0| …
class B
10: …
class C
110: … network bit is 21-bits (almost 2.1 million) these are most common for smaller networks which don’t have many unique hosts.
each class C network can support up to 256 unique hosts.
range of host addresses is from 192.0.0.0 to 223.255.255.255
IP Address Allocation
Typecally, a range of IP addresses are requested from your Internet Service Provider (ISP) by your organization’s network administrator. Often, your choice of which class of IP address you are given depends on the size of your network and expected growth needs. If NAT is in operation, such as in a home network, you only get one externally visible address!
Name Resolution
is used to convert numerical IP address values into a human-readable format known as the hostname.
The special hostname localhost is associated with the IP address 127.0.0.1 and describes the machine you are currently on (which normally has additional network-related IP addresses).