0% found this document useful (0 votes)
5 views

Layered Architecture and OSI Model

The document discusses the Application Layer of the OSI model, detailing its key functions such as user interface, communication services, and network resource access. It highlights various protocols like HTTP, FTP, and SMTP that facilitate tasks such as web browsing, file transfers, and email communication. Additionally, it addresses challenges faced at the Application Layer, including security, data integrity, and interoperability.

Uploaded by

23011598-133
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Layered Architecture and OSI Model

The document discusses the Application Layer of the OSI model, detailing its key functions such as user interface, communication services, and network resource access. It highlights various protocols like HTTP, FTP, and SMTP that facilitate tasks such as web browsing, file transfers, and email communication. Additionally, it addresses challenges faced at the Application Layer, including security, data integrity, and interoperability.

Uploaded by

23011598-133
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 108

Lecture 2

Layer Architecture
Layers, Service & Protocols
Why Layering ?
Protocols
OSI LAYERS
OSI Model
OSI Model Layers
Application Layer

• The Application Layer is the topmost layer (Layer 7) in the OSI model. It is closest to the end user and
directly interacts with software applications to provide services that allow communication over a network.

• This layer acts as a bridge between the user and the lower layers, providing services such as email, file
transfers, and web browsing.
Application Layer
• Purpose of the Application Layer

 User Interface: The Application Layer serves as an interface for the end users, providing network services
that allow users to interact with applications over a network.

 Communication Services: It supports application-specific protocols that allow for file transfers, emails, and
other data communications.

• Network Resource Access: Through this layer, applications gain access to network resources such as file
systems and databases.
Application Layer
• Key Functions of the Application Layer

 Network Resource Sharing:


o It enables applications to access shared network resources, such as printers, databases, or file systems.
o Applications can communicate over the network to share resources or services in a distributed
computing environment.
 Remote File Access and Transfer:
o File Transfer Protocol (FTP) and similar protocols allow users to access and transfer files across a
network, providing the foundation for remote access to files and resources.
o Example: FTP, SMB (Server Message Block).
Application Layer
• Key Functions of the Application Layer

 Email Communication:
o The Application Layer enables the transmission and reception of emails using protocols such as SMTP (Simple Mail Transfer
Protocol).
o It ensures that emails are properly delivered to recipients, supporting the growing need for electronic messaging.
 Web Browsing:
o HTTP (Hypertext Transfer Protocol) and HTTPS (HTTP Secure) protocols allow users to access websites and web-based
applications.
o The Application Layer ensures the smooth exchange of web data between browsers and servers.
 Directory Services:
o Directory services protocols like LDAP (Lightweight Directory Access Protocol) allow applications to query and update directory
databases used for managing information about network users, devices, and resources.
 Network Authentication:
o Protocols at the Application Layer facilitate user authentication and authorization when accessing network services or
applications.
o Example: Kerberos, which handles secure user logins.
Application Layer
 Application Layer Protocols

 HTTP/HTTPS (Hypertext Transfer Protocol/Secure):


o HTTP is used for web browsing and facilitates the exchange of web pages, media, and other content between web browsers and
web servers.
o HTTPS adds encryption for secure communication, using SSL/TLS protocols to protect sensitive data like login credentials or
payment information.
 FTP (File Transfer Protocol):
o FTP enables the transfer of files between computers over a network.
o It provides users with the ability to download or upload files to and from a remote server.
o Secure versions of FTP like SFTP (SSH File Transfer Protocol) or FTPS add encryption to ensure secure file transfers.
 SMTP (Simple Mail Transfer Protocol):
o SMTP is used for sending emails over a network.
o It is responsible for transferring outgoing emails from the sender’s mail client to the mail server and ultimately to the recipient’s
mail server.
Application Layer
• . Application Layer Protocols

 POP3 (Post Office Protocol) and IMAP (Internet Message Access Protocol):
o POP3 allows users to download emails from a mail server to their device and read them offline.
o IMAP is more flexible, enabling users to read emails without downloading them and synchronize emails across multiple devices.
 DNS (Domain Name System):
o DNS is responsible for translating human-readable domain names (e.g., www.example.com) into IP addresses (e.g., 192.168.1.1)
that machines use to identify each other on a network.
 DHCP (Dynamic Host Configuration Protocol):
o DHCP assigns IP addresses to devices on a network, allowing them to communicate with other devices without manual
configuration.
 Telnet and SSH (Secure Shell):
o Telnet provides remote access to servers or devices via a command-line interface, but it lacks security.
o SSH is the secure version, encrypting the communication between the user and the remote server.
Application Layer
• Communication Methods

 Client-Server Model:
o The Application Layer often operates in a client-server model, where a client requests services, and the server provides
them. This is commonly seen in web browsing, email services, and database access .
o Example: A web browser (client) requests a webpage from a web server.
 Peer-to-Peer (P2P):
o In a peer-to-peer model, each device on the network can act as both a client and a server, sharing files or resources directly
with other peers.
o Example: P2P file-sharing systems like BitTorrent.
Application Layer
•User Interaction and Application Layer
 Application Software Interaction:
