The different layers that make up the internet protocol stack are
- Application
- Transport
- Network
- Link
- Physical
The fundamental services (and eventual errors that each layer has to provide is described below) although the physical layer has been omitted.
The application layer specifies the shared protocols and interface methods used by hosts in a communications network. It needs to adapt to the limitations of the transport layer, especially when using UDP.
The two fundamental services provided by the Transport layer are UDP and TCP. Primarily its purpose is to compensate for the rudimentary services provided by the network layer, which provide no guarantees. Furthermore the network layer sends messages between computers, while the transport layer establishes a logical connection between processes by using port numbers.
The primary purpose of the network layer is to deliver messages to the appropriate receiver. The layer has to provide addressing and routing.
-
Data encapsulation, add additional information to the data packet from the network layer so that they may be delivered correctly, for instance the link layer address of the destination, the length of the data packet and error correction information.
-
Error correction, because of external interference the layer needs to be capable of detecting when bit-errors occur. If one wants to achieve reliable data transfer of data methods are needed for retransmitting frames that could not be correctly transferred the first time.
-
Asynchronous/Synchronous transfer. Provide synchronisation between sender and receiver.
-
Access to transmission medium and flow control.