You are on page 1of 63

What is the OSI model ?

• Open Systems Interconnection model is fundamental


to all communications between network devices.
• Developed in 1974 by ISO after the American
Department of Defence began using the TCP/IP suite
of protocols.
• Finally adopted in 1977. It is now the theoretical
model for how communication takes place between
network devices.

1
Figure 2.17 OSI model
Layers
• In the sense of purpose and responsibility, each layer is
separate and independent
• Each has its own function, but also provides a service to
those layers above and below itself
• The model should be considered an aid to understanding the
nature of communication on the network – and useful in
sorting out troubles that might occur on a network
• By providing, it allows both software engineers and hardware
manufacturers ensure their products work together.

3
The Layers at Work
As the next slide shows:
• When communicating, each OSI layer talks with the same
layer in the other device
• E.g. the Application Layer of Device A communicates with
the Application Layer of Device B, by passing the data
through the other layers
• The Application Layer of each device is not concerned with
how the other layers are functioning, but it does rely on
them to do their job

4
The layers at Work
NODE A NODE B
Sending Device Receiving Device

Layer 7 Supports the communication between Layer 7


Application Layer applications over the network Application Layer

Layer 6 Presents data to the receiver Layer 6


Presentation Layer in a form it recognises Presentation Layer

Layer 5 Establishes a connection and Layer 5


Session Layer terminates it when no longer required Session Layer

Layer 4 Acknowledges the flow of data Layer 4


Transport Layer including re-transmission where required Transport Layer

Layer 3 Adds the appropriate network Layer 3


Network Layer addresses to packets Network Layer

Layer 2 Adds the MAC addresses to packets Layer 2


Data Link Layer Data Link Layer

Layer 1 Transmits the data on the medium Layer 1


Physical Layer Physical Layer

5
Remembering the Layers
Application All
Presentation People
Session Seem
Transport To
Network Need
Data Link Data
Physical Processing

6
How does data flow ?
When data is sent from the application on the source
computer the following happens
• Data in the form of a packet moves down through
the layers
• When it reaches the Physical Layer it is ready to be
sent along the cable
• At the Physical Layer the bits may be analogue or
digital, in the form of electrical, light or radio waves

7
How does data flow ? (2)

• The data is transmitted to the destination device


• It travels up through the layers of the OSI model,
reaching the user.
• As data moves down through the layers it is
encapsulated – ie additional information is added as
headers or trailers
• The data in the packet does not change
• See the following diagram

8
Packet Encapsulation
 The data is sent down the protocol stack
 Each layer adds to the data by prepending headers

22Bytes 20Bytes 20Bytes 4Bytes

64 to 1500 Bytes 9
Physical Layer
• The lowest, bottom, layer – responsible for the physical
connection between devices
• The NIC converts the data (bits) in to transmission signals.
• Transmissions may be analogue or digital
• Responsible for the rate of transmission
• Includes all components such as the type of connector (RJ-45,
Token Ring, BNC, SC connector)
• Devices at this level include NICs, repeaters, hubs and
concentrators

10
Figure 2.5 Physical layer
Note:

The physical layer is responsible for


transmitting individual bits from one
node to the next.
Functions of Physical Layer:
Physical characteristics of interfaces and medium:
Transmission medium

Representation of bits

Data Rate: The speed with which data can be transmitted from one


device to another.

Synchronization of bits: bits should be synchronized.

Line configuration: point to point configuration and multipoint


configuration

Physical Topology

Transmission Mode
Data Link Layer
• Has two sub layers of its own:
– Logical Link Control (LLC)
– Media Access Control (MAC)
• LLC acts between protocols such as Internet Protocol
(IP) and the MAC method.
• MAC is responsible for the connection to the physical
media (eg cable)

14
MAC
• Each NIC has a unique number hard coded in to the
card – its physical address
• The first 6 digits denote the manufacturer, the next
six are unique) – type “winipcfg” on your PC
• When the MAC address is added to the packet it is
now known as a frame
• It now has all the information required to travel from
the source to the destination

15
Figure 2.6 Data link layer
Note:

The data link layer is responsible for


