Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: pub@towardsai.net
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab VeloxTrend Ultrarix Capital Partners Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Our 15 AI experts built the most comprehensive, practical, 90+ lesson courses to master AI Engineering - we have pathways for any experience at Towards AI Academy. Cohorts still open - use COHORT10 for 10% off.

Publication

Networking Explained: From “What’s Network?” to AI-Powered Networks
Computer Science   Latest   Machine Learning

Networking Explained: From “What’s Network?” to AI-Powered Networks

Last Updated on November 25, 2025 by Editorial Team

Author(s): Divy Yadav

Originally published on Towards AI.

Networking Explained: From “What’s Network?” to AI-Powered Networks

You click. Pages load. Messages send. Videos stream.

But HOW?

Let me show you using something everyone understands: a school.

By the end of this, you’ll understand IP addresses, routers, switches, firewalls — all of it.

But What Even IS a Network?

Simple answer: A network is just a group of computers and devices linked together so they can communicate and share resources MarkTechPost.

The analogy:

Think of a postal service.

  • Your computer = Your house
  • Other computers = Other houses
  • The network = The postal system connecting them
  • Data = Letters you send

Just like the postal service moves letters between houses, networks move data between computers.

That’s it. Everything else is just details about HOW that happens.

Network Types: Different Postal Systems

Networks range from simple setups connecting two devices in your home to massive global systems like the Internet Medium.

PAN (Personal Area Network)

Analogy: Passing notes in the same room

  • Range: A few feet
  • Example: Bluetooth headphones, AirDrop
  • Real-world: When you connect earbuds to your computer via Bluetooth, you’re using a PAN Substack

LAN (Local Area Network)

Analogy: Office internal mail system

  • Range: One building or campus
  • Example: Your home Wi-Fi, office network
  • Real-world: All devices in your house talking to each other

WAN (Wide Area Network)

Analogy: International postal service

  • Range: Cities, countries, continents
  • Example: The Internet
  • Real-world: The public internet is an example of WAN — not limited to a single location DataCamp

MAN (Metropolitan Area Network)

Analogy: City-wide mail system

  • Range: A city
  • Example: University campuses, city government networks
  • Real-world: Connecting multiple offices of a single organization within a city Substack

Welcome to NPS: Networking Public School

Imagine a school. NPS — Networking Public School.

This entire school = Your Local Area Network (LAN)

Inside this school:

  • Students = Devices (computers, phones, laptops)
  • Classes = Subnets (smaller networks)
  • Teachers/Staff = Network devices

Everything that happens in networking? It happens in this school.

Students Need Roll Numbers (IP Addresses)

Every student gets a unique roll number when they join.

  • Student in Class 10: Roll number 10-001, 10-002, 10-003
  • Student in Class 12: Roll number 12-001, 12-002, 12-003

This roll number = IP Address

IP Address is a unique identifier assigned by the network — like a roll number that can change if you move to a different network MarkTechPost.

Key point: If a student transfers to Class 12, their roll number changes. But one thing never changes…

Every Student Has a Unique Face (MAC Address)

Your roll number can change. Your face cannot.

Face = MAC Address

MAC Address is permanently assigned by the manufacturer — like your device’s permanent identity that never changes MarkTechPost.

Example:

  • Roll number 10-001 can be reassigned to someone else
  • But Radha’s face? That’s only Radha’s. Forever.

For any communication, you need BOTH:

  • ✅ Roll number (IP Address) — where you are
  • ✅ Face (MAC Address) — who you are

Classes Are Subnets (Smaller Networks)

The school has different classes:

  • Class 10 (one subnet)
  • Class 12 (another subnet)

Subnet = A smaller network within the bigger network

Why separate classes? Organization.

Just like you can’t have all students running around the school, you can’t have all devices talking at once. You organize them into subnets.

The Class Monitor = Switch

Every class has a class monitor.

Monitor = Switch

What does the monitor do?

When Radha (student in Class 10) wants to talk to Krishna (also in Class 10):

  1. Radha tells the monitor: “I want to talk to Krishna”
  2. Monitor checks: “Krishna is in this class”
  3. Monitor connects them directly

Switches connect devices within a network and forward data only to the specific device it’s meant for Medium.

Monitor/Switch works at Layer 2 — They recognize faces (MAC addresses).

