627  Networking Basics: Reference and Glossary

627.1 Learning Objectives

By the end of this chapter, you will be able to:

  • Master Core Terminology: Define and apply essential networking terms
  • Compare Protocol Stacks: Understand how IoT protocols map to network layers
  • Apply Network Concepts: Use reference tables to solve real-world IoT problems
  • Pass Comprehensive Assessments: Demonstrate mastery through advanced MCQ questions

627.2 Prerequisites

Before using this reference, ensure you have completed:


627.4 Key Concepts Reference

These are the essential networking concepts you should be able to explain and apply:

  • OSI Model: 7-layer theoretical framework for network communication (Physical, Data Link, Network, Transport, Session, Presentation, Application)
  • TCP/IP Model: 4-layer practical model actually used on the internet (Link, Internet, Transport, Application)
  • IPv4 Addressing: 32-bit addresses (e.g., 192.168.1.100) with public, private, and reserved ranges; facing exhaustion
  • IPv6 Addressing: 128-bit addresses (e.g., 2001:0db8:85a3::8a2e:0370:7334) with virtually unlimited space for IoT devices
  • MAC Addresses: 48-bit hardware identifiers (Layer 2) for local network communication; format: AA:BB:CC:DD:EE:FF
  • TCP vs UDP: TCP provides guaranteed delivery with higher overhead; UDP offers speed with best-effort delivery
  • Network Topologies: Point-to-point, star, mesh, and tree/hierarchical arrangements each with different trade-offs
  • MQTT and CoAP: Application-layer protocols; MQTT uses TCP (port 1883) for reliable messaging, CoAP uses UDP (port 5683) for constrained devices
  • Network Troubleshooting: Systematic layer-by-layer approach from Physical (signal strength, obstacles) to Application (DNS, ports)
  • IoT Security: Default credential changes, TLS encryption, network segmentation, firmware updates, and minimal port exposure
  • RSSI: Received Signal Strength Indicator in dBm; values above -70 dBm are considered good for reliable connections
  • Bandwidth and Latency: IoT data is typically small; sensor readings measured in bytes not megabytes; optimize for constrained networks

627.5 Comprehensive Quiz

Test your mastery with these advanced scenario-based questions.

Question 1: An IoT gateway bridges a Zigbee sensor network (PAN) to a cloud server via the internet (WAN). At which OSI layer does the gateway primarily operate to perform this routing function?

Explanation: The gateway operates as a Layer 3 (Network layer) router, forwarding packets between different networks based on IP addresses. Process: (1) Zigbee sensor sends data on 2.4 GHz radio (Layers 1-2) with 6LoWPAN compressed IPv6 header (Layer 3). (2) Gateway decapsulates to Layer 3, examines destination IP address. (3) Gateway re-encapsulates with Ethernet/Wi-Fi Layer 2 headers and forwards toward internet. (4) Cloud server receives packet. Why Layer 3? Routing decisions use IP addresses (Layer 3). Layer 2 switches forward based on MAC addresses within a single network segment - cannot bridge different network technologies. Layer 1 only handles physical signals - no routing intelligence. Layer 4 (TCP/UDP) ensures end-to-end reliability but doesn’t make forwarding decisions. Many IoT gateways also perform protocol translation (MQTT to HTTP), data aggregation, and security functions, but the core routing function is Layer 3.

Question 2: A factory’s industrial IoT network has strict latency requirements for machine control (<10ms). Which network topology provides the most predictable and lowest latency, and why?

Explanation: Wired star with switch provides most predictable latency for industrial control. Why wired beats wireless: Wireless (Wi-Fi, Zigbee) has variable latency from channel contention (CSMA/CA), interference, retransmissions, hidden node problems. In factory with 50 devices, a device might wait 5-50ms for channel access - unpredictable. Wired Ethernet with switch: Dedicated bandwidth per port, simultaneous transmissions (full-duplex), microsecond forwarding latency. Switch benefits: Stores and forwards frames only to destination port (no collisions), buffers handle burst traffic, supports VLANs for traffic separation. Industrial protocols (PROFINET, EtherNet/IP, EtherCAT) rely on wired Ethernet’s determinism for real-time control. Mesh wireless topology: While resilient, multi-hop routing adds variable latency (each hop = 1-10ms + queuing delays). For 10ms total budget, 3-hop mesh path is risky. Industrial best practice: Wired switched Ethernet backbone, wireless only for non-critical sensors. For <1ms latency, use Time-Sensitive Networking (TSN) extensions to Ethernet.

