Skip to main content

Networking, IoT and Network Diagnostics

Updated 15 min readMarkdown
Networking, IoT and Network Diagnostics

W01: Learning the Fundamentals

Introduction

Have you ever wondered why your Wi-Fi sometimes becomes slow, why video calls freeze, or why a website takes too long to load?

To understand these problems, we first need to understand how devices communicate, how networks transfer information, and how we identify network problems.

I explored the fundamentals of Internet of Things (IoT), computer networking, wireless communication, network diagnostics, and basic machine learning.

Here are the concepts I learned, explained from the ground up.


1. Understanding the Hardware Behind IoT

Before understanding how devices communicate, let's understand the small computers that make IoT possible.

What is a Microcontroller (MCU)?

A microcontroller is a tiny computer built into a single chip.

Unlike a laptop, which can perform many different tasks, a microcontroller is generally designed to perform specific tasks repeatedly.

Example: A digital watch uses a small computer to track and display time.

What is ESP32?

ESP32 is a low-cost microcontroller with built-in Wi-Fi and Bluetooth capabilities.

It allows electronic devices to connect to wireless networks and exchange information.

Example: Imagine a temperature sensor that measures room temperature and sends the reading to your phone. An ESP32 can help perform this task.

What is Raspberry Pi?

Raspberry Pi is a small, fully functional computer that can run an operating system such as Linux.

Unlike a basic microcontroller, it can run multiple programs, manage databases, and host applications.

Example: Think of an ESP32 as a worker collecting information and a Raspberry Pi as a manager collecting, storing, and analyzing that information.

What is GPIO?

GPIO stands for General Purpose Input/Output.

These are physical pins on a development board that allow software to communicate with external electronic components.

  • Input: Read information from a button or sensor.
  • Output: Control an LED or another electronic component.

Example: A light switch receives an input when pressed and changes the light's state.

What is an SoC?

SoC stands for System on a Chip.

It combines multiple computer components, such as a processor, memory controllers, and communication hardware, into a single chip.

Example: Instead of building a computer using many separate components, imagine combining several important components into one compact package.


2. Understanding Wi-Fi and Wireless Communication

What is Radio Frequency (RF)?

Radio Frequency refers to electromagnetic waves used to transmit information wirelessly.

Wi-Fi, Bluetooth, and cellular networks use radio waves to communicate.

Example: When you connect your phone to Wi-Fi, information travels between your phone and router using radio waves instead of a physical cable.

What is an Access Point (AP)?

An Access Point is a device that allows wireless devices to connect to a network.

Many home routers have an Access Point built into them.

Example: Your phone connects to your home router through its wireless Access Point.

What is SSID?

SSID stands for Service Set Identifier.

It is simply the name of a Wi-Fi network that appears when you search for available networks.

Example: When you see Home_WiFi or Office_WiFi on your phone, those are SSIDs.

What is BSSID?

BSSID stands for Basic Service Set Identifier.

It identifies a particular wireless access point, usually through its MAC address.

Difference:

  • SSID = Wi-Fi network name.
  • BSSID = Identifier of a particular access point.

This distinction becomes useful when multiple access points share the same Wi-Fi name.

What is RSSI?

RSSI stands for Received Signal Strength Indicator.

It indicates how strong a received wireless signal is.

It is commonly represented using dBm values.

Some example readings:

  • -30 dBm: Very strong signal.
  • -60 dBm: Generally good signal.
  • -80 dBm: Weak signal.
  • -90 dBm: Very weak signal.

Remember: For negative dBm readings, a value closer to zero represents a stronger signal.

What is 2.4 GHz vs 5 GHz Wi-Fi?

These are two commonly used Wi-Fi frequency bands.

2.4 GHz

  • Generally provides better coverage.
  • Travels farther.
  • Usually performs better through walls.
  • Can experience more interference.

5 GHz

  • Can provide higher data speeds.
  • Generally has shorter range.
  • Is more easily weakened by obstacles.

