639 Networking: Addressing and Subnetting
639.1 Overview
This comprehensive guide to IP addressing and subnetting has been organized into focused chapters for easier learning. Each chapter covers a specific aspect of network addressing essential for IoT deployments.
Core concept: Every device on a network needs a unique IP address, and subnets divide large networks into manageable segments using masks that separate the βnetworkβ from βhostβ portions of addresses.
Why it matters: Incorrect IP addressing causes silent failures - devices simply cannot communicate, with no helpful error messages to diagnose the problem.
Key takeaway: Use private IP ranges (10.x.x.x, 172.16-31.x.x, 192.168.x.x) for internal IoT networks, and plan /24 subnets (254 hosts) per floor, building, or sensor type.
639.2 Chapter Guide
Select the chapter that matches your learning goals:
639.2.1 IPv4 Addressing Fundamentals
Topics: 32-bit address structure, binary conversion, address classes (historical), private IP ranges (RFC 1918), special-purpose addresses, MAC address OUI
Best for: Understanding the building blocks of IP addressing
639.2.2 Subnetting and CIDR
Topics: Subnet masks, network/host division, CIDR notation, calculating network and broadcast addresses, VLSM, IoT subnet design patterns
Best for: Learning to divide networks and plan efficient address allocation
639.2.3 Port Numbers and NAT
Topics: Port number ranges (well-known, registered, ephemeral), IoT protocol ports (MQTT, CoAP, HTTP), 5-tuple connections, NAT translation, NAT traversal patterns for IoT
Best for: Understanding service identification and internet connectivity for IoT
639.2.4 IPv6 for IoT
Topics: 128-bit addresses, compression rules, address types (global, link-local, unique-local), 6LoWPAN header compression, SLAAC, IPv4/IPv6 transition strategies
Best for: Preparing for next-generation IoT networks and Thread/Matter protocols
639.2.5 DHCP and Address Resolution
Topics: DHCP DORA process, lease management, DHCP options, DHCP reservations, ARP for IPv4, Neighbor Discovery for IPv6, troubleshooting IP conflicts
Best for: Configuring automatic IP assignment and understanding address resolution
639.3 Learning Objectives (Complete Guide)
By completing all chapters, you will be able to:
- Assign IP Addresses: Configure IPv4 and IPv6 addresses for IoT devices and networks
- Design Subnets: Calculate subnet masks and plan network segmentation for IoT deployments
- Configure Port Numbers: Identify and use standard ports for IoT protocols (MQTT, CoAP, HTTP)
- Implement NAT and DHCP: Set up address translation and automatic IP assignment for device networks
- Plan Private Networks: Design internal networks using RFC 1918 private address ranges
- Troubleshoot Addressing Issues: Diagnose IP conflicts, routing problems, and connectivity failures
639.4 Prerequisites
Before diving into these chapters, you should be familiar with:
- Networking Basics: Foundation in networking concepts, IP addressing fundamentals, and protocol basics
- Network Mechanisms: Understanding how datagrams, packet switching, and network communication work
- Layered Network Models: Knowledge of where addressing operates within the OSI/TCP-IP models (primarily Layer 3 - Network Layer)
639.5 Quick Reference
639.5.1 Private IP Ranges (RFC 1918)
| Range | CIDR | Addresses | Typical Use |
|---|---|---|---|
| 10.0.0.0 - 10.255.255.255 | /8 | 16.7 million | Large enterprise, smart cities |
| 172.16.0.0 - 172.31.255.255 | /12 | 1 million | Medium industrial networks |
| 192.168.0.0 - 192.168.255.255 | /16 | 65,536 | Home automation, small buildings |
639.5.2 Common IoT Ports
| Protocol | Port | Transport | Use Case |
|---|---|---|---|
| MQTT | 1883 | TCP | Lightweight messaging |
| MQTT/TLS | 8883 | TCP | Secure MQTT |
| CoAP | 5683 | UDP | Constrained devices |
| HTTP | 80 | TCP | Web interfaces |
| HTTPS | 443 | TCP | Secure web/APIs |
639.5.3 Subnet Quick Reference
| CIDR | Usable Hosts | Use Case |
|---|---|---|
| /30 | 2 | Point-to-point links |
| /28 | 14 | Small room automation |
| /27 | 30 | Single floor |
| /26 | 62 | Medium building floor |
| /24 | 254 | Standard building network |
| /22 | 1,022 | Large campus |