CSE 555 Protocol Engineering Dr. Mohammed H. Sqalli Computer Engineering Department King Fahd University of Petroleum & Minerals Credits: Dr. Abdul Waheed.

Slides:



Advertisements
Similar presentations
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Advertisements

PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Network Protocols Dr. Eng Amr T. Abdel-Hamid NETW 703 Winter 2006 Finite State Machines (FSMs)
CSE 555 Protocol Engineering Dr. Mohammed H. Sqalli Computer Engineering Department King Fahd University of Petroleum & Minerals Credits: Dr. Abdul Waheed.
PROTOCOLS AND ARCHITECTURE Lesson 2 NETS2150/2850.
CSE 555 Protocol Engineering
Model Checking. Used in studying behaviors of reactive systems Typically involves three steps: Create a finite state model (FSM) of the system design.
Networking Theory (Part 1). Introduction Overview of the basic concepts of networking Also discusses essential topics of networking theory.
1: Operating Systems Overview
1 Lecture 30 Introduction to Data Communications Overview  Lecture Objectives.  Data Communications: Basics.  Major Issues in Data Communications. 
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Software Engineering, COMP201 Slide 1 Protocol Engineering Protocol Specification using CFSM model Lecture 30.
William Stallings Data and Computer Communications 7 th Edition Chapter 2 Protocols and Architecture.
Chapter 1 Program Design
COE 342: Data & Computer Communications (T042) Dr. Marwan Abu-Amara Chapter 2: Protocols and Architecture.
Chapter 2 Network Models.
COMPUTER NETWORKS.
The OSI Model A layered framework for the design of network systems that allows communication across all types of computer systems regardless of their.
 The Open Systems Interconnection model (OSI model) is a product of the Open Systems Interconnection effort at the International Organization for Standardization.
Network Topologies.
NETWORKING CONCEPTS. OSI MODEL Established in 1947, the International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement.
Chapter 4.  Understand network connectivity.  Peer-to-Peer network & Client-Server network  Understand network topology  Star, Bus & Ring topology.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Presentation on Osi & TCP/IP MODEL
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
1.1 What is the Internet What is the Internet? The Internet is a shared media (coaxial cable, copper wire, fiber optics, and radio spectrum) communication.
Web Services Glossary Summary of Holger Lausen
William Stallings Data and Computer Communications 7 th Edition Data Communications and Networks Overview Protocols and Architecture.
1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.
 Communication Tasks  Protocols  Protocol Architecture  Characteristics of a Protocol.
University of the Western Cape Chapter 12: The Transport Layer.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
(Business) Process Centric Exchanges
INTRODUCTION. A Communications Model Source –generates data to be transmitted Transmitter –Converts data into transmittable signals Transmission System.
MODULE I NETWORKING CONCEPTS.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
1 Network Model. 1-2 Divide and Conquer A method of managing large system.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
Chapter 11 Extending LANs 1. Distance limitations of LANs 2. Connecting multiple LANs together 3. Repeaters 4. Bridges 5. Filtering frame 6. Bridged network.
Prepared by Engr.Jawad Ali BSc(Hons)Computer Systems Engineering University of Engineering and Technology Peshawar.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Protocols and Architecture Slide 1 Use of Standard Protocols.
Network Models.
IEEE 802.X Standards The Institute of Electrical and Electronics Engineers (IEEE) has developed a series of networking standards to ensure that networking.
When we communicate, we are sharing information. This sharing can be local or remote. Between individuals, local communication usually occurs face to face,
Network Architecture Protocol hierarchies Design Issues for the layers
Protocol Layering Chapter 11.
Understanding Network Architecture CHAPTER FOUR. The Function of Access Methods The set of rules that defines how a computer puts data onto the network.
G.v. Bochmann, revised Jan Comm Systems Arch 1 Different system architectures Object-oriented architecture (only objects, no particular structure)
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
UML - Development Process 1 Software Development Process Using UML.
1 Protocols and Protocol Layering. 2 Protocol Agreement about communication Specifies –Format of messages –Meaning of messages –Rules for exchange –Procedures.
Agenda  Quick Review  Finish Introduction  Java Threads.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
TCP/IP Protocol Suite Suresh Kr Sharma 1 The OSI Model and the TCP/IP Protocol Suite Established in 1947, the International Standards Organization (ISO)
Week #8 OBJECTIVES Chapter #5. CHAPTER 5 Making Networks Work Two Networking Models –OSI OPEN SYSTEMS INTERCONNECTION PROPOSED BY ISO –INTERNATIONAL STANDARDS.
| MSC 8102:PROGRAMMING CONCEPTS By Vincent Omwenga, PhD. 1.
Chapter 27 Network Management Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lecture # 07 Spring-2016.
The Concept of Universal Service
Network Models.
PROTOCOLS PROTOCOLS.
Data Link Layer.
Understanding the OSI Reference Model
Data and Computer Communications by William Stallings Eighth Edition
Chapter 15 – Part 2 Networks The Internal Operating System
Advanced Computer Networks Lecture 1
Introduction and Overview
Data Link Layer. Position of the data-link layer.
Presentation transcript:

