Communication Model
General Block Diagram
• Source: The device which generates the data to be
  transmitted like PC, phone, camera, video recorder
• Transmitter: Encoder , Modem
  – The data cannot be transmitted from the
    transmission channel as they are produced. It
    needs to be converted into a format that
    transmission channel understand. So we need
    data encoding.
• Transmission System: It is the transmission line or
  complex network between source to destination.
  Guided or Unguided media
• Receiver: It is the device that accept the signal from
  transmission medium and converts into the form that
  destination device understands.
  decoder, modem
• Destination: It takes the data from receiver and
  give the user output
Transmission Impairments
       Transmission Impairments
• The agents that weaken or damage the transmitted
  data while travelling in the transmission line is called
  transmission Impairments
• The most significant impairments are:
   – Attenuation and attenuation distortion
   – Delay distortion
   – Noise
         Attenuation/ Attenuation Distortion
• It is the reduction of strength of signal with distance over any
  transmission medium
• Attenuation occurs with any type of signal whether analog or
  digital
• It is also called the signal loss.
• It is measured in dB per unit of distance
               Cause of Attenuation
• Range:  over longer distances both wired and
  wireless transmissions gradually dissipate in strength
• Interference:     radio interference or physical
  obstructions, such as walls, dampen communication
  signals on wireless networks
• Wire size:  thinner wires suffer from more
   attenuation than thicker wires on wired networks
Amplifiers are used to reduce the attenuation at
different distances from the transmitter
                 Delay Distortion
– Delay distortion: The velocity of propagation of a signal
  through a guided medium varies with frequencies; it is fast
  at the center of the frequency, but it falls off at the two
  edges of frequencies.
– Equalization techniques can be used to smooth out the
  delay distortion. Delay distortion is a major reason for the
  timing jitter problem, where the receiver clock deviates
  from the incoming signal in a random fashion so that an
  incoming signal might arrive earlier or late.
                             Noise
  The random or unwanted signal that mixes up with the original
  signal is called noise. There are several types of noise such as
  induced noise, crosstalk noise, thermal noise and impulse noise
  which may corrupt the signal.
Induced noise comes from sources such as motors and appliances.
  These devices act as sending antenna and transmission medium
  act as receiving antenna. 
Thermal noise is movement of electrons in wire which creates an
  extra signal. 
Crosstalk noise is when one wire affects the other wire. 
Impulse noise is a signal with high energy that comes from lightning
  or power lines
Introduction to Computer
        Network
                   Computer Network
  A computer network is a set of computers connected together for
  the purpose of sharing resources.
Use of Network:
• Business Applications
    – Resource sharing - Client Server model
    – Communication Medium - ecommerce
• Home Applications
    – Access to remote Information - ecommerce
    – Social media, communication - entertainment
• Mobile Users
Use of Mobile devices is excreting exponentially. People use laptops, e Notebooks,
   Smartphone requires network for, communication, mobile banking,
   ecommerce, etc.
                Types of Network
•   LAN
•   MAN
•   WAN
•   Extra-Net
•   Intranet
•   Internet
             Types of Networking
LAN-A LAN is a privately owned network that operates within
  and nearby a single building like a home, office or factory.
  LANs are widely used to connect personal computers and
  consumer electronics to let them share resources (e.g.,
  printers, file server etc.) and exchange information.
• MAN-A metropolitan area network (MAN) is a network that
  interconnects users with computer resources in a geographic
  area or region larger than that covered by even a large local
  area network (LAN) but smaller than the area covered by
  a wide area network (WAN).It covers a city. The best-known
  examples of MANs are the cable television networks available
  in many cities. In recent days we can see wireless MAN of
  different ISPs in the cities
WAN- A wide area network (WAN) is a telecommunications or
  an ISP network that extends over a large geographical area for
  the primary purpose of computer networking. It spans a large
  geographical area, often a country or a continent. It connects
  different branch offices to their head quarters for resource
  sharing. We are surfing the web sites hosted at different
  countries because of the WAN.
Intranet- An intranet is a private network contained within an
  enterprise that is used to securely share company information
  and computing resources among employees. It excludes the
  access by outsides. An intranet can also be used to facilitate
  working in groups and teleconferences.
