SlideShare a Scribd company logo
Prof. Mukesh N Tekwani [Mobile: 9869 488 356]



                                     1. Introduction
OSI Reference Model is a standard approach to network design. It is developed by the
International Standards Organization (ISO). The word “Open” signifies that the model deals
with connecting open systems – that is, systems that are open for communication with other
systems.

The OSI model has 7 layers. The following principles were applied to arrive at the seven
layers:
1. The complex task of network architecture is divided into a set of functions.
2. A layer should be created where a different level of abstraction is needed.
3. Each layer should perform a well defined function.
4. The layer boundaries should be chosen to minimize the information flow across the
    interfaces.
5. The number of layers should be large enough that distinct functions need not be thrown
    together in the same layer out of necessity, and small enough that the architecture does
    not become unwieldy. Functions which are similar are grouped together within layers.
6. The internal design of a layer is independent of the function it provides.
7. Each layer knows only about its immediately adjacent layers. A layer utilizes the services
    of the layer below and provides services to the layer above.
8. Each layer can be regarded as a black box

Network Model:
        What is a model? – A model is a hypothetical description of a complex entity or
        process. The process of data communication along a network is very complex
        involving hardware and software.
        Network model - A method of describing and analyzing data communications
        networks by breaking the entire set of communications process into a number of
        layers.

Network Architecture:
        A set of layers and protocols is called a network architecture
        It refers to the physical and logical design of a network

Protocol:
It is a formal description of message formats and the rules that two computers must follow in
order to exchange messages. This set of rules describes how data is transmitted over a
network. OSI is not a protocol. Protocols are needed for the following reasons:
                 In what format will the messages be transmitted?
                 At what speed should messages be transmitted?
                 What to do if errors take place?
                 What to do if parts of a message are lost?

Layered Approach To Networking:
        Divide the complex task into a number of simpler sub-tasks. A layer performs that
        simple sub-task.
        Each layer builds upon the layer below it, adding new functionality.
        The entities comprising the corresponding layers on different machines are called
        peers.
        It is the peers that communicate by using the protocols.
        Actually, data is not transferred from layer n on one machine to layer n on another
        machine.



                     OSI & TCP/IP Reference Models – Page 1 of 7
Prof. Mukesh N Tekwani [Mobile: 9869 488 356]

       Each layer passes data and control information to the layer immediately below it,
       until the lowest layer is reached.
       Actual data communication takes place through the lowest layer – the physical layer.

Design Issues for Layers:
       Addressing - some mechanism is needed for specifying the source and destination
       systems.
       Error control – error detection and correction
       Order of messages must be preserved.
       Flow control – fast sender and slow receiver – prevent the receiver from being
       flooded with data
       Disassembling, transmitting, and reassembling large messages – individual parts of
       messages must be numbered serially so that reassembly is possible, and lost /
       damaged messages can be retransmitted.
       Multiplexing / de-multiplexing – Multiplexing is a technique that allows several
       signals to be transmitted over a single communications channel. Multiplexing permits
       efficient utilization of channel resources. De-multiplexing is carried out at the
       receiving end to separate the signals.
       Routing - it is the act of moving information across an internetwork from a source to a
       destination

Concept of Services and Protocols:
       A service is a set of operations that a layer provides to the layer above it.
       Service defines what operations the layer is prepared to perform.
       A service relates to the interface between two layers – the lower layer is service
       provider and the upper layer is service user.
       A protocol is a set of rules governing the format and meaning of the packets.
       Protocols relate to packets sent between peer entities on different machines.
       Entities use protocols.
       Protocols can be changed provided the services visible to the user do not change.
       Thus services and protocols are completely decoupled.
       Analogy with programming languages:
           •      A service is like an object in an object-oriented language
           •      What operations can be performed on this object is defined
           •      How these operations are to be performed is not defined
       Protocol relates to the implementation of the service – how it is done


Layers of the OSI Model:
                                       Application
                                      Presentation
                                          Session
                                        Transport
                                         Network
                                        Data Link
                                         Physical

Useful mnemonics to remember the order of these layers:
All People Seem To Need Data Processing
Please Do Not Tell Secret Passwords Anytime


                    OSI & TCP/IP Reference Models – Page 2 of 7
Prof. Mukesh N Tekwani [Mobile: 9869 488 356]


Application Layer:
•     This is the top layer of the reference model.
•     Examples: email client, Internet browser, file transfer
•     How can two applications communicate in a meaningful way? - The particular needs of
      an application specify the communication characteristics at the application layer.
