Summary
Highlights
Subnetting involves breaking a large network into smaller ones to improve performance and security. A single large broadcast domain leads to performance drops as every device must process all broadcast messages, such as ARP requests. Security is also enhanced by limiting the scope of broadcast traffic within smaller, more manageable segments. Proper subnetting facilitates easier administration and faster data communication.
Given a network address with a /25 prefix, the first 25 bits represent the network, leaving 7 bits for hosts. With 7 host bits, 2^7 = 128 possible addresses. However, two addresses are reserved (one for the network address and one for the broadcast address), leaving 126 usable host addresses. This concept applies to other subnet masks; for example, a /26 prefix accommodates up to 62 hosts, and a /27 prefix accommodates up to 30 hosts.
VLSM allows for efficient IP address allocation by matching the subnet mask to the exact number of hosts required. Increasing the prefix length (e.g., from /25 to /26) decreases the number of available host addresses while increasing the number of network bits. This optimizes address usage and prevents wastage. The video introduces a scenario where three networks (LAN A, LAN B, and a link between routers) each require a different number of hosts.
To determine the number of networks in a topology, count the interfaces on the routers. Each LAN connected to a router interface constitutes a network, and the link connecting two routers also forms a network. In the example, there are three networks: LAN A, LAN B, and the WAN link between the routers. Each network has specific host requirements: LAN A needs 60 hosts, LAN B needs 20 hosts, and the link needs 2 hosts.
To subnet (assuming a /24 or higher prefix), start by addressing the network with the largest host requirement. For 60 hosts, a /26 subnet mask is chosen because it accommodates up to 62 hosts (2^6 - 2 = 62). The next step is to calculate the number of subnets and the block size. Subtract the original prefix length (e.g., /25) from the new prefix length (e.g., /26), which gives 1. Then, calculate 2^1 = 2, indicating two subnets can be created. The block size is calculated by subtracting the last octet of the new subnet mask from 256 (e.g., 256 - 192 = 64). This block size determines the increment between network addresses.
Using the base address (e.g., 192.168.10.128) and the block size (64), the first subnet is 192.168.10.128/26, and the next is 192.168.10.192/26. For the first subnet, the first valid host address is 192.168.10.129. The last valid host address is found by subtracting two from the next network's address (192.168.10.192 - 2 = 192.168.10.190). The broadcast address is 192.168.10.191. This process is documented in a chart to keep track of network, first host, last host, and broadcast addresses, along with the subnet mask.