The Basics of Computer Networks: OSI and TCP/IP Models
This is a multi-part series on DevOps 101. Access the complete DevOps series by clicking HERE
Access the The Basics of Computer Networks (Previous post in Networking) by clicking HERE
Access the The Basics of Computer Networks: Network Devices (Next post in Networking) by clicking HERE
The OSI (Open Systems Interconnection) model is a conceptual framework used for understanding how different communication systems interact with each other. It is divided into seven layers, each of which represents a different aspect of network communication. These layers are the physical layer, data link layer, network layer, transport layer, session layer, presentation layer, and application layer. The OSI model is often used as a reference model for comparing different network protocols.
The TCP/IP (Transmission Control Protocol/Internet Protocol) model, on the other hand, is a protocol suite used for communicating over the internet. It is divided into four layers: the network interface layer, Internet layer, transport layer, and application layer. The TCP/IP model is also often used as a reference model in networking, particularly in the context of the internet. It is notable for being the protocol suite used by the world wide web and a wide variety of other internet services.
The OSI Model

The OSI (Open Systems Interconnection) model is a conceptual framework that describes the communication functions of a computing system. It was proposed by the International Organization for Standardization (ISO) in 1984, with the aim of defining the common rules for communication between different computer systems. The OSI model consists of 7 layers, each responsible for a specific type of communication task. These include physical, data link, network, transport, session, presentation, and application layers. The model provides a standard reference architecture for network protocol design, allowing for greater interoperability and flexibility in communication between different systems.
Here is a breakdown of the OSI model:
- The Physical Layer: This layer defines the physical connection between devices and the transmission of raw data bits. It includes aspects such as voltage levels, cable specifications, and physical network topology.
- The Data Link Layer: This layer provides node-to-node data transfer. It breaks data into frames and adds a header with physical addresses (MAC addresses) to each one. It also detects and corrects errors that may occur during transmission.
- The Network Layer: This layer focuses on end-to-end data transfer. It adds logical addresses (IP addresses) to packets to determine the route that the data will take through the network. It also handles congestion control and quality of service (QoS).
- The Transport Layer: This layer provides end-to-end transport services and ensures reliable delivery of data. It segments data from upper layers into smaller units and adds a header with sequence numbers and other control information.
- The Session Layer: This layer sets up, maintains and terminates sessions between applications. It allows communication between devices even when they don’t use the same protocols.
- The Presentation Layer: This layer manages the presentation of data from one system to another. It transforms data into a suitable format for the application layer.
- The Application Layer: This layer directly interacts with the end user and communicates with the software applications that use the network. It defines protocols and the services for those protocols.
Physical Layer
The physical layer is the first layer of the OSI model, and it is responsible for the actual physical transmission of data over the transmission medium. This layer handles the mechanical and electrical specifications of the transmission medium, such as the cables, connectors, and signaling. The physical layer is responsible for translating the binary data into electrical or optical signals.
The physical layer is responsible for defining the characteristics of the transmission medium, such as the types of cables used, the physical connectors required to connect devices to the cables, and the signaling methods that are used to encode and transmit data over the medium. These characteristics form the basis of the physical layer’s protocols, which ensure that data is transmitted in a reliable and efficient manner.
One of the most important concepts in the physical layer of the OSI model is the concept of bit rate, which refers to the number of bits that can be transmitted per unit of time over the transmission medium. The bit rate is determined by the bandwidth of the medium, which is the range of frequencies that can be passed without significant attenuation. The higher the bandwidth, the higher the bit rate that can be achieved.
Another important concept in the physical layer is the use of modulation techniques to transmit data over the medium. Modulation involves changing the characteristics of the carrier signal (such as its frequency, amplitude, or phase) to represent the binary data. Some of the most common modulation techniques include amplitude modulation (AM), frequency modulation (FM), and phase modulation (PM).
In addition to the transmission of data, the physical layer is also responsible for error detection and correction. This is accomplished through the use of check digits, cyclic redundancy checks (CRC), and other techniques which ensure that data is received accurately and without errors.
The physical layer of the OSI model performs the following functions:
- Encoding and decoding of data signals to ensure that data can be transmitted across the network using the appropriate methods
- Transmission of binary data as signals across the physical network medium, which can include copper wires, fiber optic cables, or wireless signals
- Transmission rate control, ensuring that data is transmitted at an appropriate rate based on the capabilities of the network and the receiving device
- Physical addressing, which involves assigning addresses to each device on the network to ensure that data is properly directed to its intended destination
- Error detection and correction, which involves identifying and correcting errors that occur during data transmission, such as dropped packets or corrupted data
- Flow control, which regulates the pace at which data is transmitted to prevent data loss due to overflow or congestion
Overall, the physical layer is responsible for ensuring that data is transmitted reliably and efficiently across the network by controlling the physical transmission of data signals.
Data Link Layer
The Data Link Layer is layer two of the OSI Model, which is a seven-layer architecture used to describe how data moves through a network. At this layer, data packets are encapsulated into frames and sent across the physical layer of the network. The purpose of the Data Link Layer is to provide error-free transmission over the physical layer.
The Data Link Layer is divided into two sub-layers: the Logical Link Control (LLC) sub-layer and the Media Access Control (MAC) sub-layer. The LLC sub-layer is responsible for identifying network protocols and for flow control between devices. The MAC sub-layer handles the addressing and access to the media, ensuring that data is sent to the correct device and that multiple devices can share the same media.
One of the most important functions of the Data Link Layer is error checking and correction. This is achieved through the use of a frame check sequence (FCS), which is a mathematical value calculated by the sender and checked by the receiver. If the FCS does not match the value calculated by the receiver, the frame is discarded and the sender is notified of the error.
Another important function of the Data Link Layer is flow control, which ensures that data is transmitted at a rate that the receiver can handle. There are two types of flow control: stop-and-wait and sliding window. Stop-and-wait flow control involves sending a single frame at a time and waiting for an acknowledgment from the receiver before sending the next frame. Sliding window flow control allows the sender to send multiple frames before waiting for an acknowledgment.
The Data Link Layer also handles address resolution, which translates logical addresses into physical addresses. Logical addresses, such as IP addresses, are assigned by the network administrator and are used to uniquely identify devices on a network. Physical addresses, also known as MAC addresses, are burned into the network interface card (NIC) of each device and are used by the Data Link Layer to route frames to the correct device.
The data link layer is responsible for:
- Framing: The process of dividing data into frames to be transmitted over the physical layer.
- Addressing: Adding source and destination addresses to each frame for proper communication.
- Error detection and correction: Checking for errors in the data transmission through techniques such as checksumming or CRC and correcting them as necessary.
- Flow control: Regulating data transmission to prevent overwhelming the receiver.
- Access control: Managing access to shared network resources by implementing various protocols such as CSMA/CD or token passing.
The data link layer is divided into two sub-layers:
- Logical Link Control (LLC)
- Media Access Control (MAC)
Logical Link Control (LLC)
Logical Link Control (LLC) is a sub-layer of the Data Link Layer in the OSI model. It is responsible for managing communications between devices over a network. The LLC layer provides services for both connection-oriented and connectionless data transfer.
Its functions include flow control, error detection, and handling, addressing, and multiplexing. By regulating the transfer of data between devices over a network, LLC ensures efficient and accurate communication between devices.
One of the key functions of LLC is to provide flow control. This means regulating the amount of data transferred between two devices to prevent overloading the network. Additionally, LLC is responsible for error detection and handling, ensuring that data is transmitted accurately and efficiently.
Another important role of the LLC layer is addressing. It helps in identifying the source and destination of data packets transmitted over the network. The LLC layer does this by including a logical address in each data frame.
LLC is also responsible for multiplexing, which means that it supports different network protocols operating on a network. In other words, the LLC layer allows for multiple network protocols to share the same network hardware.
One of the most popular implementations of LLC is the IEEE 802.2 standard. This defines the LLC sub-layer within the Data Link Layer and helps ensure compatibility between different types of network hardware.
In terms of operation, LLC works by wrapping the data into a frame that includes the LLC header. The header includes the source and destination addresses, a control field, and other information necessary for network communication. Once the frame is created, it is transmitted over the network to its destination.
Media Access Control (MAC)
Media Access Control (MAC) is a protocol used in the data link layer of the OSI model. This layer of the model is responsible for transferring data between network devices. The MAC protocol provides important functions such as addressing, error checking, and flow control.
MAC addresses are unique identifiers assigned to network devices. They are used to ensure that data is sent to the correct device. MAC addresses are 48-bit hexadecimal numbers that are assigned to network interface cards (NICs). Each NIC has a unique MAC address that is burned into the card at the factory.
The MAC protocol operates at the data link layer of the OSI model. This layer is responsible for transferring data between devices within the same network segment. The MAC protocol is used to determine which device should have access to the network at any given time. This is important because it prevents collisions between devices that are trying to transmit data at the same time.
There are several different MAC protocol types that are used in network communication. The most common types are CSMA/CD and Token Ring. CSMA/CD is used in Ethernet networks and Token Ring is used in IBM networks. These protocols determine how devices on the network share access to the network.
In a CSMA/CD network, each device listens to the network before attempting to transmit data. If another device is transmitting data, the device waiting to transmit will wait until the network is clear. This protocol ensures that only one device is transmitting data at a time. If a collision does occur, the devices stop transmitting and wait a random amount of time before attempting to transmit again.
Token Ring networks use a different protocol. In Token Ring networks, a token is passed around the network. When a device wants to transmit data, it must wait until it receives the token. Once a device has the token, it is allowed to transmit data. After the data is transmitted, the token is passed to the next device.
In short, the data link layer is responsible for providing reliable and error-free communication between devices on the same network.
Network Layer
The network layer, also known as the third layer of the OSI model, is responsible for facilitating communication between different networks. Its primary function is to route data packets from one network to another, ensuring that they reach their intended destination.
One of the most important aspects of the network layer is its ability to provide end-to-end communication between devices that are located on different networks. This is achieved through the use of a unique identifier known as an IP address, which is assigned to each device that is connected to the network.
In addition to routing data packets, the network layer is also responsible for establishing connections between devices, managing errors and congestion, and ensuring the reliable delivery of data packets to their intended destination.
One of the key features of the network layer is its ability to operate independently of the underlying physical network technology. This means that the layer can facilitate communication between devices that are connected to different types of networks, such as Ethernet, Wi-Fi, or cellular networks.
One of the main types of network layer protocols is the Internet Protocol (IP), which is used to route data packets across the Internet. Other important protocols that operate at the network layer include the Address Resolution Protocol (ARP), which is used to map IP addresses to physical network addresses, and the Internet Control Message Protocol (ICMP), which is used to send error messages and network status updates.
The network layer protocols can be summarized as follows:
- Internet Protocol (IP): Provides logical addressing for network devices and enables packet switching across network boundaries.
- Internet Control Message Protocol (ICMP): Used for messaging and error reporting between network devices.
- Address Resolution Protocol (ARP): Resolves IP addresses to MAC addresses for communication within a local network.
- Reverse Address Resolution Protocol (RARP): Resolves MAC addresses to IP addresses for communication with systems that do not support ARP.
- Internet Group Management Protocol (IGMP): Enables multicasting on an IP network.
- Border Gateway Protocol (BGP): Used for routing between autonomous systems on the Internet.
- Open Shortest Path First (OSPF): A link-state protocol used for routing in large-scale enterprise networks.
- Routing Information Protocol (RIP): A distance-vector protocol commonly used in small to medium-sized networks.
- Intermediate System to Intermediate System (IS-IS): A link-state protocol used mainly by Internet service providers.
- Virtual Router Redundancy Protocol (VRRP): Provides redundancy for IP networks by allowing multiple routers to share a virtual IP address.
Here are some of its main features:
- Error control: The network layer is responsible for the detection and correction of errors in the data transmitted between devices. It uses various error detection and correction techniques, such as checksums and parity checks, to ensure that the data is transmitted correctly and without errors.
- Routing: The network layer is responsible for routing data between different networks. It uses routing algorithms to determine the best path for data to travel across multiple networks, based on factors such as network topology, traffic load, and quality of service requirements.
- Addressing: The network layer is responsible for identifying devices on the network by assigning them unique IP addresses. This allows data to be transmitted to specific devices, and enables routers to determine the destination of data as it traverses the network.
- Fragmentation and Reassembly: The network layer is responsible for breaking up large data packets into smaller fragments that can be transmitted over the network, and reassembling the fragments at the receiving end. This is necessary because different networks have different maximum packet sizes, and large packets may need to be broken up to ensure efficient transmission.
- Congestion Control: The network layer is responsible for managing network congestion and preventing the network from becoming overloaded with traffic. It uses various congestion control algorithms to regulate the flow of data across the network and avoid congestion-related problems, such as packet loss and delays.
In the end, the network layer plays a critical role in ensuring efficient and reliable communication between devices on different networks. Its various functions work together to enable devices to communicate with each other, regardless of their physical location or the complexity of the network architecture.
Transport Layer
Transport layer is the fourth layer of the OSI model and plays a crucial role in establishing and managing end-to-end communication between source and destination devices. It is responsible for breaking the data into smaller chunks, known as segments, and ensuring reliable and efficient transmission of those segments across the network.
One of the primary functions of the transport layer is to establish a connection between two hosts, which can be either connection-oriented or connectionless. Connection-oriented protocols like TCP establish a reliable communication channel between two hosts before data transmission begins. Connectionless protocols such as UDP, on the other hand, do not establish a connection and are less reliable but faster.
Another important aspect of the transport layer is flow control and congestion control. Flow control ensures that a receiving host can handle incoming data and prevents it from being overwhelmed with too many segments at once. Congestion control helps to prevent network congestion during high traffic periods by regulating the amount of data sent.
Of course, the transport layer is not without its challenges. One of the primary challenges is security, as many transport layer protocols are vulnerable to attacks like SYN floods or TCP reset attacks. To mitigate these risks, various security technologies have been developed, including firewalls and intrusion detection systems.
In addition to security, the transport layer must also deal with issues related to scalability and interoperability. As networks grow and new communication technologies emerge, transport layer protocols must adapt to these changes in order to remain effective. Fortunately, many transport layer protocols are designed to be flexible and extensible, allowing them to evolve alongside the networks they serve.
Here are some of its protocols:
- Transmission Control Protocol (TCP): a protocol responsible for reliable transmission of data between applications, including flow control, congestion control, and error detection and correction.
- User Datagram Protocol (UDP): a protocol that provides simple, connectionless communication between applications, without any guarantees of delivery, ordering, or error detection.
- Stream Control Transmission Protocol (SCTP): a protocol that offers features similar to those of TCP, but also provides support for multihoming and message-oriented communication.
Some of the prominent functions and features of this layer are as follows:
- End-to-End Communication: The transport layer ensures that data is transmitted and received reliably, accurately, and efficiently between the source and destination devices.
- Segmentation and Reassembly: It segments large chunks of data into smaller, manageable units called segments and then reassembles them at the receiving end.
- Flow Control: The transport layer adjusts the flow of data to prevent the receiver from being overwhelmed with too much data at once, which may lead to data loss.
- Error Control: The transport layer detects, corrects, and controls any errors that may occur during data transmission, thereby ensuring data integrity.
- Connection-Oriented Communication: This layer establishes a connection between the source and destination devices, transmitting data after a connection has been established.
- Multiplexing: The transport layer is responsible for multiplexing multiple sessions or applications onto a single network connection.
- Quality of Service (QoS): This layer enables the allocation of network resources to ensure that high-priority data is given priority in case of network congestion.
All in all, the transport layer is a critical component of modern computer networks, providing reliable and efficient communication between hosts. From flow control to security, it plays a vital role in ensuring that data is transmitted quickly, reliably, and securely across the internet and other networks.
Session Layer
The session layer is the fifth layer of the OSI model, and is responsible for managing communication sessions between hosts. This layer establishes, manages and terminates these sessions,
allowing for the exchange of multiple messages between the same two computers.
Session layer protocols and functions can be divided into three main areas: session establishment, data transfer and session termination. In terms of session establishment, the session layer provides the
mechanisms necessary to initiate and maintain a session, such as login credentials or security protocols. The session layer also facilitates data transfer by managing the size and transmission order of
data packets. Finally, the layer handles session termination by ensuring that all data has been properly transmitted, notifying both parties when the session has ended.
The session layer performs a number of important functions, including synchronization and checkpointing. Synchronization refers to the orderly, controlled exchange of information between both parties involved in a session. Checkpointing, on the other hand, ensures that data is sent and received without loss or corruption, and that communication can be resumed from a known point when necessary.
The session layer is also responsible for managing security at the session level. It provides the ability to identify users and monitor their activities within a session. By establishing and maintaining sessions, the layer is able to enforce access controls and ensure that no unauthorized user gains access to sensitive information.
Another important feature of the session layer is connection-oriented communication. This enables the creation of virtual circuits between two hosts, allowing for faster and more efficient communication. Virtual circuits are established by configuring the session layer to include addressing information, such as source and destination addresses, and connection parameters, such as window size or data flow control.
The session layer protocols provide the session layer with the functionality required to establish, maintain, and terminate communication sessions between devices. Each protocol provides different management and communication services tailored to specific communication scenarios and system requirements.
- SSCP (Session Service Control Protocol): This protocol manages the initiation, maintenance, and termination of session connections by controlling the exchange of session packets between devices.
- ISO 8328/CCITT X.225 Session Protocol: This protocol is responsible for controlling the establishment, maintenance, and termination of sessions between devices.
- AppleTalk Transaction Protocol (ATP): This protocol provides reliable, sequenced, and flow-controlled end-to-end data transmission between processes that may reside on different nodes, communicating through different physical networks.
- Remote Procedure Call (RPC): This protocol provides client/server communication between programs running on different hosts.
Below are the key features and functions of the Session Layer:
- Session Management: This particular function of the Session Layer allows the establishment, maintenance and termination of sessions between endpoints. It ensures that each session is identified uniquely and correctly.
- Synchronization: This feature involves maintaining the sequence of the exchange of information between two devices and establishes checkpoints for data retransmission.
- Dialog Control: The Session layer can manage dialog control between applications on different devices, it breaks the data into logical units called segments and makes sure they are exchanged in a respective sequence.
- Connection Oriented Service: The Session layer provides the services for connection-oriented communication at the Session level which ensures that all the devices can communicate with each other securely.
- Session Restoring: Session Layer ensures that the same application program or network process can resume its session with the same remote application program or network process after it crashes or is shut down.
- Encryption: Session Layer also provides encryption services if needed for secure communication between devices.
In short, the session layer plays a crucial role in allowing computers to effectively communicate with one another. It provides mechanisms to manage communication sessions, ensuring that data is transmitted efficiently, securely and accurately.
Presentation Layer
The Presentation Layer is the sixth layer in the Open Systems Interconnection (OSI) model. This layer is responsible for ensuring that the data sent from one system to the other is compatible and is able to be understood by the receiving system. The presentation layer provides services such as data encryption, data compression, and data translation. In this post, we will cover every important detail of the Presentation Layer.
The main function of the Presentation Layer is to provide a standard format for data exchange between different systems. It is responsible for ensuring that the data sent from one system can be understood by the receiving system, regardless of the hardware or software platforms used. This is done using a process called data formatting, which involves encoding and converting data into a standardized format that can be exchanged between systems.
Another key function of the Presentation Layer is data encryption. This layer is responsible for encrypting data before it is transmitted, and decrypting it on the receiver’s end to make the data readable again. Encryption ensures that data is secure and protected from unauthorized access while in transit. Different encryption techniques are used to provide varying levels of security, depending on the sensitivity of the data being transmitted.
Data compression is also an important function of the Presentation Layer. This involves reducing the size of data before it is transmitted over a network, ultimately allowing for faster transmission times. Compression techniques used in this layer include lossy and lossless compression.
The Presentation Layer also provides data translation services, which allow different data formats to be translated into a standardized format that can be understood by the receiver. Different devices and software platforms use different data formats, so translation services play a crucial role in enabling communication between them. Data translation services also help to ensure that data integrity is maintained during transmission.
Some of the protocols of session layer are:
- SSL (Secure Sockets Layer): This protocol provides encryption and authentication for data being transmitted between two endpoints. It is commonly used for securing online transactions and protecting sensitive information such as passwords and credit card numbers.
- AFP (Apple Filing Protocol): This protocol allows Mac OS X users to access files and folders on a remote server. It provides authentication and encryption for secure file sharing.
- NCP (NetWare Core Protocol): This protocol is used for client-server communications in Novell NetWare environments. It provides file and print services, as well as authentication and encryption for secure data transfer.
- SNMP (Simple Network Management Protocol): This protocol allows network administrators to remotely manage and monitor network devices such as routers, switches, and servers. It provides a way to collect and analyze data on network performance and respond to issues in real-time.
The main features and functions of the presentation layer can be summarized as follows:
- Data representation and encryption: The presentation layer ensures that data transmitted across the network is in a format that can be understood by the receiving device. It also offers the ability to encrypt data at the source and decrypt the data at the destination.
- Compression and decompression: The presentation layer can compress data before it is transmitted, which can reduce the amount of data that needs to be transmitted, therefore speeding up the transmission process.
- Translation: The presentation layer can translate data from one format to another, meaning that devices with different operating systems or software can communicate with each other.
- Session management: The presentation layer manages the sessions between two devices. It creates and maintains the session until the data exchange is complete.
Just to brief, the Presentation Layer is a critical component of the Open Systems Interconnection (OSI) model. Its primary function is to ensure data is compatible between different systems. This is achieved through data formatting, encryption, compression, and translation services. Understanding the importance of the Presentation Layer is essential for anyone working in the field of computer networking.
Application Layer
The application layer is the topmost layer of the OSI model and is responsible for providing interfaces and protocols for communication between various applications running on different devices. This layer is responsible for managing end-to-end communication, data exchange, authentication, and encryption.
There are several protocols that operate at the application layer, including HTTP, FTP, SMTP, DNS, and Telnet. These protocols provide the necessary interfaces for applications to communicate with each other.
HTTP (Hypertext Transfer Protocol) is one of the most widely used application layer protocols. It is used for transmitting data over the internet and is used when a user accesses a website. FTP (File Transfer Protocol) is another application layer protocol that is used for file transfer between two devices.
SMTP (Simple Mail Transfer Protocol) is used for sending and receiving email messages. This protocol can be used by any email client to send messages to an email server or to download messages from an email server. DNS (Domain Name System) is responsible for translating domain names into IP addresses. This is used when a user enters a domain name into a web browser.
Telnet is used for remote terminal communication between two devices. This protocol allows a user to establish a terminal connection to a remote device over a network.
The application layer also provides support for security protocols such as SSL (Secure Sockets Layer) and TLS (Transport Layer Security). These protocols provide encryption and authentication to ensure secure data exchange between applications.
The protocols of the application layer include:
- HTTP (Hypertext Transfer Protocol) – used for transmitting data on the World Wide Web
- FTP (File Transfer Protocol) – used for transmitting files over the internet
- SMTP (Simple Mail Transfer Protocol) – used for sending and receiving email messages
- DNS (Domain Name System) – used for translating domain names to IP addresses
- SSH (Secure Shell) – used for secure remote access and file transfer
- Telnet – used for remote access to a server or network
- SNMP (Simple Network Management Protocol) – used for managing and monitoring network devices
- DHCP (Dynamic Host Configuration Protocol) – used for assigning IP addresses to network devices automatically.
Some functions of the application layer is listed below:
- The application layer is the topmost layer of the OSI (Open Systems Interconnection) model.
- It provides services for end-to-end communication between applications or software programs.
- It includes protocols such as HTTP, FTP, SMTP, and DNS.
- It handles tasks such as data compression and encryption, file transfer, email creation and delivery, and web browsing.
- It uses sockets and APIs to facilitate communication with other layers of the OSI model.
- It enables users to interact with network resources and services, and to access data and information from servers and other devices.
- It also includes application programs and software development tools that allow users to create and customize their own applications and services.
In summary, the application layer is responsible for managing end-to-end communication, data exchange, authentication, and encryption between various applications running on different devices. A range of protocols operate at this layer, including HTTP, FTP, SMTP, DNS and Telnet. The layer also supports security protocols such as SSL and TLS for secure data transmission.
Protocols supported at various levels
Layer | Name | Protocols |
---|---|---|
Layer 7 | Application | SMTP, HTTP, FTP, POP3, SNMP |
Layer 6 | Presentation | MPEG, ASCH, SSL, TLS |
Layer 5 | Session | NetBIOS, SAP |
Layer 4 | Transport | TCP, UDP |
Layer 3 | Network | IPV5, IPV6, ICMP, IPSEC, ARP, MPLS. |
Layer 2 | Data Link | RAPA, PPP, Frame Relay, ATM, Fiber Cable, etc. |
Layer 1 | Physical | RS232, 100BaseTX, ISDN, 11. |
The TCP/IP Model