The Warden = Router

What if Radha (Class 10) wants to talk to Gita (Class 12)?

Monitor can’t help. Monitor only handles students within their own class.

Enter: The Warden

Warden = Router

What does the warden do?

  1. Radha tells monitor: “I want to talk to 12-005"
  2. Monitor sees the “12” and thinks: “Not my class!”
  3. Monitor tells the Warden
  4. Warden goes to Class 12’s monitor
  5. Class 12 monitor finds student 12-005 (Gita)
  6. Connection established

Routers connect multiple networks and direct data packets to their correct destination.

Router works at Layer 3 — They use roll numbers (IP addresses).

Admin Office = DHCP Server

Question: Who gives students their roll numbers?

Answer: The admin office!

Admin Office = DHCP Server

DHCP automatically assigns IP addresses when devices connect to a network

When a new student (device) joins the school (network):

  1. Goes to admin office
  2. Gets assigned a roll number
  3. Can now communicate

This happens automatically when you connect to Wi-Fi.

The Registrar = DNS Server

New problem: Radha only knows “Gita” by name, not her roll number.

How to find her?

The Registrar Office = DNS Server

What happens:

  1. Radha tells monitor: “I need to talk to Gita”
  2. Monitor asks Warden
  3. Warden asks Registrar: “Who is Gita?”
  4. Registrar checks records: “Gita = 12-005"
  5. Sends back the roll number
  6. Communication happens

DNS converts domain names (like google.com) to IP addresses DataCamp.

Real example:

  • You type: www.google.com
  • DNS converts it to: 142.250.190.46
  • Your browser connects

Leaving School = Wide Area Network (WAN)

So far, everything happened inside the school (LAN).

What if Class 12 wants to order pizza from outside?

Outside the school = Wide Area Network (WAN) / The Internet

WAN connects networks across cities, countries, continents — like the Internet.

The Main Security Guard = Gateway Router

To go outside, you need to pass the main security guard.

Security Guard = Gateway Router

This is different from the Warden (internal router).

Gateway = The door to the outside world

The security guard has multiple jobs:

Job #1: Proxy Server

Class 12 wants pizza from Shankar’s Pizza Shop.

What happens:

Students tell monitor → Monitor tells warden → Warden tells security guard

Security guard goes to Shankar: “I need 20 pizzas”

Shankar asks: “Who ordered them? Can I have their names?”

Security guard says: “No. Just give me the pizzas. I’ll distribute them.”

Why? Security! Shankar doesn’t need to know student identities.

This is a Proxy Server — Acts on your behalf, keeps you anonymous.

Real example: Proxy servers cache content and hide your identity when accessing websites .

Job #2: NAT (Network Address Translation)

Each student has their own roll number: 10-001, 12-007, etc.

But Shankar doesn’t need to know individual roll numbers.

Security guard gives one public address to everyone outside:

“NPS-0001”

All pizza deliveries come to NPS-0001. Security guard then distributes inside.

This is NAT — Hides private IP addresses using one public IP.

Real example: Your home has one public IP address. All your devices (phone, laptop, TV) share it when accessing the internet.

Job #3: Firewall

Security guard has strict rules:

❌ No one enters during class time
❌ No one enters without ID
❌ No suspicious people allowed
❌ Anyone with a mask must remove it

These rules = Firewall rules

Firewalls monitor and control incoming/outgoing network traffic based on security rules

Real example:

  • Block porn sites at schools
  • Block unknown IP addresses
  • Allow only HTTPS connections

The Reception Area = DMZ (Demilitarized Zone)

Notice the reception area just inside the main gate?

This dotted area = DMZ (Demilitarized Zone)

Purpose: Safe space for outsiders to interact with insiders.

Example:

  • Parents come to meet principal
  • They wait in reception (DMZ)
  • Not allowed deeper into school (LAN)

In networking: DMZ is where you place public-facing servers (web servers, email servers) that need internet access but shouldn’t directly access your internal network

How a Message Actually Travels (Full Journey)

Let’s say Radha (Class 10, 10-003) wants to send a message to Gita (Class 12, 12-005).

