Layered architecture in computer network.pptx

69 views 108 slides Nov 24, 2024
Slide 1
Slide 1 of 108
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108

About This Presentation



"Layer Architecture: Learn about the structured approach to network design, including the 7-layer OSI model and 4-layer TCP/IP model. Understand how each layer functions and interacts in this presentation."


Slide Content

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 : It enables applications to access shared network resources, such as printers, databases, or file systems. Applications can communicate over the network to share resources or services in a distributed computing environment. Remote File Access and Transfer : 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. Example: FTP, SMB (Server Message Block).

Application Layer Key Functions of the Application Layer Email Communication : The Application Layer enables the transmission and reception of emails using protocols such as SMTP (Simple Mail Transfer Protocol). It ensures that emails are properly delivered to recipients, supporting the growing need for electronic messaging. Web Browsing : HTTP (Hypertext Transfer Protocol) and HTTPS (HTTP Secure) protocols allow users to access websites and web-based applications. The Application Layer ensures the smooth exchange of web data between browsers and servers. Directory Services : 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 : Protocols at the Application Layer facilitate user authentication and authorization when accessing network services or applications. Example: Kerberos, which handles secure user logins.

Application Layer Application Layer Protocols HTTP/HTTPS (Hypertext Transfer Protocol/Secure) : HTTP is used for web browsing and facilitates the exchange of web pages, media, and other content between web browsers and web servers. HTTPS adds encryption for secure communication, using SSL/TLS protocols to protect sensitive data like login credentials or payment information. FTP (File Transfer Protocol) : FTP enables the transfer of files between computers over a network. It provides users with the ability to download or upload files to and from a remote server. Secure versions of FTP like SFTP (SSH File Transfer Protocol) or FTPS add encryption to ensure secure file transfers. SMTP (Simple Mail Transfer Protocol) : SMTP is used for sending emails over a network. 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) : POP3 allows users to download emails from a mail server to their device and read them offline. IMAP is more flexible, enabling users to read emails without downloading them and synchronize emails across multiple devices. DNS (Domain Name System) : 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) : DHCP assigns IP addresses to devices on a network, allowing them to communicate with other devices without manual configuration. Telnet and SSH (Secure Shell) : Telnet provides remote access to servers or devices via a command-line interface, but it lacks security. SSH is the secure version, encrypting the communication between the user and the remote server.

Application Layer Communication Methods Client-Server Model : 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 . Example : A web browser (client) requests a webpage from a web server. Peer-to-Peer (P2P) : 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. Example : P2P file-sharing systems like BitTorrent.

Application Layer User Interaction and Application Layer Application Software Interaction : Application Layer protocols are used by various applications (e.g., web browsers, email clients, FTP clients) to communicate with each other over a network. 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 : 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 : Instant messaging services also rely on Application Layer protocols to exchange messages in real-time between users. Example : XMPP (Extensible Messaging and Presence Protocol).

Application Layer Directory and Database Services LDAP (Lightweight Directory Access Protocol): LDAP is widely used for managing and accessing directory information, such as user credentials, within organizations. It allows applications to authenticate users and authorize access to network resources based on directory information. Database Access : 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 : 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 : Sending and receiving emails uses protocols like SMTP, POP3, or IMAP to transfer messages between email servers and clients. File Transfer : 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 : 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 : Data transmitted using Application Layer protocols can be intercepted by attackers if proper security measures are not in place. Secure versions of protocols (e.g., HTTPS, SFTP, and SSH) provide encryption and authentication mechanisms to safeguard data. Data Integrity and Reliability : 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 : 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. 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 : The Presentation Layer manages the encoding of characters in different formats, such as Unicode , ASCII , and UTF-8 . This ensures that text data is correctly represented and understood between different systems.

