To deal with the massive complexity of network communications, the network architecture is organized into layers. Each layer provides a specific service to the layer above it and relies on the services of the layer below it. This layered architecture allows hardware and software from vastly different vendors to communicate seamlessly.
The Open Systems Interconnection (OSI) model was developed by the International Organization for Standardization (ISO) in the late 1970s. It consists of 7 layers.
The application layer is the highest level. It provides the user interface and enables the user (human or software) to access the network. It provides services like email, remote file access, and web browsing. Protocols: HTTP, FTP, SMTP, DNS, SSH.
The presentation layer is concerned with the syntax and semantics of the information exchanged between two systems.
The session layer is the network dialog controller. It establishes, maintains, and synchronizes the interaction between communicating systems. It adds synchronization points (checkpoints) into a stream of data to allow recovery in case of a crash during a massive file transfer.
The transport layer is responsible for process-to-process delivery of the entire message. While the network layer oversees end-to-end (computer-to-computer) delivery, it does not recognize individual applications. The transport layer uses Port Numbers to ensure the data reaches the correct application.
The network layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links).
The data link layer transforms the physical layer (a raw transmission facility) into a reliable link. It makes the physical layer appear error-free to the upper layer.
The physical layer coordinates the functions required to carry a raw bit stream (0s and 1s) over a physical medium. It deals with the mechanical and electrical specifications of the interface and transmission medium.