o Application Layer protocols are used by various applications (e.g., web browsers, email clients, FTP clients) to
communicate with each other over a network.
o Example: A user sends an email through an email client, which uses SMTP at the Application Layer to send the
email.
 Interface with Lower Layers:
o While the Application Layer interacts directly with user-facing software, it relies on the lower layers of the OSI
model to ensure data is transmitted and received accurately across the network.
Application Layer
• Email and Messaging Services

 SMTP is responsible for sending emails, while POP3 and IMAP handle retrieving and managing emails.
 These protocols ensure that users can exchange messages reliably, even over long distances.
 Instant Messaging:
o Instant messaging services also rely on Application Layer protocols to exchange messages in real-time between users.
o Example: XMPP (Extensible Messaging and Presence Protocol).
Application Layer
• Directory and Database Services

 LDAP (Lightweight Directory Access Protocol):


o LDAP is widely used for managing and accessing directory information, such as user credentials, within
organizations.
o It allows applications to authenticate users and authorize access to network resources based on directory information.
 Database Access:
o Applications often require access to remote databases. The Application Layer facilitates communication between
database clients and servers, allowing users to retrieve or update information in real-time.
Application Layer
• Real-World Examples of Application Layer Protocols
 Web Browsing:
o When you visit a website using your browser, the Application Layer protocol (HTTP or HTTPS) communicates with
the web server to retrieve and display the website’s content.
 Email Services:
o Sending and receiving emails uses protocols like SMTP, POP3, or IMAP to transfer messages between email servers
and clients.
 File Transfer:
o FTP or SFTP is used to upload or download files from a remote server to your device, commonly seen in web hosting
and data backup applications.
 DNS Resolution:
o When you type a website URL into your browser, the DNS protocol translates the domain name into an IP address,
enabling the browser to locate the server hosting the website.
Application Layer
• Challenges at the Application Layer
 Security:
o Data transmitted using Application Layer protocols can be intercepted by attackers if proper security measures are not
in place.
o Secure versions of protocols (e.g., HTTPS, SFTP, and SSH) provide encryption and authentication mechanisms to
safeguard data.
 Data Integrity and Reliability:
o Ensuring the accuracy and reliability of data transmitted between applications is critical. Faults in the Application
Layer can lead to data loss, corruption, or delays.
 Interoperability:

Different applications and systems may use different protocols or data formats, and ensuring that they can
communicate effectively requires consistent protocol implementation and standardization
Application Layer

Application Layer is responsible for providing network services to the user.


It is also known as Desktop Layer. Identification of services is done using port Numbers

Ports are Entry and Exit Points to the Layer

Total No. Ports 0 - 65535


Reserved Ports 0 - 1023
Open client Ports 1024 - 65535
Examples of Networking Services
Data Flow From Application Layer
Presentation
Layer
Presentation Layer
•Purpose of the Presentation Layer
 Data Translation and Syntax Conversion: The Presentation Layer is responsible for translating data
between the application layer and the network. This ensures that data sent from one device is compatible
with the data format expected by the receiving device.

 Data Encryption and Decryption: This layer handles data encryption to protect sensitive information
during transmission and decryption when it reaches the destination.

 Data Compression and Decompression: It manages data compression to reduce the size of the data for
faster transmission and decompression at the destination to restore the data to its original form.
Presentation Layer

•Key Functions of the Presentation Layer

 Data Translation:
o Different systems may use different formats to represent data. The Presentation Layer ensures that data
from one system is translated into a format that can be understood by another.
o For example, it may convert EBCDIC (Extended Binary Coded Decimal Interchange Code) used on
mainframe systems into ASCII (American Standard Code for Information Interchange) used on
modern computers.
 Character Encoding:
o The Presentation Layer manages the encoding of characters in different formats, such as Unicode,
ASCII, and UTF-8.
o This ensures that text data is correctly represented and understood between different systems.
Presentation Layer

 Data Encryption and Decryption:


o To protect sensitive data, the Presentation Layer handles encryption, turning the original data (plaintext) into
ciphertext before it is transmitted over the network.
o When the data reaches the destination, the layer decrypts it back into plaintext, ensuring that only authorized users
can access the original information.
o Protocols like SSL (Secure Sockets Layer) and TLS (Transport Layer Security) work at this layer to provide
encryption for secure data transmission over the internet (e.g., for HTTPS).
 Data Compression and Decompression:
o Data can be compressed to reduce file size and make transmission more efficient, which is particularly useful in
bandwidth-limited networks.
o Once the data reaches its destination, it is decompressed back into its original form.
o Compression helps reduce the time required to transfer large files such as videos, images, and other multimedia
content.
Presentation Layer

•Data Translation
 Data Format Compatibility:
o Different devices and operating systems may use different data formats and encoding standards. The
Presentation Layer ensures that data sent by one system can be understood by another system, even if
they use different formats.
o For example, if a device uses Big Endian to store data and another device uses Little Endian, the
Presentation Layer handles the conversion between the two formats.
 Multimedia Data:
o When transmitting multimedia data such as images, audio, and video, the Presentation Layer ensures
that the data formats (e.g., JPEG, MP3, MPEG) are compatible across different devices.
Presentation Layer

