THE LAYERED APPROACH
Why Layered architecture?
To make the design process easy by
breaking unmanageable tasks into several
smaller and manageable tasks (by divide-
and-conquer approach).
Modularity and clear interfaces, so as to
provide comparability between the
different provider’s components.
Ensure independence of layers, so that the
implementation of each layer can be
changed or modified without affecting
other layers.
Each layer can be analyzed and tested
independently of all other layers.
THE OSI MODEL
A conceptual framework that describes
how data is sent over the network.
It’s the universal language for networking
that allows systems to communicate using
a standard protocol.
OSI MODEL & COMMUNICATION BETWEEN
SYSTEMS
Communication in the OSI Model happen
between layers through (software)
interfaces.
The actual host-to-host communication
happens in the Physical Layer.
INTERACTION BETWEEN OSI MODEL LAYERS
All person seem to need data processing A given layer in the OSI model generally
communicates with three other OSI layers:
Two sets of layers make up the OSI: a) the layer directly above it;
The upper layers are the responsibility of b) the layer directly below it and;
the host computer. c) its peer layer in other networked
Lower layers are the responsibility of the computer system.
network.
Transport Layer – heart of OSI. Transfers data
using transmission protocols including TCP and
UDP.
TCP (Transmission Control Protocol) –
connection-based protocol; more reliable but
slower.
UDP (User Datagram Protocol) –
connectionless; less reliable but faster. SERVICES AND SERVICE ACCESS POINTS
PROTOCOLS Three basic elements are involved in layer
services:
Protocols is a formal set of rules and 1. Service user – is the OSI layer that
conventions that governs how computers requests services from an adjacent OSI
exchange information over the network layer. [Network Layer]
medium. 2. Service provider – is the OSI layer that
A protocol implements the functions of provides services to service users.
one or more of the OSI layers. [Data Link Layer]
Some of these protocols include LAN
protocols, WAN protocols, network 3. Service Access Point (SAP) – is a
protocols, and routing protocols. conceptual location where one OSI layer
can request the services of another OSI When would such a service be
layer. appropriate?
When higher layers can recover
OSI MODEL LAYERS & INFORMATION from errors with little loss in
EXCHANGE performance.
Control information typically takes one of That is, when errors are so
two forms: infrequent that there is little to
1. Headers – are prepended to data be gained by the data link layer
2. Trailers – are appended to data performing the recovery.
Headers, trailers, and data are relative It is just easy to have higher
concepts, depending on the layer that layers deal with occasional loss
analyzes the information unit. of packet.
PHYSICAL LAYER For real-time applications
requiring better never than late
The Physical Layer decides on the semantics. Old data may be
following: worse than no data.
Number of pins and functions of each pin
of the network connector (Mechanical). c) Acknowledged Delivery
Signal Level, Data Rate (Electrical) Typically, each frame is assigned
Whether simultaneous transmission in with a unique sequence
both directions number, which the receiver
Establishing and breaking connection returns in an acknowledgement
Deal with physical transmission frame to indicate which frame
the ACK refers to.
DATA LINK LAYER
The sender must retransmit
The goal of the data link layer is to provide unacknowledged frames.
reliable, efficient communication between
adjacent machines connected by a single d) Framing
communication channel. The DLL translates the physical layer’s
raw bit stream intro discrete units
Specifically: (messages) called frames.
Group the physical layer bit stream into
units called frames. How can the receiver detect frame
Sender calculates the checksum and boundaries?
sends the checksum together with data. 1. Length count
Receiver recomputes the checksum and 2. Bit Stuffing
compares it with the received value. 3. Character Stuffing
Error control protocol returns a positive
or negative acknowledgement to the e) Error Control
sender. Error control is concerned with insuring
Flow control protocol prevents a fast that all frames are eventually delivered
sender from overwhelming a slower (possibly in order) to a destination.
receiver.
Provides service to the network layer. To achieve this, three items are
required:
Data Link Layer Design Issues: 1. Acknowledgements
a) Reliable Delivery 2. Timers
Frames are delivered to the 3. Sequence Numbers
receiver reliably and in the same
order as generated by the f) Flow Control
sender. Flow control deals with throttling
Connection stake keeps track of the speed of the sender to
sending order and which frames match that of the receiver.
require transmission. For Usually, this is a dynamic
example, receiver state includes process, as the receiving speed
which frames have been depends on such changing
received, which ones have not. factors as the load, and
availability of buffer space.
b) Best Effort
The receiver does not return Data Link Layer Design Solutions:
acknowledgements to the sender, so a) Link Management
the sender has no way of knowing if a In some cases, the data link layer
frame has been successfully delivered. service must be opened before use.
The data link layer uses open 2. Negotiation of Quality and Type of
operation for allocating buffer Services
space, control blocks, agreeing 3. Guarantee Services
on the maximum message size, 4. Addressing becomes a significant issue
etc. 5. Storage capacity of the subnet
Synchronize and initialize send 6. Address the need for a dynamic flow
and receive sequence numbers control mechanism.
with its peer at the other end of 7. Deal with congestion control
the communications channel. 8. Connection establishment
b) Error Detection and Correction SESSION LAYER
In data communication, error
may occur because of various This layer allows users on different machines to
reasons including attenuation, establish session between them.
noise.
Error usually occurs as bursts A session allows ordinary data transport
rather than independent, single but it also provides enhanced services
bit errors. useful in some applications.
A session may be used to allow a user
There are two types of attacks against to log into a remote time-sharing
errors: machine or to transfer a file between
1. Error Detecting Codes – include two machines.
enough redundancy bits to detect
errors and use ACK and Session Layer Services:
retransmissions to recover from the 1. Dialogue Control – session can allow
errors. traffic to go in both direction at the
same time or in only one direction at
Ex. Parity encoding one time.
2. Token management – only one side that
2. Error Correcting Codes – include is holding token can perform the critical
enough redundancy to detect and operation.
correct errors. 3. Synchronization – session layer provides
a way to insert checkpoints into data
Ex. CRC checksum, MD5 streams, so that after a crash, only the
data transferred after the last
NETWORK LAYER checkpoint have to be repeated.
Provide an end-to-end communication PRESENTATION LAYER
capability in contrast to machine-to-machine
communication provided by the data link layer. Concerned with syntax and semantics of the
information transmitted, unlike other layers,
This end-to-end is performed using two which are interested in moving data reliably from
basic approaches known as one machine to other.
connection-oriented or
connectionless network-layer Presentation Layer Services:
services. 1. Encoding data in standard and agreed
upon way.
Network Layer Design Issues 2. It manages the abstract data structures
1. Interface between the host and the and converts from representation used
network (the network layer is typically inside computer to network standard
the boundary between the host and representation and back.
subnet).
2. Routing APPLICATION LAYER
3. Congestion and feedback
4. Internetworking (A path may traverse The application layer consists of what most users
different network technologies e.g., think of as programs. The application does the
Ethernet, point-to-point links, etc.) actual work at hand.
TRANSPORT LAYER Applications with established standards:
1. File Transfer (FTP)
2. Remote login (telnet, ssh)
The transport level provides end-to-end 3. Mail (SMTP)
communication between processes executing on 4. News (NNTP)
different machines. 5. Web (HTTP)
6. Name Service (DNS)
Transport Layer Services:
1. User-oriented