Computer Systems (159.253) ~ 1 ~Data Communications: © P.Lyons 2004
OSI-ISO modelThe ISO-OSI Model
Data communicationsImmensely complexMany manufacturersMany types of data
We need tools for Facilitating interconnection of heterogeneous systemsStandardsReducing complexityLayering
Need a model to bring this all together
Tanenbaum 3rd edition: 28-42
Computer Systems (159.253) ~ 2 ~Data Communications: © P.Lyons 2004
The model of data communicationsFacilitates communication about data communicationdiscussion of functionality in commonly understood terms
The ISO-OSI Model
Not a widely implemented set of protocolsovertaken by success of the Internet (TCP/IP)TCP/IP not completely consistent with ISO model
OSI-ISO model
Computer Systems (159.253) ~ 3 ~Data Communications: © P.Lyons 2004
The ISO-OSI Model
Essential ingredient in a multi-manufacturer industryTiming of standardisation critical
Too soon - research continues after standardisationresult - non-compliant systems
Too late - multimillion dollar investments in nonstandard technologyresult - non-compliant system
STANDARDISATION
activity
time
research investment
standardisation
too so
ontoo late
just right
"Apocalypse of the two elephants"
Standardisation
ElephantElephant Elephant
Computer Systems (159.253) ~ 4 ~Data Communications: © P.Lyons 2004
A divide and conquer approach
The ISO-OSI Model
LAYERING
Layer n Protocol entity
Layer n-1 service requests
SAP - (Service Access point)
PDUs (Protocol data units)
layer n+1
layer n-1
Layer n service requests
Layer n Protocol entity
layer n+1
Layer n service requests
Layer n-1 service requests
layer n-1
Layering
Computer Systems (159.253) ~ 5 ~Data Communications: © P.Lyons 2004
bitstreamPhysical
receiver
Application
data
Presentation
Session
Transport
Network
Data Link
Network
Data Link
router1
Network
Data Link
router1
The ISO-OSI Model
TPDU
Packet
Frame
THE SEVEN-LAYER MODELSeven layer model
APDU
PPDU
SPDU
datasender
Application
Presentation
Session
Transport
Data Link
Network
Computer Systems (159.253) ~ 6 ~Data Communications: © P.Lyons 2004
datasender
bitstream
Presentation
Session
Transport
Network
Data Link
Physical
Application
Network
Data Link
receiver
Application
data
bitstream
Network
Data Link
Presentation
Session
Transport
Network
Data Link
router1 router1
The ISO-OSI Model
THE SEVEN-LAYER MODELSeven layer model
Computer Systems (159.253) ~ 7 ~Data Communications: © P.Lyons 2004
Seven layer model
datasender
Presentation
Session
Transport
Network
Data Link
Physical
Application
Network
Data Link
Application
bitstream
Network
Data Link
bitstream
Presentation
Session
Transport
Network
Data Link
data
data
data
data
data
data
data
receiver
router1 router1
The ISO-OSI Model
THE SEVEN-LAYER MODEL
Computer Systems (159.253) ~ 8 ~Data Communications: © P.Lyons 2004
Seven layer model
datasender
Presentation
Session
Transport
Network
Data Link
Physical
Application
Network
Data Link
Application
Network
Data Link
Presentation
Session
Transport
Network
Data Link
receiver
router1 router1
The ISO-OSI Model
THE SEVEN-LAYER MODEL
Computer Systems (159.253) ~ 9 ~Data Communications: © P.Lyons 2004
Seven layer model
Administers connections, QOS, transfers error-free data (end-to-end )
Sets up and administers sessions, synchronises after upper-layer errors
Presentation
Session
Transport
Network
Data Link
Physical
Application
The ISO-OSI Model
Maps bitstream onto medium Volts, timing, mechanical specs
Transfers error-free data (point to point ) Error correction, data frames, ack frames
Delivers data Routing (tables-based, flooding), address translation
5 transport protocol classes allow for range of network service standards
Map between user sessions and transport connections
Data representation, encryption, compression
ASCII↔EBCDIC, ASN.1, PGP, Lempel- Ziv compression
Standard data comms apps Email, WWW, file transfer
Physical
Responsibility Protocol
Data Link
Network
Transport
Session
Presentation
Application
Node-To-Node
End-to-end
Upper (user) layers
Network
THE SEVEN-LAYER MODEL
Computer Systems (159.253) ~ 10 ~Data Communications: © P.Lyons 2004
Seven layer modelThe ISO-OSI Model
Data Link
Administers connections, QOS, transfers error-free data (end-to-end )
Application
Transfers error-free data (point to point )
5 transport protocol classes allow for range of network service standards
Map between user sessions and transport connections
ASCII↔EBCDIC, ASN.1, PGP, Lempel- Ziv compression
Sets up and administers sessions, synchronises after upper-layer errors
Presentation
Session
Transport
Network
PhysicalMaps bitstream onto medium Volts, timing, mechanical specs
Error correction, data frames, ack frames
Delivers data Routing (tables-based, flooding), address translation
Data representation, encryption, compression
Standard data comms apps Email, WWW, file transfer
Physical
Responsibility Protocol
Network
Transport
Session
Presentation
Application
Node-To-Node
End-to-end
Upper (user) layers
Network
THE SEVEN-LAYER MODEL
Computer Systems (159.253) ~ 11 ~Data Communications: © P.Lyons 2004
Layer 2 (Data Link Layer)
Data Link
Physical
Network
Bit sequence only
Link establishment and termination; messages received and for transmissionData Link
peer-to-peer (virtual) communicationlink management; transfer of error-free messages
LAYER 2 (THE DATA LINK LAYER)
real communication
The ISO-OSI Model
Computer Systems (159.253) ~ 12 ~Data Communications: © P.Lyons 2004
HDLCHDLC
The ISO-OSI Model
A synchronous communications techniqueAsynchronous techniques allow for clock drift between sender and receiver
Raw dataSampling times
Manchester encoding is used for asynchronous communicationsEvery bit involves a transitionData acts as its own synch pulse
Drawback; “housekeeping” transitions increase the bandwidth requirement
- AN IMPLEMENTATION OF LAYER 2
Computer Systems (159.253) ~ 13 ~Data Communications: © P.Lyons 2004
HDLCHDLC
The ISO-OSI Model
HDLC is synchronousSender 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
- AN IMPLEMENTATION OF LAYER 2
Computer Systems (159.253) ~ 14 ~Data Communications: © P.Lyons 2004
Asynchronous techniques use frequent synchronisation events to stay in synch
HDLC
The ISO-OSI Model
HDLC is synchronousSender 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
operates between adjacent nodes in a network
need not operate over a reliable medium
may be full duplex
uses sliding window acknowledgement
is responsible for error-free data transfer
HDLC
Computer Systems (159.253) ~ 15 ~Data Communications: © P.Lyons 2004
FRAMEHDLC
The ISO-OSI Model
FLAG 01111110
ADDRESS FIELDOctet (8-bit sequence) specifying destination terminal for frame when using multidrop line
CONTROL FIELDOctet containing sequencing and protocol information
INFORMATION FIELDANY combination of 0 or more bits
FRAME CHECK10-bit CRC check on everything between flags
The HDLC Frame
Computer Systems (159.253) ~ 16 ~Data Communications: © P.Lyons 2004
HDLC
The ISO-OSI Model
CONTROL FIELDOctet containing sequencing and protocol information
Distinguishes betweenInformation framesNumbered supervisory framesUnnumbered supervisory frames
CONTROL FIELD
HDLC Control Field
Computer Systems (159.253) ~ 17 ~Data Communications: © P.Lyons 2004
HDLC Information Frame
Distinguishes betweenInformation framesNumbered supervisory framesUnnumbered supervisory frames
HDLC
The ISO-OSI Model
CONTROL FIELD
Poll/final bitSend count Receive count0
0 denotes information frame
Send count is sequence number of current frameWhen 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 countReceiving 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 senderReceiver compares incoming receive count with its send countSends frames starting with incoming receive count value
P/F bit is set by primary station when polling, by secondary when finished
: INFORMATION FRAME
Computer Systems (159.253) ~ 18 ~Data Communications: © P.Lyons 2004
HDLC Numbered Supervisory FrameThe ISO-OSI Model
CONTROL FIELD
Poll/final bit
Receive count
HDLC : NUMBERED SUPERVISORY FRAME
Send count01 0 Function
10 denotes numbered supervisory frameFrame carries information payload (hence number), and specifies a supervisory function
00 Receive Ready 01 Reject
notification of sequence errorMust retransmit all frames from Receive Count onwards
10 Receive Not Ready11 Selective Reject
need only retransmit specified frame
Function field
: INFORMATION FRAME
Computer Systems (159.253) ~ 19 ~Data Communications: © P.Lyons 2004
HDLC Unnumbered Supervisory Frame: UNNUMBERED SUPERVISORY FRAME
The ISO-OSI Model
CONTROL FIELDHDLC
Poll/final bit
function Part BReceive count1 0 functionpart A
1 1 Function
11 denotes unnumbered supervisory frame
5-bit code for network housekeepingReset countersDisconnectQuery identityTestetc
Function field
: NUMBERED SUPERVISORY FRAME
Computer Systems (159.253) ~ 20 ~Data Communications: © P.Lyons 2004
ProblemHDLC’s flag sequence is 01111110Data may include 01111110arbitrary length, so flag’s position can’t be predictedconflict if data gets mistaken for flag
The ISO-OSI Model
HDLC
Solution Accept data containing flag sequence from level 3Deliver data containing flag sequence to level 3BUT at level 2 transmitter, add an extra bit to the data prevents flag sequence from occurring in data part of transmitted bit stream
: BIT STUFFINGHDLC Bit Stuffing
Computer Systems (159.253) ~ 21 ~Data Communications: © P.Lyons 2004
0111111x
x10111110
The ISO-OSI Model
HDLC: BIT STUFFING01
1111
1x
HDLC HDLC
HDLC Bit Stuffing
Computer Systems (159.253) ~ 22 ~Data Communications: © P.Lyons 2004
ARM Asynchronous Response ModeSecondary may be polled butmay initiate transmission without being polledmay result in contention (cf. CSMA)
The ISO-OSI Model
HDLC: MODES
NRM Normal Response ModeSecondary is polled, starts transmitting frame sequenceSecondary sets F bit in final frameMay not transmit again till polled again
ABRM Asynchronous Balanced Response ModeTwo stations:Each sends as primary, receives as secondary
HDLC Modes
Computer Systems (159.253) ~ 23 ~Data Communications: © P.Lyons 2004
HDLC Sliding Window Acknowledgement
Poll/final bitSend count Receive count
00
0000 00
The ISO-OSI Model
HDLC: SLIDING WINDOW ACKNOWLEDGEMENT
0
1
2
34
5
6
7
Send count0
1
2
34
5
6
7
Receive count0
1
2
34
5
6
7
Send count0
1
2
34
5
6
7
Receive count
00
frame.sendCount := sendCountframe.sendCount := sendCountframe.receiveCount := receiveCountframe.sendCount := sendCountframe.receiveCount := receiveCountframe.Data := data
frame.sendCount := sendCountframe.receiveCount := receiveCountframe.Data := data…frame.send
frame.sendCount := sendCountframe.receiveCount := receiveCountframe.Data := data…frame.sendsendCount++
If checksOutOK(frame.CRC) thenIf frame.sendCount = receiveCount then begin Frame.accept sendCount := frame.receiveCount receiveCount++ end
11
Computer Systems (159.253) ~ 24 ~Data Communications: © P.Lyons 2004
abbreviated representation of admin. information transfer and updating
The ISO-OSI Model
HDLC: FRAME TRANSFER DIAGRAMS
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
HDLC Frame Transfer Diagrams
Computer Systems (159.253) ~ 25 ~Data Communications: © P.Lyons 2004
SecondaryPrimary
Next frame to send
N(S)
Next frame to receive
N(R)0 0 0 0
1 0 0 1
I(1,0)
Time
2 0 0 2I(2,0),P3 0 0 3I(0,3)
3 1 1 3I(1,3)F
. .. .3 2 .. ..2 3
NRM (error-free operation)
I(0,0)
Next frame to receive
N(R)N(S)
Next frame to send
The ISO-OSI Model
HDLC: FRAME TRANSFER DIAGRAMSHDLC Frame Transfer Diagrams
Computer Systems (159.253) ~ 26 ~Data Communications: © P.Lyons 2004
(transmission error):NRM NRM
(error-free operation)
The ISO-OSI Model
HDLC: FRAME TRANSFER DIAGRAMS
SecondaryPrimary
Next frame to send
N(S)
Next frame to receive
N(R)5 3 3 5
6 3 3 6I(6,3) Time
0 3 3 6
I(7,3)
1 3 3 6I(3,6),F
6 4 4 6I(6,4)F
. .. .7 4 .. ..4 7
I(5,3)
Next frame to receive
N(R)N(S)
Next frame to send
7 3 3 6Error: ignore
Incorrect N(S): ignore
I(0,3),PIncorrect N(S): ignore data, accept P bit
HDLC Frame Transfer Diagrams