Networking for Developers – part 1: overview
Tags: networking, network
Published: 2019-01-25 08:58:54

---
title: Networking for Developers – part 1: overview
published: true
tags: networking,network
canonical_url: https://flaviabastos.ca/2019/01/25/networking-for-developers-part-1-overview/
---

For some reason grasping the concepts around computer networks has always been hard for me. Not surprisingly, I find that I’m not the only one: many software developers don’t really understand how computers networks… work. All I know is that I send stuff via the internet and my stuff gets where I wanted it to go. But how does that happen? Magic?

Obviously, no! So, I’m attempting to learn more about networks and more importantly, learn how to troubleshoot when things don’t go as expected. My goal here is to share some of the things I am learning. I hope it helps someone else too.

* * *

#### Basic Concepts

**NETWORKING** : connecting computers and sending data between them.

Data is transmitted over a network in small chunks called **PACKETS** , which have two parts:

1. HEADER – all the identification info such as origin host, destination host and basic protocol.
2. PAYLOAD – the actual data, for example some HTML or an image.

![Image for data transmission showing the parts of a packet (header and payload)](https://testfbdotblog.files.wordpress.com/2019/01/internet_stack_packets.png?w=620)

The operating system takes care of translating between packets and the data that your application uses.

A fully functional network includes a set of network layers that combined are called **network stack**.

> **NOTE** : You might have heard of the seven network layers from the OSI (Open Systems Interconnection) model. The OSI model is more often used in teaching and designing networks. For the Internet, the four layers below are enough to explain how that network works.

The network stack has four layers and I will give you a tip to remember these layers. It’s A TIP… Got it? ATIP ![😬](https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f62c.png) From top to bottom:

- **Application layer** : the layer that the user interacts with (such as web browsers). It uses high-level protocols that computer applications and servers use to communicate (HTTP, SSL, FTP, etc)
- **Transport layer** : transmission of data, including data integrity checks, source and destination ports and specifications to break the data down into packets (in case the application layer hasn’t done that yet). TCP and UPD are the most common transport layer protocols.
- **Internet (or Network) layer**: defines how to move packets from a source host to a destination host. For the Internet, this is the Internet Protocol (IP)
- **Physical layer (or Link)**: defines how to send raw data across physical medium, such as Ethernet or modem.

There! **ATIP**! ![😛](https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f61b.png)

![](https://testfbdotblog.files.wordpress.com/2019/01/internet-stack_layers-1.png?w=620)

So, data going from host A to host B goes through all these layers, like this:

![Image showing the data flow direction in the layers](https://testfbdotblog.files.wordpress.com/2019/01/internet-stack_data.png?w=620)

The lower layers in the stack (Internet/Network and Physical) will help the <u>sending computer</u> know **WHERE** to send the data and the upper layers (Application and Transport) will help the <u>destination computer</u> to figure out **WHAT** is the data that it just received:

![](https://testfbdotblog.files.wordpress.com/2019/01/internet-stack_layers_roles-1.png?w=620)

I will cover each layer separately in future posts. ![🙂](https://s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f642.png)

> The post [Networking for Developers – part 1: overview](https://wp.me/pa0b0y-2s) was originally published at [flaviabastos.ca](https://flaviabastos.ca)