OSI LAYERS
OSI Model OSI means Open System Interconnect model. Developed by the International Organization for Standardization in 1974. It consists of seven layers. Each layer has a different but specific processing function.
OSI Model Layers Application Upper Layer or Software Layer Layer - 7 Layer - 6 Layer - 5 Layer - 4 Layer - 3 Layer - 2 Layer - 1 Presentation Session Transport Heart of OSI Network Lower Layer or Hardware Layer Data Link Physical
Application Layer Application Presentation Session Transport Network Data Link Physical Application Application Layer is responsible for providing Networking 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
Example of FTP request ftp://ftp.microsoft.com Client FTP Server
Example of FTP request FTP Request ftp://ftp.microsoft.com Received FTP Reply ftp://ftp.microsoft.com FTP Request Listen on Port 21 Sending FTP Reply Client FTP Server
Examples of Networking Services Service Port No. HTTP 80 FTP 21 SMTP 25 TELNET 23 TFTP 69
Data flow from Application Layer 21 80 25 67 53 69 Presentation Session Transport Network Data Link Physical
Presentation Layer Application Presentation Session Transport Network Data Link Physical Presentation Layer is responsible for converting data into standard format. Examples : ASCII, EBCDIC, JPEG, MPEG, BMP, MIDI, WAV, MP3 Following tasks are perform at Presentation layer : Encoding – Decoding Encryption – Decryption Compression – Decompression Presentation
Data flow from Presentation Layer Application Presentation Session Transport Network Data Link Physical Data Data
Session Layer Application Presentation Session Transport Network Data Link Physical Session Layer is responsible for establishing, maintaining and terminating session. Session ID works at Session Layer. Examples : RPC Remote Procedure Call SQL Structured Query Language NFS Network File System Session
Data flow from Session Layer Application Presentation Session Transport Network Data Link Physical Data Data Data
Transport Layer Application Presentation Session Transport Network Data Link Physical Transport Layer is responsible for end-to-end connectivity. It is also known as the heart of OSI Layers. Following tasks are performed at the Transport Layer : - Identifying Service Multiplexing & De-multiplexing Segmentation Sequencing & Reassembling Error Correction Flow Control Transport
Identifying Service 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 TCP UDP
Application Presentation Session Transport Network Data Link Physical Multiplexing & De-multiplexing Application Presentation Session 21 80 25 67 53 69 Transport TCP - 6 UDP - 17 Network Data Link Physical
A B Segmentation Hello! How are you ? Hello! How are you ? Hello! How
A B Sequencing & Reassembling you Hello! How ? are Hello! How are you ? You Hello! How ? Are Hello! How are you ? You Hello! Hello! How Are How You ? Are ? A B
A B Sequencing & Reassembling Hello! How are you ? 1/5 Hello! 1/5 How 2/5 How 2/5 Are 3/5 Are 3/5 You 4/5 You 4/5 ? 5/5 ? 5/5 You 4/5 Hello! 1/5 How 2/5 ? 5/5 Are 3/5 A B
A B Error Correction Hello! How are you ? Segment Missing 1/5 Hello! 1/5 Hello! 1/5 Are 3/5 You 4/5 ? 5/5 How 2/5 How 2/5 Are 3/5 Are 3/5 You 4/5 You 4/5 ? 5/5 ? 5/5 You 4/5 Hello! 1/5 How 2/5 ? 5/5 Are 3/5 A B
can send 4 Segment at a time to Flow Control - Windowing Ack-Rec-3 Sending 5-window Ack. Received-4 Sending 3-window PC-A can send 4 Segment at a time to PC-B Received 4-window Received 3-window A B
Data flow from Transport Layer Application Presentation Session Transport Network Data Link Physical Data Data Data TH Segment Data
Network Layer Application Presentation Session Transport Network Data Link Physical 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 Network
A B Routed Protocols Hello! How are you ? Hello! How are you ? Segment Segment Segment Hello! How are you ? Hello! How are you ? Source IP 192.168.1.1 Destination IP 192.168.1.2 Source IP 192.168.1.1 Destination IP 192.168.1.2 192.168.1.1 192.168.1.2 A B
Routing Protocols www.zoomgroup.com A
Data flow from Network Layer Application Presentation Session Transport Network Data Link Physical Data Data Data Segment e.g. Router NH Packet Segment
Datalink Layer Application Presentation Session Transport Network Data Link Physical 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. 12 digit Hexadecimal Number. It is also responsible for Error Detection Devices working on Data Link Layer are Switch, Bridge, NIC. Data Link
Contact Source Transport layer Error Detection – CRC Check Packet PC-A CRC No. 33333 PC-B CRC No. 11114 Error Detected For Error Correction Contact Source Transport layer Packet Hello! How are you ? 55434 89696 22222 99323 32434 46323 Error Detected 11114 00000 99434 43434 11114 22222 32434 00000 Source MAC 00-20-18-C0-07-71 Destination MAC 00-20-18-C0-07-72 89696 55434 46323 99434 43434 33333 99323 192.168.1.1 00-20-18-C0-07-71 192.168.1.2 00-20-18-C0-07-72 A B
A B Error Detection – CRC Check Hello! How are you ? 99323 55434 89696 Packet Packet Packet Hello! How are you ? 99323 55434 89696 43434 22222 11114 Source MAC 00-20-18-C0-07-71 Destination MAC 00-20-18-C0-07-72 20202 32434 46323 99434 20202 22222 89696 32434 00000 Source MAC 00-20-18-C0-07-71 Destination MAC 00-20-18-C0-07-72 00000 55434 11114 46323 99434 99323 43434 192.168.1.1 00-20-18-C0-07-71 192.168.1.2 00-20-18-C0-07-72 A B
Data flow from Data Link Layer Application Presentation Session Transport Network Data Link Physical Data Data Data Segment Packet e.g. Switch DH DT Frame Packet Packet
Physical Layer Application Presentation Session Transport Network Data Link Physical 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. Devices working at Physical Layer are Hubs, Repeaters, Cables, Modems etc. Physical
A B Physical Layer Example Hello! How are you ? Frame Frame Frame Hello! How are you ? 1010101010101010 1010101010101010 A B 1010101101010101010101010 0101011010101010101010101 1010101101010101010101010 0101011010101010101010101 0101011010101010101010101
Data flow from Physical Layer Application Presentation Session Transport Network Data Link Physical Data Data Data Segment Packet Frame e.g. Hub Bits
A B Data Encapsulation & De-capsulation Application Presentation Session Transport Network Data Link Physical Data Data Data Data Data Data TH Segment Data TH Data Segment TH NH Packet Segment Packet NH Segment NH DT DH Frame Packet Packet Packet DT Packet DH Frame DT DH Bits Bits
A B Simulation Scenario Frame Port MAC 0/2 2222:2222:2222 Data Data Data Link Physical A 1000011110001110000111000 B www.google.com Frame Application Application Presentation Session Transport Network Data Link Physical 8787874471797971766944677977 www.google.com Port MAC 0/2 2222:2222:2222 0/1 1111:1111:1111 Presentation 87878744717979 71766944677977 Student:1 8787874471797971766944677977 Session Data TCP:80 TCP:80 87878744717979 71766944677977 Student:1 Transport SIP DIP Network Data TCP:80 Segment Data Link S MAC D MAC Segment SIP DIP Packet Physical 1000011110001110000111000 Packet S MAC D MAC 1000011110001110000111000
Figure 2.21 Port addresses
Figure 2.20 IP addresses
Comparing OSI with TCP/IP Layers OSI Layers TCP/IP Layers Application Presentation Session Transport Network Data Link Physical Application Transport Internet Network Access