binary exponential backoff binary exponential backoff refers to a collision resolution mechanism...

19
Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is used in Ethernet (IEEE 802.3) wired LANs. In Ethernet networks, this algorithm is commonly used to schedule retransmissions after collisions. Author Phani Swathi Chitta Mentor Prof. Saravanan Vijayakumaran Course Name: Computer Networks Level : UG

Upload: anissa-greene

Post on 11-Jan-2016

232 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Binary Exponential BackoffBinary exponential backoff refers to a collision

resolution mechanism used in random access MAC protocols. This algorithm is used in Ethernet (IEEE 802.3) wired LANs. In Ethernet networks, this algorithm is commonly used to schedule retransmissions after collisions.

AuthorPhani Swathi Chitta

MentorProf. Saravanan Vijayakumaran

Course Name: Computer Networks Level : UG

Page 2: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Learning ObjectivesAfter interacting with this Learning Object, the learner will be able to:• Explain how the binary exponential backoff algorithm works

Page 3: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Definitions of the components/Keywords:

5

3

2

4

1• Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is used in Ethernet (IEEE 802.3) wired LANs.

• In Ethernet networks, this algorithm is commonly used to schedule retransmissions after collisions.

• After a collision, time is divided into discrete slots whose length is equal to 2τ, where τ is the maximum propagation delay in the network. •The reason for this choice is that 2 τ is the minimum amount of time a source needs to listen to the channel to always detect a collision.

• The stations involved in the collision randomly pick an integer from the set {0,1}. This set is called the contention window. If the sources collide again because they picked the same integer, the contention window size is doubled and it becomes {0,1,2,3}. Now the sources involved in the second collision randomly pick an integer from the set {0,1,2,3} and wait that number of slot times before trying again. Before they try to transmit, they listen to the channel and transmit only if the channel is idle. This causes the source which picked the smallest integer in the contention window to succeed in transmitting its frame.

Page 4: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Definitions of the components/Keywords:

5

3

2

4

1 • In general, after collisions, a random number between 0 and is chosen.

• After a station detects collision, it aborts its transmission in the slot duration itself in which it started transmitting.

•In Ethernet, the doubling of the contention window stops after 10 collisions and the contention window remains {0,1,...,1023}.

• After 16 collisions , the process is aborted and the source stops trying.

Page 5: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Master Layout 1

5

3

2

4

1

Source S1

Source S2

Part 1 – Collision with two sourcesPart 2 – Collision with three sources

Assuming two sources are involved in collision

Time

Time

Place a drop down box to choose number of sources 2 and 3

Page 6: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Step 1: 1

5

3

2

4Instruction for the animator Text to be displayed in the working area (DT)

• The figure in master layout should appear first

• The first statement in DT should appear

• Next the numbers 0 and 1 in braces should appear along with the second sentence in DT

• Assume first collision took place,

• The initial contention window for two sources is {0, 1}

Source S1

Source S2

Time

Time

C W: {0, 1}

CW: {0, 1}

Page 7: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Step 2: 1

5

3

2

4Instruction for the animator Text to be displayed in the working area (DT)

• With the first sentence in DT, the time line should be divided.

• Next the two sentences in DT should appear

• After a collision, time is divided into discrete slots.

• Frame length is much larger than the slot size.

• A single slot is sufficient to detect a collision.

Source S1

Source S2

Time

Time

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

CW :{0,1}

CW: {0,1}

Page 8: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Step 3: 1

5

3

2

4Instruction for the animator Text to be displayed in the working area (DT)

• The first sentence appears first

• With the second sentence in DT, the blue lines should blink and the red lines at S1 should appear

• The third and fourth lines should appear and then the red lines at S2 should appear

• Ideal case that S1 and S2 picks different slots randomly for the transmission of the frame.

• Suppose S1 picks 0 and S2 picks 1, S1 starts sending the frame in slot 0 S2 should start sending the frame in slot 1 but it hears the channel is busy and waits till the channel is free.

Source S1

Source S2

Time

Time

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

CW :{0,1}

CW :{0,1}

Page 9: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Step 4: 1

5

3

2

4Instruction for the animator Text to be displayed in the working area (DT)

• The first sentence in DT should appear first

• Now the numbers at the time line should move right and the first zero should disable

• Then the blue lines should blink

• After that with the second line in DT, the numbers in the braces should appear

• Suppose S1 and S2 picks the same slot number 0 to transmit the frame, they collide again.

• After second collision, the contention window changes to {0,1,2,3}

Source S1

Source S2

Time

Time

0 0 1 2 3 4 5 6 7

0 0 1 2 3 4 5 6 7

CW: {0,1,2,3}

CW: {0,1,2,3}

Collision occurs

Page 10: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Step 5: 1

5

3

2

4Instruction for the animator Text to be displayed in the working area (DT)

• The first sentence in DT should appear first

• Now the numbers at the time line should move right and the first two zeros should disable

• Then the blue lines should blink

• After that with the second line in DT, the numbers in the braces should appear

• Then the third line should appear

• Suppose S1 and S2 picks the same slot number 2 to transmit the frame, they collide again.

