To communicate with another computer, it is important to understand what happens locally. The local Operating System will perform all Layers of the OSI model to create the electrical signals on the network cable (or presence or absence of light on fiber).
Basically, as each layer accepts and delivers inputs to the next layer. If a layer is transferring data to the Operating System from the network, it removes and decodes a packet's header. If a layer is transferring data from the Operating System to the network, it creates and adds a header to the packet.
The Application layer performs all necessary steps to communicate directly with applications (Email, web browser, FTP, etc.).
The Presentation and Session layers don't do much in TCP/IP.
The Transport layer's job is to break up (or re-assemble) the entire data stream into blocks for easier processing. If a block is lost or corrupted, it asks for that block to be resent. It also responds to requests to resend blocks that were lost or corrupted on the way to a remote computer.
The Network layer's job is to address packets destined for a remote computer with an IP address of the source and destination computers. If an destination address is not known, it performs a DNS (Domain Name Service) request for the IP address.
The Data Link layer's job is to address packets destined for a remote computer with the MAC address of the source and destination computers. If the destination MAC address is not known and the destination IP address appears to not be on the local LAN, it addresses the packet to the Default Gateway and let's the Gateway deal with it.
The Physical layer's job is to perform all necessary steps to transfer the data to or from the network medium (electrical signals for Ethernet, light switching for optical, etc.).
![[logo]](logo.png)