Extranet- An extranet is a controlled private network that allows
  access to partners, vendors and suppliers or an authorized set of
  customers – normally to a subset of the information accessible
  from an organization's intranet. An extranet is similar to a DMZ in
  that it provides access to needed services for authorized parties,
  without granting access to an organization's entire network.
Internet
- is a worldwide system of computer networks
-- a network of networks in which users at any one
   computer can, if they have permission, get
   information from any other computer (and
   sometimes talk directly to users at other
   computers).
   It was conceived by the Advanced Research
   Projects Agency (ARPA) of the U.S. government in
   1969 and was first known as the ARPANet. 
Networking Model
            Client Server model
• Client- application program running on the local
  machine requests a service from another application
  program -server- running on remote machine
• Commonly server provides service to any client, not a
  particular client
• Generally, a client application program that requests a
  service should run only when it is needed.
• A server program providing service should run all the
  time, as it does not know when its services will be
  needed.
            Client-Server Model
• Client opens the communication channel
  using IP address of the remote host and the
  port address of the specific server program
  running on the host –Active open
• Request-response may be repeated several
  times, the process is finite
• The client closes the communication channel
  with an Active close.
               Client-server Model
• A server program opens its door for incoming
  request from clients but never initiates a
  service unless explicitly requested- Passive
  open
• A server program is infinite- runs unless a
  problem occurs.
• A connection is established between server
  and each client, remains open until the entire
  stream is processed
            Client server model
• Each connection requires a port and many
  connections may remain open simultaneously
• Server can use only one well-known port.
• Client makes request through the well-known
  port, once the connection is made, server
  assigns a temporary port to this connection
       Peer-Peer Model (P2P)
In a peer-to peer network, the "peers" are
computer systems which are connected to each
other via the Internet. Files can be shared
directly between systems on the network
without the need of a central server. In other
words, each computer on a P2P network
becomes a file server as well as a client.
             Peer to peer network
• The only requirements for a computer to join a peer-
  to-peer network are an Internet connection and P2P
  software. Common P2P software programs include
  –   Bit Torrent, Kazaa, Limewire, BearShare etc. for file sharing
  –   Skype (VoIP)
  –    joost (TVoIP)
  –   Hamachi (VPN)
      These programs connect to a P2P network, such as
      "Gnutella," which allows the computer to access thousands
      of other systems on the network
                     Active Mode
• To be prepare
• ----------------
• ----------------
        Protocols and Standards
• Connectionless
    Connection-Oriented (stateful) Protocol
 connection-oriented describes a means of transmitting data in
 which the devices at the end points use a
 preliminary protocol to establish an end-to-end connection
 before any data is sent.
Connection-oriented Protocol:
 Connection-oriented protocol services are often, but not
 always, reliable network   services,    that     provide
 acknowledgment after successful delivery, and automatic
 repeat request functions in case of missing data or
 detected bit-errors.
      Characteristics of Connection-Oriented Comm..
• A communication circuit/path is defined before actual data transfer
• All packets go through same route as defined
• Packets are delivered in the same order as it was sent
• It will keep resending the packets until gets acknowledged
• Handshake method is used to establish the connection between sender
  and receiver
• TCP, MPLS are connection oriented protocols
               Connectionless protocol
•  data is sent from one end point to another without prior
  arrangement.
• Connectionless      protocols   are     usually   described
  as stateless because the end points have no protocol-defined
  way to remember where they are in a "conversation" of
  message exchanges. UDP, IP are example of connectionless
  protocol
                                             Comparison
Connection Oriented                                                 Connection less
it is the communication service in which virtual connection is      in this communication service, packets are sent
created before sending the packet over the internet.                without creating any virtual connection over the
                                                                    internet.
It needs authentication of the destination node before              It transfers the data message without authenticating
transferring data.                                                  destination.
ensures delivery of the packet to the destination                   This connection does not ensure reliability on packet
                                                                    transmission
