How Internet Works

The Internet, the global network of networks that extends across virtually the entire planet Earth, is based on a series of network protocols, usually summarized by the term TCP/IP stack, named after the highest-level protocols used on the network.

Using the IP protocol, packets can be delivered to any host on the Internet: basically, it's sufficient for the sender to be
connected to the Internet and to know the public IP address of the recipient host; everything else is handled by the global network through routing. However, the IP protocol does not solve the problem of how to make two arbitrary processes, one on the sending machine and one on the receiving machine, communicate with each other. This problem is This is addressed by transport protocols, which create the logical abstraction of an end-to-end connection, that is, the communication support between two processes located at the two ends of the logical channel. On the Internet, the transport protocols are the TCP and UDP protocols: of the two, TCP is undoubtedly the most widely used, for reasons that will be explained below.

IP Addresses

The IP address is the address that allows us to recognize a device (PC, router, smartphone, etc.) within a network that uses the IP protocol
(Internet Protocol). Currently, the most popular version of the IP protocol is version 4 (v4), which will be replaced in the future by version 6 (v6), which allows us to have more Available addresses. An
IPv4 address is specified in decimal with this syntax:
192.168.0.1
 

Routing

Routing is the service performed by routers, fundamental components of the Internet. A router is a layer 3 network device whose fundamental task is to allow
different and heterogeneous networks to communicate with each other. To do this, the router routes packets based on IP addresses. Each router is connected to at least two different networks and will therefore have at least two IP addresses, one address for each network to which it is connected. connected.

TCP

TCP (Transmission Control Protocol) is the transport protocol that provides a logical channel that allows end-to-end communication between two hosts at either end of the network.
Since there are multiple processes running on any given host, and therefore multiple application programs, TCP must allow demultiplexing, allowing the network to be shared among the various application processes within the same host. The demultiplexing service, as explained in this post, is common to all transport protocols and is It is therefore also implemented by the UDP protocol.

Furthermore, the distinctive feature of the TCP protocol is that it guarantees the reliable and sequential delivery of a byte stream.

The reliable delivery service ensures that TCP is able to recover lost messages, restore their sequence, and eliminate duplicate messages. These operations are implemented by the sliding window algorithm.

Flow control allows the protocol to allow the receiver to limit the amount of data the sender transmits at a given time. This prevents the sender from exhausting the receiver's capacity.

Congestion control prevents the sender from overloading the network. In fact, if an excessive number of packets are injected into the network, switches or connection lines can be overloaded.
Â