6.1 IPv4 Address Structure Flashcards
IPv4 ADDRESS
An IPv4 address is a 32-bit hierarchical address that is made up of a network portion and a host portion.
When determining the network portion versus the host portion, you must look at the 32-bit stream.
NETWORK PORTION
The bits within the network portion of the address must be identical for all devices that reside in the same network.
If two hosts have the same bit-pattern in the specified network portion of the 32-bit stream, those two hosts will reside in the same network.
HOST PORTION
The bits within the host portion of the address must be unique to identify a specific host within a network.
SUBNET MASK
The subnet mask determines which portion of the 32-bits identifies the network and which identifies the host.
Assigning an IPv4 address to a host requires the following:
IPv4 address - This is the unique IPv4 address of the host.
Subnet mask- This is used to identify the network/host portion of the IPv4 address.
Note: A default gateway IPv4 address is required to reach remote networks and DNS server IPv4 addresses are required to translate domain names to IPv4 addresses.
The IPv4 subnet mask is used to differentiate the network portion from the host portion of an IPv4 address. When an IPv4 address is assigned to a device, the subnet mask is used to determine the network address of the device.
The network address represents all the devices on the same network.
To identify the network and host portions of an IPv4 address, the subnet mask is compared to the IPv4 address bit for bit, from left to right.
Note that the subnet mask does not actually contain the network or host portion of an IPv4 address, it just tells the computer where to look for the part of the IPv4 address that is the network portion and which part is the host portion.
ANDing
The actual process used to identify the network portion and host portion is called ANDing.
PREFIX LENGTH
Is a method of identifying a subnet mask.
The prefix length is the number of bits set to 1 in the subnet mask. It is written in “slash notation”, which is noted by a forward slash (/) followed by the number of bits set to 1.
Therefore, count the number of bits in the subnet mask and prepend it with a slash.
Note: A network address is also referred to as a prefix or network prefix. Therefore, the prefix length is the number of 1 bits in the subnet mask.
When representing an IPv4 address using a prefix length, the IPv4 address is written followed by the prefix length with no spaces.
Logical AND
A logical AND is one of three Boolean operations used in Boolean or digital logic. The other two are OR and NOT. The AND operation is used in determining the network address.
Logical AND is the comparison of two bits that produce the results shown below. Note how only a 1 AND 1 produces a 1. Any other combination results in a 0.
1 AND 1 = 1
0 AND 1 = 0
1 AND 0 = 0
0 AND 0 = 0
Note: In digital logic, 1 represents True and 0 represents False. When using an AND operation, both input values must be True (1) for the result to be True (1).
To identify the network address of an IPv4 host, the IPv4 address is logically ANDed, bit by bit, with the subnet mask.
ANDing between the address and the subnet mask yields the network address.
The AND operation between an IPv4 host address and subnet mask results in the IPv4 network address for this host.
This is an important IPv4 operation, as it tells the host what network it belongs to.
To calculate how many unique addresses are available with a given network and subnet mask use the following formula:
2^n - 2 = number of addresses