Presentation Layer Data Encryption and Decryption : To protect sensitive data, the Presentation Layer handles encryption, turning the original data (plaintext) into ciphertext before it is transmitted over the network. When the data reaches the destination, the layer decrypts it back into plaintext, ensuring that only authorized users can access the original information. 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 : Data can be compressed to reduce file size and make transmission more efficient, which is particularly useful in bandwidth-limited networks. Once the data reaches its destination, it is decompressed back into its original form. 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 : 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. 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 : 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 : Encryption is the process of converting readable data (plaintext) into an unreadable format (ciphertext) to protect it from unauthorized access. The Presentation Layer encrypts sensitive information, such as credit card details or login credentials, before transmission to ensure confidentiality. Common encryption algorithms include AES (Advanced Encryption Standard) , DES (Data Encryption Standard) , and RSA . Decryption : When the encrypted data reaches its destination, the Presentation Layer decrypts it back into plaintext so that the application layer can process it. Only the intended recipient (with the correct decryption key) can access the original, unencrypted data. Protocol Examples : 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 : 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. Compression is especially important in multimedia applications where large files (such as images, videos, and audio) are transmitted. Lossless vs. Lossy Compression : 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 . 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 : Once the data reaches its destination, the Presentation Layer decompresses the data to restore it to its original size and format. 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) : These protocols are used to provide encryption and secure communication between clients and servers over the internet. HTTPS (Hypertext Transfer Protocol Secure) is an example of how SSL/TLS is used to secure web communications. MIME (Multipurpose Internet Mail Extensions) : MIME is a standard used to encode binary files like images, videos, and attachments into a format suitable for email transmission. 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) : JPEG is a widely used image compression format that reduces the size of image files while maintaining an acceptable level of quality. The Presentation Layer compresses the image before transmission and decompresses it once received. MP3 (MPEG-1 Audio Layer 3) : 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) : 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 : 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 : 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 : The Session Layer establishes a session or a communication link between two devices (e.g., between a client and a server). It uses session control protocols to negotiate and set up communication parameters before data transmission begins. Examples: NetBIOS , RPC (Remote Procedure Call) . Session Management : This layer maintains the session and keeps it active as long as data is being exchanged between the devices. 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). 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: 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 : 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 : 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. 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 : 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). The Session Layer negotiates parameters, such as the type of session, synchronization points, and how data will be exchanged. Once the session is established, the data exchange can begin. Session Termination : After the data exchange is complete, the Session Layer ensures that the session is properly closed. 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 : Only one party can send data at any given time. Example: Sending data from a monitoring device to a control system. Half-Duplex Communication : Both devices can send data, but not simultaneously. One device must wait for the other to finish sending before it can transmit. Example: Walkie-talkie communication where only one person can speak at a time. Full-Duplex Communication : 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 : 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. Checkpoints are important for long data transfers, where resending all data from the beginning would be inefficient. Resuming from a Checkpoint : 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. 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) : RPC is used in distributed computing to allow a program on one machine to execute code on a remote system. 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) : NetBIOS is used in older Windows networks to enable communication between applications on different computers. The Session Layer in NetBIOS ensures that communication sessions between applications are properly established and maintained. PPTP (Point-to-Point Tunneling Protocol) : PPTP is a protocol used in VPNs (Virtual Private Networks) to secure a connection between two networks or devices. 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 : When you browse a website, the Session Layer helps manage the interaction between your computer (client) and the web server. 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 : In file transfers (e.g., FTP), the Session Layer is responsible for managing the transfer session between the client and the server. If the connection is interrupted, the session can resume from where it left off, thanks to synchronization points. Video Conferencing : 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 : 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 : 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

. Key Functions Segmentation and Reassembly : The Transport Layer divides large data streams from higher layers (such as the application layer) into smaller segments, suitable for transmission. At the destination, it reassembles the segments back into the original data. Flow Control : 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. 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 : 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 : For connection-oriented protocols like TCP, the Transport Layer establishes, maintains, and terminates a connection between two devices before data can be transferred. It also ensures that data is sent and received in the correct sequence and without loss. Multiplexing : 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) : 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. Reliability : TCP provides mechanisms for error checking , acknowledgment , and retransmission if data is lost or corrupted. Three-Way Handshake : TCP uses a process called the three-way handshake to establish a connection: SYN : The sender sends a synchronization request. SYN-ACK : The receiver acknowledges the request. ACK : The sender confirms the acknowledgment, and the connection is established. Error Control : TCP ensures reliable delivery by using sequence numbers and ACKs . If a segment is lost, TCP retransmits it. Flow Control : TCP uses windowing to manage the rate of data transmission and avoid overwhelming the receiver. 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) : Connectionless : Unlike TCP, UDP is a connectionless protocol. It sends data without establishing a connection, which makes it faster but less reliable. No Error Checking or Acknowledgment : UDP does not provide mechanisms for checking errors, ordering data, or retransmitting lost packets. Low Latency : Because UDP has minimal overhead, it is used in applications where speed is more critical than reliability. 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. Transport Layer

Segmentation

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. 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 : TCP establishes a connection using the three-way handshake process to ensure that both the sender and receiver are ready to communicate. This ensures that both devices agree on initial sequence numbers and are synchronized before data transfer. Connection Termination : TCP uses a four-step process (FIN-ACK exchange) to gracefully terminate a connection. 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 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 Contro l

