INRES Service Protocol Stanislaw BUDKOWSKI NATIONAL INSTITUTE OF
INRES Service & Protocol Stanislaw BUDKOWSKI NATIONAL INSTITUTE OF TELECOMMUNICATIONS (INT) 9, Rue Charles Fourier, 91011 EVRY Cedex, FRANCE tel: +33 1 60 76 42 03 fax: +33 1 60 78 41 36 Email: stan@int-evry. fr 1
General Information • INRES services and a protocol: • cannot be related to any specific layers of the OSI-BRM • it does contain many basic OSI-BRM concepts • it is used as a common example in the ISO/CCITT work on "Formal Methods and Conformance Testing" • it has originally been published by D. Hogrefe • it is an abridged version of the Abracadabra system described in K. J. Turner (Ed. ) book 2
Basic structure of the INRES system INRES-user INRES Service primitives INRES entity INRES protocol Medium Service primitives INRES entity Medium Service primitives Medium Service 3
INRES Service General information • INRES Service is: – connection-oriented – asymmetrical • connection may be initiated through the service only by the Initiator-user, • only the Initiator-user may send data once a connection is established, • only Responder-user may terminate an establish connection 4
INRES Service Structure INITIATOR User RESPONDER User ICONconf IDISind ICONreq IDATreq ICONind IDATind IDISreq ICONresp ISAPini ISAPres INRES service 5
INRES Service Primitives 6
INRES Service Connection Phase • Connection may be initiated only by the Initiator-user using ICONreq. An ICONreq should be issued only once to establish a connection and it may be repeated only once a connection has been terminated. ICONreq ICONind ICONresp ICONconf 7
INRES Service Data Transmission Phase • Once a connection is established the Initiator-user may send a IDATreq which will be delivered as IDATind to the Responder-user IDATreq IDATind 8
INRES Service Disconnection Phase - normal course (1) • Successful disconnection of an established connection ICONreq IDATreq ICONind IDATind ICONresp ICONconf IDISreq IDISind 9
INRES Service Disconnection Phase - normal course (2) • Abandon of a connection establishment attempt ICONreq ICONind IDISreq IDISind 10
INRES Service Disconnection Phase - spontaneous disconnection ICONreq IDISind IDATreq IDISind 11
INRES Service - User Errors • Should the behavior of the service under incorrect use of it by the service user be described ? -- YES for robustness. – An ICONreq should be ignored if issued when a connection is already established or is currently being established – An ICONresp should be ignored if issued before any attempt to establish a connection was done, or if issued too late, after such an attempt was made – A IDISreq should be ignored if issued before any attempt to establish a connection was done – A IDATreq should be ignored if issued when a connection is not established. 12
INRES Service Estelle High Level Description specification Inres_service; {INR_Serv. HL. stl} default individual queue; timescale seconds; (******Outermost Interface *****) type ISDUType =. . . ; {undefined type def} channel ISAPchn 1(User, Service); by User : ICONreq; IDATreq(ISDU : ISDUType); by Service : ICONconf; IDISind; channel ISAPchn 2(User, Service); by User : ICONresp; IDISreq; by Service : ICONind; IDATind(ISDU : ISDUType); (**** Service Module ******) module Service systemprocess; ip ISAPini : ISAPchn 1(Service); ISAPres : ISAPchn 2(Service); end ; body Service_Body for Service; end; {of Service_Body} modvar {of specification} SP: Service; initialize {of specification} begin init SP 13
INRES Service Estelle Specification - Service_body const d = any INTEGER; state DISCONNECTED, I_CALLING_R, CONNECTED; stateset ACTIVE = [ I_CALLING_R, CONNECTED]; ignore. ICONreq = [I_CALLING_R, CONNECTED]; ignore. ICONresp = [DISCONNECTED, CONNECTED]; ignore. IDATreq = [DISCONNECTED, I_CALLING_R]; initialize {of Service_Provider_Body} to DISCONNECTED begin end ; (*******CONNECTION PHASE *******) trans {of Service_Provider_Body} from DISCONNECTED to I_CALLING_R when ISAPini. ICONreq begin output ISAPres. ICONind end ; from I_CALLING_R to CONNECTED when ISAPres. ICONresp begin output ISAPini. ICONconf end ; (******* DATA TRANSFER PHASE ********) from CONNECTED when ISAPini. IDATreq(ISDU) begin output ISAPres. IDATind(ISDU) end ; (**** DISCONNECTION PHASE *******) from ACTIVE to DISCONNECTED when ISAPres. IDISreq begin output ISAPini. IDISind end ; (***spontaneous disconnect **) from ACTIVE to DISCONNECTED delay (d) begin output ISAPini. IDISind end ; 14
INRES Service_body, Automaton - gaph 15
INRES Service_body, Automaton - table 16
INRES Service Estelle Specification - Service_body - robuste const d = any INTEGER; state DISCONNECTED, I_CALLING_R, CONNECTED; stateset ACTIVE = [ I_CALLING_R, CONNECTED]; ignore. ICONreq = [I_CALLING_R, CONNECTED]; ignore. ICONresp = [DISCONNECTED, CONNECTED]; ignore. IDATreq = [DISCONNECTED, I_CALLING_R]; initialize {of Service_Provider_Body} to DISCONNECTED begin end ; (*******CONNECTION PHASE *******) trans {of Service_Provider_Body} from DISCONNECTED to I_CALLING_R when ISAPini. ICONreq begin output ISAPres. ICONind end ; from I_CALLING_R to CONNECTED when ISAPres. ICONresp begin output (******* DATA TRANSFER PHASE ********) from CONNECTED when ISAPini. IDATreq(ISDU) begin output ISAPres. IDATind(ISDU) end ; (**** DISCONNECTION PHASE *******) from ACTIVE to DISCONNECTED when ISAPres. IDISreq begin output ISAPini. IDISind end ; (***spontaneous disconnect **) from ACTIVE to DISCONNECTED delay (d) begin output ISAPini. IDISind end ; (*******USER ERRORS PROCESSING******) from ignore. ICONreq when ISAPini. ICONreq begin end ; from ignore. ICONresp to same when ISAPres. ICONresp begin end ; from ignore. IDATreq to same 17
INRES Protocol General information • INRES protocol is a connection-oriented protocol that operates between two protocol entities Initiator and Responder • The protocol entities communicate by exchange of the protocol data units (PDU) CR, CC, DT, AK and DR • The protocol renders the INRES service to users located in the imaginary next higher layer 18
INRES Protocol Structure INRES protocol Initiator User Responder User ICONconf IDISind IDATind ICONreq IDATreq IDISreq ICONresp CR, DT ISAP 1 RESPONDER INITIATOR PDU 1 ISAP 2 CC, DR, AK PDU 2 19
INRES Protocol data units (PDU) 20
INRES Protocol Phases • Communication between INITIATOR and RESPONDER takes place in three distinct phases: • connection establishment phase • data transmission phase • disconnection phase • an error processing phase exists which corresponds to the spontaneous disconnection's of the INRES service 21
INRES Protocol Connection establishment phase • Connection establishment phase is initiated by Initiator-user by sending an ICONreq to Initiator – Upon receipt of ICONreq Initiator sends a CR to Responder – Responder can answer to Initiator with CC or DR • If it responds by CC, Initiator issues an ICONconf to its user, and the data transmission phase can start • If it responds by DR, the disconnection phase is entered – If Initiator receives nothing at all within 5 seconds, CR is transmitted again to Responder – If, after 4 attempts, still nothing is received by Initiator, it enters the disconnection phase 22
INRES Protocol Connection establishment phase (cont. ) • If Responder receives a CR from Initiator, the Responder -user gets an ICONind • Responder-user can respond with ICONresp or IDISreq • ICONresp indicates the willingness to accept the connection • Upon receipt of an ICONresp, Responder sends a CC to Initiator, and the data transmission phase is entered • Upon receipt of an IDISreq, Responder enters the disconnection phase 23
INRES Protocol Data transmission phase (1) • If Initiator-user issues an IDATreq, the Initiator sends a DT and is then ready to receive another IDATreq • IDATreq has one parameter - a service data unit ISDU transmitted by Initiator as a parameter of DT • After having sent a DT, Initiator waits for an AK • DT and AK carry a one-bit sequence number (0 or 1) • First DT sent by Initiator carry sequence number 1 • A correct AK of a DT has the same sequence number 24
INRES Protocol Data transmission phase (cont. ) • After receipt of a correct acknowledgement, the next DT with the next (i. e. other) sequence number can be sent • If Initiator receives an AK with incorrect sequence number, it sends the last DT once again • Last DT is also sent again if the respective AK does not arrive within 5 seconds • A DT can only be sent (retransmitted !!!) 4 times; afterwards Initiator enters the disconnection phase 25
INRES Protocol Data transmission phase (cont. ) • Responder expects first DT with the sequence number 1 • Upon receipt of a DT with the expected sequence number (and ISDU), Responder sends IDATind to its user (with the received ISDU as a parameter), and sends to the Initiator an AK with the same sequence number • Upon receipt of a DT with an unexpected sequence number Responder sends an AK with the sequence number of the last correctly received DT • The user data ISDU of an incorrect received DT is ignored. 26
INRES Protocol Disconnection phase • It is initiated by Responder-user by sending an IDISreq to Responder • Upon receipt of IDISreq Responder sends a DR to Initiator and it is ready to receive another connection establishment attempt CR from Initiator • Upon receipt of a DR Initiator sends an IDISind to its use • An IDISind is also sent by Initiator to its user after DT or CR have been sent unsuccessfully to the Responder 27
INRES Protocol Estelle Specification -HLD specification Inres_protocol; {INR_Pr-ner. stl ; without error processing (reliable transmission assumed, no-user errors} (***** Protocol Entity module *****) module Protocol_Entity systemprocess; ip ISAP 1: ISAPchn 1(P_E); ISAP 2: ISAPchn 2(P_E); default individual queue; (*****Outermost Interface ******) type ISDUtype =. . . ; {undefined data type} Seq. Nb = 0. . 1; PDUtype = (CR, CC, DT, AK, DR); channel ISAPchn 1(Usr, P_E); by Usr: ICONreq; IDATreq(ISDU: ISDUtype); by P_E: ICONconf; IDISind; channel ISAPchn 2(Usr, P_E); by Usr: ICONresp; IDISreq; by P_E: ICONind; IDATind(ISDU: ISDUtype); channel IPDU(Ior. R, Coder); by Ior. R: CR; DT(Num: Seq. Nb; ISDU: ISDUtype); by Coder CC; PDU 2: IPDU(Coder); PDU 1: IPDU(Ior. R); end; (******** Initiator **********) body Initiator for Protocol_Entity ; #include "Initiator-ner" end; {of Initiator} (******** Responder *******) body Responder for Protocol_Entity ; #include "Responderner" end; {of Responder} modvar {of specification} Ini, Res: Protocol_Entity; initialize {of specification} begin 28 Ini with Initiator; init
INRES Protocol Estelle Specification - Initiator-ner {Initiator body-no error processing} var number: Seq. Nb; state DISCONNECTED, WAIT, CONNECTED, SENDING; stateset notignore. DR = [WAIT, CONNECTED, SENDING]; initialize {of Initiator} to DISCONNECTED begin end; trans {of Initiator} { Connection Phase } from DISCONNECTED to WAIT when ISAP 1. ICONreq begin output PDU 1. CR end; from WAIT to CONNECTED when PDU 1. CC begin number: = 1; output ISAP 1. ICONconf end; { Data Transfer Phase } from CONNECTED to SENDING when ISAP 1. IDATreq(ISDU) begin output PDU 1. DT(number, ISDU); end; from SENDING when PDU 1. AK(Num) provided Num = number to CONNECTED begin number: = 1 - number; end; { Disconnection Phase } from notignore. DR to DISCONNECTED when PDU 1. DR begin output ISAP 1. IDISind end; 29
INRES Protocol Initiator-ner-graph DISCONNECT DR ICONreq CR IDISind WAIT CC number: =1; ICONconf CONNECTED AK(Num), Num=number: =1 -number IDATreq(ISDU) DT(number, ISDU) SENDING 30
INRES Protocol Estelle Specification - Responder-ner {Responder body - no error processing } var number: Seq. Nb; state DISCONNECTED, WAIT, CONNECTED; stateset notignore. IDISreq = [WAIT, CONNECTED]; initialize {of Responder} to DISCONNECTED begin end; trans {of Responder} { Connection Phase } from DISCONNECTED to WAIT when PDU 2. CR begin output ISAP 2. ICONind end; from WAIT to CONNECTED when ISAP 2. ICONresp begin number: = 1; output PDU 2. CC end; { Data Transfer Phase } from CONNECTED when PDU 2. DT(Num, ISDU) provided Num = number begin output ISAP 2. IDATind(ISDU); output PDU 2. AK(Num); number: = 1 - number end; { Disconnection Phase } from notignore. IDISreq to DISCONNECTED 31 when
INRES Protocol Responder-ner-graph DISCONNECTED IDISreq CR DR ICONind WAIT ICONresp number: =1; CC CONNECTED DT(Num, ISDU), Num = number IDATind(ISDU); AK(Num); number: =1 -number 32
INRES Protocol Estelle Specification - Initiator { Initiator body with error processing } Var number: Seq. Nb; olddata: ISDUtype; counter: 0. . 4; state DISCONNECTED, WAIT, CONNECTED, SENDING; stateset notignore. DR = [WAIT, CONNECTED, SENDING]; ignore. ICONreq = [WAIT, CONNECTED, SENDING]; ignore. IDATreq = [DISCONNECTED, WAIT]; ignore. CC = [DISCONNECTED, SENDING]; ignore. AK = [DISCONNECTED, WAIT, CONNECTED]; initialize {of Initiator} to DISCONNECTED begin end; trans {of Initiator} { User-Errors Processing Phase } from ignore. ICONreq to same when ISAP 1. ICONreq begin end; from ignore. IDATreq to same {Connection Phase } from DISCONNECTED to WAIT when ISAP 1. ICONreq begin counter: = 0; output PDU 1. CR end; from WAIT to CONNECTED when PDU 1. CC begin number: = 1; counter: = 0; output ISAP 1. ICONconf end; from WAIT delay(5) provided counter < 4 to same begin output PDU 1. CR; 33 counter: = counter + 1; end;
INRES Protocol Estelle Specification - Initiator ( cont. ) { Data Transfer Phase } from CONNECTED to SENDING when ISAP 1. IDATreq(ISDU) begin olddata: = ISDU ; output PDU 1. DT(number, ISDU); end; from SENDING when PDU 1. AK(Num) provided Num = number to CONNECTED begin counter: = 0 ; number: = 1 - number; end; provided (Num <> number) and (counter < 4) to same begin output PDU 1. DT(number, olddata); from SENDING delay(5) provided counter < 4 to same begin output PDU 1. DT(number, olddata); counter: = counter + 1 end; provided otherwise to DISCONNECTED begin output ISAP 1. IDISind end; { Errors/Time-outs Processing Phase } from ignore. CC to same when PDU 1. CC begin end; from ignore. AK to same when PDU 1. AK(NUM) begin end; from DISCONNECTED when PDU 1. DR begin end; { Disconnection Phase }34
INRES Protocol Medium • INRES protocol have to be mapped on Medium service to realise INRES system • Medium service is symmetrical and operates connectionless • Medium service is unreliable (SPs can be lost) • Medium Service Primitives (SPs) MDATreq and MDATind, carry a parameter Medium-Service Data Units (MSDU) 35
INRES Protocol Medium Structure User MDATind (MPDU) MDATreq (MPDU) MSAP[1] MDATind (MPDU) MSAP[2] Medium Service 36
INRES System Medium Service Successful data transfer in both direction Unsuccessful data transfer in both direction MDATreq MDATind MDATreq MDATind 37
INRES System Structure Responder User Initiator User ISAP 2 ISAP 1 IDATind ICONconf IDISind IDISreq ICONresp ICONreq IDATreq ISAP 1 ISAP 2 Responder Initiator PDU 2 PDU 1 CR, DT CC, DR, AK PDU 1 Coder PDU 2 MSAP MDATind MDATreq MSAP[1] MSAP[2] Medium Service 38
INRES System - Estelle Specification-HLD specification Inres_protocol; {INR_Sy-ner. stl } default individual queue; (******Outermost Interface *******) type ISDUtype =. . . ; {undefined data type} Seq. Nb = 0. . 1; PDUtype = (CR, CC, DT, AK, DR); type MSDUtype = record id: PDUtype; num : Seq. Nb; data: ISDUtype; end; channel ISAPchn 1(Usr, P_E); by Usr: ICONreq; IDATreq(ISDU: ISDUtype); by P_E: ICONconf; IDISind; channel ISAPchn 2(Usr, P_E); by Usr: ICONresp; IDISreq; by P_E: ICONind; IDATind(ISDU: ISDUtype); channel IPDU(Ior. R, Coder); (******User module ********) module User systemprocess; ip ISAP 1: ISAPchn 1(Usr); ISAP 2: ISAPchn 2(Usr); end; body User_body 1 for User; end; body User_body 2 for User; end; (***** Medium_Service module *******) module Medium_Service systemprocess; ip MSAP: array [1. . 2] of MSAPchn(M_S); end; body Medium_body for Medium_Service; #include "Medium-ner" end; {Medium_body} (***** Protocol Entity module ****) module Protocol_Entity systemprocess; ip ISAP 1: ISAPchn 1(P_E); ISAP 2: ISAPchn 2(P_E); PDU 2: IPDU(Coder); PDU 1: IPDU(Ior. R); end; 39
INRES System - Estelle Specification-HLD (cont. ) (********** Initiator ********) body Initiator for Protocol_Entity ; #include "Initiator-ner" end; {of Initiator} (******** Responder ********) body Responder for Protocol_Entity ; #include "Responderner" end; {of Responder} (****** Coder module ********) module Coder systemprocess; ip PDU 1: IPDU(Coder); PDU 2: IPDU(Ior. R); MSAP: MSAPchn(P_E); end; body Coder_body_Ini for Coder; #include "Coder_body_Ini" modvar {of specification} Ini, Res: Protocol_Entity; Usr_Ini, Usr_Res: User; Cod_Ini, Cod_Res: Coder; Med: Medium_Service; initialize {of specification} begin init Ini with Initiator; init Res with Responder; init Usr_Ini with User_body 1; init Usr_Res with User_body 2; init Cod_Ini with Coder_body_Ini; init Cod_Res with Coder_body_Res; init Med with Medium_body connect Usr_Ini. ISAP 1 to Ini. ISAP 1; connect Ini. PDU 1 to Cod_Ini. PDU 1; connect Cod_Ini. MSAP to Med. MSAP[1]; connect Med. MSAP[2] to Cod_Res. MSAP; connect Cod_Res. PDU 2 to Res. PDU 2; connect Res. ISAP 2 to Usr_Res. ISAP 2; end. {of specification} 40
INRES System - Coder for Initiator {Coder_body_ini } var MSDU: MSDUtype; trans {of Coder_body_ini} when PDU 1. CR begin MSDU. id: = CR; output MSAP. MDATreq(MSDU) end; when PDU 1. DT(Num, ISDU) begin MSDU. id: = DT; MSDU. num: = Num; MSDU. data: = ISDU; output MSAP. MDATreq(MSDU) end; when MSAP. MDATind (MSDU) begin case MSDU. id of CC: output PDU 1. CC; AK: output PDU 1. AK (MSDU. num); DR: output PDU 1. DR; end; 41
INRES System Coder for Responder {Coder_body_res } var MSDU: MSDUtype; trans {of Coder_body_res} when PDU 2. CC begin MSDU. id: = CC; output MSAP. MDATreq(MSDU) end; when PDU 2. AK(Num) begin MSDU. id: = AK; MSDU. num: = Num; output MSAP. MDATreq(MSDU) end; when PDU 2. DR begin MSDU. id: = DR; output MSAP. MDATreq(MSDU) end; when MSAP. MDATind(MSDU) begin case MSDU. id of CR: output PDU 2. CR; DT: output. PDU 2. DT(MSDU. num, MSD. data); end; 42
INRES System Medium trans when MSAP[1]. MDATreq(MSDU) begin output MSAP[2]. MDATind(MSDU) end; when MSAP[2]. MDATreq(MSDU) begin output MSAP[1]. MDATind(MSDU) end; {Message loss} when MSAP[1]. MDATreq(MSDU) begin end; when MSAP[2]. MDATreq(MSDU) begin end; 43
INRES System ENJOY PROTOCOL DESIGN WITH ESTELLE 44
- Slides: 44