Question 3: A smart building uses the OSI model’s layered approach. If you need to replace Zigbee (Layer 2) with Thread (Layer 2) while keeping IPv6 addressing (Layer 3) and MQTT (Layer 7) unchanged, which concept enables this modularity?

Explanation: Layer independence is the OSI model’s core principle - each layer provides services to the layer above through well-defined interfaces, hiding implementation details. Your scenario: Before: MQTT (Layer 7) -> TCP (Layer 4) -> IPv6 (Layer 3) -> Zigbee (Layer 2) -> 2.4 GHz radio (Layer 1). After: MQTT (Layer 7) -> TCP (Layer 4) -> IPv6 (Layer 3) -> Thread (Layer 2) -> 2.4 GHz radio (Layer 1). Only Layer 2 changes; Layers 3-7 unchanged. How it works: IPv6 (Layer 3) doesn’t care if Layer 2 is Zigbee, Thread, Ethernet, or Wi-Fi - it simply hands packets to Layer 2 and says “deliver to next hop.” MQTT application sees same IPv6 addresses, same TCP reliability, unchanged. Real-world benefit: You can upgrade building’s sensor network from Zigbee to Thread (better mesh routing, more vendors) without modifying applications, reconfiguring IP addresses, or changing MQTT broker. This modularity is why IP-based IoT is winning over proprietary approaches.

Question 4: A building automation system uses a bus topology with 50 devices. A new HVAC controller is added. Compared to a star topology with a switch, what is the primary disadvantage?

Explanation: Bus topology disadvantages: Single point of failure: One break in bus cable disconnects all devices downstream. In 50-device system, maintenance risk is high. Collision domain: All 50 devices share same medium, compete for access using CSMA/CD. With 51st device, collision probability increases. More collisions = more retransmissions = lower throughput. Example: At 30% load, 10 devices might have 5% collision rate. At 70% load, 50 devices might have 40% collision rate (exponential increase). No simultaneous communication: Only one device transmits at a time. Star topology with switch advantages: No single point of failure: One cable break affects only that device; others function normally. No collisions: Switch provides dedicated bandwidth per port (full-duplex), simultaneous bidirectional communication. 50 devices x 100 Mbps = 5 Gbps aggregate bandwidth. Scalability: Adding 51st device doesn’t degrade others’ performance. Historical note: Early Ethernet (10BASE2, 10BASE5) used bus topology - frequent “network down” incidents led to switched Ethernet dominance.

Question 5: Which characteristics accurately describe the TCP/IP model’s practical advantages for IoT networking? Select ALL that apply.

Explanation: TCP/IP practical advantages: Reduced layers (B): TCP/IP has 4 layers (Application, Transport, Internet, Link) compared to OSI’s 7 layers. OSI’s Session (Layer 5), Presentation (Layer 6), and Application (Layer 7) are combined into TCP/IP’s single Application layer. This simplification reduces implementation complexity - protocols like MQTT and CoAP handle their own session management and data formatting without separate layers. For resource-constrained IoT devices, fewer layers mean less memory and processing overhead. Practical implementation (D): TCP/IP is the de facto internet standard. All internet routers, switches, and devices implement TCP/IP. When building IoT systems that communicate over the internet or local networks, you use TCP/IP protocols (IPv4/IPv6, TCP/UDP, HTTP/MQTT). OSI is a theoretical reference model for teaching and documentation, but production code implements TCP/IP. Incorrect: TCP/IP has fewer layers (A is false): 4 layers, not 8. Not all layers require connections (C is false): Only TCP at Transport layer is connection-oriented. UDP is connectionless. Link and Internet layers are stateless.

Question 6: Which statements correctly describe network layer (Layer 3) functions in IoT systems? Select ALL that apply.