•Data Encryption and Security


 Encryption:
o Encryption is the process of converting readable data (plaintext) into an unreadable format (ciphertext) to protect it from
unauthorized access.
o The Presentation Layer encrypts sensitive information, such as credit card details or login credentials, before transmission to
ensure confidentiality.
o Common encryption algorithms include AES (Advanced Encryption Standard), DES (Data Encryption Standard), and RSA.
 Decryption:
o When the encrypted data reaches its destination, the Presentation Layer decrypts it back into plaintext so that the application
layer can process it.
o Only the intended recipient (with the correct decryption key) can access the original, unencrypted data.
 Protocol Examples:
o SSL (Secure Sockets Layer) and TLS (Transport Layer Security) are common protocols that work at this layer to encrypt data
transmitted over the internet.

• These protocols are used to secure communication between web browsers and servers (e.g., for HTTPS websites).
Presentation Layer

•. Data Compression
 Purpose of Compression:
o Data compression is used to reduce the size of data before transmission. This leads to faster transmission speeds and reduces the
amount of bandwidth required.
o Compression is especially important in multimedia applications where large files (such as images, videos, and audio) are
transmitted.
 Lossless vs. Lossy Compression:
o Lossless Compression: No data is lost during compression. This is important for applications where data integrity is critical,
such as in text files or executable programs. Examples of lossless compression formats include ZIP and PNG.
o Lossy Compression: Some data is discarded during compression to achieve a smaller file size, but this may lead to a slight
reduction in quality. This is often used for images, audio, and video files where perfect accuracy is not essential. Examples of
lossy formats include JPEG for images and MP3 for audio.
 Decompression:
o Once the data reaches its destination, the Presentation Layer decompresses the data to restore it to its original size and format.
o This ensures that the receiving application layer gets the data in the correct form for processing.
Presentation Layer

•. Protocol Examples in the Presentation Layer


 SSL (Secure Sockets Layer) and TLS (Transport Layer Security):
o These protocols are used to provide encryption and secure communication between clients and servers over the internet.
o HTTPS (Hypertext Transfer Protocol Secure) is an example of how SSL/TLS is used to secure web communications.
 MIME (Multipurpose Internet Mail Extensions):
o MIME is a standard used to encode binary files like images, videos, and attachments into a format suitable for email
transmission.
o The Presentation Layer handles the encoding and decoding of MIME data to ensure proper delivery of multimedia content via
email.
 JPEG (Joint Photographic Experts Group):
o JPEG is a widely used image compression format that reduces the size of image files while maintaining an acceptable level of
quality.
o The Presentation Layer compresses the image before transmission and decompresses it once received.
 MP3 (MPEG-1 Audio Layer 3):
o MP3 is a common format for compressing audio files. The Presentation Layer ensures that the audio is properly compressed
and decompressed during transmission.
Presentation Layer

•Presentation Layer in Real-World Applications


 Web Browsing (HTTPS):