Real-life example: Imagine two people shouting across a building. A lower-pitched sound may travel farther through obstacles, while a higher-pitched sound may not travel as far.

What is Airtime Contention?

Wi-Fi devices share wireless communication channels.

When many devices compete to transmit information, they may have to wait for their turn.

This can increase network delays.

Example: Imagine 20 students trying to speak in one classroom. Everyone cannot speak clearly at the same time.


3. Computer Networking Fundamentals

What is a Network?

A computer network is a group of connected devices that communicate and share information.

These devices can include:

  • Computers
  • Smartphones
  • Printers
  • Servers
  • Smart TVs

What is LAN?

LAN stands for Local Area Network.

It connects devices within a limited geographical area, such as a home, office, or college laboratory.

Example: Your laptop, phone, and printer connected to the same home router.

What is WAN?

WAN stands for Wide Area Network.

It connects networks across large geographical areas.

The Internet is the most familiar example of a WAN.

Simple difference:

  • LAN: A local network.
  • WAN: A network connecting networks over larger distances.

What is a Default Gateway?

A default gateway is the device that forwards traffic from your local network to other networks.

In most home networks, your router acts as the default gateway.

Example: Imagine your house has a main exit door. Whenever you need to travel outside, you use that door. Your default gateway performs a similar role for network traffic.

What is an ISP?

ISP stands for Internet Service Provider.

It is the company that provides your Internet connection.

Examples include Jio, Airtel, and other broadband providers.

What is Ethernet?

Ethernet is a technology used to connect devices through wired network connections.

It commonly uses Ethernet cables to transfer data between devices.

Example: Connecting your computer directly to a router using a network cable instead of Wi-Fi.

What is Cat6?

Cat6 stands for Category 6 Ethernet cable.

It is a type of network cable designed to support high-speed wired communication.


4. Understanding Network Performance

A network can have excellent download speeds but still perform poorly during video calls or online gaming.

To understand why, we need to learn some important measurements.

What is Bandwidth?

Bandwidth represents how much data a network connection can transfer over a given amount of time.

It is commonly measured in Mbps or Gbps.

Example: Imagine a highway with ten lanes. More lanes allow more vehicles to travel simultaneously.

What is Latency?

Latency is the time taken for data to travel from one point to another.

It is commonly measured in milliseconds (ms).

Lower latency generally means faster responses.

Example: When you click a button in an online game, latency determines how quickly the server receives and responds to your action.

Bandwidth vs Latency

  • Bandwidth = How much data can travel.
  • Latency = How long data takes to travel.

A connection can have high bandwidth but high latency.

What is RTT?

RTT stands for Round-Trip Time.

It measures how long a packet takes to travel to a destination and return.

This is what we commonly observe when using the ping command.

Example: Imagine shouting into a valley and measuring how long your echo takes to return.

What is Jitter?

Jitter describes variations in packet delay over time.

Consider these two examples:

  • 20 ms, 21 ms, 19 ms, 20 ms: Consistent delays.
  • 20 ms, 350 ms, 18 ms, 520 ms: Highly inconsistent delays.

High jitter can cause problems during video calls, online gaming, and live streaming.

What is Packet Loss?

Packet loss occurs when some data packets fail to reach their destination.

Example: Imagine sending 100 letters through the postal service, but only 95 arrive.

The remaining five letters represent packet loss.

What is Bufferbloat?

Bufferbloat occurs when excessive data builds up in network queues, increasing delays.

Example: Imagine standing in a supermarket checkout line behind someone with a trolley full of groceries when you only want to buy one chocolate bar.

Your request is small, but you still have to wait.


5. Important Network Protocols

Protocols are rules that define how devices communicate with each other.

Let's understand some important networking protocols.

What is an IP Address?

An IP address is a numerical address assigned to a device on a network.

It helps devices identify where information should be sent.

Example:

192.168.1.10

Think of it as the postal address of a house.

What is DHCP?

DHCP stands for Dynamic Host Configuration Protocol.

It automatically assigns IP configuration to devices joining a network.