TCP/IP is the basic communication protocol that powers the internet. It stands for Transmission Control Protocol/Internet Protocol and is primarily built on two separate protocols TCP and IP.
TCP/IP dates all the way back to the 1960s when the US Department of Defense created the Network Control Program (NCP). NCP paved the way for ARPANET, one of the very first computer networks.
As the number of devices connected to the network grew, it became essential to develop a standardized protocol for more efficient communication between the devices. This led to the development of TCP/IP.
TCP provides a reliable, ordered, and error-checked delivery of data between applications running on hosts communicating across an IP network. It guarantees that data will be correctly transmitted and received in the right order. When packets of data are sent from one device to another, TCP tracks every packet, and if a packet is lost or damaged, TCP requests that the packet be retransmitted.
IP, on the other hand, provides a connectionless, unreliable packet delivery system. It is responsible for routing the data across the network to the correct destination. It does not guarantee that every packet will reach its destination, or that they will be delivered in the correct order.
The TCP/IP model consists of four layers – the link layer, the internet layer, the transport layer, and the application layer.
The link layer, also known as the network access layer or data-link layer, is responsible for the physical transmission of the data, including the actual cables, wireless transmitters, and other physical components of the network. This layer is also responsible for formatting the data into packets that can be understood by the rest of the protocol.
The internet layer is responsible for routing packets between networks. This is the layer where IP comes into play. The internet layer adds addressing and routing information to the packets.
The transport layer is responsible for the communication between applications across a network. This is where TCP comes into play. The transport layer divides the data received from the application layer into smaller packets and assembles them at the receiving end.
Finally, the application layer is the layer that directly interacts with the end user. It contains protocols that allow for email, file sharing, web browsing, and other types of network communication.
Here’s a breakdown of the TCP/IP model:
- Application Layer: This layer acts as the interface between the user and the network, providing various application services such as HTTP, FTP, Telnet, etc.
- Transport Layer: This layer provides end-to-end packet delivery services for reliable and sequential data transmission. It ensures that data is delivered in the right order, with proper error recovery and flow control mechanisms.
- Internet Layer: This layer provides logical addressing, routing, and forwarding of data packets across different networks. It uses IP (Internet Protocol) to accomplish this task.
- Network Access Layer: This layer provides access to the physical transmission medium and performs functions related to the physical transmission of data, such as encoding and decoding, framing, and error detection.
These different layers work together to ensure that data is transmitted securely and efficiently across networks. Each layer has its own set of protocols and functions, which help in achieving the end goal of successful data transmission.
Application Layer
The application layer is the highest layer of the TCP/IP model. It is responsible for providing services to the user, such as email, file sharing, and web browsing. The application layer protocols are responsible for breaking down user data into smaller units that can be transmitted over the network. They also reassemble the data at the receiving end.
The application layer is the most diverse layer of the TCP/IP model. There are many different application layer protocols, each of which is designed for a specific purpose. Some of the most common application layer protocols include:
- File Transfer Protocol (FTP): FTP is used to transfer files between computers on a network.
- Simple Mail Transfer Protocol (SMTP): SMTP is used to send and receive email.
- Hypertext Transfer Protocol (HTTP): HTTP is used to transfer web pages between web servers and web browsers.
- Domain Name System (DNS): DNS is used to translate domain names into IP addresses.
- Telnet: Telnet is a terminal emulation program that allows users to connect to a remote computer and interact with it as if they were sitting in front of it.
The application layer is responsible for providing a variety of services to the user. These services include:
- Data transfer: The application layer is responsible for transferring data between computers on a network.
- Data storage: The application layer can be used to store data on a remote server.
- Data sharing: The application layer can be used to share data with other users on a network.
- Data collaboration: The application layer can be used to collaborate with other users on a project.
The application layer is a critical layer of the TCP/IP model. It provides the services that allow users to interact with the network and share data.
The application layer is the most important layer of the TCP/IP model because it provides the services that allow users to interact with the network and share data. Without the application layer, the TCP/IP model would be useless.
The application layer is responsible for providing a variety of services to the user, including:
- Data transfer: The application layer is responsible for transferring data between computers on a network. This is done by breaking down the data into smaller units that can be transmitted over the network.
- Data storage: The application layer can be used to store data on a remote server. This is useful for storing large amounts of data that would not be practical to store on a local computer.
- Data sharing: The application layer can be used to share data with other users on a network. This is useful for collaborating on projects or sharing files with friends and family.
- Data collaboration: The application layer can be used to collaborate with other users on a project. This is done by allowing users to share files and edit them in real time.
The application layer is a critical layer of the TCP/IP model. It provides the services that allow users to interact with the network and share data. Without the application layer, the TCP/IP model would be useless.
Transport Layer
The transport layer is the third layer of the TCP/IP model. It is responsible for providing reliable, end-to-end delivery of data between applications running on different hosts. The transport layer does this by providing a number of services, including:
- Connection establishment: The transport layer establishes a connection between the source and destination applications before any data is sent. This ensures that the data is delivered in the correct order and that any errors are detected and corrected.
- Flow control: The transport layer controls the flow of data between the source and destination applications. This prevents the source application from sending too much data too quickly, which could overwhelm the destination application.
- Error detection and correction: The transport layer detects and corrects errors in data that is sent between the source and destination applications. This ensures that the data is received in the correct order and that any errors are corrected.
The transport layer uses two protocols to provide these services:
- Transmission Control Protocol (TCP): TCP is a connection-oriented protocol that provides a reliable, end-to-end delivery of data. TCP is used for applications that require a guaranteed delivery of data, such as file transfers and email.
- User Datagram Protocol (UDP): UDP is a connectionless protocol that provides a best-effort delivery of data. UDP is used for applications that do not require a guaranteed delivery of data, such as streaming media and gaming.
The transport layer is an important part of the TCP/IP model. It provides the services that are necessary for applications to communicate reliably over a network.
Internet Layer
The internet layer is the second layer of the TCP/IP model. It is responsible for routing data packets from the source to the destination. The internet layer uses the IP address to identify the source and destination of a data packet. The IP address is a 32-bit number that uniquely identifies each device on the internet.
The internet layer uses a variety of routing protocols to determine the best path for a data packet to take. The most common routing protocol is the Border Gateway Protocol (BGP). BGP is a dynamic routing protocol that allows routers to exchange information about the best routes to each destination.
The internet layer also uses a variety of fragmentation protocols to break up large data packets into smaller packets that can be transmitted over smaller networks. The most common fragmentation protocol is the Internet Fragmentation Protocol (IPF). IPF breaks up data packets into smaller packets that are no larger than the maximum transmission unit (MTU) of the next network.
The internet layer is a critical layer in the TCP/IP model. It is responsible for ensuring that data packets are delivered to the correct destination in a timely manner.
The internet layer performs the following functions:
- Routing: The internet layer is responsible for routing data packets from the source to the destination. It does this by using the IP address to identify the source and destination of a data packet.
- Fragmentation: The internet layer may fragment large data packets into smaller packets that can be transmitted over smaller networks. This is necessary because different networks may have different MTUs.
- Error detection: The internet layer may detect errors in data packets. If an error is detected, the internet layer may discard the data packet or request that the sender retransmit the data packet.
The internet layer uses a variety of protocols to perform its functions. These protocols include:
- Internet Protocol (IP): IP is the primary protocol used in the internet layer. IP is responsible for routing data packets from the source to the destination.
- Internet Control Message Protocol (ICMP): ICMP is a protocol used for error reporting and control in the internet layer. ICMP is used to report errors in data packets, to request that data packets be retransmitted, and to control the flow of data packets.
- Address Resolution Protocol (ARP): ARP is a protocol used to resolve IP addresses to MAC addresses. MAC addresses are the physical addresses of network interface cards.
The internet layer is a complex and important layer in the TCP/IP model. It is responsible for routing data packets from the source to the destination, fragmenting large data packets into smaller packets that can be transmitted over smaller networks, and detecting errors in data packets. The internet layer is used by all internet-connected devices, and it is essential for the smooth operation of the internet.
Network Access Layer
The network access layer (NAL) is the lowest layer of the TCP/IP model. It is responsible for delivering data between two hosts on the same network. The NAL does this by encapsulating data from the internet layer into frames that can be transmitted over the physical network. The NAL also provides mechanisms for error detection and correction.
The NAL is divided into two sublayers: the link layer and the physical layer. The link layer is responsible for providing a reliable connection between two hosts on the same network. The physical layer is responsible for transmitting data over the physical network medium.
There are a number of different link layer protocols that can be used, including Ethernet, Token Ring, and Fiber Distributed Data Interface (FDDI). The choice of link layer protocol depends on the type of network and the requirements of the application.
The physical layer is responsible for transmitting data over the physical network medium. The most common physical network media are copper wire, fiber optic cable, and radio waves.
The NAL is a critical layer in the TCP/IP model. It is responsible for ensuring that data is delivered reliably and efficiently between two hosts on the same network.
The network access layer performs the following functions:
- Data encapsulation: The network access layer encapsulates data from the internet layer into frames that can be transmitted over the physical network.
- Error detection: The network access layer provides mechanisms for detecting errors in data frames.
- Error correction: The network access layer may correct errors in data frames.
- Flow control: The network access layer may control the flow of data between two hosts.
The network access layer uses a variety of protocols to perform its functions. These protocols include:
- Ethernet: Ethernet is the most common link layer protocol. Ethernet uses a shared medium, such as copper wire or fiber optic cable, to transmit data between hosts.
- Token Ring: Token Ring is a link layer protocol that uses a token-passing mechanism to control access to the network medium.
- FDDI: FDDI is a link layer protocol that uses fiber optic cable to transmit data between hosts.
The network access layer is a complex and important layer in the TCP/IP model. It is responsible for delivering data between two hosts on the same network. The NAL does this by encapsulating data from the internet layer into frames that can be transmitted over the physical network. The NAL also provides mechanisms for error detection and correction.
OSI Model | TCP/IP Model |
---|---|
It stands for Open System Interconnection. | It stands for Transmission Control Protocol. |
OSI model has been developed by ISO (International Standard Organization). | It was developed by ARPANET (Advanced Research Project Agency Network). |
It is an independent standard and generic protocol used as a communication gateway between the network and the end user. | It consists of standard protocols that lead to the development of an internet. It is a communication protocol that provides the connection among the hosts. |
In the OSI model, the transport layer provides a guarantee for the delivery of the packets. | The transport layer does not provide the surety for the delivery of packets. But still, we can say that it is a reliable model. |
This model is based on a vertical approach. | This model is based on a horizontal approach. |
In this model, the session and presentation layers are separated, i.e., both the layers are different. | In this model, the session and presentation layer are not different layers. Both layers are included in the application layer. |
It is also known as a reference model through which various networks are built. For example, the TCP/IP model is built from the OSI model. It is also referred to as a guidance tool. | It is an implemented model of an OSI model. |
In this model, the network layer provides both connection-oriented and connectionless service. | The network layer provides only connectionless service. |
Protocols in the OSI model are hidden and can be easily replaced when the technology changes. | In this model, the protocol cannot be easily replaced. |
It consists of 7 layers. | It consists of 4 layers. |
OSI model defines the services, protocols, and interfaces as well as provides a proper distinction between them. It is protocol independent. | In the TCP/IP model, services, protocols, and interfaces are not properly separated. It is protocol dependent. |
The usage of this model is very low. | This model is highly used. |
It provides standardization to the devices like router, motherboard, switches, and other hardware devices. | It does not provide the standardization to the devices. It provides a connection between various computers. |
The TCP/IP model is used in real life more than the OSI model. This is because the TCP/IP model is more widely implemented and supported by networking devices. The TCP/IP model is a conceptual model that defines how data should be exchanged between devices on a network.
The OSI model is a more comprehensive model than the TCP/IP model. It defines seven layers, each of which has a specific function. However, the OSI model is not as widely implemented as the TCP/IP model. This is because the OSI model is more complex and difficult to implement.
In general, the TCP/IP model is a good choice for most networking applications. It is widely implemented and supported, and it is relatively easy to understand and use.
I hope that after reading this post, you will have a much better understanding of the basic concepts of OSI and TCP/IP models.
More great stuff related to networking coming soon! Stay tuned and share and subscribe for more!
Access the The Basics of Computer Networks (Previous post in Networking) by clicking HERE
Access the The Basics of Computer Networks: Network Devices (Next post in Networking) by clicking HERE
Access the complete DevOps series by clicking HERE