TCP/IP Model
The TCP/IP model, or Internet Protocol Suite, is a conceptual framework that governs how data should be packaged, transmitted, received, and processed over the internet.
It consists of four layers: the Application Layer interacts with software applications and uses familiar protocols like HTTP, SMTP, FTP, and more; the Transport Layer controls end-to-end communication using TCP or UDP; the Internet Layer is responsible for packet routing and dispatching using protocols like IP and ICMP; and finally, the Network Interface Layer that interfaces directly with the network hardware and facilitates data transmission in the form of frames using protocols like Ethernet and Wi-Fi. Each layer plays a critical role in enabling successful, standardised, and organised communication across the internet.
How to: TCP/IP model
Each layer has a specific function, but they all work together to allow data transmission over a network, from the originating application on one device to the destination application on another.
- Application Layer: This layer interacts directly with the software applications like web browsers, email clients, etc. It uses protocols like HTTP, HTTPS, FTP, SMTP, DNS, and more. The type of data handled here is application data or messages. It uses logical ports assigned to specific services (e.g., port 80 for HTTP).
- Transport Layer: This layer is responsible for end-to-end communication control. It uses protocols like TCP (for reliable connection-oriented services) and UDP (for fast connectionless services). It deals with data known as segments (TCP) or datagrams (UDP). This layer also uses logical ports, dictated by upper layer protocols and services.
- Internet Layer: This layer handles the packaging, routing, and dispatching of data packets across networks. Devices such as routers and hosts operate at this layer. Protocols include IP, ICMP, IGMP, and ARP. This layer mainly deals with IP addresses, not ports.
- Network Interface Layer: This is the lowest layer that interfaces directly with the network hardware. It deals with data in the form of frames. Devices operating at this layer include NICs, switches, routers, etc. Protocols used here include Ethernet, Wi-Fi, PPP, among others. The ports referred to at this layer are the physical ports on the networking hardware.
OSI Model
Layer 7 (Application Layer)
Consist of protocols, services, and interfaces for end-user application to communicate over a Network.
It handles data formatting, user interface, application-specific functionality, and facilitates interoperability between different applications and systems.
Layer 6 (Presentation Layer)
The Presentation Layer (Layer 6) in the OSI model focuses on the syntax and semantics of data exchanged between applications. It handles data formatting, encryption/decryption, and compression/decompression.
This layer ensures that data is properly structured and presented for seamless communication between different systems. It defines protocols and mechanisms to handle tasks such as character encoding/decoding, data translation, and protocol conversion. Examples of protocols at this layer include the Secure Sockets Layer (SSL) and Transport Layer Security (TLS), which provide encryption for secure communication. Additionally, protocols like ASCII, Unicode, and MIME (Multipurpose Internet Mail Extensions) aid in character encoding, ensuring compatibility between different systems
Layer 5 (Session Layer)
The Session Layer (Layer 5) in the OSI model is responsible for establishing, managing, and terminating sessions between applications. It provides mechanisms for session synchronisation, checkpointing, and recovery to ensure reliable communication.
The Session Layer sets up and maintains communication channels, or sessions, between applications, allowing them to exchange data in an organised manner. It handles tasks such as session establishment, session management, and session termination. This layer also provides session multiplexing, allowing multiple sessions to run concurrently on the same network connection. While there are no specific ports associated with Layer 5, devices operating at this layer include computers, servers, and network appliances. Example protocols at Layer 5 include NetBIOS (Network Basic Input/Output System) Session Protocol and the Session Control Protocol (SCP).
Layer 4 (Transport Layer)
The Transport Layer (Layer 4) in the OSI model is responsible for reliable and efficient end-to-end delivery of data between hosts. It ensures that data is delivered accurately, in the correct order, and without errors or losses.
The Transport Layer handles tasks such as segmentation, flow control, error detection and correction, and end-to-end connection management. It provides mechanisms for multiplexing and demultiplexing data streams using port numbers to identify different applications. The Transport Layer also determines the level of reliability and guarantees provided for data transmission, whether it’s through connection-oriented protocols like TCP (Transmission Control Protocol) or connectionless protocols like UDP (User Datagram Protocol). Devices operating at this layer include computers, servers, routers, and switches. Example protocols at Layer 4 include TCP, UDP, and SCTP (Stream Control Transmission Protocol)[2]-OTL
Layer 3 (Network Layer)
The Network Layer (Layer 3) in the OSI model is responsible for logical addressing, routing, and forwarding of data packets between different networks.
It provides the necessary mechanisms to establish end-to-end communication paths across interconnected networks. The Network Layer adds network addresses (such as IP addresses) to the data packets, enabling routers to direct them to their destinations. It determines the optimal path for data transmission, considering factors such as network topology, congestion, and quality of service requirements. The Network Layer encapsulates data from the Transport Layer into packets and performs routing decisions based on the destination address. Devices operating at this layer include routers, Layer 3 switches, and some firewalls. Example protocols at Layer 3 include IP (Internet Protocol), ICMP (Internet Control Message Protocol), and OSPF (Open Shortest Path First).[2]-ONL
Layer 2 (Data Link Layer)
The Data Link Layer (Layer 2) in the OSI model is responsible for the reliable transfer of data frames between adjacent network nodes over a physical link.
It provides error detection and correction mechanisms, as well as flow control and access control to manage the transmission of data. The Data Link Layer encapsulates network layer packets into data frames, adds control information like headers and trailers, and performs framing, error checking, and addressing based on the physical addresses (MAC addresses). It handles media access control, resolving contention in shared media environments. Devices operating at this layer include network interface cards (NICs), Ethernet switches, and wireless access points. Example protocols at Layer 2 include Ethernet (IEEE 802.3), Wi-Fi (IEEE 802.11), and PPP
Layer 1 (Physical Layer)
The Physical Layer (Layer 1) in the OSI model is responsible for the transmission and reception of raw bit streams over a physical medium. It deals with the physical characteristics of the network such as voltage levels, cable types, connectors, and signalling mechanisms.
The Physical Layer establishes and terminates the physical connections between network nodes and ensures the reliable transmission of bits. It defines the electrical, mechanical, and procedural aspects of the physical medium. This layer does not involve any addressing or formatting of data but focuses solely on the transmission of binary signals. Devices operating at this layer include network cables, connectors, repeaters, hubs, and physical interfaces of network devices. Example protocols or standards at Layer 1 include Ethernet physical standards (such as 10BASE-T, 100BASE-TX) and optical fiber standards (such as 1000BASE-SX, 10GBASE-LR)
Why TCP/IP is 4 Layered and OSI 7-Layered
OSI is the detailed model dividing the network design into 7 layers, however the TCP/IP which is the simplified de-fecto standard used when creating/designing networks to talk to each other over different geological regions, contains 4 layers.
The top three and bottom 2 layers of OSI model are treated as one layer for simplicity as they all form the first/last steps of the sending and receiving journey of data.
4 – Application – First step
3 – Transport – Middle part
2 – Internet – Middle part
1 – Network – Last Step
Layers 7,6,5 becomes layer 4 forming an Application layer
Layers 1,2 becomes layer 1 forming the Network layer