CSE 555 Protocol Engineering Dr. Mohammed H. Sqalli Computer Engineering Department King Fahd University of Petroleum & Minerals Credits: Dr. Abdul Waheed (KFUPM) Spring 2004 (Term 032)

CSE555-SqalliTerm Course Objectives  This course covers the following topics  Overview of structured protocol design and testing techniques  Formulation of desirable properties of a protocol  Formal description techniques and languages  Protocol synthesis and validation  Conformance testing  Study of some protocol design and validation tools  What is expected from the students  Study all details of at least one protocol  Application of at least one analysis and testing tool/language to selected protocol for its modeling and validation

Introduction to Protocol Engineering

CSE555-SqalliTerm Topics (Ch. 1)  Motivation  Computer networks  Protocols as languages  Examples of some of the well-known protocols  Overview of structured protocol design and testing techniques

CSE555-SqalliTerm Motivation for Protocol Engineering  What is a protocol?  A set of rules for interactions among concurrent processes  Processes typically run on distributed systems  Protocol design spans a number of established fields  Operating systems; computer networks; data communication  Provides some standard solutions  Designing a logically consistent protocol that can be proven correct is a challenging task  Establishing validity of even a sequential program is hard  In distributed systems, we must reason about concurrently executed, interacting programs  Let’s consider one example

CSE555-SqalliTerm Example: Clock Synchronization Problem  Problem statement  Distributed systems have asynchronous clocks  Due to clock skew, a message may be received before it was sent  Observing concurrent events on a distributed system is non-trivial  Local clocks ensure that local events are observed in correct order  However, correct global event order may not be observed accurately  A send event has to happen before corresponding receive event  Global event order may not show this causal relationship due to clock skew  One solution (Lamport’s law):  Ensure sequential consistency of individual clocks (partial event order)  When two processes interact, ensure that receive occurs after send event (global event ordering)  An implementation: Network Time Protocol (NTP)  Servers provide reference network time  All clients synchronize their clocks with respect to the reference clock  Synchronized time is accurate within a few msec range

CSE555-SqalliTerm Communication Protocols: Early Beginnings  Problem of designing efficient and unambiguous communication protocols existed even before the advent of computers  Number of systems for communication over long distances  Fire signals and torch telegraph (458 BC)  Chappe’s semaphore/optical telegraph (Claude Chappe 1793)  Electric telegraph (William Cooke 1837)  Problems with early communication systems  Number of messages that can be communicated by fire signals is limited (and previously determined) - Unforeseen things can’t be communicated  Synchronization problems  What happens if two messages arrive simultaneously to a semaphore from opposite directions (relay messages)?  Electric telegraphs could not prevent some railway crashes due to misunderstandings among signalmen  Common problem: unexpected occurrences, which require immediate attention lead to protocol failures  expect the unexpected

