1 Data Link Protocols By Erik Reeber. 2 Goals Use SPIN to model-check successively more complex protocols Using the protocols in Tannenbaums 3 rd Edition.

Slides:



Advertisements
Similar presentations
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
Advertisements

Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.
1 Formal Modeling & Verification of Messaging Framework of Simple Object Access Protocol (SOAP) Manzur Ashraf Faculty,BRAC University.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
ZMQS ZMQS
Tintu David Joy. Agenda Motivation Better Verification Through Symmetry-basic idea Structural Symmetry and Multiprocessor Systems Mur ϕ verification system.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 14 Introduction to Computer Networks.
Chapter 3 The Data Link Layer.
Data Link Layer Protocols Flow Control in Data Link Layer.
Data Link Layer (cont’d)
Homework Reading Machine Projects Labs
Local Area Networks - Internetworking
ABC Technology Project
1 Improving TCP Performance over Mobile Networks HALA ELAARAG Stetson University Speaker : Aron ACM Computing Surveys 2002.
1 Carnegie Mellon UniversitySPIN ExamplesFlavio Lerda Bug Catching SPIN Examples.
Routing and Congestion Problems in General Networks Presented by Jun Zou CAS 744.
Sliding window protocols:  Window: subset of consecutive frames  only frames in window can be sent.
Processes Management.
Addition 1’s to 20.
25 seconds left…...
Week 1.
We will resume in: 25 Minutes.
Network Operations & administration CS 4592 Lecture 15 Instructor: Ibrahim Tariq.
11-1 FRAMING The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. Our postal system practices a type.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2001 Chapter 16 Integrated Services Digital Network (ISDN)
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Flow and Error Control. Flow Control Flow control coordinates the amount of data that can be sent before receiving acknowledgement It is one of the most.
20101 The Data Link Layer Chapter Design Issues Controls communication between 2 machines directly connected by “wire”-like link Services Provided.
1 Reliable Data Transfer. 2 r Problem: Reliability  Want an abstraction of a reliable link even though packets can be corrupted or get lost r Solution:
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
11.1 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Wireless TCP Prasun Dewan Department of Computer Science University of North Carolina
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
3: Transport Layer 3a-1 8: Principles of Reliable Data Transfer Last Modified: 10/15/2015 7:04:07 PM Slides adapted from: J.F Kurose and K.W. Ross,
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
Cyclic Code. Linear Block Code Hamming Code is a Linear Block Code. Linear Block Code means that the codeword is generated by multiplying the message.
CSC 311 Chapter Eight FLOW CONTROL TECHNIQUES. CSC 311 Chapter Eight How do we manage the large amount of data on the network? How do we react to a damaged.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
CS 453 Computer Networks Lecture 9 Layer 2 – Data Link Layer.
TCP continued. Discussion – TCP Throughput TCP will most likely generate the saw tooth type of traffic. – A rough estimate is that the congestion window.
Failure detection The design of fault-tolerant systems will be easier if failures can be detected. Depends on the 1. System model, and 2. The type of failures.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
Building A Network: Cost Effective Resource Sharing
Data Link Layer. Data link layer The communication between two machines that can directly communicate with each other. Basic property – If bit A is sent.
Chi-Cheng Lin, Winona State University CS412 Introduction to Computer Networking & Telecommunication Data Link Layer Part II – Sliding Window Protocols.
1 The utopia protocol  Unrealistic assumptions: –processing time ignored –infinite buffer space available –simplex: data transmitted in one direction.
DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.
Computer Networking Lecture 16 – Reliable Transport.
Data Link Layer.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Data Link Layer Flow Control.
Introduction of Transport Protocols
CIS 321 Data Communications & Networking
Overview Jaringan Komputer (2)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Data Link Layer (cont’d)
CS4470 Computer Networking Protocols
Building A Network: Cost Effective Resource Sharing
Data Link Layer (cont’d)
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Selective Repeat.
Presentation transcript:

1 Data Link Protocols By Erik Reeber

2 Goals Use SPIN to model-check successively more complex protocols Using the protocols in Tannenbaums 3 rd Edition of Computer Networks Compare this approach to using other verification tools

3 Background Processes communicate using layers Each layer provides services to higher- level layers and ultimately to the user Physical Data Link Network … User Data A Layered Packet

4 Data Link Layer Sits between the physical and network layers For our purposes: provides non-lossy, error- free, and ordered communication for the network layer The physical layer will provide error-free communication, but packets may get lost.