Explanation: Network layer (Layer 3) functions: Routing (A): Primary function is routing packets between different networks. Routers operate at Layer 3, examining destination IP addresses to determine next hop. Home router routes between LAN (192.168.1.0/24) and internet (WAN). IoT gateways route between sensor networks (Zigbee, BLE) and IP networks (Wi-Fi, Ethernet). IPv6 solving exhaustion (C): IPv4 has 32-bit addresses (4.3 billion possible). With 50+ billion IoT devices projected, IPv4 is exhausted. IPv6 has 128-bit addresses (340 undecillion = 3.4x10^38 possible addresses) - enough for every grain of sand on Earth to have millions of addresses. Each IoT sensor can have globally routable address without NAT. Network layer protocols (D): IPv4/IPv6: Addressing and routing. ICMP: Internet Control Message Protocol for diagnostics (ping, traceroute). RPL: Routing Protocol for Low-Power and Lossy Networks - designed specifically for IoT mesh networks. Incorrect: Encryption is not Layer 3 (B is false): Encryption occurs at Layer 6 (Presentation) via TLS/SSL or Layer 7 (Application) via protocol-specific security.

Question 7: A smart home has 50 IoT devices using private IP addresses (192.168.1.0/24). The ISP provides one public IP address (203.0.113.42). When devices communicate with cloud servers, how does Network Address Translation (NAT) enable this, and what is the primary limitation for IoT?

Explanation: NAT (Network Address Translation) operation: Router maintains translation table mapping private IP:port -> public IP:port. Outbound connection example: Smart camera (192.168.1.50:5000) sends video to cloud (1.2.3.4:443). NAT router translates source to (203.0.113.42:50123) before forwarding. Cloud response to 203.0.113.42:50123 is translated back to 192.168.1.50:5000. Router tracks these mappings in state table. Multiple devices share single public IP using different port numbers. Critical limitation for IoT: No direct inbound connections. External devices can’t initiate connection to 192.168.1.50:5000 because that IP is not globally routable. NAT router has no translation entry for unsolicited inbound packets. Workarounds: 1) Port forwarding: Manually configure router to forward external port 8080 to 192.168.1.50:80 (security risk - exposes device). 2) UPnP/NAT-PMP: Automatic port forwarding. 3) Cloud relay: Device maintains persistent outbound connection to cloud; cloud relays commands to device. 4) VPN: Secure tunnel into home network. 5) IPv6: Every device gets globally routable address, no NAT needed.


627.6 Quick Glossary

This glossary provides quick definitions for essential networking concepts used throughout this chapter.