Transport Layer Identifying Service TCP UDP Transmission Control Protocol Connection Oriented Acknowledgement Reliable Slower Port No.6 e.g. HTTP , FTP , SMTP User Datagram Protocol Connection Less No Acknowledgement Unreliable Faster Port No. 17 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

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 : The Network Layer assigns a logical address to devices, called an IP address (Internet Protocol address), which uniquely identifies each device on a network. IP addresses ensure that data is delivered to the correct device on different networks. Routing : 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). 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. Routing protocols : Examples include OSPF (Open Shortest Path First) , RIP (Routing Information Protocol) , and BGP (Border Gateway Protocol) . . Network Layer

Routing : 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). 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. Routing protocols : Examples include OSPF (Open Shortest Path First) , RIP (Routing Information Protocol) , and BGP (Border Gateway Protocol) . Packet Forwarding : After determining the route, the network layer forwards packets across network devices such as routers, following the selected path toward the destination. This process is also known as packet switching . Fragmentation and Reassembly : 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. 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 Protocol) is used to send error messages and operational information such as unreachable hosts. 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 : IPv4 (Internet Protocol Version 4) : 32-bit address format (e.g., 192.168.1.1), which allows for approximately 4.3 billion unique addresses. 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 : Static Routing : Routes are manually configured by network administrators. Dynamic Routing : Routers automatically adjust routes using routing protocols like OSPF, RIP, and BGP. Routing Algorithms : 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 : 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 : 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) : The fundamental protocol for transmitting data across networks. It is connectionless and does not guarantee delivery. ICMP (Internet Control Message Protocol) : Used for diagnostic purposes, such as the ping command, which checks connectivity between devices. ARP (Address Resolution Protocol) : Used to map an IP address to a physical MAC address in a local network. NAT (Network Address Translation) : A method used to map private IP addresses to public IP addresses, allowing devices within a private network to communicate with the internet. Network Layer

Routing Protocols

. Network Layer Challenges Congestion Control : Excessive data traffic can cause network congestion, where packets are delayed, dropped, or lost. Managing network congestion is a key challenge. Security : 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) : 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) : 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. Network Layer

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

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 : The data link layer detects and corrects any errors that may have occurred during the transmission of data from the physical layer. 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 : This function ensures that the sender does not overwhelm the receiver with too much data at once, preventing data loss or congestion. Protocols like Stop-and-Wait and Sliding Window are commonly used to control the flow of data. Frame Synchronization : 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: Logical Link Control (LLC) : Handles communication between the network layer and the data link layer. Manages flow control and error checking, and provides an interface for the network layer above. Identifies which network protocol is being used, such as IP for internet communication. Media Access Control (MAC) : Responsible for controlling how devices access the physical medium (cable or wireless). Assigns MAC addresses (a unique identifier) to network devices. 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 : Operate at the data link layer and are responsible for forwarding frames between devices within the same network. Use MAC addresses to determine the destination of frames and to route them appropriately. Switches help in reducing traffic by creating separate collision domains for each device. Network Interface Cards (NICs) : Each NIC has a unique MAC address that identifies it on the network. 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) : A mathematical technique that allows the receiver to detect errors in the received frames by calculating a checksum. Acknowledgment and Retransmission : 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 : A widely used protocol in wired local area networks (LANs) that operates at the data link layer. Defines how devices share access to the network and how frames are structured. Wi-Fi (IEEE 802.11) : Wireless networking protocol that operates at the data link layer. Uses MAC addresses to manage communication and frame delivery over wireless connections. PPP (Point-to-Point Protocol) : 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 : In shared networks like Ethernet, multiple devices may try to send data simultaneously, leading to collisions. CSMA/CD helps reduce these collisions. Bandwidth Efficiency : Ensuring efficient utilization of the available bandwidth while preventing congestion or excessive errors. Security : Since MAC addresses can be spoofed, the data link layer faces security challenges. Devices can be misidentified or attacked using MAC spoofing techniques. Data Link Layer

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

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: Electrical signals over copper cables (e.g., Ethernet). Light signals in fiber optics. Radio waves for wireless communication. Transmission Media : Manages the physical media through which data is sent, including: Cables : Twisted pair, coaxial, fiber-optic cables. 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 : Twisted Pair (e.g., Cat5, Cat6) : Used for Ethernet connections. Coaxial Cable : Used for older networks and cable TV. 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

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