The handshaking is carried out to ensure both sender and receiver   There is no handshaking happens while sending a
agree with this connection                                          packet over the network
It is slower than the connectionless service. Before sending a      It is faster than connection-oriented protocol service.
packet, the virtual connection is created in the connection-
oriented protocol which adds extra delay.
More Overheads: Sending packet in connection-oriented service       It has less overhead and smaller packet header size
requires more parameters in the header of the packet to ensure
the reliable transmission.
Route is finalized and decided at the time of handshaking The route is not finalized and decided on the
before sending the actual packet.                         way while transferring data packet based on
                                                          the network congestion.
All the packets between sender and destination follows Not necessary all the packets transmitting
the same path.                                         between sender and receiver follows the same
                                                       path.
Open System Interconnection (OSI) Reference model
OSI stands for Open Systems Interconnection. It has been developed by
ISO – ‘International Organization of Standardization’, as a model for a
computer protocol architecture and as a framework for developing
protocol standards in the year 1984. It is a 7 layer architecture with each
layer having specific functionality to perform. All these 7 layers work
collaboratively to transmit the data from one person to another across the
globe
OSI model consists of 7 layers
Application
Presentation
Session
Transport
Network
Data link
Physical
7. Application Layer    Provides a user interface, distributed information services. http, email, dns
6. Presentation Layer   Provides independence from differences in data representation
                        (e.g., encryption) by translating from application to network format, and vice
                        versa.
5. Session Layer        Establishes, manages and terminates connections between applications.
                        This layer sets up, coordinates, and terminates conversations, exchanges,
                        and dialogues between the applications at each end. It deals with session
                        and connection coordination.
4. Transport Layer       provides transparent transfer of data between end systems, or hosts, and is
                        responsible for end-to-end error recovery and flow control. It ensures
                        complete data transfer. TCP, UDP
3. Network Layer        provides switching and routing technologies, creating logical paths, known
                        as virtual circuits, for transmitting data from node to node. Routing and
                        forwarding are functions of this layer, as well as addressing, internetworking,
                        error handling, congestion control and packet sequencing. IP, IPX, Appletalk
2. Data Link Layer      data packets are encoded and decoded into bits. It furnishes transmission
                        protocol knowledge and management and handles errors in the physical
                        layer, flow control and frame synchronization. The data link layer is divided
                        into two sub layers: The Media Access Control (MAC) layer and the Logical
                        Link Control (LLC) layer. 
1. Physical Layer       conveys the bit stream - electrical impulse, light or radio signal — through
                        the network at the electrical and mechanical level. It provides
                        the hardware means of sending and receiving data on a carrier, including
                        defining cables, cards and physical aspects.
                Why OSI?
Standardization within the OSI Framework
The principal motivation for the development of the OSI model was to
provide a framework for standardization. Within the model, one or more
protocol standards can be developed at each layer. The model defines in
general terms the functions to be performed at that layer and facilitates
the standards-making process in two ways:
 – Because the functions of each layer are well defined, standards can be
   developed independently and simultaneously for each layer. This speeds up
   the standards-making process.
 – Because the boundaries between layers are well defined, changes in standards
   in one layer need not affect already existing software in another layer. This
   makes it easier to introduce new standards.
                                    TCP/IP
                                  History
• It stands for Transmission Control Protocol/Internet Protocol.
• In 1974, Vint Cerf and Bob Kahn published a paper "A Protocol for Packet
  Network Interconnection" which describes the TCP/IP Model.
• It is specifically designed as a model to offer highly reliable and end-to-end
  byte stream over an unreliable internetwork.
• By 1978, testing and further development of this language led to a new
  suite of protocols called TCP/IP
• On January 1, 1983, ARPAnet switched over to TCP/IP,
TCP/IP vs OSI model
                      Internet
                 Network Access
                      Physical
                                                  TCP/IP Model
• TCP/IP is suit of communication protocols used to interconnect the network devices in
   the internet. It specifies how data are broken into packets, transmitted and arranged to
   while transferring from source to destination
• TCP/IP is the 5 layered architecture used to transfer data from host computer to
   destination computer in packet switched network.