transmitting frames from
one node to the next.
Functions of Data Link Layer:
Framing

Physical Addressing

Flow Control

Error control

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.
Figure 2.7 Node-to-node delivery
Example 1
In Figure 2.8 a node with physical address 10 sends a
frame to a node with physical address 87. The two nodes
are connected by a link. At the data link level this frame
contains physical addresses in the header. These are the
only addresses needed. The rest of the header contains
other information needed at this level. The trailer usually
contains extra bits needed for error detection
Figure 2.8 Example 1
Network Layer
• Responsible for the correct addressing and delivery of packets
of data
• These are known as datagrams
• Uses the network address ( this is a logical address – and does
not depend upon any hardware in the device, or the device’s
physical location)

22
Network Layer (2)
The Network Layer does the following:
• Adds the address to the packet (encapsulation)
• Maps the network address to the devices physical address
• Determines the best path for the packet (routing)
• Ensures that the packet is in the correct format for the
destination

23
How does it work ?
• Encapsulation at the Transport Layer involves adding the address of the
sender to the datagram
• The destination address is now added. Both addresses are logical.
• Both addresses are necessary for packets to move between end systems.
• If a packet must move to another network, a routing protocol is required
• If different packet lengths are used on the different networks, the
Network Layer formats the data accordingly
• The primary piece of hardware which works on this layer is the router.
(covered in detail, later in course)

24
Figure 2.9 Network layer
Note:

The network layer is responsible for the


delivery of packets from the original
source to the
final destination.
Functions of Network layer:
Logical addressing

Routing
Figure 2.10 Source-to-destination delivery
Example 2
In Figure 2.11 we want to send data from a node with
network address A and physical address 10, located on
one LAN, to a node with a network address P and
physical address 95, located on another LAN. Because
the two devices are located on different networks, we
cannot use physical addresses only; the physical
addresses only have local jurisdiction. What we need here
are universal addresses that can pass through the LAN
boundaries. The network (logical) addresses have this
characteristic.
Figure 2.11 Example 2
Transport Layer
• Ensures reliable transport of packets from source to
destination
• Also manages the speed of transmission – flow
control
• There are two types of transmission (Connection-
Oriented Transmissions and Connectionless
Transmissions) – see next slide

31
Connection-Oriented Transmissions
• Also known as ‘ Reliable Transport Method’ – uses
acknowledgement (ack) packets on successful receipt of data
• Extra packets slows down communication
• Features are
– Reliability
– Slower Communication
– Packets are re-transmitted if unrecognisable or not received
• Once all the data is received successfully , the packet is re-
assembled and the Transport Layer passes it to the Session
Layer

32
Connectionless Transmissions
• In this mode the transmitting device does not require
acknowledgements from the receiver, and continues
to transmit on the assumption that the data was
received
• Features are:
– Little or No Reliability
– Faster Transmission
– Packets are not Re-transmitted

33
Flow Control
• Establishes the maximum speed at which both sender
and receiver can communicate at
• Transport Layer determines largest packet size which
can be sent
• Packets are numbered – to allow re-assembly in the
correct order
66MHz 128MHz

Transmission occurs at the


agreed speed of 66MHz

34
Figure 2.12 Transport layer
Note:

The transport layer is responsible for


delivery of a message from one process
to another.
Functions of Transport Layer:
Service-Point Addressing: delivery of message is
also from one specific process on one computer to
a specific process running on another computer.
So transport layer header also includes a type of
address called as service point address or port
address.

Segmentation and reassembly: message is


divided into transmittable segments, with each
segment containing a sequence number. With
these sequence numbers the message has been
reassemble at destination.
Connection Control: the transport layer can
be either connectionless or connection-
oriented.

Flow Control: like data link layer, transport


layer is responsible for flow control by sliding
window protocols.

Error Control: like data link layer, transport