• After third collision, the contention window changes to {0,1,2,3,4,5,6,7}

• After 16 such attempts of transmission, the process is aborted.

Source S1

Source S2

Time

Time

0 0 0 1 2 3 4 5 6

0 0 0 1 2 3 4 5 6

CW: {0,1,2,3,4,5,6,7}

CW: {0,1,2,3,4,5,6,7}

Collision occurs

Page 11: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Master Layout 2

5

3

2

4

1

Source S1

Source S2

Part 1 – Collision with two sourcesPart 2 – Collision with three sources

Assuming three sources are involved in collision

Time

Time

Source S3 Time

Page 12: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Step 1: 1

5

3

2

4Instruction for the animator Text to be displayed in the working area (DT)

• The figure in master layout should appear first

• The first statement in DT should appear

• Next the numbers 0 and 1 in braces should appear along with the second sentence in DT

• Assume first collision took place,

• The initial contention window for three sources is {0, 1}

Source S1

Source S2

Time

Time

Source S3 Time

CW: {0,1}

CW: {0,1}

CW: {0,1}

Page 13: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Step 2: 1

5

3

2

4Instruction for the animator Text to be displayed in the working area (DT)

• With the first sentence in DT, the time line should be divided.

• Next the two sentences in DT should appear

• After a collision, time is divided into discrete slots.

• Frame length is much larger than the slot size.

• A single slot is sufficient to detect a collision.

Source S1

Source S2

Time

Time

Source S3 Time

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

CW: {0,1}

CW: {0,1}

CW: {0,1}

Page 14: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Step 3: 1

5

3

2

4Instruction for the animator Text to be displayed in the working area (DT)

• The first sentence in DT should appear first

• Then the blue lines should blink

• After that with the second line in DT, the numbers in the braces should appear

• After that the third sentence should appear

• Suppose S1 and S2 picks the same slot number 0 to transmit the frame and S3 picks 1, then S1 and S2 collide again.

• After second collision, the contention window changes to {0,1,2,3}

• The contention window of S3 remains same.

Source S1

Source S2

Time

Time

Source S3 Time

CW: {0,1,2,3}

CW: {0,1,2,3}

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

0 1 2 3 4 5 6 7 8

CW: {0,1}

Page 15: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Step 4: 1

5

3

2

4Instruction for the animator Text to be displayed in the working area (DT)

• The first sentence in DT should appear first

• Then the blue lines should blink

• After that with the second line in DT, the numbers in the braces should appear

• After that with the third line in DT, the numbers in the braces should appear

• Suppose S1 picks slot number 0 to transmit the frame after second collision and S3 picks 1 after first collision and S2 picks 3 after second collision, then S1 and S3 collide again.

• After third collision, the contention window of S1 changes to {0,1,2,3,4,5,6,7}

• After second collision, the contention window of S3 changes to {0,1,2,3}

Source S1

Source S2

Time

Time

Source S3 Time

CW: {0,1,2,3,4,5,6,7}

CW: {0,1,2,3}

0 0 1 2 3 4 5 6 7

0 0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7 8

CW: {0,1,2,3}

Page 16: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Introduction

Credits

16

Definitions Test your understanding (questionnaire) Lets Sum up (summary) Want to know more…

(Further Reading)

Try it yourself

Interactivity:

Analogy

Slide 1

Slide 3

Slide 17

Slide 19

Slide 18

Electrical Engineering

• Place a dropdown box for each source

• Place a dropdown box to select the slot number

• The range of the slot number is 0 to 7

• Place a dropdown box to select the contention window

•The range of the contention window is {0,1}, {0,1,2,3}, {0,1,2,3,4,5,6,7}

Source S2

Time

Time

Source S3 Time

{0, 1}

{0, 1}

{0, 1}

Source S1

Source S4 Time

{0, 1}

Page 17: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Questionnaire1. After how many collisions will the process be aborted?

Answers: a) b) 16 c) 20 d)

2. If a 5th collision occurs, the contention window is

Answers: a) 35 b) 0,1 c) 0 to 35 d) 0 to 5

3. If a 12th collision occurs, the contention window is

Answers: a) 4095 b) 0 to 4095 c) 1023

d) 0 to 1023

The answers are given in red

1

5

2

4

3

Page 18: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Links for further reading

Reference websites:

http://en.wikipedia.org/wiki/Exponential_backoff

Books:

Computer Networks – Andrew S Tanenbaum, fourth edition, Prentice Hall

Research papers:

Page 19: Binary Exponential Backoff Binary exponential backoff refers to a collision resolution mechanism used in random access MAC protocols. This algorithm is

Summary• Binary exponential backoff refers to a collision resolution mechanism

used in random access MAC protocols. This algorithm is used in Ethernet (IEEE 802.3) wired LANs.

• In Ethernet networks, this algorithm is commonly used to schedule retransmissions after collisions.

• After a collision, time is divided into discrete slots whose length is equal to 2τ, where τ is the time taken by the frame to reach other end.

• In general, after collisions, a random number between 0 and

is chosen