•     Contains protocols that allow the users to access the network (FTP, HTTP, SMTP, etc
•     Does not include application programs such as email, browsers, word processing
      applications, etc
•     Protocols contain utilities and network-based services that support email via SMTP,
      Internet access via HTTP, file transfer via FTP, etc

Presentation Layer:
•     Examples: compression, encryption
•     What does the data look like? - The Presentation layer provides services that affect
      how data passed between applications will look, such as character set conversion, or
      encryption/decryption.
•     Translation
          o Different computers use different encoding systems (bit order translation)
          o Convert data into a common format before transmitting.
          o Syntax represents info such as character codes, data types, and file formats
               (how many bits to represent data – 8 or 7 bits
•     Compression – reduce number of bits to be transmitted
•     Encryption – transform data into an unintelligible format at the sending end for data
      security
•     Decryption – at the receiving end.

Session Layer
•     Main functions of this layer are:
          o Dialog control – allows two systems to enter into a dialog, keep a track of
              whose turn it is to transmit
          o Synchronization – adds check points (synchronization points) into stream of
              data.
•     How can more than one resource talk to only one of me? – The session layer answers
      the need for individual hosts to support more than one active connection at a time.

Transport Layer
•     Main functions of this layer are:
          o Responsible for source-to-destination delivery of the entire message
          o Segmentation and reassembly – divide message into smaller segments, number
              them and transmit. Reassemble these messages at the receiving end.
          o Error control – make sure that the entire message arrives without errors – else
              retransmit.
•     What if data arrives garbled or out of order or too fast? – The Transport Layer provides
      end-to-end communication integrity. If a packet is missing or garbled, or arrives out-of-
      order, or too soon, the protocol at this layer will attempt to correct.

Network Layer
Main functions of this layer are:
         o Responsible for delivery of packets across multiple networks
         o Routing – Provide mechanisms to transmit data over independent networks that
             are linked together.
         o Network layer is responsible only for delivery of individual packets and it does
             not recognize any relationship between those packets


                     OSI & TCP/IP Reference Models – Page 3 of 7
Prof. Mukesh N Tekwani [Mobile: 9869 488 356]


Data Link Layer
•     Responsible for delivery of data between two systems on the same network
•     Main functions of this layer are:
         o Framing – divides the stream of bits received into manageable data units called
             frames.
         o Physical Addressing – Add a header to the frame to define the physical address
             of the source and the destination machines.
         o Flow control – Impose a flow control – control rate at which data is transmitted
             so as not to flood the receiver
         o Error Control – Adds mechanisms to detect and retransmit damaged or lost
             frames; also prevents duplication of frames. This is achieved by adding a trailer
             to the end of a frame.

Physical layer
•     Functions of Physical Layer:
         o Bit representation – encode bits into electrical or optical signals
         o Transmission rate – The number of bits sent each second
         o Physical characteristics of transmission media
         o Synchronizing the sender and receiver clocks
         o Transmission mode – simplex, half-duplex, full duplex
         o Physical Topology – how devices are connected – ring, star, mesh, bus
              topology
•     Transmit raw bit-stream over physical cable.
•     Define physical aspects of media, network cards, etc.

Connection-oriented and Connectionless Services:
Layers can offer two types of services t5o the layers above them: connection-oriented and
connectionless.

    Connection-oriented service is modelled after the telephone system. To talk to someone,
    pick up a phone, dial the number, talk and disconnect. Similarly, in a network, the
    service user will
        1. Establish a connection
        2. Use the connection
        3. Release the connection
        4. The sender, receiver and the network may conduct a negotiation about data
            transfer speed, maximum message size, etc.

When a connection is established, the sender and receiver may conduct a negotiation about
parameters to be used such as maximum message size, data transfer speed, etc.

Connection-oriented service is used when reliability is important. Only a single path is
established for the call, and all the data follows that path.

    Connectionless service is modelled after the post office system. Each message (letter)
    carries the full address of the destination system. Each message is routed through the
    network system independent of the other messages. If two messages are sent to the same
    destination, normally the first one to be sent should arrive first. But it is possible that the
    second message arrives first. Since each message (packet) is routed independently, the
    network cannot guarantee that all the messages will arrive at the destination in the
    transmitting order. Different parts of a message may travel along different routes.




                      OSI & TCP/IP Reference Models – Page 4 of 7
Prof. Mukesh N Tekwani [Mobile: 9869 488 356]


                                   TCP / IP Protocol
What is TCP / IP?
TCP – Transmission Control Protocol
IP – Internetwork Protocol
TCP/IP refers to a collection of protocols
The name TCP/IP is misleading because TCP and IP are only two of the many protocols in
this collection of protocols.

TCP is a reliable connection-oriented protocol with the following features:
1. Allows error-free transmission.
2. Incoming byte stream is fragmented into a number of shorter messages and these are
   passed on to the next layer.
3. At the receiving end the TCP reassembles the messages into an output stream
4. TCP also handles flow control – to control data transfer rate so that a slow receiver is not
   flooded with data from a fast sender.
5. A connection must be established between the sender and the receiver before transmission
   begins.
6. TCP creates a virtual circuit between sender and receiver for the duration of the
   transmission.
7. TCP begins each transmission by alerting the receiver that segments are on their way
   (connection establishment).
8. Each transmission is ended with connection termination.


Layers of TCP/IP Model:
                                         Application

                                          Transport

                                           Internet

                                          Data Link

                                           Physical


The TCP / IP suite does not define any specific protocols at the data link and physical layers.

The Application layer: This is equivalent to the combined OSI Session, Presentation, and
Application layers. All the functions handled by these 3 layers in the OSI model is handled by
the Application layer. This layer contains the higher level protocols:
a. FTP – File Transfer Protocol – basic file transfer between hosts (computers)
b. SMTP – Simple Mail Transfer Protocol (for email)
c. HTTP – Hyper Text Transfer Protocol (for web browsing)

A data unit created at the application layer is called a message.

Encapsulation of Data: TCP/IP protocol suite encapsulates data units at various layers of the
model
a. At the Application layer, the data unit created is called a message.
b. The Transport layer adds a header to form either a segment with TCP or a user
   datagram with UDP.



                     OSI & TCP/IP Reference Models – Page 5 of 7
Prof. Mukesh N Tekwani [Mobile: 9869 488 356]

c. Each segment created by TCP includes:
         i. A sequencing number for re-ordering after receipt.
        ii. An acknowledgement ID number
       iii. Source address and destination address
       iv. Checksum – for error detection
        v. Data
       vi. And other fields
d. The Network (or Internet) layer adds another header to form a datagram. A datagram is a
   self-contained message unit which contains sufficient information to allow it to be routed
   from the source to the destination. The protocol used at the data link layer encapsulates
   the datagram into a frame and this is transmitted across the transmission medium.

Transport Layer:
   •    This layer is represented by two protocols – TCP (Transmission Control Protocol )
        and UDP (User Datagram Protocol).
   •    UDP is simpler but is used when reliability and security are less important than size
        and speed – such as speech and video where a loss of few data is not significant,
        but speed is important.

Network Layer or Internetwork Layer
Internetwork Protocol (IP) is an unreliable and connectionless datagram protocol.
It offers a best–effort delivery service. There is no error checking. IP does its best to get a
transmission through to its destination but with no guarantees. Noise can cause bit errors
during transmission, and datagrams maybe discarded due to timeout errors.

IP transports data in packets called datagrams:
•      Each datagram is transported separately.
•      Datagrams can be of variable lengths (upto 64 KB).
•      Datagrams may travel along different routes and may arrive out of sequence.
•      IP does not keep track of the routes.
•      IP does not have the facility to reorder datagrams once they arrive.
•      A datagram contains a header and data.
•      The header contains a number of fields including source and destination address.

Comparison of OSI and TCP/IP Models:
o   The OSI model makes a clear distinction between services, interfaces and protocols
o   Each layer performs some service for the layer above it
o   A layer’s interface tells the processes above it how to access it. It specifies what the
    parameters are and what results to expect (somewhat like a function declaration)
o   The protocols used in a layer are used to get the job done.
o   The OSI model has 7 layers while the TCP/ IP model has 5 layers
o   Both have network, transport, and application layers, but the other layers are different
o   OSI model supports both connectionless and connection-oriented communication
o   TCP/IP supports only connectionless communication

How TCP/IP works?
User application programs communicate with the top layer in the protocol stack. This layer
passes information to the next subsequent lower layer of the stack, and so on till the
information is passed to the lowest layer, the physical layer, which transfers the information
to the destination network.

At the destination, the lower layer passes the received information to its higher levels, which
in turn passes the data to the destination application. Each protocol layer performs various



                     OSI & TCP/IP Reference Models – Page 6 of 7
Prof. Mukesh N Tekwani [Mobile: 9869 488 356]

functions which are independent of the other layers. Each layer communicates with equivalent
layers on another computer; this is called peer interaction

File Transfer using TCP / IP:
An application program, transferring files using TCP/IP, performs the following:

At the sending end:

     •   the application layer passes the data to the transport layer of the source computer
     •   the transport layer
                  - divides the data into TCP segments
                  - adds a header with a sequence number to each TCP segment
                  - passes the TCP segments to the IP layer
     •   the IP layer
                  - creates a packet with a data portion containing the TCP segment
                  - adds a packet header containing the source and destination IP
         addresses
                   - determines the physical address of the destination computer
                  - passes the packet and destination physical address to the datalink
                     layer
     •   the datalink layer transmits the IP packet in the data portion of a frame

At the receiving end:

     •   the destination computers datalink layer
                 - discards the datalink header and passes the IP packet to the IP layer
     •   the destination’s IP layer
                 - checks the IP packet header and checksum
                 - if okay, discards IP header & passes the TCP segment to the TCP
         layer
     •   the destination’s TCP layer
                 - computes a checksum for the TCP segment data and header
                 - if okay, sends acknowledge to the source computer
                 - discards the TCP header and passes the data to the application




                                           Questions
1.   What is a peer-to-peer process? Explain with examples.
2.   State the layers of the OSI mode and state the functions of each layer.
3.   What is the difference between connectionless communication and connection-oriented
     communication?
4.   What are the reasons for using layered protocols?
5.   What does “negotiation” mean when discussing network protocols?
6.   If the unit exchanged at the data link layer is called frame and the unit exchanged at the
     network layer is called a packet, do frames encapsulate packets or do packets encapsulate
     frames? Explain your answer.
7.   List two ways in which OSI and TCP/IP reference models are same and two ways in
     which they are different.
8.   How do the layers of the TCP/IP model correlate to the layers of the OSI model?

                                     ======= X =======




                      OSI & TCP/IP Reference Models – Page 7 of 7

More Related Content

PDF
Manchester & Differential Manchester encoding scheme
PDF
The Physical Layer
PPT
Data link control
PPTX
Internet protocol (ip) ppt
PPT
(Ftp) file transfer protocol
PPTX
Computer network switching
PPT
Unit 5 Application Layer
PPT
Forouzan _ Multiple access protocols.ppt
Manchester & Differential Manchester encoding scheme
The Physical Layer
Data link control
Internet protocol (ip) ppt
(Ftp) file transfer protocol
Computer network switching
Unit 5 Application Layer
Forouzan _ Multiple access protocols.ppt

What's hot (20)

PPT
Chapter 2 - Network Models
PDF
Data Communication & Networking
PPTX
Application layer
PPT
Circuit and packet_switching
PPTX
TCP/IP Introduction
PPT
Chapter 8: Switching
PPT
Transmission Modes in Computer Networks
PPT
Osi , tcp/ip protocol and Addressing
PPTX
Computer Network - Network Layer
PPTX
Tcp and udp
PPTX
Distance Vector & Link state Routing Algorithm
PPT
Chapter 32
PPTX
Data link layer
PPT
Transportlayer tanenbaum
PDF
Introduction to Data Communication
PPTX
Network Fundamentals: Ch3 - Application Layer Functionality and Protocols
Chapter 2 - Network Models
Data Communication & Networking
Application layer
Circuit and packet_switching
TCP/IP Introduction
Chapter 8: Switching
Transmission Modes in Computer Networks
Osi , tcp/ip protocol and Addressing
Computer Network - Network Layer
Tcp and udp
Distance Vector & Link state Routing Algorithm
Chapter 32
Data link layer
Transportlayer tanenbaum
Introduction to Data Communication
Network Fundamentals: Ch3 - Application Layer Functionality and Protocols
Ad

Viewers also liked (20)

PDF
Data communications ch 1
PPT
Chapter 2: Network Models
PPT
The internet
PPTX
Internet
PPT
Arpanet.53
PPTX
Networks classification
PPTX
Data Representation
PPTX
Computer network : models and topologies
PPT
Network Models
PDF
Chap 1 introduction
PDF
Difference between Routing & Routed Protocol
PDF
Chap 3 data and signals
PPT
3.1.2 classification of network
PPTX
types of network
PPTX
Ppt of routing protocols
PPTX
Data representation in computers
PPTX
Ppt on internet
PPT
Chapter 3 - Data and Signals
PPTX
Data Representation
Data communications ch 1
Chapter 2: Network Models
The internet
Internet
Arpanet.53
Networks classification
Data Representation
Computer network : models and topologies
Network Models
Chap 1 introduction
Difference between Routing & Routed Protocol
Chap 3 data and signals
3.1.2 classification of network
types of network
Ppt of routing protocols
Data representation in computers
Ppt on internet
Chapter 3 - Data and Signals
Data Representation
Ad

Similar to Chap 2 network models (20)

PDF
OSI Model
PPT
Osi layer and network protocol
PPTX
unit1 network model osi and tcpip.pptx
PPTX
Computer network layers
PPTX
Osi model
PDF
OSI &TCP/IP Model
PPTX
Network fundamentals
PPT
Osi model
PPTX
Pwani notes-Network Essentials.pp for Internet Protocoltx
PPTX
Omnya Ashraf.Network (chp1 OSI MODEL.).pptx
PPTX
unit-1fon (1).pptx
DOCX
OsI reference model
PPTX
OSI and TCP/IP reference models in networking
PPT
1_Operating System.ppt
PPTX
Osi model
PPTX
BAPANKAR15800121011 SOFT.pptx
PPTX
Osi layer model
PPT
savli_._Jagrati._Yash_ppt.ppt
PPT
osi reference model ppt
OSI Model
Osi layer and network protocol
unit1 network model osi and tcpip.pptx
Computer network layers
Osi model
OSI &TCP/IP Model
Network fundamentals
Osi model
Pwani notes-Network Essentials.pp for Internet Protocoltx
Omnya Ashraf.Network (chp1 OSI MODEL.).pptx
unit-1fon (1).pptx
OsI reference model
OSI and TCP/IP reference models in networking
1_Operating System.ppt
Osi model
BAPANKAR15800121011 SOFT.pptx
Osi layer model
savli_._Jagrati._Yash_ppt.ppt
osi reference model ppt

More from Mukesh Tekwani (20)

PDF
The Elphinstonian 1988-College Building Centenary Number (2).pdf
PPSX
Circular motion
PPSX
Gravitation
PDF
ISCE-Class 12-Question Bank - Electrostatics - Physics
PPTX
Hexadecimal to binary conversion
PPTX
Hexadecimal to decimal conversion
PPTX
Hexadecimal to octal conversion
PPTX
Gray code to binary conversion
PPTX
What is Gray Code?
PPSX
Decimal to Binary conversion
PDF
Video Lectures for IGCSE Physics 2020-21
PDF
Refraction and dispersion of light through a prism
PDF
Refraction of light at a plane surface
PDF
Spherical mirrors
PDF
Atom, origin of spectra Bohr's theory of hydrogen atom
PDF
Refraction of light at spherical surfaces of lenses
PDF
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
PPSX
Cyber Laws
PPSX
Social media
The Elphinstonian 1988-College Building Centenary Number (2).pdf
Circular motion
Gravitation
ISCE-Class 12-Question Bank - Electrostatics - Physics
Hexadecimal to binary conversion
Hexadecimal to decimal conversion
Hexadecimal to octal conversion
Gray code to binary conversion
What is Gray Code?
Decimal to Binary conversion
Video Lectures for IGCSE Physics 2020-21
Refraction and dispersion of light through a prism
Refraction of light at a plane surface
Spherical mirrors
Atom, origin of spectra Bohr's theory of hydrogen atom
Refraction of light at spherical surfaces of lenses
ISCE (XII) - PHYSICS BOARD EXAM FEB 2020 - WEIGHTAGE
Cyber Laws
Social media

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
KodekX | Application Modernization Development
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
A Presentation on Artificial Intelligence
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
cuic standard and advanced reporting.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
Modernizing your data center with Dell and AMD
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
NewMind AI Monthly Chronicles - July 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
KodekX | Application Modernization Development
Unlocking AI with Model Context Protocol (MCP)
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
The AUB Centre for AI in Media Proposal.docx
Encapsulation_ Review paper, used for researhc scholars
A Presentation on Artificial Intelligence
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
cuic standard and advanced reporting.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Electronic commerce courselecture one. Pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation

Chap 2 network models

  • 1. Prof. Mukesh N Tekwani [Mobile: 9869 488 356] 1. Introduction OSI Reference Model is a standard approach to network design. It is developed by the International Standards Organization (ISO). The word “Open” signifies that the model deals with connecting open systems – that is, systems that are open for communication with other systems. The OSI model has 7 layers. The following principles were applied to arrive at the seven layers: 1. The complex task of network architecture is divided into a set of functions. 2. A layer should be created where a different level of abstraction is needed. 3. Each layer should perform a well defined function. 4. The layer boundaries should be chosen to minimize the information flow across the interfaces. 5. The number of layers should be large enough that distinct functions need not be thrown together in the same layer out of necessity, and small enough that the architecture does not become unwieldy. Functions which are similar are grouped together within layers. 6. The internal design of a layer is independent of the function it provides. 7. Each layer knows only about its immediately adjacent layers. A layer utilizes the services of the layer below and provides services to the layer above. 8. Each layer can be regarded as a black box Network Model: What is a model? – A model is a hypothetical description of a complex entity or process. The process of data communication along a network is very complex involving hardware and software. Network model - A method of describing and analyzing data communications networks by breaking the entire set of communications process into a number of layers. Network Architecture: A set of layers and protocols is called a network architecture It refers to the physical and logical design of a network Protocol: It is a formal description of message formats and the rules that two computers must follow in order to exchange messages. This set of rules describes how data is transmitted over a network. OSI is not a protocol. Protocols are needed for the following reasons: In what format will the messages be transmitted? At what speed should messages be transmitted? What to do if errors take place? What to do if parts of a message are lost? Layered Approach To Networking: Divide the complex task into a number of simpler sub-tasks. A layer performs that simple sub-task. Each layer builds upon the layer below it, adding new functionality. The entities comprising the corresponding layers on different machines are called peers. It is the peers that communicate by using the protocols. Actually, data is not transferred from layer n on one machine to layer n on another machine. OSI & TCP/IP Reference Models – Page 1 of 7
  • 2. Prof. Mukesh N Tekwani [Mobile: 9869 488 356] Each layer passes data and control information to the layer immediately below it, until the lowest layer is reached. Actual data communication takes place through the lowest layer – the physical layer. Design Issues for Layers: Addressing - some mechanism is needed for specifying the source and destination systems. Error control – error detection and correction Order of messages must be preserved. Flow control – fast sender and slow receiver – prevent the receiver from being flooded with data Disassembling, transmitting, and reassembling large messages – individual parts of messages must be numbered serially so that reassembly is possible, and lost / damaged messages can be retransmitted. Multiplexing / de-multiplexing – Multiplexing is a technique that allows several signals to be transmitted over a single communications channel. Multiplexing permits efficient utilization of channel resources. De-multiplexing is carried out at the receiving end to separate the signals. Routing - it is the act of moving information across an internetwork from a source to a destination Concept of Services and Protocols: A service is a set of operations that a layer provides to the layer above it. Service defines what operations the layer is prepared to perform. A service relates to the interface between two layers – the lower layer is service provider and the upper layer is service user. A protocol is a set of rules governing the format and meaning of the packets. Protocols relate to packets sent between peer entities on different machines. Entities use protocols. Protocols can be changed provided the services visible to the user do not change. Thus services and protocols are completely decoupled. Analogy with programming languages: • A service is like an object in an object-oriented language • What operations can be performed on this object is defined • How these operations are to be performed is not defined Protocol relates to the implementation of the service – how it is done Layers of the OSI Model: Application Presentation Session Transport Network Data Link Physical Useful mnemonics to remember the order of these layers: All People Seem To Need Data Processing Please Do Not Tell Secret Passwords Anytime OSI & TCP/IP Reference Models – Page 2 of 7
  • 3. Prof. Mukesh N Tekwani [Mobile: 9869 488 356] Application Layer: • This is the top layer of the reference model. • Examples: email client, Internet browser, file transfer • How can two applications communicate in a meaningful way? - The particular needs of an application specify the communication characteristics at the application layer. • Contains protocols that allow the users to access the network (FTP, HTTP, SMTP, etc • Does not include application programs such as email, browsers, word processing applications, etc • Protocols contain utilities and network-based services that support email via SMTP, Internet access via HTTP, file transfer via FTP, etc Presentation Layer: • Examples: compression, encryption • What does the data look like? - The Presentation layer provides services that affect how data passed between applications will look, such as character set conversion, or encryption/decryption. • Translation o Different computers use different encoding systems (bit order translation) o Convert data into a common format before transmitting. o Syntax represents info such as character codes, data types, and file formats (how many bits to represent data – 8 or 7 bits • Compression – reduce number of bits to be transmitted • Encryption – transform data into an unintelligible format at the sending end for data security • Decryption – at the receiving end. Session Layer • Main functions of this layer are: o Dialog control – allows two systems to enter into a dialog, keep a track of whose turn it is to transmit o Synchronization – adds check points (synchronization points) into stream of data. • How can more than one resource talk to only one of me? – The session layer answers the need for individual hosts to support more than one active connection at a time. Transport Layer • Main functions of this layer are: o Responsible for source-to-destination delivery of the entire message o Segmentation and reassembly – divide message into smaller segments, number them and transmit. Reassemble these messages at the receiving end. o Error control – make sure that the entire message arrives without errors – else retransmit. • What if data arrives garbled or out of order or too fast? – The Transport Layer provides end-to-end communication integrity. If a packet is missing or garbled, or arrives out-of- order, or too soon, the protocol at this layer will attempt to correct. Network Layer Main functions of this layer are: o Responsible for delivery of packets across multiple networks o Routing – Provide mechanisms to transmit data over independent networks that are linked together. o Network layer is responsible only for delivery of individual packets and it does not recognize any relationship between those packets OSI & TCP/IP Reference Models – Page 3 of 7
  • 4. Prof. Mukesh N Tekwani [Mobile: 9869 488 356] Data Link Layer • Responsible for delivery of data between two systems on the same network • Main functions of this layer are: o Framing – divides the stream of bits received into manageable data units called frames. o Physical Addressing – Add a header to the frame to define the physical address of the source and the destination machines. o Flow control – Impose a flow control – control rate at which data is transmitted so as not to flood the receiver o Error Control – Adds mechanisms to detect and retransmit damaged or lost frames; also prevents duplication of frames. This is achieved by adding a trailer to the end of a frame. Physical layer • Functions of Physical Layer: o Bit representation – encode bits into electrical or optical signals o Transmission rate – The number of bits sent each second o Physical characteristics of transmission media o Synchronizing the sender and receiver clocks o Transmission mode – simplex, half-duplex, full duplex o Physical Topology – how devices are connected – ring, star, mesh, bus topology • Transmit raw bit-stream over physical cable. • Define physical aspects of media, network cards, etc. Connection-oriented and Connectionless Services: Layers can offer two types of services t5o the layers above them: connection-oriented and connectionless. Connection-oriented service is modelled after the telephone system. To talk to someone, pick up a phone, dial the number, talk and disconnect. Similarly, in a network, the service user will 1. Establish a connection 2. Use the connection 3. Release the connection 4. The sender, receiver and the network may conduct a negotiation about data transfer speed, maximum message size, etc. When a connection is established, the sender and receiver may conduct a negotiation about parameters to be used such as maximum message size, data transfer speed, etc. Connection-oriented service is used when reliability is important. Only a single path is established for the call, and all the data follows that path. Connectionless service is modelled after the post office system. Each message (letter) carries the full address of the destination system. Each message is routed through the network system independent of the other messages. If two messages are sent to the same destination, normally the first one to be sent should arrive first. But it is possible that the second message arrives first. Since each message (packet) is routed independently, the network cannot guarantee that all the messages will arrive at the destination in the transmitting order. Different parts of a message may travel along different routes. OSI & TCP/IP Reference Models – Page 4 of 7
  • 5. Prof. Mukesh N Tekwani [Mobile: 9869 488 356] TCP / IP Protocol What is TCP / IP? TCP – Transmission Control Protocol IP – Internetwork Protocol TCP/IP refers to a collection of protocols The name TCP/IP is misleading because TCP and IP are only two of the many protocols in this collection of protocols. TCP is a reliable connection-oriented protocol with the following features: 1. Allows error-free transmission. 2. Incoming byte stream is fragmented into a number of shorter messages and these are passed on to the next layer. 3. At the receiving end the TCP reassembles the messages into an output stream 4. TCP also handles flow control – to control data transfer rate so that a slow receiver is not flooded with data from a fast sender. 5. A connection must be established between the sender and the receiver before transmission begins. 6. TCP creates a virtual circuit between sender and receiver for the duration of the transmission. 7. TCP begins each transmission by alerting the receiver that segments are on their way (connection establishment). 8. Each transmission is ended with connection termination. Layers of TCP/IP Model: Application Transport Internet Data Link Physical The TCP / IP suite does not define any specific protocols at the data link and physical layers. The Application layer: This is equivalent to the combined OSI Session, Presentation, and Application layers. All the functions handled by these 3 layers in the OSI model is handled by the Application layer. This layer contains the higher level protocols: a. FTP – File Transfer Protocol – basic file transfer between hosts (computers) b. SMTP – Simple Mail Transfer Protocol (for email) c. HTTP – Hyper Text Transfer Protocol (for web browsing) A data unit created at the application layer is called a message. Encapsulation of Data: TCP/IP protocol suite encapsulates data units at various layers of the model a. At the Application layer, the data unit created is called a message. b. The Transport layer adds a header to form either a segment with TCP or a user datagram with UDP. OSI & TCP/IP Reference Models – Page 5 of 7
  • 6. Prof. Mukesh N Tekwani [Mobile: 9869 488 356] c. Each segment created by TCP includes: i. A sequencing number for re-ordering after receipt. ii. An acknowledgement ID number iii. Source address and destination address iv. Checksum – for error detection v. Data vi. And other fields d. The Network (or Internet) layer adds another header to form a datagram. A datagram is a self-contained message unit which contains sufficient information to allow it to be routed from the source to the destination. The protocol used at the data link layer encapsulates the datagram into a frame and this is transmitted across the transmission medium. Transport Layer: • This layer is represented by two protocols – TCP (Transmission Control Protocol ) and UDP (User Datagram Protocol). • UDP is simpler but is used when reliability and security are less important than size and speed – such as speech and video where a loss of few data is not significant, but speed is important. Network Layer or Internetwork Layer Internetwork Protocol (IP) is an unreliable and connectionless datagram protocol. It offers a best–effort delivery service. There is no error checking. IP does its best to get a transmission through to its destination but with no guarantees. Noise can cause bit errors during transmission, and datagrams maybe discarded due to timeout errors. IP transports data in packets called datagrams: • Each datagram is transported separately. • Datagrams can be of variable lengths (upto 64 KB). • Datagrams may travel along different routes and may arrive out of sequence. • IP does not keep track of the routes. • IP does not have the facility to reorder datagrams once they arrive. • A datagram contains a header and data. • The header contains a number of fields including source and destination address. Comparison of OSI and TCP/IP Models: o The OSI model makes a clear distinction between services, interfaces and protocols o Each layer performs some service for the layer above it o A layer’s interface tells the processes above it how to access it. It specifies what the parameters are and what results to expect (somewhat like a function declaration) o The protocols used in a layer are used to get the job done. o The OSI model has 7 layers while the TCP/ IP model has 5 layers o Both have network, transport, and application layers, but the other layers are different o OSI model supports both connectionless and connection-oriented communication o TCP/IP supports only connectionless communication How TCP/IP works? User application programs communicate with the top layer in the protocol stack. This layer passes information to the next subsequent lower layer of the stack, and so on till the information is passed to the lowest layer, the physical layer, which transfers the information to the destination network. At the destination, the lower layer passes the received information to its higher levels, which in turn passes the data to the destination application. Each protocol layer performs various OSI & TCP/IP Reference Models – Page 6 of 7
  • 7. Prof. Mukesh N Tekwani [Mobile: 9869 488 356] functions which are independent of the other layers. Each layer communicates with equivalent layers on another computer; this is called peer interaction File Transfer using TCP / IP: An application program, transferring files using TCP/IP, performs the following: At the sending end: • the application layer passes the data to the transport layer of the source computer • the transport layer - divides the data into TCP segments - adds a header with a sequence number to each TCP segment - passes the TCP segments to the IP layer • the IP layer - creates a packet with a data portion containing the TCP segment - adds a packet header containing the source and destination IP addresses - determines the physical address of the destination computer - passes the packet and destination physical address to the datalink layer • the datalink layer transmits the IP packet in the data portion of a frame At the receiving end: • the destination computers datalink layer - discards the datalink header and passes the IP packet to the IP layer • the destination’s IP layer - checks the IP packet header and checksum - if okay, discards IP header & passes the TCP segment to the TCP layer • the destination’s TCP layer - computes a checksum for the TCP segment data and header - if okay, sends acknowledge to the source computer - discards the TCP header and passes the data to the application Questions 1. What is a peer-to-peer process? Explain with examples. 2. State the layers of the OSI mode and state the functions of each layer. 3. What is the difference between connectionless communication and connection-oriented communication? 4. What are the reasons for using layered protocols? 5. What does “negotiation” mean when discussing network protocols? 6. If the unit exchanged at the data link layer is called frame and the unit exchanged at the network layer is called a packet, do frames encapsulate packets or do packets encapsulate frames? Explain your answer. 7. List two ways in which OSI and TCP/IP reference models are same and two ways in which they are different. 8. How do the layers of the TCP/IP model correlate to the layers of the OSI model? ======= X ======= OSI & TCP/IP Reference Models – Page 7 of 7