Network Models
Course Code: COE 3201      Course Title: Data Communication
                    Dept. of Computer Engineering
                       Faculty of Engineering
Lecture No:        2       Week No:        2     Semester:    Summer 19-20
Lecturer:     Abir Ahmed
Lecture Outline
1.   Layered Tasks
2.   Introduction to OSI Model
3.   Introduction to TCP/IP Model
4.   Data Encapsulation
 Layered Tasks
We use the concept of layers in our daily life. As
an example, let us consider two friends who
communicate through postal mail The process of
sending a letter to a friend would be complex if
there were no services available from the post
office.
                         Fig: Tasks involved in sending a letter
Importance of Layering
Troubleshooting: The protocols, actions, and data contained in each layer of
the model relate only to the purpose of that layer. This enables
troubleshooting efforts to be pinpointed on the layer that carries out the
suspected cause of the problem.
Standards: Probably the most important reason for using a layered model is
that it establishes a prescribed guideline for interoperability between the
various vendors developing products that perform different data
communications tasks.
Change: When changes are made to one layer, the impact on the other
layers is minimized. If the model consists of a single, all-encompassing
layer, any change affects the entire model.
    Introduction to OSI Model
 The Open System Interconnection Reference Model (OSI Reference
  Model or OSI Model) is an abstract description for layered
  communications and computer network protocol design.
 It divides network architecture into seven layers which, from top to
  bottom, are the Application, Presentation, Session, Transport, Network,
  Data Link, and Physical Layers. It is therefore often referred to as
  the OSI Seven Layer Model.
 In 1978, the International Standards Organization (ISO) began to
  develop its OSI framework architecture.
Introduction to OSI Model
                    OSI Model
        Data unit                 Layer
                    7. Application
      Data          6. Presentation
                    5. Session
      Segments      4. Transport
      Packet        3. Network
      Frame         2. Data Link
      Bit           1. Physical
Application Layer
 The application layer is the OSI layer closest to the end
 user, which means that both the OSI application layer and
 the user interact directly with the software application.
 Some examples of application layer implementations
 include
   Hypertext Transfer Protocol (HTTP)
   File Transfer Protocol (FTP)
   Simple Mail Transfer Protocol (SMTP)
Presentation Layer
 Before being transmitted, information in the form of
  characters and numbers should be changed to bit streams.
  The presentation layer is responsible for interoperability
  between encoding methods as different computers use
  different encoding methods. It translates data between the
  formats the network requires and the format of the
  computer.
 This layer provides independence from differences in data
  representation, such as – Encryption, Compression
Session Layer
 Session layer provides mechanism for controlling the
  dialogue between the two end systems. It defines how to
  start, control and end conversations (called sessions)
  between applications.
 Any necessary log-on or password validation is also
  handled by this layer.
 Session layer is also responsible for terminating the
  connection.
Transport Layer
 Purpose of this layer is to provide a reliable mechanism
  for the exchange of data between two processes in
  different computers.
 Ensures that the data units are delivered error free.
 Ensures that data units are delivered in sequence.
 Ensures that there is no loss or duplication of data units.
 Provides connectionless or connection-oriented service.
 Provides for the connection management.
 Multiplex multiple connection over a single channel.
    Network Layer
 Routing: The network layer protocols determine which route is
  suitable from source to destination. This function of network
  layer is known as routing.
 Logical Addressing: In order to identify each device on
  internetwork uniquely, network layer defines an addressing
  scheme. The sender & receiver’s IP address are placed in the
  header by network layer. Such an address distinguishes each
  device uniquely and universally.
     Data Link Layer
 The data link layer is responsible for the node to node delivery of
   the message. The main function of this layer is to make sure data
   transfer is error free from one node to another, over the physical
   layer. The data link layer is divided into two sub-layers -
1. Media Access Control (MAC)
2. Logical Link Control (LLC).
 Mac is lower sub-layer, and it defines the way about the media
   access transfer, such as CSMA / CD /CA (Carrier Sense Multiple
   Access /Collision Detection /Collision Avoidance)
 LLC controls the synchronization, flow control, and error checking
   functions of the data link layer
Services of Data-Link Layer
 Framing: The data link layer divides the stream of bits
  received from the network layer into manageable data units
  called frames.
 Physical addressing: The Data Link layer adds a header to
  the frame in order to define physical address of the sender or
  receiver of the frame.
 Flow control: If the rate at which the data are absorbed by
  the receiver is less than the rate at which data are produced
  in the sender, the data link layer imposes a flow control
  mechanism to avoid overwhelming the receiver.
Services of Data-Link Layer
Contd.
  Error control: The data link layer adds reliability to the
   physical layer by adding mechanisms to detect and
   retransmit damaged or lost frames. It also uses a
   mechanism to recognize duplicate frames. Error control is
   normally achieved through a trailer added to the end of the
   frame.
  Access control: When two or more devices are connected
   to the same link, data link layer protocols are necessary to
   determine which device has control over the link at any
   given time.
Data Link Layer - Frame
        The data link layer is responsible for
        moving frames from one hop (node)
                     to the next
Physical Layer
 Bit synchronization: The physical layer provides the synchronization
  of the bits by providing a clock. This clock controls both sender and
  receiver thus providing synchronization at bit level.
 Bit rate control: The Physical layer also defines the transmission rate
  i.e. the number of bits sent per second.
 Physical topologies: Physical layer specifies the way in which the
  different, devices/nodes are arranged in a network i.e. bus, star or
  mesh topology.
 Transmission mode: Physical layer also defines the way in which the
  data flows between the two connected devices. The various
  transmission modes possible are: Simplex, half-duplex and full-
  duplex.
Introduction to TCP/IP Model
 The Internet Protocol Suite (commonly known
  as TCP/IP) is the set of communications protocols used
  for the Internet and other similar networks.
 It is named from two of the most important protocols in
  it:
    the Transmission Control Protocol (TCP) and
    the Internet Protocol (IP), which were the first two
       networking protocols defined in this standard.
TCP/IP Model in relation to OSI
Model:
Data Encapsulation
The term encapsulation is used to describe a process of adding headers and
trailers around some data. This process can be explained with the four-layer
TCP/IP model, with each step describing the role of the layer.
For example, here is what happens when you send an email using your
favorite email program (such as Outlook or gmail):
1. The email is sent from the Application layer to the Transport layer.
2. The Transport layer encapsulates the data and adds its own header with
     its own information, such as which port will be used and passes the
     data to the Internet layer
3. The Internet layer encapsulates the received data and adds its own
     header, usually with information about the source and destination IP
     addresses. The Internet layer than passes the data to the Network
     Access layer
4. The Network Access layer is the only layer that adds both a header and
     a trailer. The data is then sent through a physical network link.
Figure: Data Encapsulation
Books
  1. Forouzan, B. A. "Data Communication and Networking. Tata McGraw." (2005).
References
  1. Prakash C. Gupta, “Data communications”, Prentice Hall India Pvt.
  2. William Stallings, "Data and Computer Communications”, Pearson
  3. Forouzan, B. A. "Data Communication and Networking. Tata McGraw." (2005).