layer is responsible for error control. Error
control is performed process to process by
using simple tools as CHECKSUM,
ACKNOWLEDGEMENT, TIMED-OUT.
Figure 2.12 Reliable process-to-process delivery of a message
Process to process delivery
Example 3
Figure 2.14 shows an example of transport layer
communication. Data coming from the upper layers have
port addresses j and k (j is the address of the sending
process, and k is the address of the receiving process).
Since the data size is larger than the network layer can
handle, the data are split into two packets, each packet
retaining the port addresses (j and k). Then in the network
layer, network addresses (A and P) are added to each
packet.
Figure 2.14 Example 3
Session Layer
• Primarily responsible for handling the session
between devices (beginning, maintaining and
finishing)
• Enforces order in the communication between
devices
• Regulates the flow of data
• It takes responsibility for the following ….

43
Session Services
The following services are provided:

• Establishing a Connection
• Maintaining the Session
• Ending the Connection
• Dialogue Control
• Dialogue Separation

44
Session Services (2)
• Handshaking – SYN and ACK packets
• ‘Keep alive messages’
• Session must be terminated (otherwise one device will
be still transmitting without any device actually listening)
• Dialogue Control (simplex, half-duplex, full-duplex)
• Dialogue Separation – checkpoints within the
transmission which allow the detection of lost packets,
and subsequent re-transmission

45
• 10000 bytes

• S-----------------------------------------------------R
• *-----*-----*-----*-----*----*----*-----*----*-----*
Session Layer Functions:
Dialog Control: session layer allows two
systems to enter into a dialog, it allows
communication between two processes to take
place in either half duplex or full duplex mode.

Synchronization: add checkpoints or


synchronization points
Presentation Layer
This layer has three fundamental functions
(1) Data Presentation
• Enables receiving device to understand the
information sent from the source
• Converts data from native format (abstract syntax) to
a common format (transfer syntax), e.g. ASCII

48
Presentation Layer (2)
(2) Data Compression
• By reducing the volume of data, transfers can take
place in less time
• Packets are examined and such things as spaces in
text removed
• The destination device returns the data to its original
format before passing to the Application Layer

49
Presentation Layer (3)
(3) Data Encryption
• Allows data to be converted to a form which hides its
meaning, apart from those you wish to see it
• Not all data is encrypted on its journey across the
network
• In order for decryption to occur at the destination
device a ‘key’ is required

50
Functions of Presentation Layer:
Translation – The presentation layer at the sender
changes information from its sender-dependent format into a
common format. The presentation layer at receiving machine
changes the common format into its receiver dependent format.

Encryption – MESSAGE -> ?@#%^* !

Compression – reduces the number if bits contained in


the information.
Application Layer

• ‘Closest’ layer to the user


• Works with the applications you use to communicate over the
network
• E.g.. Services include SMTP, HTTP and FTP
• Clicking on a link on a web page issues a command for the browser
to retrieve the relevant information from the Internet
• In this example your computer is the source, and the host of the
web site information is the destination
• The application completes your request and delivers the
information to your computer

52
Application Services
• File Services
• Electronic-mail Services
• Network-printing Services
• Application Services
• Database Services

53
Figure 2.15 Application layer
Note:

The application layer is responsible for


providing services to the user.
Functions of Application Layer:
Network Virtual Terminal: Like TELNET

File transfer, access and management:

Mail Services:

Directory Services:
Figure 2.16 Summary of duties
OSI versus TCP/IP Model
• OSI model is an important concept
• Protocol most in use on modern networks is TCP/IP
• TCP/IP does not map its layers precisely to OSI model
• OSI = 7 layers, TCP/IP = 4 layers (sometimes a 5th
physical layer is referred to)

58
OSI vs TCP/IP
Application
Application or
Presentation
Process Layer
Session

Transport Transport

Network Internet

Data Link Data Link

Physical

59
TCP/IP Model – Summary
• Application or Process Layer – concerned with how data at
both ends is handled.
• Transport Layer – manages flow of data
• Internet Layer – consists of several protocols, primary
protocol is IP (providing hierarchical addressing scheme
• Data Link (or Network Interface) Layer – manages
transmission of data within the network
• Physical Layer – not really defined, TCP/IP leaves the physical
connection to manage itself

60
Summary
• Purpose of the OSI model and its seven layers
• Function of each layer
• Process for communication between devices
• TCP/IP Model

61
• ADDITIONAL READING
IS STRONGLY
RECOMMENDED

You might also like