• It contains 5 layers, unlike seven layers in the OSI model.
The layers are:
1. Physical Layer
2. Network Access/Link Layer
3. Internet Layer
4. Host-to-Host/Transport Layer
5. Process/Application Layer
Some authors use 4 layer as well- Network access, internet, transport, application
• TCP/IP is a hierarchical protocol made up of interactive modules, and each of them
   provides specific functionality.
   Here, hierarchical means that each upper-layer protocol is supported by two or more lower-level protocols.
              Functions of TCP/IP model and OSI layers
                        TCP/IP                        OSI
                                                     Application
Application                                          Presentation
                                                         Session
                                                         Transport
 Internet                                            Network
                       Network Access                Data Link
                                                         Physical
                         Physical Layer
• The physical layer covers the physical interface between a data
  transmission device (e.g., workstation, computer) and a
  transmission medium or network.
• This layer is concerned with specifying the characteristics of
  the transmission medium, the nature of the signals, the data
  rate, and related matters.
  For example:
      Guided media- Twisted pair cable, coaxial cable, Fiber
  optics
      Unguided Media- Wireless
                             Network Layer
• It defines how the data should be sent physically through the
  network.
• The network access layer is concerned with the exchange of
  data between an end system (server, workstation, etc.) and the
  network to which it is attached.
• This layer is mainly responsible for the transmission of the data
  between two devices on the same network.
• The functions carried out by this layer are encapsulating the IP
  datagram into frames transmitted by the network and mapping
  of IP addresses into physical addresses.
• The protocols used by this layer are ethernet, token ring, FDDI,
  X.25, frame relay.
                            Internet Layer
• The main responsibility of the internet layer is to send the
  packets from any network, and they arrive at the destination
  irrespective of the route they take.
• It routes the packets into multiple interconnected network
  until they reach from source to the destination
• Internet Protocol (IP) is the most significant protocol used in
  this layer to route packet from source to destination
   – IP uses the 32bit or 128 bit IP address
• This protocol is implemented not only in the end systems but
  also in routers.
   – A router is a processor that connects two networks and whose primary
     function is to relay data from one network to the other on its route from
     the source to the destination end system
• Other protocols used in this layer are- ARP, ICMP, IGMP
                    Transport Layer
• The transport layer is responsible for maintaining end-to-end
  communications across the network.
• This layer builds on the message which are received from the
  application layer. It helps ensure that data units are delivered error-
  free and in sequence.
• The transport layer also offers an acknowledgment of the successful
  data transmission and sends the next data in case no errors
  occurred. TCP is the best-known example of the transport layer
• TCP handles communications between hosts and provides flow
  control, multiplexing and reliability.
• The transport protocols include TCP and User Datagram Protocol (
  UDP), which is sometimes used instead of TCP for special purposes.
                       Application Layer
• Application layer interacts with software applications
  to implement a communicating component
• The application layer provides applications with
  standardized data exchange. Like email, file transfer,
  voice over IP, DNS etc.
• Its protocols include
   –   Hypertext Transfer Protocol (HTTP)
   –   File Transfer Protocol (FTP)
   –   Post Office Protocol 3 (POP3)
   –   Simple Mail Transfer Protocol (SMTP)
   –   Simple Network Management Protocol (SNMP) etc.
               OSI Reference Model                                    TCP/IP Model
It is developed by ISO (International Standard It is developed by ARPANET (Advanced Research
Organization)                                  Project Agency Network).
OSI model provides a clear distinction between TCP/IP doesn't have any clear distinguishing points
interfaces, services, and protocols            between services, interfaces, and protocols
OSI refers to Open Systems Interconnection.        TCP refers to Transmission Control Protocol.
OSI is a generic, protocol independent standard,   TCP/IP model is based on standard protocols
acting as a communication gateway between the      around which the Internet has developed. It is a
network and end user                               communication protocol, which allows connection
                                                   of hosts over a network
OSI uses the network layer to define routing       TCP/IP uses only the Internet layer.
standards and protocols.
OSI layers have seven layers.                      TCP/IP has five layers.
the transport layer is only connection-oriented.   A layer of the TCP/IP model is both connection-
                                                   oriented and connectionless.
OSI model has a separate Presentation layer and    TCP/IP does not have a separate presentation layer
Session layer.                                     or Session layer.
IT is used as a guidance tool                      TCP/IP model is, in a way implementation of the
                                                   OSI model.