o When you visit a secure website (e.g., https://), the Presentation Layer ensures that your data is encrypted using
SSL/TLS so that third parties cannot intercept or access your sensitive information (e.g., passwords, credit card
details).
 Email Attachments:
o When you send or receive email attachments (such as images or documents), the Presentation Layer ensures that the
data is encoded in a format that can be correctly displayed or opened by the recipient.
 Video Streaming:
o The Presentation Layer handles the compression and decompression of video files, allowing for smoother streaming
of video content across the network without consuming too much bandwidth.
Presentation Layer

Challenges at the Presentation Layer


•Format Compatibility:
Ensuring that different systems (with different operating systems and file formats) can correctly interpret and
display data is a challenge.
•Security Vulnerabilities:
Even though encryption adds a layer of security, there can be vulnerabilities in encryption algorithms that
attackers can exploit.
Ensuring that encryption protocols are up-to-date and using secure encryption keys is essential for maintaining
security.
•Performance Impact:
Compression and encryption processes can introduce delays in data transmission, especially for resource-
intensive applications like video streaming or large file transfers.
Balancing the need for data security, compression, and efficient transmission is a key consideration.
Presentation Layer

Presentation Layer is responsible for converting data into standard format.

Following tasks are perform at presentation Layer


Data Flow from Presentation Layer
Session Layer
Session Layer

•The Session Layer is the responsible for establishing, managing, and terminating communication sessions
between applications on different devices. The primary role of this layer is to ensure that the data exchange
between systems or applications occurs in an organized and synchronized manner.
Session Layer

 Establishes, manages, and terminates communication sessions between applications.


 Provides mechanisms to control the dialog between two devices, ensuring proper data exchange.
 Synchronizes data exchange and manages interruptions, making sure that communication can resume where
it left off if a disruption occurs.
Session Layer

1. Key Functions of the Session Layer


 Session Establishment:
o The Session Layer establishes a session or a communication link between two devices (e.g., between a client
and a server).
o It uses session control protocols to negotiate and set up communication parameters before data transmission
begins.
o Examples: NetBIOS, RPC (Remote Procedure Call).
 Session Management:
o This layer maintains the session and keeps it active as long as data is being exchanged between the devices.
o It manages the dialog control, ensuring that the flow of data happens in a coordinated manner (e.g., deciding
which system sends or receives data at a given time).
o The mode of communication is also determined at this layer, such as whether communication will be half-
duplex (one-way at a time) or full-duplex (both directions at the same time).
Session Layer

 Session Termination:
o When communication is complete, the Session Layer is responsible for gracefully terminating the
session, ensuring that all data has been properly transmitted and no resources are left unnecessarily
allocated.
 Dialog Control:
o The Session Layer provides mechanisms to control the dialog between two systems. For example:
 Simplex: Data flows in only one direction (sender to receiver).
 Half-duplex: Data flows in both directions but not simultaneously (i.e., one device sends while the
other waits).
 Full-duplex: Data can flow in both directions at the same time (simultaneous sending and
receiving).
Session Layer

 Synchronization:
o This layer provides synchronization points in the data stream, called checkpoints. These checkpoints
allow communication to resume from a known point in case of an interruption.
o If a failure occurs, such as a network disruption, the session can be resumed from the last
synchronization point without needing to restart the entire data transfer.
 Session Recovery:

• If there is a disruption in the communication (such as a network failure), the Session Layer is responsible for
recovering the session, either by restarting it or resuming it from the last known checkpoint
Session Layer

.
2 Session Establishment and Termination
 Session Establishment:
o A session is set up between two devices when an application on one device requests data from
another application (e.g., a client-server interaction).
o The Session Layer negotiates parameters, such as the type of session, synchronization points, and
how data will be exchanged.
o Once the session is established, the data exchange can begin.
 Session Termination:
o After the data exchange is complete, the Session Layer ensures that the session is properly closed.
o This process ensures that no further data will be sent or received and that system resources are freed
up for other tasks.
Session Layer

•3. Dialog Control


 Simplex Communication:
o Only one party can send data at any given time.
o Example: Sending data from a monitoring device to a control system.
 Half-Duplex Communication:
o Both devices can send data, but not simultaneously. One device must wait for the other to finish sending
before it can transmit.
o Example: Walkie-talkie communication where only one person can speak at a time.
 Full-Duplex Communication:
o Both devices can send and receive data simultaneously, without waiting for the other device.

• Example: Telephone conversations where both parties can talk and listen at the same time.
Session Layer

•5. Synchronization and Checkpointing


 Checkpoints:
o The Session Layer inserts checkpoints (synchronization points) during data transfer. These points help
ensure that communication can be resumed from where it left off in case of a failure.
o Checkpoints are important for long data transfers, where resending all data from the beginning would be
inefficient.
 Resuming from a Checkpoint:
o If the communication is interrupted, the Session Layer uses the last checkpoint as a recovery point to
restart the session from that moment rather than starting from the beginning.
o For example, during a file transfer, if the transfer is interrupted at 80%, the session can resume from the
80% point instead of retransmitting the entire file.
Session Layer

•6. Examples of Session Layer Protocols


 RPC (Remote Procedure Call):
o RPC is used in distributed computing to allow a program on one machine to execute code on a remote system.
o The Session Layer manages the session between the local and remote systems, ensuring that the execution happens
smoothly and that data exchange is synchronized.
 NetBIOS (Network Basic Input/Output System):
o NetBIOS is used in older Windows networks to enable communication between applications on different computers.
o The Session Layer in NetBIOS ensures that communication sessions between applications are properly established
and maintained.
 PPTP (Point-to-Point Tunneling Protocol):
o PPTP is a protocol used in VPNs (Virtual Private Networks) to secure a connection between two networks or devices.
o The Session Layer helps manage and synchronize the session between the client and server in a VPN connection.
Session Layer

7 Session Layer in Real-World Applications


 Web Browsing:
o When you browse a website, the Session Layer helps manage the interaction between your computer (client) and the
web server.
o It establishes a session when you open a web page and terminates the session when you close your browser or
navigate away from the site.
 File Transfers:
o In file transfers (e.g., FTP), the Session Layer is responsible for managing the transfer session between the client and
the server.
o If the connection is interrupted, the session can resume from where it left off, thanks to synchronization points.
 Video Conferencing:
o In video conferencing, the Session Layer helps manage real-time communication between participants.

• It ensures that the video and audio streams are synchronized and that the communication session remains active throughout
the meeting.
Session Layer

8. Challenges at the Session Layer


 Session Recovery:
o If a session is interrupted due to network issues or system failures, the Session Layer must efficiently
resume the session without losing data or requiring the session to restart from the beginning.
 Session Termination:
o Properly terminating a session is crucial to avoid unnecessary resource usage and to ensure that future
sessions can be established without issues.
 Coordination Across Complex Networks:

• The Session Layer is essential for distributed computing environments where multiple sessions may need to
be managed across different network devices
Session Layer

Session Layer is responsible for establishing , maintaining and terminating session.

Session ID work at Session Layer.

Examples:
Data Flow from Presentation Layer
Transport Layer
Transport Layer

• The Transport Layer is the fourth layer in the OSI model. It is responsible for
ensuring reliable data transfer between devices, controlling the flow of data, and
providing error detection and recovery. The primary goal of the transport layer
is to deliver complete, error-free data from the source to the destination.
Transport Layer

•Purpose of the Transport Layer

 End-to-End Communication: The Transport Layer ensures that data is delivered from the source to the
destination across multiple networks, maintaining the end-to-end connection between devices.
 Segmentation and Reassembly: It breaks down large chunks of data into smaller, manageable pieces called
segments. Once the data reaches its destination, it is reassembled into its original form.

• Error Handling and Reliability: It provides mechanisms for detecting and correcting errors in transmitted

data, ensuring that the data is delivered accurately


Transport Layer

•. Key Functions
 Segmentation and Reassembly:
o The Transport Layer divides large data streams from higher layers (such as the application layer) into smaller
segments, suitable for transmission.
o At the destination, it reassembles the segments back into the original data.
 Flow Control:
o The Transport Layer manages data flow between the sender and receiver to prevent the sender from
overwhelming the receiver with too much data at once.
o Windowing protocols like Sliding Window Protocol are used to control the amount of data that can be sent
before requiring an acknowledgment.
 Error Detection and Recovery:
o Errors can occur during transmission (due to lost, duplicated, or corrupted segments). The Transport Layer
uses techniques like checksums and retransmission to detect and correct these errors.
Transport Layer

 Connection Management:
o For connection-oriented protocols like TCP, the Transport Layer establishes, maintains, and terminates a
connection between two devices before data can be transferred.
o It also ensures that data is sent and received in the correct sequence and without loss.
 Multiplexing:
o The Transport Layer can handle multiple applications on a single device by using port numbers. Each
application is assigned a unique port number, allowing the transport layer to direct the data to the
correct process.
Transport Layer
•Key Protocols at the Transport Layer
 TCP (Transmission Control Protocol):
o Connection-Oriented: TCP establishes a reliable connection between the sender and receiver before transmitting
data. This ensures that data arrives in the correct order, without errors, and without loss.
o Reliability: TCP provides mechanisms for error checking, acknowledgment, and retransmission if data is lost or
corrupted.
o Three-Way Handshake: TCP uses a process called the three-way handshake to establish a connection:
1. SYN: The sender sends a synchronization request.
2. SYN-ACK: The receiver acknowledges the request.
3. ACK: The sender confirms the acknowledgment, and the connection is established.
o Error Control: TCP ensures reliable delivery by using sequence numbers and ACKs. If a segment is lost, TCP
retransmits it.
o Flow Control: TCP uses windowing to manage the rate of data transmission and avoid overwhelming the receiver.
o Use Cases: TCP is used in applications requiring high reliability, such as web browsing, email, and file transfers
(e.g., HTTP, FTP, SMTP).
Transport Layer

 UDP (User Datagram Protocol):


o Connectionless: Unlike TCP, UDP is a connectionless protocol. It sends data without establishing a
connection, which makes it faster but less reliable.
o No Error Checking or Acknowledgment: UDP does not provide mechanisms for checking errors,
ordering data, or retransmitting lost packets.
o Low Latency: Because UDP has minimal overhead, it is used in applications where speed is more
critical than reliability.
o Use Cases: UDP is used for applications that require real-time transmission, such as video streaming,
online gaming, VoIP (Voice over IP), and DNS queries.
Transport Layer

•Segmentation and Reassembly

 Segmentation: Large messages (e.g., files, multimedia) are broken into smaller segments for
transmission.
 Reassembly: Once the segments arrive at the destination, the Transport Layer reassembles them
into the original message.
 Each segment includes sequence numbers, ensuring that they can be properly reordered if they
arrive out of sequence.
Segmentation
Transport Layer

•Flow Control
 Flow control ensures that the sender does not overwhelm the receiver with too much data at once.
 Sliding Window Protocol: A common flow control mechanism where the sender and receiver agree on a
"window" size—how much data can be sent before receiving an acknowledgment.
o The receiver sends acknowledgments after processing the data. The sender can adjust the transmission
rate based on the acknowledgment feedback.

• This prevents congestion and ensures efficient use of network resources


Transport Layer

•Error Detection and Correction

 Checksums: Both TCP and UDP use checksums to detect errors in transmitted data. A checksum is a value
calculated from the data. If the checksum of the received data doesn't match, an error is detected.
 Retransmission: In TCP, if an error is detected, the corrupted segment is discarded, and the sender
retransmits it.
 Acknowledgment (ACK) and Retransmission: TCP uses acknowledgments to confirm the successful
receipt of data. If an ACK is not received, the sender assumes the segment was lost and retransmits it.
Transport Layer

•Connection Establishment and Termination (TCP)


 Three-Way Handshake:
o TCP establishes a connection using the three-way handshake process to ensure that both the sender
and receiver are ready to communicate.
o This ensures that both devices agree on initial sequence numbers and are synchronized before data
transfer.
 Connection Termination:
o TCP uses a four-step process (FIN-ACK exchange) to gracefully terminate a connection.
o This ensures that all data has been sent and acknowledged before the connection is closed.
Transport Layer

•Transport Layer Challenges


 Congestion Control: The transport layer is responsible for handling network congestion by adjusting the
rate of data transmission.
 Latency and Jitter: In real-time applications, the transport layer must manage data delivery to minimize
latency (delay) and jitter (variability in delay).

• Security: While the transport layer itself does not handle encryption, protocols like SSL/TLS (which operate
between the transport and application layers) provide secure communication.
Transport Layer

Transport Layer is responsible for end –to-end connectivity.


It is also know as the heart of OSI Layers.
Following tasks are performed at Transport Layer :-

• Identifying Service
• Multiplexing & De-multiplexing
• Segmentation
• Sequencing & Reassembling
• Error Correction
• Flow Control
Transport Layer

Identifying Service
TCP UDP

• Transmission Control Protocol • User Datagram Protocol


• Connection Oriented • Connection Less
• Acknowledgement • No Acknowledgement
• Reliable • Unreliable
• Slower • Faster
• Port No.6 • Port No. 17
• e.g. HTTP , FTP , SMTP • e.g. DNS , DHCP, TFTP
Multiplexing & De-multiplexing
Data Flow From Transport Layer
Network Layer
Network Layer

• The Network Layer is the third layer in the OSI model. It plays a crucial role in routing data across networks
and determining the best path for data packets to travel from the source to the destination. This layer is
responsible for logical addressing, packet forwarding, routing, and fragmentation
Network Layer
•Purpose of the Network Layer
 End-to-End Packet Delivery: The Network Layer is responsible for the delivery of packets from
the source host to the destination host across multiple networks, often called internetworking.
• It makes decisions about the path that data will take to reach its destination, based on network
conditions, performance, and the logical address of the destination
Network Layer
• . Key Functions
 Logical Addressing:
o The Network Layer assigns a logical address to devices, called an IP address (Internet Protocol
address), which uniquely identifies each device on a network.
o IP addresses ensure that data is delivered to the correct device on different networks.
 Routing:
o One of the main responsibilities of the network layer is determining the best path for packets to take
across a network or multiple networks (internetwork).
o Routers, which operate at the network layer, use routing protocols to determine the optimal route for
forwarding packets, based on factors like distance, network traffic, and speed.
o Routing protocols: Examples include OSPF (Open Shortest Path First), RIP (Routing Information
Protocol), and BGP (Border Gateway Protocol).
 .
Network Layer
 Routing:
o One of the main responsibilities of the network layer is determining the best path for packets to take across a network or
multiple networks (internetwork).
o Routers, which operate at the network layer, use routing protocols to determine the optimal route for forwarding packets,
based on factors like distance, network traffic, and speed.
o Routing protocols: Examples include OSPF (Open Shortest Path First), RIP (Routing Information Protocol), and BGP
(Border Gateway Protocol).
 Packet Forwarding:
o After determining the route, the network layer forwards packets across network devices such as routers, following the selected
path toward the destination.
o This process is also known as packet switching.
 Fragmentation and Reassembly:
o The Network Layer is responsible for dividing data into smaller units, called fragments, to fit the maximum transmission unit
(MTU) of the underlying physical network.
o If a packet is too large for a given network, the network layer fragments it, and the receiving system reassembles it.
 Error Handling and Diagnostics:

• Protocols at this layer also include error reporting and network diagnostics. For example, ICMP (Internet Control Message
Network Layer

•. Logical Addressing: IP Addresses


 The most common protocol used at the network layer is IP (Internet Protocol), which defines how data
should be sent across the internet.
 IP Versions:
o IPv4 (Internet Protocol Version 4):
 32-bit address format (e.g., 192.168.1.1), which allows for approximately 4.3 billion unique
addresses.
o IPv6 (Internet Protocol Version 6):
 128-bit address format (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334), designed to overcome
IPv4 exhaustion and support a larger address space.
 Each device on a network, such as a computer or router, has a unique IP address that identifies it. IP
addresses are used to determine both the source and destination of each packet.
Network Layer

•Routing and Routers


 Routers are devices that operate at the network layer and are responsible for forwarding packets between
networks.
 They examine the destination IP address of a packet and use routing tables to determine the best path to the
destination.
 Static vs. Dynamic Routing:
o Static Routing: Routes are manually configured by network administrators.
o Dynamic Routing: Routers automatically adjust routes using routing protocols like OSPF, RIP, and
BGP.
 Routing Algorithms:
o Routers use different algorithms to find the best path:
 Distance Vector Routing: Routers share information about the distance (hops) to destination
networks.
 Link-State Routing: Routers build a complete map of the network's topology to determine the
shortest path (e.g., OSPF).
Network Layer
•Packet Forwarding Techniques
 Packet Switching:
o The Network Layer uses packet switching to forward data across different networks. In
packet switching, data is broken into small packets, each of which can take different paths to
the destination.
 Hop-by-Hop Forwarding:
o As a packet travels through a network, it is forwarded from one router (hop) to the next until
it reaches its destination.
• Each router makes an independent decision about how to forward the packet based on the
destination IP address
Network Layer
•Protocols Operating at the Network Layer
 IP (Internet Protocol):
o The fundamental protocol for transmitting data across networks. It is connectionless and does not
guarantee delivery.
 ICMP (Internet Control Message Protocol):
o Used for diagnostic purposes, such as the ping command, which checks connectivity between devices.
 ARP (Address Resolution Protocol):
o Used to map an IP address to a physical MAC address in a local network.
 NAT (Network Address Translation):
o A method used to map private IP addresses to public IP addresses, allowing devices within a private
network to communicate with the internet.
Routing Protocols
Network Layer
•. Network Layer Challenges
 Congestion Control:
o Excessive data traffic can cause network congestion, where packets are delayed, dropped, or lost. Managing network
congestion is a key challenge.
 Security:
o While the network layer does not provide robust security features, it can be vulnerable to attacks like IP spoofing and
Denial-of-Service (DoS) attacks.
 Quality of Service (QoS):
o Ensuring that network traffic is prioritized and that critical services (e.g., voice or video) receive adequate bandwidth
and low latency.
 Interoperability:

• Different networks may use different protocols and addressing schemes, making it important for the network layer to enable
communication across diverse networks
Network Layer
•Examples of Network Layer Protocols in Action
 Internet: The most common use of the network layer is the internet itself, where routers forward packets
based on IP addresses across various interconnected networks.
 VPN (Virtual Private Networks):
o VPNs create a secure tunnel for data across public networks using encryption and tunneling protocols.
Network layer protocols like IPsec work at this layer to provide security.
Routed Protocols
Network Layer

Network Layer is responsible for providing best path for data to reach the destination.
Logical Addressing works on this layer.
Router is a Network Layer device

It is divided into two parts


• Routed Protocols
e.g. IP ,IPX , Apple Talk.
• Routing Protocols
e.g. RIP , IGRP ,OSPF, EIGRP
Data Flow From Transport Layer
Data Link Layer
Data Link Layer

• The Data Link Layer is the second layer in the OSI model. It plays a crucial role in ensuring reliable data
transmission between adjacent nodes on the same network. This layer is responsible for establishing and
controlling communication between directly connected devices, detecting and correcting errors that may
occur at the physical layer, and ensuring smooth data flow
Data Link Layer
•Purpose of the Data Link Layer
 Node-to-Node Data Transfer: The data link layer is responsible for reliable communication between two
directly connected devices on the same network. It deals with how data is formatted, transmitted, and
received between these devices.

• Frame Creation: This layer converts raw bits from the physical layer into data packets called frames. A
frame is the smallest unit of data handled at this layer.
Data Link Layer
•Key Functions
 Error Detection and Correction:
o The data link layer detects and corrects any errors that may have occurred during the transmission of
data from the physical layer.
o Techniques like Cyclic Redundancy Check (CRC) are used to detect errors in frames, ensuring that
corrupted data doesn’t propagate through the network.
 Flow Control:
o This function ensures that the sender does not overwhelm the receiver with too much data at once,
preventing data loss or congestion.
o Protocols like Stop-and-Wait and Sliding Window are commonly used to control the flow of data.
 Frame Synchronization:
o Frames must be synchronized so that the receiving device can distinguish where one frame ends, and
the next begins.

• Bit stuffing or special control bits are used to mark the start and end of each frame
Data Link Layer
•Sub-Layers of the Data Link Layer
•The Data Link Layer is divided into two sub-layers:
1. Logical Link Control (LLC):
o Handles communication between the network layer and the data link layer.
o Manages flow control and error checking, and provides an interface for the network layer above.
o Identifies which network protocol is being used, such as IP for internet communication.
2. Media Access Control (MAC):
o Responsible for controlling how devices access the physical medium (cable or wireless).
o Assigns MAC addresses (a unique identifier) to network devices.
o Determines when a device can send data, ensuring that multiple devices can share the same physical
medium without collisions (e.g., in Ethernet or Wi-Fi networks).

• Uses techniques like Carrier Sense Multiple Access with Collision Detection (CSMA/CD) for wired
networks (Ethernet) and Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) for wireless
networks (Wi-Fi)
Data Link Layer
•Frame Structure
•A frame typically contains:
 Preamble: Used to synchronize communication between devices.
 Source and Destination MAC Addresses: Identifies the devices sending and receiving the data.
 Payload: The actual data being transmitted.

• Error Check (CRC): Ensures that the data is not corrupted during transmission
Data Link Layer
•. Network Devices Operating at the Data Link Layer
 Switches:
o Operate at the data link layer and are responsible for forwarding frames between devices within the
same network.
o Use MAC addresses to determine the destination of frames and to route them appropriately.
o Switches help in reducing traffic by creating separate collision domains for each device.
 Network Interface Cards (NICs):
o Each NIC has a unique MAC address that identifies it on the network.
o The NIC is responsible for assembling and disassembling frames, managing error detection, and
controlling data flow.
Data Link Layer
•Error Detection and Correction Mechanisms
 Cyclic Redundancy Check (CRC):
o A mathematical technique that allows the receiver to detect errors in the received frames by calculating
a checksum.
 Acknowledgment and Retransmission:
o The sender waits for an acknowledgment from the receiver, confirming that the frame was received
correctly. If no acknowledgment is received, the frame is retransmitted.
Data Link Layer

•Data Link Layer Protocols


 Ethernet:
o A widely used protocol in wired local area networks (LANs) that operates at the data link layer.
o Defines how devices share access to the network and how frames are structured.
 Wi-Fi (IEEE 802.11):
o Wireless networking protocol that operates at the data link layer.
o Uses MAC addresses to manage communication and frame delivery over wireless connections.
 PPP (Point-to-Point Protocol):
o Used in point-to-point connections, such as between a computer and an ISP. It includes features
for authentication, compression, and error detection.
Data Link Layer
•Challenges at the Data Link Layer
 Collisions:
o In shared networks like Ethernet, multiple devices may try to send data simultaneously, leading to
collisions. CSMA/CD helps reduce these collisions.
 Bandwidth Efficiency:
o Ensuring efficient utilization of the available bandwidth while preventing congestion or excessive
errors.
 Security:
o Since MAC addresses can be spoofed, the data link layer faces security challenges. Devices can be
misidentified or attacked using MAC spoofing techniques.
Datalink Layer

Datalink Layer is divided into two sub Layers

• LLC- Logical Link Control


It talks about Wan protocols e.g. PPP ,HDLC , Frame-relay

• MAC – Media Access Control


It talks about physical Address.
It is a 48 bit Address i.e. 12digit Hexadecimal Number.
It is also responsible for Error Detection
Devices working on Data Link
Layer are Switch , Bridge , NIC
Physical Layer
Physical Layer

• The Physical Layer is the first and lowest layer in the OSI model, dealing with the actual physical
connection between devices. Here's a detailed breakdown of its function and components
Physical Layer

•Purpose of the Physical Layer


 Transmission of Raw Data: The physical layer is responsible for the transmission of raw, unstructured
data (bits) over a physical medium such as cables, fiber optics, or wireless signals.

• Bit-Level Communication: It deals with the electrical, mechanical, and procedural interfaces used to
send bits (0s and 1s) between network devices. It does not concern itself with understanding or managing the
content of the data, but only with how it is physically transmitted
Physical Layer

•Key Functions
 Data Encoding: Converts data into signals that can be transmitted, using techniques such as:
o Electrical signals over copper cables (e.g., Ethernet).
o Light signals in fiber optics.
o Radio waves for wireless communication.
 Transmission Media: Manages the physical media through which data is sent, including:
o Cables: Twisted pair, coaxial, fiber-optic cables.
o Wireless media: Wi-Fi, radio signals, infrared.
 Synchronization: Ensures that sending and receiving devices are synchronized (using clocks) to correctly
interpret the bits being transmitted.
 Bit Rate Control: Manages how fast data is transmitted, measured in bits per second (bps).
 Physical Topology: Determines the physical layout of devices on a network (e.g., star, bus, ring).
 Modulation: Converts digital signals into analog signals (and vice versa) when transmitting data over analog
mediums.
Physical Layer

•Devices and Components


 Network Interface Cards (NICs): Convert digital data into a form that can be sent over a
network. NICs also manage the physical connection to the network.
 Cables:
o Twisted Pair (e.g., Cat5, Cat6): Used for Ethernet connections.
o Coaxial Cable: Used for older networks and cable TV.
o Fiber Optic Cable: Transmits data as light, offering higher speeds and long-distance
communication.
• Hubs and Repeaters: Simple devices that work at the physical layer to extend the range of the
network by amplifying signals
Physical Layer

•Transmission Techniques
 Simplex: One-way communication (e.g., television broadcasts).
 Half-Duplex: Two-way communication, but not simultaneously (e.g., walkie-talkies).

• Full-Duplex: Two-way communication occurring simultaneously (e.g., telephone calls, modern Ethernet)
Physical Layer

•Physical Layer Challenges


 Signal Attenuation: The weakening of signals as they travel long distances. This is why repeaters are often
needed in long cable runs.
 Noise and Interference: Physical signals can be affected by electromagnetic interference (EMI) from other
devices, which can lead to data corruption.
 Crosstalk: Interference caused by signals in nearby wires.

• Signal Jitter: Variations in signal timing that can lead to transmission errors
Physical Layer

•Real-World Examples
 Ethernet Cables (Twisted Pair): Commonly used to connect devices to a local network.
 Fiber Optic Cables: Used for high-speed internet and data transmission over long distances.
 Wi-Fi Signals: Wireless transmission of data over short distances.
Physical Layer Example
Physical Layer

Physical Layer is responsible for electrical, mechanical and procedural checks.


Data will be converted into binary (i.e) 0 ‘s & 1’ s.
Data will be in the form of Electrical pulses if it is Coaxial or Twisted Pair cable
and in the form of light if it Is Fiber Optic Cable

Device working at Physical Layer are Hubs, Repeaters, Cables ,Modems etc
Data flow from Physical Layer
Data Encapsulation & De-capsulation
Simulation Scenario
Port addresses
IP addresses
Comparing OSI with TCP/IP Layers

You might also like