an implementation for alternating bit protocol (abpelise/courses/cs6800/abp-presentation.pdf ·...

17
AN IMPLEMENTATION FOR ALTERNATING BIT PROTOCOL (ABP) AS AN APPLICATION OF THEORY IN NETWORKING Hussein Salim Qasim Lawrence J Kalisz, Jr.

Upload: others

Post on 20-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

AN IMPLEMENTATION FOR ALTERNATING BIT PROTOCOL (ABP) AS AN APPLICATION OF THEORY IN NETWORKING Hussein Salim Qasim Lawrence J Kalisz, Jr.

Page 2: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

Introduction

To make this possible and suitable for real word need to solve this three main problems:

Error control: messages may be lost, corrupted, or reordered. Flow control: delay may happen in message pressing from receiver host side.

Bandwidth limitation: the limitation on speed in transmitted data in the network. If data are sent faster than transmitted they will lose.

The network job is to provide an efficient and reliable communication channel between network elements eg. (hosts).

Q) What is network job? And what is network three main problems? And how you can solve it?

Page 3: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

To solve this problem required to use one or more communication protocol, i.e., using acknowledgments In this project we will describe and show the application of theory foundation in area of networking.Such application of theory foundation in area of networking is Alternating Bit Protocol (ABP).

Page 4: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

ObjectiveDesign a ABP simulation that meet project proposal and design.

The simulation works precisely and produces accurate results.

Simulation is easy to use.

Page 5: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

GoalThe goal of this phase is to show that the project is working as the specification and meet requirement.

Page 6: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

Alternative Bit Protocol (ABP)ABP is a simple data link layer (layer 3) protocol that retransmits lost or corrupted messages by only add a single control bit to each data message and to each ACK.• Each process (A or B) maintains a control bit called the alternating bit• every message sent by a process contains the current value of its alternating bit.

The message sequence numbers simply alternate between 0 and 1 with each transmission.

Page 7: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

•Flip the bit from receiver before sending ACK.•The message that acknowledges the receipt of D0 will be ACK1.•The next sender will be D1

ABP case of straightforward (a)

a. The straightforward case of ABP [1]

ABP case of straightforward (a)

Q) Describe ABP case of straightforward

Page 8: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

ABP Case of delayed message (b)• The second ACK1 is simply discarded as redundant since the sender already knows that D0 was received.• The sender will timeout waiting to get an ACK0 (acknowledging receipt of D1), so it will (correctly) resend D1. • This mechanism allow receiver to detect duplicate messages.• the second copy will simply be discarded

ABP handling Case of delayed message (b)

b. show that the second ACK1 simply discarded as redundant since the sender already knows that D0 was received) [1]Q) Describe ABP case of delayed message

Page 9: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

Sender Receiver

Sender and Receiver models for the Alternative Bit Protocol [1](as we can see in this models both sender and receiver start state with waiting)

Page 10: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

Time-Out MechanismAccording to [3] a standard time-out mechanism and retransmission of messages given by Lynch in [4] are suggested as a method for recovering from loss of messages.Process A retransmits the message which it has sent most recently if it does not receive any message from B within a given time-out interval after it sends a message.Time-out interval must be sufficiently large in order to avoid messages in opposite directions from “crossing” on the line.

Page 11: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

Safety and Liveness Properties assumptions

Processes A and B do not halt, if a message is sent by a process, then eventually one of the following occurs: • the message is delivered without corruption.• the message is delivered but corrupted.• the message is lost.

If process (A or B) sends messages infinitely often, then process (B or A) receives uncorrupted messages infinitely often.

The alternative bit protocol possesses the following safety and liveness properties under assumptions:

Page 12: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

Safety and Liveness property for ABP Safety property: • The sender ensures that the data with the correct sequence number is sent to the receiver even though, the data is lost in the channel.• The receiver ensures that an ack is sent to the sender even if the sent ack is lost in the channel, and the receiver never delivers two odd packets (the packets with sequence numbers 1and1) without an intervening even packet (packet with sequence number 0).

Liveness property: • Any data item given to process (A or B) is eventually output to (B or A) (the protocol terminates correctly).

Q) What is Safety and Liveness property for ABP?

Page 13: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

Simulation The ABP simulation will simulate both an application layer (layer 5) and a network layer (layer 3) that transport protocol must interact with.The simulation will simulate sending messages (packet) from side A and the receiving messages from side B using unidirectional transfer channel. B side will ultimately have to send packets to A to acknowledge receipt of message.

simulation general structureL3

Page 14: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

Input • the number of messages = any integer number•packet loss probability = 0.0 if no loss or any real number such as 0.1.•packet corruption probability = 0.0 if no corruption or any real number such as 0.1.•average time between messages = integer number.•window size =1.

show A sent packet to B.started A timer.

seq#.

ack #.simulator terminated time.

Simulation

Page 15: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

ConclusionsAlternative Bit Protocol (ABP) has a limitation.

• It does not solve all error control problems, such as it does not address the problem of messages that are received but corrupted.• It also won’t work if the message that deliver after long time of delay.

ABP has throughput as a practical protocol.

Page 16: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

References■ [1] E. Rich, Automata, computability and complexity: theory and applications. Upper Saddle River, NJ: Pearson Prentice Hall, 2008. ■ [2] Automata, Computability and Complexity: Theory & Applications,” Automata, Computability and Complexity: Theory & Applications. [Online]. Available at: http://www.theoryandapplications.org/. [Accessed: 20-Feb-2016].■ [3] K. A. Bartlett, R. A. Scantlebury, and P. T. Wilkinson, “A note on reliable full-duplex transmission over half-duplex links,” Commun. ACM, vol. 12, no. 5, pp. 260-261, May 1969■ [4] W. C. Lynch, “Reliable full-duplex file transmission over halfduplex telephone lines,” Commun. ACM, vol. 11, no. 6, pp. 407-410, June 1968.■ [5] I. Suzuki, "Formal analysis of the alternating bit protocol by temporal Petri nets," in IEEE Transactions on Software Engineering, vol. 16, no. 11, pp. 1273-1281, Nov 1990. doi: 10.1109/32.60315■ URL: http://ieeexplore.ieee.org.libproxy.library.wmich.edu/stamp/stamp.jsp?tp=&arnumber=60315&isnumber=2192■ [6] K. J. Gildea and M. S. Krishnamoorthy, "Modular Protocol Nets: The Alternating Bit Protocol Example," Computer Integrated Manufacturing, 1992., Proceedings of the Third International Conference on, 1992, pp. 86-95.doi: 10.1109/CIM.1992.638998 URL: http://ieeexplore.ieee.org.libproxy.library.wmich.edu/stamp/stamp.jsp?tp=&arnumber=638998&isnumber=13874■ [7] Berthomieu, B., Diaz, M., “Modeling slid Verification of Time Dependent Systems Using Time Petri Nets,” IEEE Transactions on Software Engineering, March 1991.

Page 17: An Implementation for Alternating Bit Protocol (ABPelise/courses/cs6800/ABP-Presentation.pdf · Microsoft PowerPoint - An Implementation for Alternating Bit Protocol (ABP.pptx Author:

Questions Q1) What is network job? And what is network three main problems? And how you can solve it?Q2) Describe ABP case of straightforward.Q3) Describe ABP case of delayed message.Q4) What is Safety and Liveness property for ABP?