5.1.IPv4 Addresses
Last updated
Was this helpful?
Last updated
Was this helpful?
When two devices on a network want to communicate, they need logical addresses (that is, Layer 3 addresses)
Two versions of IP are addressed :
IP Version 4 (IPv4)
IP Version 6 (IPv6)
An IPv4 address is a 32-bit address.
IP address is divided into four separate numbers, separated by periods.
Because each of these four divisions of an IP address represent 8 bits, these divisions are called octets .
For example, Figure below shows the binary representation of the 10.1.2.3 IP address.
An IP address is composed of two types of addresses:
a network address
a host address
The IP address component that determines which bits refer to the network and which bits refer to the host is called the subnet mask.
You can think of the subnet mask as a dividing line separating an IP address’s 32 bits into a group of network bits (on the left) and a group of host bits (on the right).
In total, a subnet mask contains 32 bits, which correspond to the 32 bits found in an IPv4 address.
The 1s in a subnet mask correspond to network bits in an IPv4 address
The 0s in a subnet mask correspond to host bits in an IPv4 address.
The default subnet mask for a given IP address is solely determined by the value in the IP address’s first octet. These ranges of IP address, which you should memorize, are referred to as different classes of addresses.
Classes A, B, and C are those ranges of addresses assigned to network devices.
Class D addresses are used as destination IP addresses (that is, not assigned to devices sourcing traffic) for multicast networks.
Class E addresses are reserved for experimental use.
Address Class
Value in First Octet
Classful Mask
Classful Mask
Class A
1–126
255.0.0.0
/8
Class B
128–191
255.255.0.0
/16
Class C
192–223
255.255.255.0
/24
Class D
224–239
-
-
Class E
240–255
-
-
When an organization is assigned one or more publicly routable IP addresses by its service provider, that organization often needs more IP addresses to accommodate all of its devices. There are 2 solutions :
Private IP addressing within an organization
Network Address Translation (NAT)
Address Class
Address Range
Default Subnet Mask
Class A
10.0.0.0–10.255.255.255
255.0.0.0
Class B
172.16.0.0–172.31.255.255
255.255.0.0
Class B
169.254.0.0–169.254.255.255
255.255.0.0
Class C
92.168.0.0–192.168.255.255
255.255.255.0
The 169.254.0.0–169.254.255.255 address range is not routable. Addresses in the range are only usable on their local subnet and are dynamically assigned to network hosts using the Automatic Private IP Addressing (APIPA) feature.
The number of assignable IP addresses in a subnet can be determined by the following table:
Address Class
Number of host bits
Assignable IP Addresses
Class A
8
16777214
Class B
16
65534
Class C
24
254