Network Basics

Reem Dalvi
7 min readDec 31, 2022

--

The internet is a global network of interconnected computer networks, millions of people connected, while making use a set of rules called Internet Protocol Suite (TCP/IP) to link devices worldwide.

It is essentially a network of networks that consists of millions of private, public, academic, business, and government networks, of local to global scope, that are linked by a broad array of electronic, wireless, and optical networking technologies.

This is a representation of the underwater telecommunications cables that are laid on the sea floor to connect different parts of the world.

The OPTE project was designed by Barnett Lyon, who wanted to help people understand the complexity and structure of the internet by creating a map.

“This thing did not build itself, millions of people across every culture have been plugging things in running cables across the oceans, installing servers, building data centers, all to make this work!” You can watch his video here.

A visualisation of the global flow of internet traffic by OPTE Project

If you’re interested you can look at how data moves from the server of the website, like google.com, all the way to you by typing traceroute google.com in your terminal, for windows it is tracert google.com

The command displays a list of all the intermediate nodes the data passes to get to you.

Internet Primers: DHCP & DNS

Each computer connected to a computer network is assigned a numerical label called Internet Protocol (IP) address which is a unique identifier of your computer, like a home address that people can come visit or send mail.

There are two main versions of IP addresses: IPv4 and IPv6.

IPv4 addresses are 32-bit numbers that are typically expressed as four groups of numbers separated by periods (192.168.0.1). There are approximately 4.3 billion unique IPv4 addresses.

IPv6 addresses are 128-bit numbers that are expressed as eight groups of hexadecimal numbers separated by colons (2001:0db8:85a3:0000:0000:8a2e:0370:7334). There are approximately 3.4 x 10³⁸ unique IPv6 addresses which should help cover the growing population of humans.

Dynamic Host Configuration Protocol (DHCP) is a network protocol used to assign IP addresses and other network configuration parameters to devices on a network. The goal is to ensure that each device on the network has a unique IP address, which is necessary for communication between devices on the network and with the wider internet.

Domain Name System (DNS) is a decentralised system that maps human-readable domain names to numerical IP addresses. It is a hierarchical decentralised naming system for computers, services, or any resource connected to the Internet or a private network.

DNS is an important part of the internet because it allows users to access websites and other resources using easy-to-remember domain names, rather than having to remember numerical IP addresses.

When you type a domain name into your web browser, your computer sends a request to a DNS server to resolve the domain name into an IP address.

The DNS server looks up the IP address associated with the domain name and sends it back to your computer, which then uses the IP address to establish a connection to the website’s server and request the content you want to view.

IP

Internet Protocol (IP) is a set of rules that govern the format and transmission of data over the internet. It is responsible for getting data from point A to point B and splitting large data into smaller packets.

Each packet contains a header that contains information about the data, such as the source and destination IP addresses and also specifies the format of these packets. However, there is a risk of breaking them into packets means that the packets can be lost/dropped sometimes.

IP is a connectionless protocol, which means that each packet is treated independently and has no defined path. It is forwarded based on its destination address without establishing a dedicated end-to-end connection.

This allows for a high degree of flexibility and scalability, but it also means that IP does not guarantee delivery or guarantee the order in which packets are received.

TCP

TCP (Transmission Control Protocol) is a transport layer protocol that provides a reliable and ordered delivery of data between two devices connected to the internet.

TCP/IP are two protocols that are interrelated and treated as a single unit but they are two separate protocols that do two separate things. Since IP is responsible for getting data from one machine to another, TCP is responsible for getting to the correct program on the machine.

TCP can be thought of as directing the packet to the correct program by using a port number, which is how a specific service, or utility, or program, is identified on a machine.

Some of the common port numbers are: port 21 for File Transfer Protocol (FTP), port 25 for Email/SMTP, port 53 for DNS and port 443 for secure web browsing.

TCP also guarantees delivery by ordering those packets so they can be reconstructed on the receiving machine, even if they are received in a different order than they were sent, which can happen because IP is a connectionless protocol, TCP can take care of any packets that go missing by making a request a retransmission to ensure that the data is delivered correctly.

What is the TCP/IP process?

  1. The application layer on the source device generates data that needs to be transmitted to another device.
  2. TCP helps break the data into chunks called segments and adds a header to each segment that includes what port it is supposed to go to and what order the segment is out of all. Example 1/10 if it was split into 10 segments.
  3. IP receives the segments and divides it into smaller units called packers and adds a header to each packet that includes the destination IP address.
  4. The packet is transmitted over the internet to the destination device.
  5. Once the packet reaches the receiving machine, the device takes off the IP header and checks the IP address to ensure that it has arrived at the correct location.
  6. Next, the TCP header is removed and the data is checked for errors and the organises the data in the correct order. Once all the data packets are received, TCP can hand it off to the correct service using the port number.
  7. The application layer on the destination device process the data and sends a response back in reverse and the communication is closed if everything is ok.

HTTP

HTTP (HyperText Transfer Protocol) is a protocol for communication on the World Wide Web. It is an example of an application layer protocol, which specifically dictates the format by which clients request web pages from a server, and the format via which servers return information to clients.

A client can make HTTP to a server to request data either by GET or POST, a URI (Uniform Resource Identifier), and a request header. Example below shows how you would request to see cats.com

GET/ HTTP/ 1.1
Host: cats.com

If you request is approved, you get a status code of 200 OK with the page details. But if the page does not exist, you may receive a 404 Not Found.

Use your developer tools on Chrome to see this in the Network tab

Some of the other status codes are: 301 Moved Permanently, 302 Found (moved temporarily), 401 Unauthorised, 403 Forbidden, 500 Internal Server Error and 504 Gateway Timeout.

GET requests are used to retrieve data from a server. The data included in the request is appended to the URL as a query string, and the server returns the data in the response. Eg: https://www.google.com/search?q=cats

The data is intended to be safe (no side effects on the server), idempotent (they can be repeated multiple times without changing the result), and cacheable (the response can be stored and reused by intermediaries).

POST requests are used to send data to a server to be processed, such as to submit a form or to upload a file. The data is included in the body of the request, which is not visible to the user and is not logged by the server.

Data is not intended to be safe, idempotent, or cacheable.

There are also other request methods like HEAD, PUT, DELETE and OPTIONS.

Wood Wide Web

The world beneath our feet holds a vast and intricate communication network, linking trees, plants, and fungi. These organisms converse in a language of elements such as Nitrogen, Carbon, and Phosphorus. They also send out defense signals and hormones to one another, essentially sharing information.

This communication is made possible through the Mycorrhizal Network, which consists of fungal roots. While the mushrooms we see are merely the reproductive parts of fungi, the underground network is a dense and complex web of mycelium that colonizes the roots of all trees and plants.

Fungi extend their hyphae, or filamentous growths, into the soil, where they absorb nutrients and water for the trees and plants. In return, the trees provide the fungi with sugars produced by photosynthesis.

The mycelium network is so dense that there can be hundreds of kilometres of it under just one footstep and the network connects trees and plants of different species.

Similar to the internet, these mycelium networks have nodes and links. Mature nodes, referred to as mother trees, send nutrients to younger trees through the mycelium web.

Nature is communicating too.

--

--

Reem Dalvi

I like finding parallels between biological and computer science