Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Catterall/0bb1f2cca08bc05f661e2223e8e0e9c8 to your computer and use it in GitHub Desktop.
Save Catterall/0bb1f2cca08bc05f661e2223e8e0e9c8 to your computer and use it in GitHub Desktop.
A basic introduction to networking — the first gist of the first section on network hacking.
K. Catterall's Network Hacking Gists

1. Networking Fundamentals

01 — introduction


Devices.

What is a network and what network devices are there?

A network is a connection of devices that can communicate with one another and share resources.

In general, networks are often built of many different devices, and are highly customizable to their use case. For example, one network may allow only cables to be used to connect devices, whereas another network may allow for both cabled and wireless connections.

Before exploring use cases further, a table of common network devices and their purpose can be viewed below.

Device Name Purpose
Workstation A workstation is a term to describe any generic device, such as a laptop, mobile phone, or printer. These devices are not specific to networks, or how the network operates. Instead, they are the beneficiaries of networks, gaining the ability to communicate from them.
Switch A switch is a device that allows other devices to connect to it. Devices that are connected to the same switch can communicate and share resources with one another.
Wireless Access Point A wireless access point allows other devices to connect to it wirelessly. You can connect a WAP to a switch to allow cabled and wireless devices to connect to the same network.
Router Whereas switches allow multiple devices to be connected, routers allow multiple switches to be connected. This allows routers to be the main managers of data in a network, monitoring all incoming and outgoing traffic. Because routers monitor traffic, this allows routers to also serve as the first line of defence for a network, via firewalls.
Modem A modem converts analog signals from an internet service provider to digital signals for devices, and vice versa. This means that modems are requied to connect to the internet. For example, all routers connect to a modem, as the router would not be able to intepret the incoming data otherwise.
Firewall* A firewall determines what traffic is and is not allowed to be received or transmitted by a network via set rules.

*Firewalls can be hardware, but can also be software that works with applications and ports.
Server A server is a computer designed to store, send, and receive data. Other devices can connect to servers to send and receive data.
Internet Service Provider (ISP) An ISP is a company that provides access to the internet, usually for a fee. An ISP gets it internet from its connection to a backbone that it pays for.
Backbone Provider A backbone provider is a company that provide backbones to the internet, which are designed to connect local and global networks together at high speeds. These backbones are the foundations of the internet.

Use case example.

Let's say you have a computer lab in a lower school. As a teacher/institution, you want kids attention to be given to the lesson and wish for minimal distractions. One way to mitigate this would be to disallow wireless connections. This way, only lab computers will be able to connect to a network, making other devices such as phones virtually useless for non-emergency situations.

How do you think you would do this? Well, you know a few things:

  • Routers connect switches and can serve as security via firewalls.
  • Switches allow for devices to be connected to one another.
  • Wireless devices require a wireless access point to connect to a network.

Phones are wireless devices, and so the answer becomes clear: do not have a wireless access point. Instead, as all the computers in the lab are in one room, simply connect the computers via a cable to switch, which connects to a router, which will allow for an internet connection. This way, it is impossible for the phones to access the internet connection provided by the school.

Simple Computer Lab Example

Why routers are needed.

As a brief note, some readers may be curious as to why a router is needed. After all, routers connect multiple switches, but what if you only have one switch? Is a router still needed?

The truth is that routers are not needed if you only have one switch. However, it is not reccomended to disregard routers, even so. This is because an ISP typically only provides one IP address (more on them later). Therefore, if you only use a switch, only one device will be able to access the internet. Not only that, but switches do not have the network monitoring capabilities of a router, and so not having a router raises security concerns.

How do devices understand one another?

The goal of a network is to provide devices with a way to communicate with one another. For devices to communicate with each other, they must understand each other. Because of this limitation, sets of rules as to how different devices should communicate were created, and these rules are known as protocols.

There are many different protocols, and many protocols can be used in combination to allow for communication between devices. Like IP addresses, protocols will be covered in later gists.


Types of network.

SOHO Networks.

A SOHO network is a small network comprised of only a few devices, such as a single switch, WAP, router, and modem. SOHO is an acronym that stands for "Small Office, Home Office", which describes the areas in which these networks are common.

Enterprise Networks.

An enterprise network may be used by a coorperation and span between many floors in a building, or many buildings, perhaps accross different cities or countries. Naturally, enterprise networks will have a higher amount of devices compared to a SOHO network.

Service Provider Networks.

A service provider network is a network common to ISPs. ISPs use their service provider network to connect smaller networks together, typically for a fee.

LANs vs MANs vs WANs.

A connection of devices in a local area is known as a local area network, or LAN. For example, in a SOHO network, the switch acts as a LAN, allowing multiple devices to connect to it.

A metropolitan area network, or MAN, connects multiple LANs in a metropolitan area, such as a town or city.

A wide area network, or WAN, is the largest of the three networks. WANs allow for connections across the globe.


@Catterall
Copy link
Author

Catterall commented Sep 25, 2022

This is the first gist in a long line of gists to be published on the topic of network hacking.
These gists are a collection of information gathered from sources, shown at the bottom of each gist.
My game theory is that by writing out all of the information I have learned in an instructive manner, I will gain access to the concept of "learn by teaching" without actually teaching anyone, as I have no one to teach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment