Transcript Slide 1

The ISO-OSI Model
Tanenbaum 3 edition: 28-42
OSI-ISO
model
rd
Data communications
Immensely complex
Many manufacturers
Many types of data
We need tools for
Facilitating interconnection of heterogeneous systems
Standards
Reducing complexity
Layering
Need a model to bring this all together
Computer Systems (159.253)
~ 122 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
OSI-ISO model
The model of data communications
Facilitates communication about data communication
discussion of functionality in commonly understood terms
Not a widely implemented set of protocols
overtaken by success of the Internet (TCP/IP)
TCP/IP not completely consistent with ISO model
Computer Systems (159.253)
~ 123 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Standardisation
STANDARDISATION
Essential ingredient in a multi-manufacturer industry
Timing of standardisation critical
Too soon - research continues after standardisation
result - non-compliant systems
Too late - multimillion dollar investments in nonstandard technology
result - non-compliant system
"Apocalypse of the two elephants"
Elephant
standardisation
activity
research
investment
just
right
time
Computer Systems (159.253)
~ 124 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Layering
LAYERING
A divide and conquer approach
layer n+1
layer n+1
Layer n service requests
Layer n service requests
SAP - (Service Access point)
Layer n
Protocol entity
PDUs
(Protocol data units)
Layer n-1 service requests
Layer n-1 service requests
layer n-1
Computer Systems (159.253)
Layer n
Protocol entity
layer n-1
~ 125 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Seven layer model
THE SEVEN-LAYER MODEL
sender
data
APDU
receiver
Application
Application
data
Presentation
PPDU Presentation
SPDU
Session
Session
TPDU
Transport
Transport
Packet
Network
Frame
Data Link
router1
router1
Network
Network
Network
Data Link
Data Link
Data Link
Physical
bitstream
Computer Systems (159.253)
~ 126 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Seven layer model
THE SEVEN-LAYER MODEL
sender
data
receiver
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Data Link
router1
router1
Network
Network
Network
Data Link
Data Link
data
Data Link
Physical
bitstream
bitstream
Computer Systems (159.253)
~ 127 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Seven layer model
THE SEVEN-LAYER MODEL
sender
data
receiver
Application
Application
data
Presentation
Presentation
data
Session
Session
data
Transport
Transport
Network
Data Link
data
router1
router1
Network
Network
data
Data Link
Data Link
data
Network
Data Link
Physical
bitstream
Computer Systems (159.253)
bitstream
~ 128 ~
data
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Seven layer model
THE SEVEN-LAYER MODEL
sender
data
receiver
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Data Link
router1
router1
Network
Network
Network
Data Link
Data Link
Data Link
Physical
Computer Systems (159.253)
~ 129 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Seven layer model
THE SEVEN-LAYER MODEL
Upper (user) layers
End-to-end
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Responsibility
Standard data comms apps
Email, WWW, file transfer
Data representation, encryption,
compression
Sets up and administers sessions,
synchronises after upper-layer errors
Administers connections, QOS, transfers
error-free data (end-to-end )
ASCII↔EBCDIC, ASN.1, PGP,
Lempel- Ziv compression
Map between user sessions
and transport connections
5 transport protocol classes allow for
range of network service standards
Routing (tables-based, flooding),
address translation
Error correction, data frames,
ack frames
Network
Delivers data
Network
Data Link
Data Link
Physical
Physical
Protocol
Transfers error-free data (point to point )
Maps bitstream onto medium
Volts, timing, mechanical specs
Node-To-Node
Network
Computer Systems (159.253)
~ 130 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Seven layer model
THE SEVEN-LAYER MODEL
Upper (user) layers
End-to-end
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Responsibility
Standard data comms apps
Email, WWW, file transfer
Data representation, encryption,
compression
Sets up and administers sessions,
synchronises after upper-layer errors
Administers connections, QOS, transfers
error-free data (end-to-end )
ASCII↔EBCDIC, ASN.1, PGP,
Lempel- Ziv compression
Map between user sessions
and transport connections
5 transport protocol classes allow for
range of network service standards
Routing (tables-based, flooding),
address translation
Error correction, data frames,
ack frames
Network
Network
Delivers data
Data Link
Transfers error-free data (point to point )
Physical
Physical
Protocol
Maps bitstream onto medium
Volts, timing, mechanical specs
Node-To-Node
Network
Computer Systems (159.253)
~ 131 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Layer 2 (Data Link Layer)
LAYER 2 (THE DATA LINK LAYER)
Network
Link establishment and termination; messages received and for transmission
Data Link
Data Link
Bit sequence
only (virtual) communication
peer-to-peer
Physical
real
communication
link management; transfer of error-free messages
Computer Systems (159.253)
~ 132 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC
HDLC - AN IMPLEMENTATION OF LAYER 2
A synchronous communications technique
Asynchronous techniques allow for clock drift between sender and receiver
Raw data
Sampling times
Manchester encoding is used for asynchronous communications
Every bit involves a transition
Data acts as its own synch pulse
Drawback; “housekeeping” transitions increase the bandwidth requirement
Computer Systems (159.253)
~ 133 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC
HDLC - AN IMPLEMENTATION OF LAYER 2
HDLC is synchronous
Sender inserts SYN character occurs at start and end of large block of data
Receiver recognises bit pattern of SYN &
sets its clock to sample signal in the middle of each bit
Synchronisation must last for the whole of the current block
Computer Systems (159.253)
~ 134 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC
HDLC
Asynchronous techniques use frequent synchronisation events to stay in synch
HDLC is synchronous
Sender inserts SYN character occurs at start and end of large block of data
operates between adjacent nodes in a network
Receiver recognises bit pattern of SYN &
setsmay
its clock
to sample
be full
duplexsignal in the middle of each bit
need not operate over a reliable medium
is responsible for error-free data transfer
uses sliding window acknowledgement
Computer Systems (159.253)
~ 135 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
The HDLC Frame
HDLC FRAME
FLAG
01111110
FRAME CHECK
10-bit CRC check on everything between flags
INFORMATION FIELD
ANY combination of 0 or more bits
CONTROL FIELD
Octet containing sequencing and protocol information
ADDRESS FIELD
Octet (8-bit sequence) specifying
destination terminal for frame when using
multidrop line
Computer Systems (159.253)
~ 136 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC Control Field
HDLC
CONTROL FIELD
Distinguishes between
Information frames
Numbered supervisory frames
Unnumbered supervisory frames
CONTROL FIELD
Octet containing sequencing and protocol information
Computer Systems (159.253)
~ 137 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC Information Frame
HDLC CONTROL FIELD : INFORMATION FRAME
Distinguishes between
0
Poll/final
Information
frames
Send count
bit
Numbered supervisory frames
Unnumbered supervisory frames
Receive count
0 denotes information frame
Send count is sequence number of current frame
When frames arrive correctly, receiving station stores arriving send count + 1 as receive count
Arriving frame’s send count should always equal receiving station’s receive count
Receiving station does not increment its receive count till arriving frame checks out
Receive count in the HDLC frame is seq no. of next frame expected by the sender
Receiver compares incoming receive count with its send count
Sends frames starting with incoming receive count value
P/F bit is set by primary station when polling, by secondary when finished
Computer Systems (159.253)
~ 138 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
Numbered
Supervisory
ONTROL FIELD : N
HDLC CHDLC
INFORMATION
UMBERED SUPERVISORY
FRAME
FRAME Frame
10
0 Send Function
count
Poll/final
bit
Receive count
10 denotes numbered supervisory frame
Frame carries information payload (hence number), and specifies a supervisory function
Function field
00 Receive Ready
01 Reject
notification of sequence error
Must retransmit all frames from Receive Count onwards
10 Receive Not Ready
11 Selective Reject
need only retransmit specified frame
Computer Systems (159.253)
~ 139 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC Unnumbered
Supervisory
Frame
HDLC CONTROL FIELD : N
UUMBERED
NNUMBERED
SUPERVISORY
SUPERVISORY
FRAME
FRAME
1
01
function
Function
part A
Poll/final
bit
Receive count
function
Part B
11 denotes unnumbered supervisory frame
Function field
5-bit code for network housekeeping
Reset counters
Disconnect
Query identity
Test
etc
Computer Systems (159.253)
~ 140 ~
Data Communications: © P.Lyons 2004
HDLC : BIT STUFFING
The ISO-OSI Model
HDLC Bit Stuffing
Problem
HDLC’s flag sequence is 01111110
Data may include 01111110
arbitrary length, so flag’s position can’t be predicted
conflict if data gets mistaken for flag
Solution
Accept data containing flag sequence from level 3
Deliver data containing flag sequence to level 3
BUT at level 2 transmitter, add an extra bit to the data
prevents flag sequence from occurring in data part of transmitted bit stream
Computer Systems (159.253)
~ 141 ~
Data Communications: © P.Lyons 2004
0111111x
HDLC: BIT STUFFING
The ISO-OSI Model
HDLC Bit Stuffing
Computer Systems (159.253)
HDLC
0111111x
x10111110
HDLC
~ 142 ~
Data Communications: © P.Lyons 2004
HDLC: MODES
NRM
The ISO-OSI Model
HDLC Modes
Normal Response Mode
Secondary is polled, starts transmitting frame sequence
Secondary sets F bit in final frame
May not transmit again till polled again
ARM
Asynchronous Response Mode
Secondary may be polled but
may initiate transmission without being polled
may result in contention (cf. CSMA)
ABRM Asynchronous Balanced Response Mode
Two stations:Each sends as primary, receives as secondary
Computer Systems (159.253)
~ 143 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC Sliding Window Acknowledgement
HDLC: SLIDING WINDOW ACKNOWLEDGEMENT
Send count
6
10
5
4
Receive count
0
7
1
6
2
5
3
0
Send count
0
4
Poll/final
bit
Receive count
7
0
7
Send count
0
7
0
1
6
1
6
1
2
5
2
5
2
4
3
3
4
3
Receive count
frame.sendCount := sendCount
frame.receiveCount := receiveCount
frame.Data := data
…
frame.send
sendCount++
Computer Systems (159.253)
If checksOutOK(frame.CRC) then
If frame.sendCount = receiveCount then
begin
Frame.accept
sendCount := frame.receiveCount
receiveCount++
end
~ 144 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC Frame Transfer Diagrams
HDLC: FRAME TRANSFER DIAGRAMS
abbreviated representation of admin. information transfer and updating
Symbol
Meaning
I(0,0)
Information Frame, SN = 0, RN = 0, P/F bit = FALSE
I(1,0)P
Information Frame, SN = 1, RN = 0, Poll
RR(4)F
Receive Ready Frame, no SN, RN = 4, Final
Computer Systems (159.253)
~ 145 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC Frame Transfer Diagrams
HDLC: FRAME TRANSFER DIAGRAMS
NRM
(error-free operation)
Primary
Secondary
Next frame
to send
N(S)
Next frame
to receive
N(R)
0
0
1
0
I(0,0)
Next frame
to send
N(S)
Next frame
to receive
N(R)
0
0
0
1
0
2
0
3
1
3
..
..
Time
I(1,0)
2
0
3
0
3
1
..
3
..
I(2,0),P
I(0,3)
I(1,3)F
2
Computer Systems (159.253)
2
3
~ 146 ~
Data Communications: © P.Lyons 2004
The ISO-OSI Model
HDLC Frame Transfer Diagrams
HDLC: FRAME TRANSFER DIAGRAMS
NRM
(error-free
operation)
(transmission
error):
Primary
Secondary
Next frame
to send
N(S)
Next frame
to receive
N(R)
5
3
6
3
7
3
0
3
1
3
6
4
..
7
..
I(5,3)
I(6,3)
I(7,3)
I(0,3),P
I(3,6),F
I(6,4)F
4
Computer Systems (159.253)
Next frame
to send
N(S)
Next frame
to receive
N(R)
3
5
3
6
Error: ignore
3
6
Incorrect N(S): ignore
3
6
Incorrect N(S): ignore
data, accept P bit
3
6
4
6
..
..
4
Time
7
~ 147 ~
Data Communications: © P.Lyons 2004