The most widely known computer network is the internet. A network, as defined in mathematics, has to main objects with derivatives : nodes and edges. For a computer network nodes are computers. Nevertheless "computer" is a very general term that can design an modem, phone, a workstation and even a virtual machines... On the other side edges display also a certain diversity from wireless to a Ethernet through electromagnetic signals. This article aims to present you how computers are allowed to interacts together ? To begin with, basic elements of a computer network are presented then you will understand the structuration of these basics elements together to form networks and Finally you'll understand the dynamics of these networks and how communication is done through protocols.

  1. Abstractions and their properties
    1. MAC addresses
    2. IP addresses
    3. Ports
  2. Structure of computer networks 
    1. Local vs Internet and IPv4 reservations
    2. Gateway and Routing
    3. Switch, Hub, Router and proxy
  3.  Protocols
    1. Basic Layers 
    2. UDP/TCP Transfers protocol
    3. Applications protocol HTTP/FTP/POP3/IMAP/SMTP/SFTP/SCP...

1) Abstractions and their properties

In computer science a set of abstractions is often defined for simplification purpose. The most widely-known abstractions are files and folders. These abstractions allow every users to deal with data storage without knowing anything on what's going on the low-level. Dealing with abstractions is called "high-level". Abstractions are defined with properties and for a software engineer it is generally sufficient to know only about the high-level abstractions and properties. Here are defined must-know abstractions to understand Network computers.

1.1) MAC addresses:

MAC for Media Access Control are a theoretically unique identifier for a hardware controlling an edge of the network, for examples: a wireless controller or an Ethernet card. Conventionally, they are coded with 48 bits and can be represented by 6 couple of hexadigits to be comprehensible for human. MAC address is often referred to be the physical address of a computer, but it's false. The truth is that they are only the physical dress of an edge Input/Output. Indeed if one computer has both an Ethernet card and a wireless controller there will be 2 different edges to connect into a network, and thus 2 MAC adresses, one for each edge interface. It is then the role of the OS (operating system) to define an logical interface for each of the physical edge interfaces with the MAC adress as id. Logical interfaces are then associated to a network configuration, a point that is not discussed here.

1.2) IP addresses

IP (Internet Protocol) addresses are an abstraction designed in order not to deal with MAC addresses. An IP is a logical id referring to a computer (more specifically a edge interface designed by a MAC) in a network. Designers of IP decided that it would be coded with 32 bits... They were far to imagine that more than 4 billions of possibilities are now obsolete. Because of the critical growth of the internet the first IP (IPv4) has to be replaced by the IPv6 coded with 128 bits. Unfortunately many hardware/software are only working with IPv4. This is the reason why today there is a coexistence of IPv6/IPv4 addresses. Most people only work with IPv4. Just remember this coexistence of 2 norms for IP address and that IP adress is actually the unique id used to communicate through computer networks, the non-uniqueness of this id will raise conflicts, bugs etc... To be human readable IPs are written with 4 numbers comma-separated between 0 and 255

1.3) Ports 

Ports are another layer of abstraction imagined by designers of the internet protocol. The problem using only IP adress is the following: if more than one service is running waiting for a signal, At the time the signal comes in the following question is raised : Which service should treats the signal ? It was not possible to let all services wait for any signal reaching the server. Thus the principle of port listening has been set-up. For example the Mysql service is listening by default the 3306 port to treat signal as a Mysql query. Thus a Mysql service will only treat signals associated to the port 3306 and no other services will treat this signal. Port are coded with 16 bits and to be human readable they are represented as a number, than can be added after the IP address with ":"

 2) Structure of computer Networks

2.1) Local vs Internet and IPv4 reservation

On most computers there is a coexistence of different networks. Some are called private or local, what does it means ? A private network is somehow isolated from a bigger network. This is a relative notion because the bigger network can be itself private and isolated from a much bigger network. These notions will make more sense with knowledge on hub, switch, router and proxies developed later. Conventionally a sub-network is designated by a prefix code like This code refer to a range of IP addresses that can possibly taken in this sub-network with the first 8 bits fixed, here from to /8 can also be written as a mask A mask w.x.y.z where for each set of 8 bits represented by a number between 0 and 255 you move along an interval of size 255-x for the first 8 bits etc... To learn more about these notations go here.

To avoid conflicts and to limit signal associated to private IP to their networks: all networks are configured with masks. Conventionally 4 must-known range of IP addresses are excluded from internet possible IP to allow the isolation of sub-network from internet : more IP address reservation here.

Prefix notation Subnet mask Range of IP adresses Number  Purpose 16,777,216  Private Network 1,048,576  Private Network 65,536   Private Network 16,777,216  Host loop-back networks

NB: Prefix notation is sufficient to define the sub-network range of IP addresses. On the contrary only the sub-network mask is not sufficient you need to give the first bits that are fixed... Hopefully a sub-network is always configured with the IP addresses of the Gateway that is developed here after.

2.2) Gateway and Routing;.

Did you thought that all computers in the internet were all interconnected together ? No as you can see on the schema above computers are not all interconnected together.

For a signal to go from the start IP address to the end IP address it needs to go through many gateways. Still it is not clear which path the signal will use to reach its end point. Choosing the right path is the role of gateways. Routing algorithms are implemented in gateways to ensure proper routing of the signal through the network, the above image adapted from wikipedia show different alternatives for the gateways to route the signals.

Giving a the IP address of a default gateway directly connected to our computer is essential, this will be the first gateway involved in routing all signals sent by the computer. What's a gateway and how computers/gateways are interconnected ? This is in the next development.

2.3) Switch, Hub, Router and Proxy


© 2017 Julien FOURET. All Rights Reserved. Designed By Julien FOURET.