Summary
Highlights
The video introduces logical ANDing, a process used by routers in classless IP addressing to determine the network portion of a destination IP address. Routers no longer rely on IP address classes but instead use a subnet mask to perform this operation. A logical AND gate outputs a 1 only if both inputs are 1; otherwise, it outputs a 0. This principle is fundamental to how IP addresses are masked.
Two key rules for logical ANDing with IP addresses are introduced: 1. ANDing any number with 255 results in the same number. 2. ANDing any number with 0 results in 0. These rules simplify the process of calculating the network portion of an IP address when dealing with masks that have 255 or 0 in their octets.
The video demonstrates how to apply logical ANDing by taking an IP address (e.g., 192.168.10.165) and logically ANDing it with a subnet mask (e.g., 255.255.255.224). The first three octets, when ANDed with 255, remain unchanged. The last octet (165 ANDed with 224) requires binary conversion to determine the result, which in this example is 160. This effectively masks the host portion of the IP address, revealing the network portion.
Subnet masks are often represented using slash notation (CIDR notation), indicating the number of '1' bits in the mask. For instance, a /27 mask means there are 27 continuous '1' bits. The video explains how to convert this slash notation into the dotted decimal format of a subnet mask by counting '1's and then converting the remaining bits to their decimal equivalent. A chart is provided to quickly convert the number of '1's in an octet to its decimal value.
An example demonstrates finding the network portion of an IP address (192.168.10.170) with a /27 subnet mask. First, the /27 is converted to its dotted decimal form (255.255.255.224). Then, each octet of the IP address is logically ANDed with the corresponding octet of the subnet mask. The result (192.168.10.160) is the network address, where the host portion has been forced to zero by the mask. It's noted that network addresses cannot be assigned to individual hosts.