5 Specification Safety: [] ! Bad_network_packet Liveness: [] (network_message_sent -> <> network_message_received) A packet is bad if it is not the packet expected

6 Problems with the Spec Ideally, requires an infinite queue to check Ideally, any packet can be sent. This can be implemented in SPIN with: packet new_packet; do :: (i if :: true-> new_packet.p[i]++ :: true-> skip fi :: else -> break od

7 Simplifications Use a finite queue, that loops around Use a packet size of 1, and pick between 0 and 1. 0,4,8 12,… 123 packet new_packet; if :: true-> new_packet.p[0]=0 :: true-> new_packet.p[0]=1 fi

8 Why OK? Finite-queue of k elements: not always ok (consider k=2, and drop 2). We must prove: [] ((network_sent – network_received) < k). Packet size 1: ok, since the physical layer can only lose packets. Any packet loss or reordering can be detected with just 1 bit.

9 Protocol 1 Assumes no packets are lost by the physical layer Assumes receiver infinitely fast sender() { packet buffer; frame s; do :: true -> A_from_network?to_sender(buffer); s.info.p=buffer.p; A_to_physical!to_physical(s) } receiver() { packet pack; frame r,s; do :: true -> B_wait_for_event?to_receiver(); B_from_physical_layer?to_receiver(r); pack.info.p = r.info.p; B_to_network!to_network(pack) }

10 Notes on Protocol 1 I use separate processes for the network, physical, and data-link processes (6 processes already!) Wire is multiple channel, all other communication is done with 0 width (synchronous) channels. Need to add a constraint to both properties: [] (num_packets_in_DLR < 2) With the constraint, both properties went through SPIN

11 Protocol 2 No longer assume infinite speed receiver Instead, receiver sends ack back to sender A B frame ack

12 Notes on Protocol 2 Up to 8 processes! Model-checker getting slow (liveness proof went 252,700 states deep) Never more than one message being dealt with at a time Both checks went through

13 Protocol 2_5 Tannenbaum mentions a simple extension to protocol 2 to make it handle dropped messages. Just set a timer on the sender, if the timer buzzes resend. Why doesnt that work? Safety proofs goes through if add the condition that the ack is never dropped

14 Protocol 3 Truly handle lost messages Add a one bit sequence number to the message and the ack. Also timeout as in 2_5. But how does one implement a timer in SPIN…

15 Timer Implementations Use the timeout keyword: Had problems with the timeout keyword sticking Use the scheduler: timer() { do :: timeout -> A_wait_for_event!to_sender(time_out) od } timer() { do :: true -> A_wait_for_event!to_sender(time_out) od }

16 More timer implementations Use non-determinism: timer() { do :: true -> do :: true -> skip :: true -> break od; A_wait_for_event!to_sender(time_out) od }

17 Notes on protocol 3 Proved liveness with the schedulers timer and safety under the timeout keyword. Looking for the right timer implementation Made a pretty and an ugly version of protocol 3. The ugly version gets rid of the physical senders

18 Protocol 4 Bidirectional 1-bit windowing protocol (only 1 bit ack) More efficient && symmetric Original implementation has 12 processes: my ugly version weans this down to 6 – and still does not make it through.

19 Notes on Protocol 4 I tried using various forms of compression, but never got a full search On the other hand, between my 5 implementations of protocol 4, SPIN caught a lot of errors.

20 3 More Protocols? There are three more data link protocols in Tannenbaums book. First n-bit windowing, then 1-bit sliding window, and finally the n-bit sliding window protocol Since Protocol 4 did not go through, …

21 Spin v. ACL2 ACL2 proof would work at a lower level: + ACL2 can handle more states - if the user can do the proof + SPIN has a better simulator: its tough to simulate this type of ACL2 code. (defun next_system_state (i system_state) (cond ((== i 0) (execute_A system_state)) (t (execute_B system_state))))... (thm (and (not (get-val bad_network_packet (init_state))) (implies (not (get-val bad_network_packet s)) (not (get-val bad_network_packet (next_system_state i s))))

22 Conclusions Model-checking complex protocols is hard SPIN is very good at helping users find bugs. The interactive simulator is useful. Try combining SPIN with theorem proving

23 Future Work Simplify the spec: Is there something simpler that will still distinguish ordering? Simplify the model: 6 processes are not really necessary. Implement a better timer Prove the network protocols in ACL2 or PVS for comparison