Building Blocks Of The Internet

Jesse Okeya
5 min readSep 14, 2021

What is an intranet ? An intranet is a local or restricted network that enables people to store, organize, and share information within an organization

What is the internet ? The Internet is a globally-connected network of computers that enables people to share information and communicate with each other

What is an extranet? Creates connections beyond (or outside) an organization or locality

So the underlying problem that was solved is a communication issue trying to figure out an effective, reliable and scalable way that allows, empowers and enables multiple physical computers or systems to communicate and share information between themselves. To share these information multiple protocols and techniques have been developed, improved and reiterated upon over the years. And the most reliable and battle tested protocol is what is used behind the scenes of the internet.

To send information between two or more computers we need to figure out a way to sneak bytes or bits over a physical medium. A medium could be a ethernet cables (electrical current), wifi signals (radio waves), fiber-optic cables (light). The mechanism or model that enables us to effectively sneak computer signals which are bytes and bits (1’s and 0’s) via a medium and make sense of the data from a higher level view or perspective is called the OSI (Open Systems Interconnection) Model.

OSI Model

The open system interconnection model is a seven layer abstraction where each layer encapsulates or decapsulate data before passing it off either up or down depending if the request is incoming or outgoing. Each layer is responsible for a specific function.

I use a simple acronym to remember this model.

AllApplication Layer

People Presentation Layer

Seem Session Layer

ToTransport Layer

NeedNetwork Layer

DataData Link Layer

Processing Physical Layer

Now let’s dive into each of the following layer in more detail.

Application Layer

Application layer is where most software engineers live. This is where the http and http via TLS (Transport Layer Security) or SSL (Secure Sockets Layer) which we know as https protocols are. Requests are sent over http or https and we receive a data format in JSON, XML etc. And our application make sense of the data received but we shielded from dealing with the lower level intricacies, complexities and abstractions.

Presentation Layer

The presentation layer does what it’s name entails it presents the data and also handles encryption and decryption and ensures our data is in a useable format

Session Layer

The session layer establishes and coordinates connections between controlling sessions and ports and determines how long a connection between systems should say alive also known as TTL (Time To Live).

Transport Layer

The Transport layer is in charge of data transmission utilizing the TCP(Transmission Control Protocol) or UDP(User Datagram Protocol) protocols to transmit the data. Data in this layer is referenced and stored as “segments”. These segments are either passed up to the session layer or down to the network layer depending if the request is incoming or outgoing.

Network Layer

The network layer decides which physical path the data will take. This is where ip addresses live and data in the layer is represented as “packets”. Packets contain the source and destination ip addresses. The source ip is the ip address of the current system and the destination ip is the ip address of the system the packets are going to

Data Link Layer

The data link layer defines the format of data on the network. This contains information in frames where each frame contains the physical device mac (media access control) address which is know as the source mac address and the destination mac address for the computer the frame is going out to. No two devices can ever have the same mac address as it is a unique identifier for any physical device

Physical Layer

Finally we have the physical layer. This layer is in charge of transmitting raw bits over a physical medium. Every abstraction or encapsulation passed down from all the layers above are converted to bits (1’s and 0's) and sneaked through the physical medium used to communicate. The medium can be an ethernet cable, wifi signals, fiber-optic cables etc.

The diagram above shows the abstraction of data for and incoming request

Note: We have the tcp/ip model which is basically the OSI model minus the session and presentation layers. The tcp/ip model have five layers instead of seven layers.

Example

From the image above lets assume the sender is the client and sends data to a server. The data sent is encapsulated downwards in the OSI models and sent out as bits over a physical medium. The recipient in our case is the server receives these bits and moves up the OSI model converting it to an acceptable application data format i.e JSON or XML and makes sense of the incoming data.

Still curious?. Read more about the OSI model here.

Hopefully this article was helpful and clears any ambiguities concerning the OSI model which are basically the building blocks for internet communication enabling multiple systems to talk to each other.

--

--

Jesse Okeya

An outlet for sharing my experiences, ideas and learnings to whoever finds them valuable. Backend Software Engineer at Extend