Вы находитесь на странице: 1из 62

The OSI Model

(Open Systems
Interconnection)

Topics

What are Protocols ?


Why we need Protocols and Standards
The OSI Reference Model
The Seven Layers of the Model

Responsibilities of Each Layer

The Application Layer

The Presentation Layer


The Session Layer

The Transport Layer

The Network Layer

The Data Link Layer

The Physical Layer

What are Protocols ?

Lets look at what happen:

Oh my
God, what
did he say
? Know
die soon

Khng bit
thng ny
ang ni
ci g na ?
Hiu cht
lin
They do not understand each
other because they are using
different languages.

What are Protocols ? (cont)

Now, Lets look at what happens next:

They can understand each other


because they are using the
same language.

What are Protocols ? (cont)

So in order for two people to speak to each


other, the first thing they should to agree
on is the language, or protocols, to use.

Communication between hosts on the


network is the same. When hosts begin
communicating with each other, they
first must agree on what protocols to
use.

What are Protocols ? (cont)

What are Protocols ? (cont)

A group of protocol is called a protocol suite


or a protocol stack.

When combined with other protocols, the


protocol group that result is called a
protocol suite. TCP/IP, for example, is a
protocol suite.

Why We Need Protocols and


Standards

Rules or protocols and standards are


important to ensure compatibility between
different kinds of things

Developing protocols is an ongoings, everchanging science. As the industry is


increasing so dynamically and rapidly.

However, before a protocol is accepted


and widely implemented, it has to pass
rigorous testing. So a standard framework
is used to help design, compare, test, and
evaluate protocols.

The OSI Reference Model


(cont)

So, in 1977, the International Standards


Organization (ISO) adopted the Open
Standard Interconnection (OSI) model.

The Seven Layers of the OSI


Model

The goal of the OSI model is to break down


the task of data communication into simple
steps. These steps are called layers.

The OSI model is made up of seven


distinct layers. Each layer has certain
responsibilities.

The Seven Layers of the OSI


Model

Responsibilities of Each
Layer

The purpose of each layer in the OSI


model is to provide services to the layer
above it.
The higher layers do not need to what
happened at the lower layers.

The Application Layer


The
Website
isisdelivered
Lets
look at what
happening:
to you
You are surfing on the
Internet
You
type an address of a
Website

Web
Browser

Web Server

The Application Layer

The Application layer is the top layer of


the OSI model.

Web
Browser

Web Server

The purpose of the Application layer


is to manage communications
between applications.

The Application Layer

Example of the Application layer:

File transfer: FTP, TFTP


Electronic mail: POP3, SMTP
Terminal access: TELNET
Word processing: Microsoft word
Web Browser:HTTP

The Presentation Layer

Lets look at what is happening:

The Presentation Layer

The Presentation layer is the layer below the


Application layer and above the Session layer.

The Presentation ensures that the


information that the application layer
of one system sends out is readable
by the application layer of another
system.

The Presentation Layer

Actions of the Presentation layer:


Format of data
Data conversion
Data compression
Data encryption
Examples of the Presentation layer:
MIDI The Musical Instrument Digital Interface is used for

digitized music.

MPEG The Moving Picture Experts Groups standard for the


compression and coding of motion video for CDs .
RTF Rich Text Format is a file format that lets you exchange
text files between different word processors, even in different
operating systems.

The Session Layer

Lets look at what is happening:

The Session Layer

The Session is below the Presentation layer.

The Session layer establishes,


manages, and terminates sessions
between two communicating hosts.

The Transport Layer


The
The

Transport layer
is can
below
the Session
layer.
Transport
layer
guarantee
that
packets are received.

The Transport Layer

The Transport layers segments and reassembles data


into a data stream

The Transport Layer

Connectionless transmission

Connection-oriented transmission

The three-way handshake

Flow control

Acknowledgement

Windowing

Sequence

Buffering

The Transport Layer

The primary function of the Transport layer is


to ensure that the data packets it receives
from the Session layer arrive reliably.

The Transport layer does this by using two


types of transmissions: connectionless
and connection oriented.

The Transport layer also has the job of


managing the speed of communication
between devices. This is known as flow

The Transport Layer


Connectionless transmissions

Thats
The
Buthe
the
letter
OK.
letter
then
The
may
letter
delivered
be
islost
not
from
on
important,
the
theway
local
and
it Post
isleft
just
Lets
So
Harry
look
goes
want
at
to
what
the
send
happens:
local
mail
Post
to
Wilson
Office
and
to
a
Office
never
friendly
come
through
letter.
to the
destination.
Office system arrive at
the Post
the
letter
there
the Destination Post Office then delivered to
Wilson