Example: When your phone connects to Wi-Fi, your router can automatically assign it an IP address.

What is ICMP?

ICMP stands for Internet Control Message Protocol.

It is used for network diagnostics and error reporting.

The ping command commonly uses ICMP Echo Request and Echo Reply messages.

Example: You knock on someone's door to check whether they are home. If they respond, you know they are reachable.

What is TCP?

TCP stands for Transmission Control Protocol.

It provides reliable, ordered delivery of data between communicating devices.

It uses acknowledgements and retransmissions to handle missing data.

Example: Sending a registered parcel where delivery confirmation matters.

What is UDP?

UDP stands for User Datagram Protocol.

It sends data without establishing TCP-style reliable delivery.

It has less communication overhead and is useful when speed and low delay are important.

Example: A live radio broadcast does not stop and repeat everything just because one listener missed a sentence.

TCP vs UDP

TCP UDP
Reliable delivery No guaranteed delivery
Uses acknowledgements No TCP-style acknowledgements
Retransmits lost data Does not automatically retransmit
Common in file transfers Common in real-time applications

What is DNS?

DNS stands for Domain Name System.

It translates human-readable domain names into IP addresses.

For example:

google.com → An IP address.

Example: Your phone's contact list converts a person's name into their phone number.

Without DNS, remembering IP addresses for websites would be much harder.

What is mDNS?

mDNS stands for Multicast Domain Name System.

It allows devices on a local network to discover each other using names without requiring a traditional central DNS server.

Example: Instead of remembering a device's IP address, you may be able to access it using a local hostname ending in .local.

What is a Captive Portal?

A captive portal is a web page that appears when you connect to certain Wi-Fi networks.

It may ask you to log in, accept terms, or enter information before accessing the Internet.

Example: The login page you see when connecting to hotel or airport Wi-Fi.

What is SoftAP?

SoftAP stands for Software-enabled Access Point.

It allows a device to create its own Wi-Fi network.

Example: A device can broadcast its own temporary Wi-Fi network so that another device can connect and configure it.


6. IoT Communication and Data Storage

IoT devices often have limited processing power, memory, and network resources.

Therefore, lightweight communication methods are useful.

What is MQTT?

MQTT stands for Message Queuing Telemetry Transport.

It is a lightweight messaging protocol commonly used in IoT applications.

It allows small devices to send information without requiring heavy communication overhead.

Example: A temperature sensor sends its current reading to another computer using MQTT.

What is an MQTT Broker?

An MQTT Broker is the central component responsible for receiving messages from publishers and delivering them to subscribers.

Example: Imagine a post office:

  • People send letters to the post office.
  • The post office receives them.
  • It delivers them to the correct recipients.

What is Publish/Subscribe (Pub/Sub)?

Publish/Subscribe is a communication model.

It has two important roles:

  • Publisher: Sends information.
  • Subscriber: Receives information.

A broker manages the communication between them.

Example: When you subscribe to a YouTube channel, you receive updates when the creator publishes new content.

What is MQTT QoS?

QoS stands for Quality of Service.

It defines the delivery guarantee for MQTT messages.

There are three levels:

  • QoS 0: At most once. The message is sent without delivery confirmation.
  • QoS 1: At least once. The message is delivered with acknowledgement, but duplicates are possible.
  • QoS 2: Exactly once. The protocol uses additional steps to prevent duplicate delivery to the receiving application.

What is a Time-Series Database?

A Time-Series Database stores information associated with timestamps.

Examples include:

  • Temperature readings over time.
  • Network latency measurements.
  • CPU usage every second.
  • Sensor measurements throughout the day.

Example: Think of a fitness tracker recording your heart rate every few seconds. The timestamp helps you understand how your heart rate changes over time.

InfluxDB is an example of a Time-Series Database.


7. Understanding Cellular Networks

Wi-Fi is not the only way devices connect to the Internet. Smartphones also communicate using cellular networks.

What is LTE / 4G?

LTE stands for Long-Term Evolution.

