What is a network?

Mon Sep 09 2024

~ 4 mins

Introduction

We use the internet on a daily basis whether we're browsing the internet or sending memes to our friends, but have you ever stopped and questioned how any of these things work behind the scenes?

The answer to that question is networking.

The Evolution of communication

In the early days of computing, computers were isolated machines. They processed data, performed calculations, and ran programs, but they couldn’t share information or communicate with each other.

If you wanted to transfer data from one computer to another, you had to use physical media like floppy disks or tapes. This inability to connect with each other limited the potential of computers and made collaboration between different systems difficult.

As the need for sharing information grew, we needed to find better ways to communicate.

This led to the creation of networks — a system that connects computers and other devices, enabling them to exchange data and resources efficiently.

What is a network?

In computing, a network is just the name we give to a group of connected devices that can communicate with each other.

These devices could be computers, servers, smartphones, printers, etc.

The main purpose of a network is to share resources, such as files, internet connections, and printers, and to facilitate communication between devices.

A network can be as simple as two computers connected together or as complex as the global internet, which connects millions of devices worldwide.

Networks can be classified based on their size and scope, with common types including Local Area Networks (LANs), Wide Area Networks (WANs), and the internet.

Forming a local network

One of the most basic forms of a network is a Local Area Network (LAN).

A LAN connects devices within a relatively small area, such as a home, office, or school. The primary tool used to create a LAN is a device called a switch.

How a Switch Works

A switch is a piece of hardware that connects multiple devices to create a network.

It operates at the data link layer (Layer 2) of the OSI model and uses MAC addresses to forward data to the correct destination.

Here’s how it works:

  • When a device on the network wants to send data to another device, it sends the data to the switch.
  • The switch reads the destination MAC address from the message it received and forwards it to the correct computer.

Using a switch, you can connect multiple computers and devices within a local network to communicate with each other, share files, and use shared resources like printers.

However, a switch by itself only let's you talk to computers inside of that local network. If you want to connect your LAN to other networks, you need a router.

Cross-network communication

While a switch connects devices within a single network, a router is responsible for connecting different networks together.

Routers operate at the network layer (Layer 3) of the OSI model and use IP addresses to send data to different networks.

How a Router Works

A router acts as a bridge between your local network (LAN) and other networks, such as the internet. Here’s a simplified overview of how a router functions:

  • The router has two main interfaces: one connected to your LAN and the other connected to an external network (like the internet).
  • When a device on your LAN wants to send data to a device in a different network (e.g., accessing a website), the data is first sent to the router.
  • The router examines the destination IP address in the message and determines the best route to send the packet toward its destination.
  • The router then forwards the packet to the next hop on its journey, whether that’s another router or the destination device itself.

By using a router, devices on your local network can communicate with devices on other networks, enabling access to the internet and other external resources.

This is essential for modern computing, where most networks are interconnected through the global internet.

Bringing It All Together

Now that we’ve covered switches and routers, let’s see how they work together to form a LAN that’s connected to the internet.

Switches Connect Local Devices:

  • Within a LAN, a switch connects all the local devices, such as computers, printers, and servers.

Router Connects the LAN to the Internet:

  • The router connects the LAN to the internet or other external networks.
  • It routes data between your local devices and the internet.

In a typical home network, your computer might be connected to a switch (which is often built into your router).

The router then connects your home network to your ISP’s network, which provides access to the internet.

This setup allows all devices in your home to share the internet connection and communicate with each other.

Conclusion

In summary, a network in computing is the system that allows computers and devices to communicate with each other.

Understanding the basics of networking gives you insight into how our world is connected together.

With this knowledge you can better understand how the world we live in functions, and forms the foundation for exploring more advanced networking concepts....(like hacking 😈)