CSE555-SqalliTerm Incomplete Protocol Specifications  This is the primary problem that results in communication protocol failures  Examples:  Example 1: A railway signaling protocol  Example 2: Deadly Embrace

CSE555-SqalliTerm Example 1: Railway Signaling Protocol  One of the first applications of electric telegraph was railway signaling to protect notoriously dangerous stretches of railroads  Single-track lines  Tunnels  Crashes did take place due to unexpected combination of events  Crashes are always investigated in minute details  Lots of information is available on early protocol design problems  Consider the example of Clayton Tunnel accident that occurred in England in August 1861

CSE555-SqalliTerm Example 1 (Cont’d)  Protocol  Using semaphore signals, signalmen on each end were required to make certain that a train that entered the tunnel had emerged from the other end before allowing next train into the tunnel  Any train passing a green signal automatically sets that signal to red  Separate tracks for trains moving in each direction  Small number of pre-defined messages can be exchanged among signalmen (“train in tunnel”, “tunnel is free”)  Signalmen reset signal to green after “tunnel is free”  Unexpected sequence of events  First train passes signal A but fails to reset the green signal to red; signalman A manually fetches the red flag and indicates to B that there is a train in the tunnel  Second train is too fast and passes green signal; but the driver catches glimpse of red flag and stops the train inside the tunnel  A third train stops outside the tunnel  Signalman A indicates that a second train is also in the tunnel (protocol did not allow this situation); only message that signalman A could transmit was “has the train left the tunnel?”  Signalman B is not aware of the second train in tunnel; responds when the first train leaves the tunnel that “tunnel is clear”  Signalman A decides that both trains must have left the tunnel. The third train is allowed to move on. The driver of the second train (who had seen the red flag) decides to play it safe and back out of the tunnel.  Both trains collided, 21 people died and 176 injured.

CSE555-SqalliTerm Example 2: Deadly Embrace  A call requires exclusive access to at least 2 shared resources in the telephone system:  The line of the calling party  The line of the called party  Access is always first granted to the calling party’s line, then to the called party’s line  When two subscribers A and B simultaneously attempt to establish a connection to each other, the access rules will prevent this  If A and B repeatedly pick up the receiver simultaneously to dial the connection, they will repeatedly fail (until one fives up!).

CSE555-SqalliTerm Early Computer Communication Systems  Computer communication has its roots in modifications made to early telegraphs  Use of Morse signaling code instead of needle instruments (1851)  Elisha Gray and Alexander Graham Bell invent telephone (1876)  Marconi build first radio telegraph (1897)  Use of paper tape instead of manual operation to increase the transmission speeds  Complete telegraph exchange (telex) networks by 1925  Automated communication protocol execution on mainframe computers (1950)  Demand for thoroughness of communication protocols increased  Early communication protocols  Master-slave protocols  Peer protocols

CSE555-SqalliTerm Master-Slave Protocols  ENIAC was the first computer built in 1946 at Univ. of Pennsylvania  Computer needed to communicate with peripheral devices, such as paper tape readers and keyboards  One large and expensive mainframe computer  Several “dumb” peripherals  Protocol:  If no data to transfer to peripherals, mainframe would “poll” the peripherals to see if any of them had data to return or a status  All peripherals were within a room connected by multidrop lines

CSE555-SqalliTerm Master-Slave Protocols (Cont’d)  First experiments of long distance computer to computer communication over telephone lines took place in 1956  Fundamentally different types of control problems  Data transmission via a satellite (1962)  First data communication protocols  Simple encodings of manual operations  Procedures were used to solve traditional master-slave interaction problem  At all times, one data transmission entity would control:  Connection management  Data transfer  Synchronization and recovery  Example: IBM’s Bisync protocol

CSE555-SqalliTerm Peer Protocols  By 1960s, mainframes were connected directly via data networks  Mainframes talking directly to each other as peers  Lack of any master-slave relationship (and related convenience)  Higher data speeds and larger traffic loads  Packet switching started with ARPANet in 1969  Internet is a successor of ARPANet  It grew from 25,000 nodes in 1987 to more than a billion nodes now  Protocol design problem:  Establish agreement to use shared resources in a network of peers  If more than one process erroneously assumes responsibility of a task, havoc can result

