Application Layer
Application layer
The application layer provides the interface between applications and the network.
It defines protocols that applications use to exchange data, such as:
- HTTP for web browsing
- SMTP for email
- DNS for domain name resolution
Transport Layer
Transport layer
The transport layer ensures reliable communication between hosts.
It uses protocols like:
- TCP (Transmission Control Protocol): Provides reliable, ordered, and error-checked delivery.
- UDP (User Datagram Protocol): Offers faster, but less reliable, communication.
Internet Layer
Internet layer
The internet layer handles packetization, addressing, and routing.
Its primary protocol is IP (Internet Protocol), which:
- Assigns unique IP addresses to devices
- Routes packets across networks
Network Interface Layer
Network interface layer
The network interface layer deals with the physical transmission of data.
It includes:
- Data framing: Encapsulating packets into frames
- MAC addressing: Ensuring data reaches the correct device on a local network
Interaction Between Layers
Each layer of the TCP/IP model performs a specific function, but they work together to ensure reliable data transmission:
- Application Layer: Prepares data for transmission (e.g., an HTTP request).
- Transport Layer: Segments data and adds error-checking information.
- Internet Layer: Encapsulates segments into packets with IP addresses.
- Network Interface Layer: Converts packets into signals for physical transmission.
Step-by-Step: Sending a File from Computer A to B
On Computer A
- Application Layer (User level)
- This is where the file transfer starts.
- The user on Computer A uses a program (e.g. a browser, FTP client, or email app) to send the file.
- The application adds its own header with information like:
- The type of data (e.g. file, text, video)