Step by step:

  1. Radha tells her class monitor (switch): “Message for 12-005"
  2. Monitor checks: “12? Not my class!”
  3. Monitor tells Warden (internal router)
  4. Warden goes to Class 12’s monitor
  5. Class 12 monitor finds student 12-005
  6. Gita stands up (shows her face/MAC address)
  7. Message delivered!

This happened in milliseconds.

Now What if Gita Is in Another School? (WAN)

Radha wants to message her friend who goes to XYZ School (different network).

Journey:

  1. Radha → Class monitor → Warden
  2. Warden → Main security guard (Gateway)
  3. Security guard steps outside school
  4. Finds XYZ School’s security guard
  5. XYZ security guard → Their warden → Their monitor → Friend
  6. Reply comes back the same way

This is internet communication!

Layer 2 vs Layer 3 (Quick Explainer)

Layer 2 (Data Link) — Faces/MAC Addresses

  • Class monitors work here
  • They recognize faces
  • Local communication only

Layer 3 (Network) — Roll Numbers/IP Addresses

  • Wardens/Routers work here
  • They use roll numbers
  • Can route between networks

Remember: Communication needs BOTH layers working together.

Special Case: Layer 3 Switch (Promoted Monitor)

Sometimes a class monitor gets promoted to “School Monitor”

Now they can:

  • ✅ Handle their class (Layer 2)
  • ✅ Route between classes (Layer 3)

This is a Layer 3 Switch — A switch that can also route!

AI in Networking: The Smart School

Now imagine if NPS became AI-powered:

Traditional School (Network):

  • Manual attendance
  • Fixed schedules
  • React to problems after they happen

AI-Powered School (Network):

  • Predicts which classes will be crowded
  • Automatically assigns extra monitors where needed
  • Detects troublemakers before they cause problems
  • Optimizes routes between classes based on traffic

AI network infrastructure integrates machine learning to automate management, optimize performance, and enhance security with real-time analytics

Real examples:

1. Predictive Maintenance

  • Traditional: Router breaks → You notice → Fix it
  • AI: AI predicts failures before they occur by analyzing patterns

2. Traffic Optimization

  • Traditional: Network congested → Everything slows
  • AI: AI detects congestion and automatically reroutes traffic to maintain performance

3. Security

  • Traditional: Hacker attacks → Damage control
  • AI: AI identifies potential security threats like DDoS attacks and prevents them using deep learning

School analogy:

  • AI notices: “Every Wednesday at 10 AM, hallways are crowded”
  • Solution: Automatically opens extra corridors, assigns more monitors
  • Before students even complain

LAN (Inside School):

  • Students = Devices
  • Roll numbers = IP addresses
  • Faces = MAC addresses
  • Class monitor = Switch (Layer 2)
  • Warden = Router (Layer 3)
  • Admin office = DHCP
  • Registrar = DNS
  • Classes = Subnets

WAN (Outside School):

  • Main security guard = Gateway Router
  • Proxy = Security guard acting on your behalf
  • NAT = One public address for whole school
  • Firewall = Security rules
  • DMZ = Reception area

AI Additions:

  • Predictive = Fixing problems before they happen
  • Self-healing = Auto-repair without human help
  • Smart routing = Best path selection in real-time

The Bottom Line

Networking = A school system

Every device (student) needs:

  • ✅ An address (roll number/IP)
  • ✅ A permanent ID (face/MAC)

Communication happens through:

  • Monitors/Switches (within class/subnet)
  • Wardens/Routers (between classes/subnets)
  • Security guard/Gateway (to outside world)

AI makes it all smarter — predicting, optimizing, protecting automatically.

What confused you most before reading this?

Drop it in comments. I’ll explain with another analogy.

If this finally made networking click, hit that clap! 👏

P.S. — Next time someone asks “How does the internet work?”

Just say: “It’s like a school system.”

Then explain using roll numbers and faces. They’ll get it instantly.

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI


Take our 90+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Towards AI has published Building LLMs for Production—our 470+ page guide to mastering LLMs with practical projects and expert insights!


Discover Your Dream AI Career at Towards AI Jobs

Towards AI has built a jobs board tailored specifically to Machine Learning and Data Science Jobs and Skills. Our software searches for live AI jobs each hour, labels and categorises them and makes them easily searchable. Explore over 40,000 live jobs today with Towards AI Jobs!

Note: Content contains the views of the contributing authors and not Towards AI.