Systematic Learning Outline: Networking & Communication in Modern Devices

πŸ”° Stage 1: Foundations of Networking

βœ… Concepts:

  • What is a network (LAN, WAN, WLAN, internet)
  • Packet-switched vs. circuit-switched networks
  • Basic networking terminology

βœ… Topics to Study:

  1. OSI & TCP/IP Models
    • 7-layer OSI model: physical to application
    • TCP/IP 4-layer model
  2. IP Addressing & Subnetting
    • IPv4 vs IPv6
    • Public vs private IP
    • CIDR, subnet masks
  3. MAC Addresses & ARP (A MAC address (Media Access Control address) is a unique identifier assigned to a device’s network interface card (NIC) for communication on a local network (LAN). It’s a 12-digit hexadecimal address like 00:1A:2B:3C:4D:5E, used at the data link layer (Layer 2) of the OSI model.)
    • Device-level addressing
    • Address Resolution Protocol
  4. Devices & Roles
    • Modem, router, switch, access point, repeater, hub
  5. Protocols (Basic Overview)
    • TCP, UDP
    • ICMP (ping)
    • DNS, DHCP

TCP use curl http://example.com/, ICM use Ping, DNS nslookup

TCP:
[SYN] β†’ [SYN-ACK] β†’ [ACK]
β†’ Data1 [ACK]
β†’ Data2 [ACK]
β†’ FIN/ACK to close

UDP:
β†’ Data (sent)
β†’ Data (maybe arrives, maybe not)
β†’ No ACK, no connection, no close


πŸ“‘ Stage 2: Internet Communication & Protocols

βœ… Topics to Study:

  1. TCP/IP Deep Dive
    • Three-way handshake (SYN, ACK)
  2. we can use wireshark, or write a python socket file as below to see how three-way handshake is realized:
    output in console is HTTP/1.1 200 OK
    Content-Type: text/html; charset=UTF-8
    Content-Length: 1256
    Connection: close
    …
    then actual html body
    <!doctype html>
    <html>
    <head>
    <title>Example Domain</title>
    <meta charset="utf-8" />
    ...
    </head>
    <body>
    <div>
    <h1>Example Domain</h1>
    <p>This domain is for use in illustrative examples in documents...</p>
    </div>
    </body>
    </html>
  3. HTTP/HTTPS
    • Request/response cycle
    • Headers, status codes
    • HTTPS (TLS encryption)
  4. DNS (Domain Name System)
    • How names resolve to IPs
    • Recursive vs authoritative DNS
  5. Ports & Sockets
    • Well-known ports (e.g., 80, 443, 22)
    • Client/server architecture
    • Binding to IP and port

HTTP or HTTPS is just one protocol devices communicate with each other, we can have others like the following table, we can also create our own custom protocol as shown in below python codes


πŸ“Ά Stage 3: Wireless & Mobile Networking

βœ… Topics to Study:

  1. Wi-Fi (802.11 standards)
    • 2.4GHz vs 5GHz vs 6GHz
    • Channels, interference, SSID, WPA3 security
  2. Bluetooth & BLE
    • Pairing and communication
    • Device roles (peripheral, central)
  3. Cellular Networks
    • 3G, 4G, 5G architecture
    • SIM cards, mobile data, roaming
  4. IoT Communication Protocols
    • MQTT, CoAP, Zigbee, Z-Wave
    • Low-power wide-area networks (LoRaWAN, NB-IoT)

🌐 Stage 4: Application Layer & Modern Use Cases

βœ… Topics to Study:

  1. WebSockets & Real-Time Communication
    • WebSockets vs HTTP
    • Pub/Sub patterns
  2. REST vs gRPC vs GraphQL
    • API design and communication models
  1. Network Security Essentials
    • TLS/SSL
    • VPNs
    • Firewalls and NAT
    • Zero Trust networking
  2. Cloud Networking Concepts
    • VPC (Virtual Private Cloud)
    • Load balancers
    • CDN (Cloudflare, Akamai)
    • Network-as-a-Service (AWS VPC, Azure VNets)

When we build a RESTful API, we’re designing an interface that exposes resources over HTTP, using URLs and standard HTTP methods. The server responds with data β€” often in JSON or XML β€” which is transported over TCP.


πŸ”¬ Stage 5: Tools, Troubleshooting & Advanced Concepts

βœ… Tools to Learn:

  • ping, traceroute, netstat, ifconfig/ip
  • Wireshark (packet analysis)
  • Nmap (network scanning)
  • curl, telnet, dig, nslookup

βœ… Advanced Topics:

  • SDN (Software Defined Networking)
  • Network virtualization
  • Network performance metrics (latency, jitter, throughput)
  • Routing algorithms (BGP, OSPF)

socket.py

import socket

# Create a TCP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

# Connect to the server (this performs SYN β†’ SYN-ACK β†’ ACK under the hood)
server_address = ('example.com', 80)
sock.connect(server_address)

# Send HTTP GET request
request = b"GET / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n"
sock.sendall(request)

# Receive the response
response = b""
while True:
    data = sock.recv(4096)
    if not data:
        break
    response += data

print(response.decode(errors='ignore'))

# Close the connection (initiates FIN β†’ ACK teardown)
sock.close()

custom protocol to communicate

import socket

s = socket.socket()
s.bind(('0.0.0.0', 12345))  # your custom port
s.listen(1)

conn, addr = s.accept()
data = conn.recv(1024)
print("Received:", data)
conn.send(b'Hello from custom protocol!')

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.