Overview
This lecture explains the fundamentals of IPv4 addressing, including address classes, subnet masks, private ranges, bit values, and key techniques for subnetting and calculating network, broadcast, and host ranges.
IP Address Classes and Ranges
- IPv4 addresses are grouped into five classes: A, B, C (common), D (multicast), and E (experimental).
- Class A: 1–126 in the first octet, default mask /8 (255.0.0.0).
- Class B: 128–191 in the first octet, default mask /16 (255.255.0.0).
- Class C: 192–223 in the first octet, default mask /24 (255.255.255.0).
- Class D: 224–239 (multicast); Class E: 240–255 (experimental), not used in typical applications.
- 0.x.x.x is reserved (default route) and 127.x.x.x is reserved for loopback testing.
Private IP Address Ranges
- Private Class A: 10.0.0.0 – 10.255.255.255, default mask /8.
- Private Class B: 172.16.0.0 – 172.31.255.255, default mask /12.
- Private Class C: 192.168.0.0 – 192.168.255.255, default mask /16.
- Private IPs are not routable on the internet and require NAT for external access.
Subnetting Basics and Bit Values
- An IPv4 address has 4 octets (8 bits each), for a total of 32 bits.
- Subnetting separates network and host portions using a subnet mask (expressed as a "CIDR" notation, e.g., /24).
- Key octet bit values: 128, 64, 32, 16, 8, 4, 2, 1.
- To calculate subnets or hosts, use bit values to determine increments and available addresses.
Calculating Network, Broadcast, and Host Ranges
- The subnet increment is determined by the bit value at the subnet mask's division.
- Network ID: starting address of the subnet.
- Broadcast address: last address in the subnet (network ID + increment - 1).
- Usable host range: addresses between network ID + 1 and broadcast - 1.
- For given host requirements, count bits from right; subtract 2 for network and broadcast addresses.
- For given subnet requirements, count bits from left.
Mask and CIDR Calculation Examples
- Common subnet masks: /28 = 255.255.255.240, /20 = 255.255.240.0, /12 = 255.240.0.0.
- Use bit-to-decimal conversion to quickly derive subnet masks.
- Always focus on the octet where the "line" (division between network/host) falls for calculations.
Subnetting Practice Example
- For a mask of 255.255.254.0: 128 subnets, 510 hosts per subnet.
- Find network, broadcast, and valid host ranges by incrementing the relevant octet and applying bit values.
Key Terms & Definitions
- Octet — 8 bits in an IP address (there are 4 per IPv4 address).
- CIDR (Classless Interdomain Routing) — Notation (e.g., /24) showing the number of network bits in a subnet mask.
- Network ID — The first address in a subnet, identifies the subnet itself.
- Broadcast Address — Last address in a subnet, used to communicate with all hosts in that subnet.
- Private IP Address — IP addresses not routable on the internet, used in internal networks.
- Subnet Mask — 32-bit number dividing the network and host portions of an IP address.
Action Items / Next Steps
- Memorize IP class ranges, private IP ranges, default masks, and bit values.
- Practice subnetting calculations using increment and bit value methods.
- Prepare for upcoming lectures on VLSM and route summarization.