The Transport Layer


Connectionless transmissions
(cont)
The second reason is that its OK if there is a
Working
in the same
way, with connectionless
The
advantage
of
connectionless
transmission
good
and
reliable
connection
between
the
The
reason
is thats
the data
is not
important
Thefirst
packets
may
be
lost
on the
way
transmission
using
connectionless
protocol,

transmission
using connectionless
protocol,
using
connectionless
protocol is that
it is very
source
and
the
destination
(lease
line)
(internet).
thats
OK. data to Host B, it
when
Host But
A want
to send
fast.
only put the packet onto the network and
hope that it will be arrive at the destination.

The Transport Layer


Connectionless transmissions
(cont)

User Datagram Protocol (UDP) is an example of connectionless protocol

Applications that use UDP to send their


data information is DNS, TFTP, .

The Transport Layer


Connection-oriented
transmissions

When
Harry
receive
an
acknowledge
phone
He
The
then
letter
goes
then
toit
sent
the
Local
and
when
Post
Wilson
Office
and
receives
But
Lets
Harry
this
look
want
time,
atto
what
send
is an
happens:
mail
important
to Wilson
business
again.
fromletter
Wilson,
stop
worrying
about
send
the
the
and
see
inisanow
that
certified
it
is phone
an
form.
important
It
means
letter.
Soletter
he he
want
Wilson
him
to
the letter.
that
business
the Post
letter,
Office
so he
guarantee
then phone
the Harry
letter
will
acknowledge
when
Wilson
receive
theto
arrive
acknowledge
at the right
that destination.
he had received the letter.
letter.

The Transport Layer

Connection-oriented transmissions
(cont)

Host A receive an acknowledgement packet, it then stop worrying about the


When
Because
The
But
advantage
Host
waiting
of
and
for
connection-oriented
Host
away,
predefined
Bwith
bothconnectionuse
time, Host A
Working
in
theAsame
packet. after

packet.

connection-oriented
does not transmission
receive
anconnection-oriented
acknowledgement
protocol
to send and
packet
transmission
using
oriented
using connectionreceive
protocol
from Host
packets.
is
B,
that
Host
itSo
isA
reliable
when
will resend
Host
although
the
receive
packet
it has
oriented
protocol,
when
Host
A Bwant
to
send
packet
and wait.
from
The
A,
itit will
send
happens
an acknowledge
until
Host
higher
than
protocol.
data
tolatency
Host
B,process
putconnectionless
the
packet
onto
the A
packet
receiveto
an
specify
acknowledgement
it has
received.
packet to
from
network
and
wait that
for the
destination
Host B.
acknowledge
of receiving packet.

The Transport Layer


Connection-oriented
transmissions
(cont)

Transmission Control Protocol (TCP) is an example of connection-oriented protocol

Applications that use TCP to send their


data information is DNS, FTP, HTTP, SMTP,

The Transport Layer


the three-way handshake

In connection-oriented transmission, both


the sender and receiver have to join to the
session. The receiver must know that the
sender is sending packets in order to
answer (acknowledgment)

So, the sender must first establish a


connection-oriented session with the
receiver, which is called a call setup, or
three-way handshake

The Transport Layer


the three-way handshake
(cont)

Lets
look
at
what
happens:
In
theA
handshake
process,
when
Host
Bthree-way
after
(receiver)
receives
after
the
examine
synchronize
the
Host
Host
A (sender)
want
to
aagree,
session
segment
synchronize
from
packet
Host
B,
from
it establish
will
Host
send
A, ifan
it
with
Host acknowledgement
B (receiver),
it firstto
send
acknowledgement
will send
segment
synchronize
HosttoBthe
to
segmentatosynchronize
Host
A.
receiver
segment.
acknowledge
to connection.
Synchronize (Can I talk to you ?)
Connection Established
Ack (Yes), Synchronize ( Can I talk to you ?)
Data Transfer
(send
segments)
Ack (Yes)

The Transport layer


Flow Control

Once data transfer is in progress, congestion


can occur for two reasons.

The Transport layer


Flow Control (cont)

First, the sending device might be able to generate


traffic faster than the network can transfer it.

The Transport layer


Flow Control (cont)

The second reason is that multiple devices need


to send data to the same destination.

The Transport layer


Flow Control (cont)

When datagram arrive too quickly for a device to


process, it temporarily stores them in memory.

The Transport layer


Flow Control (cont)

If the datagrams are part of a small burst, this


buffering solves the problem.

The Transport layer


Flow Control (cont)