CSE555-SqalliTerm Lessons Learned by Early Protocol Designers  Unlikely sequence of events do happen and can ruin the design  Faulty or incomplete protocols can paralyze entire networks  Collision of two data streams on a satellite channel may seem harmless compared to head-on collision of two trains  In reality, damage can be substantial in both cases

CSE555-SqalliTerm Protocol Design and Analysis  Fundamental design problem:  How to design large sets of rules for information exchange that are:  Minimal  Logically consistent  Complete  How to implement those rules efficiently  Two approaches:  Given a problem, how can a designer solve it systematically so that design requirements are realized?  Given a protocol, how can an analyzer demonstrate convincingly that it conforms to the correctness requirements?  Design discipline  A set of self-imposed constraints that can help us avoid trouble “Every protocol should be considered incorrect until proven otherwise”

CSE555-SqalliTerm Communication Architectures  ISO established a subcommittee to develop an architecture that defines communication tasks (1977)  Result was the Open System Interconnection (OSI) reference model  Provided common basis for development of standards for systems interconnection  Layered architecture  Layer n provides a service that can be used by the layer n+1  Each layer performs specific functions that distinguish it from the other layers  Each layer can access services from the layer below it by accessing specific service access points (SAPs)

CSE555-SqalliTerm Data Transfer Through Protocol Hierarchies

CSE555-SqalliTerm Network Protocols  Specify any function that requires cooperation between two or more network entities  specify the format of the information that is sent/received among routers and end-systems  specify timings and the actions that a node has to take when it receives special messages or special events occur

CSE555-SqalliTerm Formal Languages  Components of a formal language:  An alphabet;  Strings; and  Operations  An alphabet is a finite collection of symbols  Symbols in alphabet cannot be decomposed  Example symbols: a, b, left, right, move_robot_arm, etc  A string (or word) is a finite sequence of zero or more symbols taken from an alphabet  A string containing no symbol is called an empty string  Some useful operations of strings  Examples: length of a string, join of two strings, index of a symbol in a string, etc.

CSE555-SqalliTerm Formal Languages (Cont’d)  A formal language is any set of strings that can be formed using symbols of an alphabet  A language whose strings are formed from symbols in an alphabet A is said to be a language over A  The strings in a language are called the sentences of that language  The symbol A* is used to represent all possible strings over the alphabet A. So any language L over A is a subset of A*

CSE555-SqalliTerm Protocols as Languages  An informal definition of a communication protocol:  An agreement for exchange of information in a distributed system  A more careful definition looks like a language definition:  Defines a precise format of valid messages (syntax)  Example: dots and dashes in Morse code  Defines procedure rules for data exchange (grammar)  Example: transmission initiator and responder follow different procedures  Defines a vocabulary of valid messages that can be exchanged, with their meaning (semantics)  Example: control messages, acknowledgements, etc.  Grammar of a protocol must be logically consistent and complete:  Rules should specify clearly (unambiguously) what is allowed and what is forbidden  This is a difficult requirement to meet, in practice

CSE555-SqalliTerm Requirements of Designing a Protocol  Hidden requirement:  Rules for exchange of information is an obvious requirement  There should be agreement between sender and receiver about those rules  Protocol design results in more than one implementation  Different implementations leave room for short-cuts or improvements  Such differing implementations may not work together  Example: many implementations of IBM’s Bisync protocol rule out any hopes of communicating among different implementations  Solution to multiple implementations:  Institution of international standardization bodies  Other possibility could have been more strict guidelines for the design, specification, and implementation of protocols

CSE555-SqalliTerm Protocol Standardization  Two most important standardization bodies in the are of communication:  ISO and  CCITT

CSE555-SqalliTerm International Standards Organization (ISO)  Included many national standards organizations, such as ANSI  Organized into technical committees, each of which is divided into:  Subcommittees and  Working groups  It is not a treaty organization  Membership is voluntary  Best known protocol recommendations: ASCII and RS232