It is a mobile communication technology used to provide high-speed wireless Internet connectivity.

4G is the fourth generation of mobile network technology.

What is RSRP?

RSRP stands for Reference Signal Received Power.

It measures the strength of the reference signal received from a cellular base station.

It is generally measured in dBm.

Example: It helps us understand how strong the cellular signal reaching your phone is.

What is RSRQ?

RSRQ stands for Reference Signal Received Quality.

It provides information about the quality of the received cellular signal, considering interference and noise.

Simple difference:

  • RSRP: Signal strength.
  • RSRQ: Signal quality.

What is Cell ID?

Cell ID identifies a particular cellular network cell or sector.

It helps determine which cell your phone is communicating with.

What is Termux?

Termux is a terminal emulator and Linux environment available on Android.

It allows users to run command-line tools, scripts, and programming environments directly on their smartphones.

Example: You can use Python from your Android phone without needing a laptop.


8. Introduction to Machine Learning and Network Diagnosis

After collecting information from a network, we need a way to understand what the measurements mean.

This is where logical rules and machine learning become useful.

What is Baseline Calibration?

Baseline calibration means measuring normal system behaviour under known conditions.

This gives us a reference point for identifying unusual behaviour later.

Example: Before checking whether your body temperature is unusually high, a doctor considers the normal temperature range.

What is a Heuristic Rule?

A heuristic is a practical rule or shortcut used to make decisions.

It commonly follows an IF-THEN structure.

Example:

  • IF the router cannot be reached, THEN investigate the local network connection.
  • IF an IP address is reachable but a domain name cannot be resolved, THEN investigate DNS.

These rules help narrow down possible problems.

What is Machine Learning?

Machine Learning is a field of Artificial Intelligence in which computers learn patterns from data.

Instead of manually writing every possible rule, we train a model using examples.

Example: Show a computer thousands of pictures of cats and dogs. It can learn patterns that help distinguish between them.

What is Random Forest?

Random Forest is a Machine Learning algorithm that combines multiple decision trees to make a prediction.

Each decision tree makes its own prediction, and the model combines their results.

Example: Imagine asking 50 people to independently diagnose a problem. You choose the answer receiving the majority of votes.

What is Selective Abstention?

Selective abstention means allowing an AI system to avoid making a prediction when it is not sufficiently confident.

Instead of guessing, the system can respond that the result is inconclusive.

Example: A doctor may say that more tests are needed before making a diagnosis.

This is important because an uncertain answer is sometimes better than an incorrect one.


9. A Few Important Things I Learned

After exploring these concepts, some important distinctions became clearer:

  1. A strong Wi-Fi signal does not always mean a fast connection.
  2. High bandwidth does not automatically mean low latency.
  3. Packet loss and jitter are different network problems.
  4. TCP and UDP serve different communication requirements.
  5. DNS translates domain names into IP addresses.
  6. MQTT makes communication between small IoT devices easier.
  7. Machine Learning can identify patterns that are difficult to capture using simple rules.
  8. Network troubleshooting becomes easier when problems are investigated layer by layer.

What's Next?

My next learning goals are to strengthen my understanding of:

  • Linux networking commands.
  • IP addressing and subnetting.
  • DNS resolution and troubleshooting.
  • TCP/IP communication.
  • Network monitoring and packet analysis.
  • Practical networking experiments.

Final takeaway: Understanding networking is not just about connecting devices to the Internet. It is about understanding how information travels, how communication problems occur, and how we can identify and solve them.

Let knowledge be your Light, and Patience your Path.

About the author

  • I'm a Computer Science undergraduate passionate about Cloud Security, DevSecOps, and secure infrastructure engineering. I'm building my skills in Linux, computer networking, AWS, Docker, Kubernetes, and security automation through hands-on labs and practical projects. I believe in learning by building, understanding systems from the ground up, and sharing technical knowledge in a simple way. My goal is to engineer secure, reliable, and scalable cloud infrastructure.

No comments yet. Be the first to comment.