Term Definition Example/Context
IP Address Unique numerical identifier for a device on a network IPv4: 192.168.1.100, IPv6: 2001:db8::1
MAC Address Hardware address burned into network interface card (NIC) 00:1A:2B:3C:4D:5E (48 bits, Layer 2)
Port Number 16-bit number identifying application/service on a device HTTP: 80, HTTPS: 443, MQTT: 1883
Router Layer 3 device that forwards packets between different networks Home router connects LAN to internet
Switch Layer 2 device that forwards frames within same network Connects multiple devices in LAN
Gateway Device connecting different network types/protocols IoT gateway: Zigbee sensors -> Wi-Fi -> cloud
NAT Network Address Translation, maps private IPs to single public IP 192.168.1.x -> 203.0.113.42:port
Subnet Logical subdivision of IP network for organization/security Home: 192.168.1.0/24 (256 addresses)
Subnet Mask Defines which portion of IP is network vs host 255.255.255.0 = /24 (first 3 octets = network)
DNS Domain Name System, converts names to IP addresses iot.example.com -> 203.0.113.42
DHCP Dynamic Host Configuration Protocol, assigns IPs automatically Router assigns 192.168.1.100 to new device
Packet Unit of data at Layer 3 (Network), contains IP headers IP packet = header + payload
Frame Unit of data at Layer 2 (Data Link), contains MAC addresses Ethernet frame = preamble + header + payload + FCS
Datagram UDP packet (connectionless) Sensor sends UDP datagram with reading
Segment TCP packet (connection-oriented) TCP segment = header + data + checksum
MTU Maximum Transmission Unit, largest packet size without fragmentation Ethernet: 1500 bytes, LoRaWAN: 51-242 bytes
Bandwidth Maximum data transfer rate of a connection Wi-Fi 802.11ac: up to 1.3 Gbps
Latency Time delay for packet to travel from source to destination Wi-Fi: 2-5ms, LoRaWAN: 1-10 seconds
Throughput Actual data rate achieved (always < bandwidth) 100 Mbps link might achieve 85 Mbps throughput
Protocol Set of rules governing communication between devices TCP, UDP, IP, MQTT, CoAP
TCP Transmission Control Protocol, reliable connection-oriented transport HTTP, MQTT, FTP use TCP (Layer 4)
UDP User Datagram Protocol, unreliable connectionless transport DNS, CoAP, streaming video use UDP
IPv4 Internet Protocol version 4, 32-bit addresses (4.3 billion) 192.168.1.1, exhausted for IoT scale
IPv6 Internet Protocol version 6, 128-bit addresses (340 undecillion) 2001:0db8:85a3::8a2e:0370:7334
6LoWPAN IPv6 over Low-power Wireless PANs, compresses IPv6 for 802.15.4 40-byte IPv6 header -> 2-8 bytes
OSI Model 7-layer reference model for network protocols Physical, Data Link, Network, Transport, Session, Presentation, Application
TCP/IP Model 4-layer practical internet model Link, Internet, Transport, Application
Topology Description Pros Cons IoT Use Case
Star All devices connect to central hub/switch Easy to add devices, failure isolated Hub is single point of failure Wi-Fi access point, home network
Mesh Devices interconnect with multiple paths Redundant, self-healing Complex routing, more power Zigbee, Thread, WSN
Bus All devices on single cable Simple, cheap Collisions, single point of failure CAN bus (automotive)
Tree Hierarchical star networks Scalable, organized Central points of failure Industrial networks, buildings
Ring Devices in closed loop Predictable latency Break disrupts all Rarely used in IoT
Layer Name Function Protocols IoT Examples
7 Application User applications, APIs HTTP, MQTT, CoAP Sensor data APIs
6 Presentation Data format, encryption TLS, SSL, JSON Data serialization
5 Session Connection management NetBIOS, RPC Session establishment
4 Transport End-to-end delivery TCP, UDP Reliable vs fast delivery
3 Network Routing between networks IP, ICMP, RPL Internet routing
2 Data Link Local delivery, MAC Wi-Fi, Ethernet, BLE Wireless protocols
1 Physical Physical transmission Radio waves, cables 2.4 GHz, sub-GHz
Feature TCP UDP When to Use
Connection Connection-oriented (3-way handshake) Connectionless TCP: Critical data; UDP: Real-time
Reliability Guaranteed delivery, retransmissions Best-effort, no guarantees TCP: Commands; UDP: Streaming
Ordering In-order delivery No ordering guarantee TCP: File transfer; UDP: Gaming
Overhead 20+ bytes header, state management 8 bytes header, no state TCP: MQTT; UDP: CoAP, DNS
Speed Slower (reliability mechanisms) Faster (no handshake) TCP: Cloud sync; UDP: Voice
Use Cases HTTP, MQTT, FTP, email DNS, CoAP, streaming, VoIP TCP: Accuracy; UDP: Latency

%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#7F8C8D'}}}%%
graph TB
    subgraph MQTT["MQTT over Wi-Fi"]
        M7["Layer 7: MQTT<br/>(Application)"]
        M4["Layer 4: TCP<br/>(Transport)"]
        M3["Layer 3: IPv4/IPv6<br/>(Network)"]
        M2["Layer 2: Wi-Fi 802.11<br/>(Data Link)"]
        M1["Layer 1: 2.4 GHz radio<br/>(Physical)"]
        M7 --> M4 --> M3 --> M2 --> M1
    end

    subgraph CoAP["CoAP over 6LoWPAN"]
        C7["Layer 7: CoAP<br/>(Application)"]
        C4["Layer 4: UDP<br/>(Transport)"]
        C3["Layer 3: IPv6 + 6LoWPAN<br/>(Network)"]
        C2["Layer 2: 802.15.4<br/>(Data Link)"]
        C1["Layer 1: 868/915 MHz<br/>(Physical)"]
        C7 --> C4 --> C3 --> C2 --> C1
    end

    subgraph LoRa["LoRaWAN"]
        L7["Layer 7: App Payload<br/>(Custom Format)"]
        L43["Layer 4-3: LoRaWAN MAC<br/>(Combined)"]
        L21["Layer 2-1: LoRa PHY<br/>(Modulation)"]
        L7 --> L43 --> L21
    end

    style M7 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
    style M4 fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
    style M3 fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
    style M2 fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff
    style M1 fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff

    style C7 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
    style C4 fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
    style C3 fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
    style C2 fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff
    style C1 fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff

    style L7 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
    style L43 fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
    style L21 fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff

Figure 627.1: Three common IoT protocol stacks compared: MQTT over Wi-Fi (full TCP/IP), CoAP over 6LoWPAN (constrained IPv6), and LoRaWAN (simplified LPWAN) {fig-alt=“Comparison of three IoT protocol stacks. MQTT over Wi-Fi uses 5 layers: MQTT application, TCP transport, IPv4/IPv6 network, Wi-Fi 802.11 data link, and 2.4 GHz physical. CoAP over 6LoWPAN uses 5 layers: CoAP application, UDP transport, IPv6 with 6LoWPAN compression network, 802.15.4 data link, and 868/915 MHz physical. LoRaWAN uses simplified 3-layer stack: Application payload, combined LoRaWAN MAC for transport and network, and LoRa modulation for data link and physical layers.”}
Class Range Default Mask Typical Use
A 1.0.0.0 - 126.0.0.0 /8 (255.0.0.0) Large enterprises
B 128.0.0.0 - 191.255.0.0 /16 (255.255.0.0) Medium networks
C 192.0.0.0 - 223.255.255.0 /24 (255.255.255.0) Small networks, home
Private 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 Various Internal networks, NAT
Loopback 127.0.0.1 /8 Testing on same device
Link-Local 169.254.0.0/16 /16 Auto-config (no DHCP)
Port Protocol Service IoT Relevance
80 TCP HTTP Web APIs, REST endpoints
443 TCP HTTPS Secure web, cloud APIs
1883 TCP MQTT IoT messaging (unencrypted)
8883 TCP MQTTS MQTT over TLS/SSL
5683 UDP CoAP Constrained devices
5684 UDP CoAPS CoAP over DTLS
8080 TCP HTTP Alt Alternate web port
123 UDP NTP Time synchronization
53 UDP/TCP DNS Domain name resolution
22 TCP SSH Secure shell access
502 TCP Modbus Industrial IoT
5353 UDP mDNS Local device discovery
RSSI (dBm) Quality Description IoT Impact
-30 to -50 Excellent Very close to AP/gateway Max throughput, reliable
-50 to -60 Good Normal operating range Good performance
-60 to -70 Fair Distant, obstacles Reduced speed, occasional drops
-70 to -80 Poor Edge of range Frequent reconnections
< -80 Very Poor Out of range Connection unstable/impossible

627.7 Chapter Summary

Networking is the foundation of IoT - without connectivity, you have isolated devices instead of the “Internet of Things.” This reference chapter consolidated essential networking concepts for IoT developers.

Core Concepts Covered:

We explored the OSI and TCP/IP models, understanding how they structure network communication from physical transmission through application-level protocols. While OSI provides a 7-layer theoretical framework, TCP/IP’s 4-layer practical model reflects what actually runs on the internet.

IP addressing is central to IoT. IPv4’s 4.3 billion addresses are exhausted, making IPv6 critical for IoT’s future with its 340 undecillion possible addresses. Private IPv4 ranges enable local networks, while NAT translates between private and public addresses.

Transport protocols determine reliability vs. speed trade-offs: TCP guarantees delivery with higher overhead, while UDP prioritizes speed with best-effort delivery. For IoT, UDP is often preferred for sensor readings where occasional loss is acceptable.

Network topologies significantly impact system design. Star topology is simple but creates single points of failure. Mesh topology is self-healing and extends range but adds routing complexity.

Key Takeaways:

  • OSI provides theoretical framework; TCP/IP is practical implementation
  • IPv6 solves address exhaustion; essential for massive IoT
  • Topology choice impacts reliability, range, and complexity
  • Protocol selection depends on power, bandwidth, reliability needs
  • Security must be designed in, not added later

627.8 Additional Resources

Books:

  • “Computer Networking: A Top-Down Approach” by Kurose and Ross
  • “TCP/IP Illustrated” by W. Richard Stevens

Videos:

Tools:

  • Wireshark: Network traffic analysis
  • nmap: Network scanning
  • PingPlotter: Visual traceroute
  • MQTT Explorer: MQTT broker monitoring

Standards:


627.9 What’s Next

You’ve completed the Networking Basics Assessment series! Continue your IoT journey with:

Return to the Networking Basics: Assessment Overview for navigation.