CSE555-SqalliTerm CCITT  CCITT is part of the International Telecommunication Union  It is a treaty organization formed by UN in 1956  It is a union of two separate entities:  CCIT (telegraph systems) and  CCIF (telephone systems)  Organized into study groups and working parties  Best know protocols recommended by CCITT: X.21 and X.25

CSE555-SqalliTerm …But Design Problem Is Not Solved  Standardization does not necessarily solve protocol design problem  Standards could be incomplete  They can even be faulty

CSE555-SqalliTerm How Design Problem Can be Solved  We need effective methods for:  Designing and describing protocols  Checking that a protocol submitted for standardization is correct  In other words, we need to be able to:  Express a design criteria of a protocol  Examples (Holzmann 91):  Absence of any unwanted behaviors of a system, such as the infinite repetition of actions that do no meet a progress criterion defined by the user  Guaranteed observance of a specific functionality, e.g., within finite time after lifting the receiver the telephone subscriber must receive a dial-tone  Check that its design criteria are met  Protocol specification languages have been developed  Referred to as: Formal Description Techniques (FDTs)  Used for specifying protocols for standardization

CSE555-SqalliTerm Formal Description Techniques  Three FDTs have been standardized:  SDL  LOTOS  Estelle

CSE555-SqalliTerm Specification and Description Language (SDL)  SDL was developed by a CCITT study group  Work started in 1968  A final stable version was approved in 1987  Meant specifically for the specification and design of telecommunication systems, e.g., telephone switches  Two variants of SDL:  Graphical form  Program form

CSE555-SqalliTerm Language Of Temporal Ordering Specification (LOTOS)  It is being developed within ISO  Issued as international standard in 1989  LOTOS is also called a process algebra  Based on the calculus of communicating systems (CCS) developed by Robin Milner at University of Edinburgh  Main goal of process algebra:  Formal specification of process behaviors on a high level of abstraction  Algebra defines:  a rigorous set of transformations rules, and  equivalence relations  Allows a designer to reason formally about behaviors

CSE555-SqalliTerm Estelle  Being developed under another ISO subgroup  Issued as international ISO standard in 1989  Based on an extended finite state machine concept

CSE555-SqalliTerm Limitations of FDTs  LOTOS is the only language that also addresses the design issues, in addition to specification  None of the FDTs addresses the problem that complete designs must be verifiable at the protocol specification level  We must be able to check with automated tools that a design meets its requirements  Verifiability is not guaranteed by any of the FDTs

CSE555-SqalliTerm Selected Model Checking Tools  Spin  Model checking tool where models are expressed in PROMELA (PROcess MEta LAnguage)  Available with source code on Windows and Unix platforms   VeriSoft  Model checking tool where models are expressed in C/C++  Available on Linux or Solaris platforms   PV: The Protocol Verifier  Model checking using PROMELA  Available on Linux or Solaris platforms   Murphi  Custom description language  Available on Linux, Solaris, Irix, and HP-UX 

CSE555-SqalliTerm Application Example: Flow Control  Go-back-N flow control protocol  Protocol translated into PROMELA specification  From informal description given in Computer Networks by Tanenbaum  Using Spin, its correctness properties can be proven in few minutes  Absence of deadlocks  No unreachable code  No unspecified receptions  Need to verify two properties:  Message can be lost  No message arrives out of order

CSE555-SqalliTerm Example: Model of A Sliding Window Protocol in Spin

CSE555-SqalliTerm Applications of Verification Tools  Verification of part of SCI ("Scalable Coherent Interface"), IEEE Std SCI  Some bugs were discovered   Verification of memory consistency models in shared memory multiprocessors   Verification of SSL protocol  Finite state analysis   Bottleneck analysis of a Gigabit Network Interface Card  Uses PROMELA   Verification Experiments on the MASCARA Protocol  Uses SDL   Database of PROMELA Models 