However, if the traffic continues at this rate, the device eventually


exhausts its memory and must discard additional datagrams that arrive.

The Transport layer


Flow Control (cont)

Instead of losing the data, the transport function


can issue a not ready indicator to the sender.

The Transport layer


Flow Control (cont)

This acts like a stop sign and signal the sender to


discontinue sending segment traffic to the receiver.

The Transport layer


Flow Control (cont)

After the receiving device has processed sufficient segments to free


space in its buffer, the receiver sends a ready transport indicator
which is like a go signal.

The Transport layer


Flow Control (cont)

When they receives this indicator, the senders


can resume segment transmission.

The Transport Layer


Acknowledgement

The transport layer provide a reliable service


regardless of the quality of the underlying network

The Transport Layer


Acknowledgement (cont)

One technique that is used to guarantee reliable delivery


is called positive acknowledgement with retransmission .

This requires the receiver to issue an


acknowledgement message to the sender when it
receivers data.

The Transport Layer


Acknowledgement (cont)

The sender also start a timer when it sent a


packet.

If the timer expires before an acknowledgement is


received, it retransmits the packet.

The Transport Layer


Windowing

Acknowledging every data segment, however,


has its drawback.
If the sender has to wait for an
acknowledgement of each data segment, the
throughput will be very low.

The Transport Layer


Windowing (cont)

The quantity of data segments (measured in


bytes) that the transmitting machine is allowed
to send without receiving an acknowledgment for
them is called a window.

the size of the window controls how much


information is transferred from one end to the
other
You and I will use window
I agree size of 1 ?

The Transport Layer


Windowing (cont)

Now lets examine an example with windows size


of 3.
You and I will use window
I agree size of 3 ?

TCP Sequence and


Acknowledgment Numbers

The Network Layer

Lets look at what is


E0

192.168.1.1

172.16.1.1 is in
network
happening:
attached to E2.
So
E1

E2

172.16.1.1

10.0.0.1

The Network Layer

The Network layer, which is below the


Transport layer.
It is responsible for routing the packet
based on its logical address.
E0

192.168.1.1

E1

E2

172.16.1.1

10.0.0.1

The Network Layer

Actions that the Network layer have to


deal : (x l) with:

Packets
Route, routing table, routing protocol
Logical address
Fragmentation

Examples of the Network layer


protocols:

Internet Protocol (IP)

The Data Link Layer

So
Yeah,
ButSo
host
the
I have
network
10.0.0.1
to re-is
encapsulate
attached
located in
tonetwork
S0
thisispacket
a
Frame
into
attached
Frame
RelayRelay
network
to S0.frame.

Lets look at what is happening:

192.168.1.1
So
ThisE0
packet
is
And my
is an
destined for
Ethernet
10.0.0.1 that is in
interface.
network attached
to my E0 interface.

10.0.0.1

172.16.1.1

The Data Link Layer

The Data Link layer is below the Network layer.

The Data Link layer is concerned with


physical addressing.

The Data Link layer provides the physical


transmission of the data.
MAC address
00-06-7B-02-EF-05

The Data Link Layer

The Data Link layer is made up of 2 sublayers:

The Logical Link Control (LLC) sublayer.


The Media Access Control (MAC) sublayer

The Data Link Layer

Logical Link Control (LLC) sublayer

Logical Link Control (LLC) sublayer is


responsible for identifying Network layer
protocols and then encapsulating into frame
But
If the
if Network
the Network
layer
layer
givegive
me
an IP
me
packet,
an IPXI packet,
will encapsulate
I will
encapsulate
it into a frame
it intolike
frame
thislike

The Data Link Layer

Media Access Control (MAC) sublayer

Media Access Control (MAC) sublayer


defines how packets are placed on the
media.

If the network interface card


(NIC) has RJ45 port and
connected to crossover
But if the network
cable. I will transfer frame on
interface card (NIC) has
pin 2 and receive frame on
BNC port, I will transfer
pin 3
frame in another way.

The physical layer

Transmission of an unstructured bit


stream over a physical link between end
systems.

Electrical
Physical data rate
Distances
Physical connector

The physical layer

For Example:
UTP, STP, coaxial, Fiber cable
RJ45, RJ11 connector
DB9, DB25 connector
10base2, 10base5, 100baseT, 1000baseTx

Following is the process of


moving data from one host to
another:

IP Header

IP
IP Header
Header

1
1

Frame Header
HeaderIP
Frame
IP Header
Header

11

II

IP Header

Frame Header IP Header

IP Header

Peer-to-Peer Communication

Вам также может понравиться