CN Notes
CN Notes
At the sender’s side: The transport layer receives the formatted data from the upper layers,
performs Segmentation, and also implements Flow and error control to ensure proper data
transmission. It also adds Source and Destination port numbers in its header and forwards the
segmented data to the Network Layer.
Session Layer – Layer 5
This layer is responsible for the establishment of connection, maintenance of sessions, and
authentication, and also ensures security.
Step 1: Luffy interacts with e-mail application like Gmail, outlook, etc. Writes his email to send.
(This happens in Layer 7: Application layer)
Step 2: Mail application prepares for data transmission like encrypting data and formatting it for
transmission. (This happens in Layer 6: Presentation Layer)
Step 3: There is a connection established between the sender and receiver on the internet. (This
happens in Layer 5: Session Layer)
Step 4: Email data is broken into smaller segments. It adds sequence number and error-checking
information to maintain the reliability of the information. (This happens in Layer 4: Transport
Layer)
Step 5: Addressing of packets is done in order to find the best route for transfer. (This happens in
Layer 3: Network Layer)
Step 6: Data packets are encapsulated into frames, then MAC address is added for local devices
and then it checks for error using error detection. (This happens in Layer 2: Data Link Layer)
Step 7: Lastly Frames are transmitted in the form of electrical/ optical signals over a physical
network medium like ethernet cable or WiFi.
After the email reaches the receiver i.e. Zoro, the process will reverse and decrypt the email
content. At last, the email will be shown on Zoro’s email client.
Physical Layer
The physical layer is the first and lowest layer from the bottom of the 7-layered OSI model and
delivers security to hardware. Being the most complex layer, it is in charge of data transmission
over the physical medium.
It converts the data frame received from the data link layer into bits, i.e., in terms of ones and
zeros. It maintains the data quality by implementing the required protocols on different network
modes and maintaining the bit rate through data transfer using a wired or wireless medium.
Attributes of the physical layer:
1. Signals: The data is first converted to a signal for efficient data transmission. There are two
kinds:
- Analog Signals: These signals are continuous waveforms in nature and are represented
by continuous electromagnetic waves for the transmission of data.
- Digital Signals: These signals are discrete in nature and represent network pulses and
digital data from the upper layers.
2. Transmission media: Data is carried from source to destination with the help of transmission
media. There are two sorts of transmission media:
- Wired Media: The connection is established with the help of cables. For example, fiber
optic cables, coaxial cables, and twisted pair cables.
- Wireless Media: The connection is established using a wireless communication network.
For example, Wi-Fi, Bluetooth, etc.
3. Data Flow: It describes the rate of data flow and the transmission time frame. The factors
affecting the data flow are:
- Encoding: Encoding data for transmission on the channel.
- Error-Rate: Receiving erroneous data due to noise in transmission.
- Bandwidth: The rate of transmission of data in the channel.
4. Transmission mode: It describes the direction of the data flow. Data can be transmitted in
three sorts of transmission modes:
- Simplex mode: This mode of communication is a one-way communication where a
device can only send data. Examples are a mouse, keyboard, etc.
- Half-duplex mode: This mode of communication supports one-way communication, i.e.,
either data can be transmitted or received. An example is a walkie-talkie.
- Full-duplex mode: This mode of communication supports two-way communication, i.e.,
the device can send and receive data at the same time. An example is cellular
communication.
5. Noise in transmission: Transmitted data can get corrupted or damaged during data
transmission due to many reasons. Some of the reasons are mentioned below:
- Attenuation: It is a gradual deterioration of the network signal on the communication
channel.
- Dispersion: In the case of Dispersion, the data is dispersed and overlapped during
transmission, which leads to the loss of the original data.
- Data Delay: The transmitted data reaches the destination system outside the specified
frame time.
The data link layer is the second layer from the bottom in the OSI (Open System
Interconnection) network architecture model. It is responsible for the node-to-node delivery of
data. Its major role is to ensure error-free transmission of information. DLL is also responsible
for encoding, decode and organizing the outgoing and incoming data. This is considered the most
complex layer of the OSI model as it hides all the underlying complexities of the hardware from
the other layers above.
● The communication channel that connects the adjacent nodes is known as links, and in
order to move the datagram from source to the destination, the datagram must be moved
across an individual link.
● The main responsibility of the Data Link Layer is to transfer the datagram across an
individual link.
● The Data link layer protocol defines the format of the packet exchanged across the nodes
as well as the actions such as Error detection, retransmission, flow control, and random
access.
● The Data Link Layer protocols are Ethernet, token ring, FDDI and PPP.
● Framing & Link access: Data Link Layer protocols encapsulate each network frame
within a Link layer frame before the transmission across the link. A frame consists of a
data field in which a network layer datagram is inserted and a number of data fields. It
specifies the structure of the frame as well as a channel access protocol by which frame is
to be transmitted over the link.
● Reliable delivery: Data Link Layer provides a reliable delivery service, i.e., transmits the
network layer datagram without any error. A reliable delivery service is accomplished
with transmissions and acknowledgements. A data link layer mainly provides the reliable
delivery service over the links as they have higher error rates and they can be corrected
locally, link at which an error occurs rather than forcing to retransmit the data.
● Flow control: A receiving node can receive the frames at a faster rate than it can process
the frame. Without flow control, the receiver's buffer can overflow, and frames can get
lost. To overcome this problem, the data link layer uses the flow control to prevent the
sending node on one side of the link from overwhelming the receiving node on another
side of the link.
● Error detection: Errors can be introduced by signal attenuation and noise. Data Link
Layer protocol provides a mechanism to detect one or more errors. This is achieved by
adding error detection bits in the frame and then receiving nodes can perform an error
check.
● Error correction: Error correction is similar to the Error detection, except that the
receiving node not only detects the errors but also determines where the errors have
occurred in the frame.
● Half-Duplex & Full-Duplex: In a Full-Duplex mode, both the nodes can transmit the
data at the same time. In a Half-Duplex mode, only one node can transmit the data at the
same time.
● Logical Link Control (LLC): This sublayer of the data link layer deals with
multiplexing, the flow of data among applications and other services, and LLC is
responsible for providing error messages and acknowledgments as well.
● Media Access Control (MAC): MAC sublayer manages the device’s interaction,
responsible for addressing frames, and also controls physical media access.
Network Layer
The network layer is a crucial layer in the OSI (Open Systems Interconnection) model
responsible for facilitating data transfer across networks. Its primary role is to handle the routing
of data packets from the source to the destination through potentially multiple intermediate nodes
(routers).
Designing the network layer involves addressing several critical issues to ensure efficient,
reliable, and scalable communication between devices across different networks.
● Store-and-Forward: Packets are sent from the source to the nearest router, stored until
fully received and processed, and then forwarded to the next router along the path. This
continues until the packet reaches the destination.
● Service Goals:
● Independence from router technology.
● Shielding transport layer from the number, type, and topology of routers.
● Uniform network addressing across LANs and WANs.
● Connection-Oriented vs. Connectionless:
● Connectionless (Datagram Service): Each packet is routed independently (e.g.,
IP).
● Connection-Oriented: A path is established before sending packets (e.g., virtual
circuits).
● Datagram Network: Packets are routed independently. Each packet carries the full
destination address. Routers use routing tables to determine the next hop.
● Datagram Network:
● No setup required.
● Each packet contains the full address.
● Routers do not hold state information about connections.
● Independent packet routing.
● Virtual-Circuit Network:
● Requires setup.
● Each packet contains a short virtual circuit number.
● Routers maintain state information about each connection.
● Fixed route for all packets in a session.
Routing Algorithms
Optimality Principle
● Concept: If router B is on the optimal path from A to C, then the path from B to C is also
optimal.
Flooding
● Definition: Sends every packet out on all outgoing lines except the one it arrived on.
● Pros/Cons: Robust but inefficient due to duplicate packets.
Hierarchical Routing
Broadcast Routing
Multicast Routing
Anycast Routing
● Function: Sends a packet to any one of a group of nodes, typically the closest.
● Use Case: Load distribution and optimized response times.
Quality of Service (QoS) ensures predictable network performance for critical applications. It
focuses on:
QoS Techniques
1. Traffic Shaping: Controls the data flow rate to prevent congestion.
2. Priority Queuing: Assigns priority to different types of traffic.
3. Resource Reservation: Reserves bandwidth for specific applications using protocols like
RSVP.
4. Traffic Policing: Enforces data flow rules to maintain network integrity.
5. Congestion Management: Uses algorithms to manage and prevent network congestion.
6. Admission Control: Decides on accepting new traffic based on current load.
QoS in Practice
Importance of QoS
● Real-Time Applications: Ensures smooth operation for video calls and gaming.
● Business-Critical Applications: Provides reliable performance for essential services.
● Efficient Network Utilization: Optimizes resource use and prevents congestion.
Internetworking
1. Routers: Devices that forward data packets between networks. They determine the best
path for data to travel across interconnected networks.
2. IP (Internet Protocol): The primary protocol for internetworking, defining how data
packets are addressed and routed across networks.
3. Protocols: Sets of rules that govern data communication, including TCP/IP, which is the
foundational suite for the Internet.
1. Packet Switching: Data is broken into packets that are routed independently across the
network and reassembled at the destination.
2. Addressing: Each device on the network has a unique IP address, enabling correct routing
of packets.
3. Routing: The process of determining the path for data to travel from the source to the
destination.
Importance of Internetworking
The network layer is responsible for routing data packets across interconnected networks. It
includes protocols like IPv4 and IPv6, which provide addressing and routing functions.
1. Addressing:
● Uses 32-bit addresses, allowing for about 4.3 billion unique addresses.
● Address format: 192.168.0.1.
2. Header:
● Contains source and destination IP addresses.
● Includes fields for packet fragmentation and reassembly.
3. Fragmentation:
● Supports fragmentation to accommodate different maximum transmission units
(MTUs) of various networks.
4. Routing:
● Utilizes routing tables and protocols like OSPF and BGP to determine the best
path for packet delivery.
5. Limitations:
● Address exhaustion due to limited address space.
● Lacks built-in security features.
IPv6 (Internet Protocol version 6)
1. Addressing:
● Uses 128-bit addresses, providing a virtually unlimited address space.
● Address format: 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
2. Header:
● Simplified compared to IPv4 for more efficient processing.
● Includes mandatory fields and optional extension headers for additional features.
3. Fragmentation:
● Performed only by the sending host, not by routers, improving efficiency and
security.
4. Routing:
● Supports improved routing protocols with hierarchical address allocation,
enhancing route aggregation and reducing the size of routing tables.
5. Features:
● Built-in support for security with IPsec.
● Improved support for mobile devices through features like auto-configuration and
neighbor discovery.
6. Transition:
● Designed to coexist with IPv4 during the transition period, using techniques like
dual-stack, tunneling, and translation mechanisms.
Transport Layer
The transport layer in computer networks is a crucial component of the networking stack
responsible for ensuring reliable and efficient communication between two devices over a
network. Its primary function is to manage end-to-end data transmission, offering services such
as segmentation, error checking, flow control, and multiplexing to enable secure and efficient
data transfer. It sits above the network layer and below the session layer and manages end-to-end
communication between devices in a network.
Working of Transport Layer:
The transport layer acts as an intermediary, receiving services from the Application layer while
providing services to the Network layer.
● On the sender's side: The transport layer takes data (messages) from the Application layer
and proceeds to segment it. It breaks down the original message into smaller segments,
incorporates the source and destination port numbers into the segment's header, and
dispatches the segmented data to the Network layer.
● On the receiver's side: The transport layer receives data from the Network layer,
reconstructs the segmented information, inspects the header to determine the port
number, and then routes the message to the proper port within the Application layer.
Transport layer services:
Transport layer protocols offer services that can be categorized into five distinct groups:
1. End-to-end delivery: In computer networking, just as the Data Link Layer relies on
MAC addresses to ensure precise frame delivery and the Network Layer uses IP
addresses for effective packet routing, the Transport Layer also depends on port numbers.
Port numbers are essential for accurately directing data segments to the appropriate
process among several concurrently running on a single host. These 16-bit addresses
serve as unique identifiers for client-server programs, ensuring that data is correctly
delivered to the intended destination process.
2. Addressing: Addressing involves the capability to establish communication with the
precise application running on a computer. This addressing procedure commonly
employs network ports to allocate distinct port numbers to both the sending and receiving
applications residing on a machine. The combination of the IP address utilised in the
network layer and the port number within the transport layer results in a unique address
for each application, ensuring precise identification and communication.
3. Reliable delivery: Reliability in the context of network data transmission refers to the
system's capability to address potential errors that may occur during data transfer. If data
undergoes unintended alterations during transit, error correction mechanisms and
checksums are in place to identify and rectify these issues. If a data packet is lost during
transmission, it is recognized, and the system initiates a retransmission process.
Furthermore, if a single packet is inadvertently duplicated, it can be detected and
subsequently discarded. Additionally, the system can transmit acknowledgments upon
successfully receiving packets to ensure guaranteed data delivery. Some protocols even
include mechanisms to notify the sender if a packet is either missing or corrupted.
4. Flow control: Flow control within the transport layer refers to its capability to prevent
the transmission of data beyond what the network can reliably handle. This involves
buffering both outgoing and incoming data until sufficient network capacity is available
for smooth transmission. In cases where the receiver's buffer reaches its capacity, the
sending rate is adjusted downward to avoid overwhelming the recipient.
5. Multiplexing: Multiplexing, often described as a many to one process, involves
consolidating data from multiple sender processes into a single packet, which includes
appropriate headers. This consolidated packet is then transmitted as a unified entity.
Multiplexing enables the concurrent utilisation of various processes on a host within a
network environment, with each process being distinguished by its unique port number.
UDP
● Connectionless protocol
● Unreliable protocol
● UDP stands for User Datagram Protocol.
● UDP is one of the simplest transport layer protocols which provides nonsequenced data
transmission functionality.
● UDP is considered as a connectionless transport layer protocol.
● This type of protocol is referred to be used when speed and size are more important than
reliability and security.
● It is an end-to-end transport-level protocol that adds transport-level addresses, checksum
error control, and length information to the data received from the upper layer.
● User datagram is the packet constructed by the UDP protocol
UDP Services
● Process to Process Communication
● Connectionless Service
● Fast delivery of the message
● Checksum
TCP
● Connection-oriented protocol
● Reliable protocol
● Provide error and flow control
● TCP stands for Transmission Control Protocol.
● TCP is a connection-oriented transport layer protocol.
● TCP explicitly defines connection establishment, data transfer, and connection tear-down
phases to provide connection-oriented service for data transmission.
● TCP is the most commonly used transport layer protocol.
SCTP
● SCTP stands for Stream Control Transmission Protocol.
● SCTP is one of the connection-oriented transport layer protocols.
● It allows the transmission of data between sender and receiver in full duplex mode.
● This protocol makes it simpler to build connections over a wireless network and to
control multimedia data transmission.
Features of SCTP
● Unicast with Multiple Properties
● Reliable Transmission
● Message oriented
● Multi-homing
Session Layer
The session layer is Layer 5 layer from the bottom in the OSI model. The job of the session layer
is to control and maintain connections between systems to share data. It establishes, maintains,
and ends sessions across all channels. In case of a network error, it checks the authenticity and
provides recovery options for active sessions. It manages sessions and synchronizes data flow.
Basically, this layer regulates when computers can send data and how much data they can send.
Essentially it coordinates communication between devices.
○ Session Establishment: The session layer establishes connections between devices which
are known as sessions. The session which is created allows users to share data, remote
access, and file management. When the session is released, the transport connection is
mapped. The ways in which transport connection maps are one-to-many, one-to-one, and
many-to-one.
○ Data Transfer: It is the very basic function of the session layer, which handles the
exchange of data between systems in a full-duplex or half-duplex mode of transmission.
The session layer allows only one user to transmit data in half-duplex as well as exchange
data in full-duplex mode.
○ Dialog Management: The session layer keeps log data on which connections are
established to transmit and receive data, which is called dialog management. It is
accountable for establishing, synchronizing, preserving, and ending the conversation
between the sender and the receiver. It uses a token mechanism in which the user sharing
the data is given a token in case of half duplex mode and, after the exchange, transfers it
to another device. The token method maintains the efficiency of the connection.
○ Synchronization: The session maintains proper connectivity between systems, and if any
error occurs, then it provides a recovery option which is called a known state. The session
layer adds synchronization bits to the message to use the known state in the event of an
error. These bits can be used as checkpoints. It adds synchronization points or
checkpoints to the data stream for longer communication. It ensures that the data streams
are successfully received and acknowledged up to the checkpoints. In case of any failure,
only the stream needs to be retransmitted after the checkpoints.
The session layer offers many network protocols for the safety, security, and efficiency of
communication between devices.
Presentation Layer
The presentation layer is the 6th layer from the bottom in the OSI model. This layer presents the
incoming data from the application layer of the sender machine to the receiver machine. It
converts one format of data to another format of data if both sender and receiver understand
different formats; hence this layer is also called the translation layer. It deals with the semantics
and syntax of the data, so this layer is also called the syntax layer. It uses operations such as data
compression, data encryption & decryption, data conversion, etc.
Functions of the presentation layer:
○ Translation: Data is sent from sender to receiver, but what if the sender device and
receiver device understand different formats of code? For example, suppose one device
understands ASCII code and another device understands EBCDIC code. In that case, the
data must be translated into a code that the recipient understands to determine what data
has been sent. The presentation layer is responsible for translating ASCII codes to
EBCDIC or vice versa. With the help of the presentation layer, the receiver understands
the data effectively and uses it efficiently.
○ Encryption and Decryption: Whatever data is being transmitted between the sender and
the receiver, that data must be secure because an intruder can hack the data passing
between the sender and the receiver. Hackers can modify the data and send the modified
data to the receiver to create false communication. The presentation layer is responsible
for encrypting and decrypting data to avoid data leakage and data modification.
The plaintext data at the source is encrypted into ciphertext (unreadable format), then it is
sent to the receiver, where the ciphertext is decrypted into plaintext. Now, if the hacker
tries to hack the data, the hacker receives an encrypted, unreadable form, and if the
hacker tries to send modified data, the receiver can detect the modification during
decryption; thereby, the data remains safe.
○ Compression and Decompression: If the file size is large, it becomes difficult to transmit
the large file over the network. File size can be decreased by compressing the file for easy
transmission of data. Compression is the method of diminishing the size of a file to
transmit data easily in less time. When the compressed data reaches the receiver, the data
is reconstructed back to the original size, and this process is called decompression.
The presentation layer in the OSI model is classified into two sublayers:
1. Common Application Service Element (CASE): This sublayer offers services to layer-7,
i.e., the application layer, and requests services from layer-5, i.e., the session layer. It
supports various application services, such as Reliable Transfer Service Element (RTSE),
Remote Operation Service Element (ROSE), Association Control Service Element
(ACSE), and Commitment Concurrency and Recovery (CCR).
○ Network Data Representation (NDR): It is the protocol that is used to implement the
presentation layer of the OSI model. It provides different kinds of data representation,
such as images, video, audio, numbers, etc. It is used for Microsoft Remote Procedure
Call (Microsoft RPC) and Distributed Computing Environment (DCE) / Remote
Procedure Calls (RPC).
○ Apple Filing Protocol (AFP): It is a communication protocol that was specifically
designed for macOS by Apple, Inc. It provides file services for Classic Mac OS and
macOS. This protocol is used to share files over the network.
The Application Layer is the topmost layer in the Open System Interconnection (OSI) model.
This layer provides several ways for manipulating the data (information) which actually enables
any type of user to access the network with ease. This layer also makes a request to its bottom
layer, which is the presentation layer for receiving various types of information from it. The
Application Layer interface directly interacts with applications and provides common web
application services. This layer is basically the highest level of open system, which provides
services directly for the application process.
Functions of Application
Layer :
To ensure smooth communication, application layer protocols are implemented the same on
source host and destination host.
The following are some of the features which are provided by Application layer protocols-
● The Application Layer protocol defines processes for both parties which are involved in
communication.
● These protocols define the type of message being sent or received from any side (either
source host or destination host).
● These protocols also define basic syntax of the message being forwarded or retrieved.
● These protocols define the way to send a message and the expected response.
● These protocols also define interaction with the next level.
TCP/IP Model
TCP/IP was designed and developed by the Department of Defense (DoD) in the 1960s and is
based on standard protocols. It stands for Transmission Control Protocol/Internet Protocol. The
TCP/IP model is a concise version of the OSI model. It contains four layers, unlike the seven
layers in the OSI model.
The number of layers is sometimes referred to as five or four. Here In this article, we’ll study
five layers. The Physical Layer and Data Link Layer are referred to as one single layer as the
‘Physical Layer’ or ‘Network Interface Layer’ in the 4-layer reference.
What Does TCP/IP Do?
The main work of TCP/IP is to transfer the data of a computer from one device to another. The
main condition of this process is to make data reliable and accurate so that the receiver will
receive the same information which is sent by the sender. To ensure that each message reaches its
final destination accurately, the TCP/IP model divides its data into packets and combines them at
the other end, which helps in maintaining the accuracy of the data while transferring from one
end to another end.
What is the Difference between TCP and IP?
TCP and IP are different protocols of Computer Networks. The basic difference between TCP
(Transmission Control Protocol) and IP (Internet Protocol) is in the transmission of data. In
simple words, IP finds the destination of the mail and TCP has the work to send and receive the
mail. UDP is another protocol, which does not require IP to communicate with another computer.
IP is required by only TCP. This is the basic difference between TCP and IP.
How Does the TCP/IP Model Work?
Whenever we want to send something over the internet using the TCP/IP Model, the TCP/IP
Model divides the data into packets at the sender’s end and the same packets have to be
recombined at the receiver’s end to form the same data, and this thing happens to maintain the
accuracy of the data. TCP/IP model divides the data into a 4-layer procedure, where the data first
go into this layer in one order and again in reverse order to get organised in the same way at the
receiver’s end.
For more, you can refer to TCP/IP in Computer Networking.
Layers of TCP/IP Model
1. Application Layer
2. Transport Layer(TCP/UDP)
3. Network/Internet Layer(IP)
4. Data Link Layer (MAC)
5. Physical Layer
The packet’s network protocol type, in this case, TCP/IP, is identified by the data-link layer.
Error prevention and “framing” are also provided by the data-link layer. Point-to-Point Protocol
(PPP) framing and Ethernet IEEE 802.2 framing are two examples of data-link layer protocols.
3. Internet Layer
This layer parallels the functions of OSI’s Network layer. It defines the protocols which are
responsible for the logical transmission of data over the entire network. The main protocols
residing at this layer are as follows:
● IP: IP stands for Internet Protocol and it is responsible for delivering packets from the
source host to the destination host by looking at the IP addresses in the packet
headers. IP has 2 versions: IPv4 and IPv6. IPv4 is the one that most websites are
using currently. But IPv6 is growing as the number of IPv4 addresses is limited in
number when compared to the number of users.
● ICMP: ICMP stands for Internet Control Message Protocol. It is encapsulated within
IP datagrams and is responsible for providing hosts with information about network
problems.
● ARP: ARP stands for Address Resolution Protocol. Its job is to find the hardware
address of a host from a known IP address. ARP has several types: Reverse ARP,
Proxy ARP, Gratuitous ARP, and Inverse ARP.
The Internet Layer is a layer in the Internet Protocol (IP) suite, which is the set of protocols that
define the Internet. The Internet Layer is responsible for routing packets of data from one device
to another across a network. It does this by assigning each device a unique IP address, which is
used to identify the device and determine the route that packets should take to reach it.
Example: Imagine that you are using a computer to send an email to a friend. When you click
“send,” the email is broken down into smaller packets of data, which are then sent to the Internet
Layer for routing. The Internet Layer assigns an IP address to each packet and uses routing tables
to determine the best route for the packet to take to reach its destination. The packet is then
forwarded to the next hop on its route until it reaches its destination. When all of the packets
have been delivered, your friend’s computer can reassemble them into the original email
message.
In this example, the Internet Layer plays a crucial role in delivering the email from your
computer to your friend’s computer. It uses IP addresses and routing tables to determine the best
route for the packets to take, and it ensures that the packets are delivered to the correct
destination. Without the Internet Layer, it would not be possible to send data across the Internet.
4. Transport Layer
The TCP/IP transport layer protocols exchange data receipt acknowledgments and retransmit
missing packets to ensure that packets arrive in order and without error. End-to-end
communication is referred to as such. Transmission Control Protocol (TCP) and User Datagram
Protocol are transport layer protocols at this level (UDP).
● TCP: Applications can interact with one another using TCP as though they were
physically connected by a circuit. TCP transmits data in a way that resembles
character-by-character transmission rather than separate packets. A starting point that
establishes the connection, the whole transmission in byte order, and an ending point
that closes the connection make up this transmission.
● UDP: The datagram delivery service is provided by UDP, the other transport layer
protocol. Connections between receiving and sending hosts are not verified by UDP.
Applications that transport little amounts of data use UDP rather than TCP because it
eliminates the processes of establishing and validating connections.
5. Application Layer
This layer is analogous to the transport layer of the OSI model. It is responsible for end-to-end
communication and error-free delivery of data. It shields the upper-layer applications from the
complexities of data. The three main protocols present in this layer are:
● HTTP and HTTPS: HTTP stands for Hypertext transfer protocol. It is used by the
World Wide Web to manage communications between web browsers and servers.
HTTPS stands for HTTP-Secure. It is a combination of HTTP with SSL(Secure
Socket Layer). It is efficient in cases where the browser needs to fill out forms, sign
in, authenticate, and carry out bank transactions.
● SSH: SSH stands for Secure Shell. It is a terminal emulations software similar to
Telnet. The reason SSH is preferred is because of its ability to maintain the encrypted
connection. It sets up a secure session over a TCP/IP connection.
● NTP: NTP stands for Network Time Protocol. It is used to synchronize the clocks on
our computer to one standard time source. It is very useful in situations like bank
transactions. Assume the following situation without the presence of NTP. Suppose
you carry out a transaction, where your computer reads the time at 2:30 PM while the
server records it at 2:28 PM. The server can crash very badly if it’s out of sync.
The host-to-host layer is a layer in the OSI (Open Systems Interconnection) model that is
responsible for providing communication between hosts (computers or other devices) on a
network. It is also known as the transport layer.
Some common use cases for the host-to-host layer include:
1. Reliable Data Transfer: The host-to-host layer ensures that data is transferred
reliably between hosts by using techniques like error correction and flow control. For
example, if a packet of data is lost during transmission, the host-to-host layer can
request that the packet be retransmitted to ensure that all data is received correctly.
2. Segmentation and Reassembly: The host-to-host layer is responsible for breaking
up large blocks of data into smaller segments that can be transmitted over the
network, and then reassembling the data at the destination. This allows data to be
transmitted more efficiently and helps to avoid overloading the network.
3. Multiplexing and Demultiplexing: The host-to-host layer is responsible for
multiplexing data from multiple sources onto a single network connection, and then
demultiplexing the data at the destination. This allows multiple devices to share the
same network connection and helps to improve the utilization of the network.
4. End-to-End Communication: The host-to-host layer provides a connection-oriented
service that allows hosts to communicate with each other end-to-end, without the
need for intermediate devices to be involved in the communication.
Example: Consider a network with two hosts, A and B. Host A wants to send a file to host B.
The host-to-host layer in host A will break the file into smaller segments, add error correction
and flow control information, and then transmit the segments over the network to host B. The
host-to-host layer in host B will receive the segments, check for errors, and reassemble the file.
Once the file has been transferred successfully, the host-to-host layer in host B will acknowledge
receipt of the file to host A.
In this example, the host-to-host layer is responsible for providing a reliable connection between
host A and host B, breaking the file into smaller segments, and reassembling the segments at the
destination. It is also responsible for multiplexing and demultiplexing the data and providing
end-to-end communication between the two hosts.
Other Common Internet Protocols
TCP/IP Model covers many Internet Protocols. The main rule of these Internet Protocols is how
the data is validated and sent over the Internet. Some Common Internet Protocols include:
● HTTP (Hypertext Transfer Protocol): HTTP takes care of Web Browsers and
Websites.
● FTP (File Transfer Protocol): FTP takes care of how the file is to be sent over the
Internet.
● SMTP (Simple Mail Transfer Protocol): SMTP is used to send and receive data.
TCP/IP OSI
TCP refers to the Transmission
Control Protocol. OSI refers to Open Systems Interconnection.
TCP/IP uses both the session and
presentation layer in the application OSI uses different session and presentation
layer itself. layers.
TCP/IP follows a connectionless
horizontal approach. OSI follows a vertical approach.
The Transport layer in TCP/IP does
not provide assurance delivery of In the OSI model, the transport layer provides
packets. assurance delivery of packets.
While in the OSI model, Protocols are better
Protocols cannot be replaced easily covered and are easy to replace with the
in the TCP/IP model. technology change.
TCP/IP model network layer only
provides connectionless (IP) Connectionless and connection-oriented
services. The transport layer (TCP) services are provided by the network layer in
provides connections. the OSI model.