0% found this document useful (0 votes)
301 views13 pages

Chapter 6 EX

Uploaded by

ryuu.ducat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
301 views13 pages

Chapter 6 EX

Uploaded by

ryuu.ducat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Chapter 6

Exercises
Ion Turcanu: [email protected]

Mahdi Fotouhi: [email protected]

Note: the slides used in this course are adapted from the original slides
Computer Networking: A
created by Jim Kurose and Keith Rose:
https://gaia.cs.umass.edu/kurose_ross/ppt.htm
Top-Down Approach
7th edition
All material copyright 1996-2020 Jim Kurose, Keith Ross
J.F Kurose and K.W. Ross, All Rights Reserved Pearson/Addison Wesley, 2016
Introduction: 1-1
Error Detection and Correction: Two-Dimensional
Parity
Suppose that a packet’s payload consists of 10 eight-bit values (e.g., representing ten ASCII-encoded
characters) shown below. (Here, we have arranged the ten eight-bit values as five sixteen-bit
values):

Compute the two-dimensional parity bits for the 16


columns. Combine the bits into one string 00100011 01001010 0
00110110 00011011 0
01110010 01001000 0
01110100 10110111 0
11101011 00000110 0
11111000 10101000 0

The parity bits for the 16 columns is: 11111000 10101000

Introduction: 1-2
Error Detection and Correction: Two Dimensional
Parity
Suppose that a packet’s payload consists of 10 eight-bit values (e.g., representing ten ASCII-encoded
characters) shown below. (Here, we have arranged the ten eight-bit values as five sixteen-bit
values):

01101011 00001011 0
indicate the row and column with the flipped bit (format 11010011 00010001 1
as: x,y), assuming the top-left bit is 0,0 11100100 00001101 1
11100010 10000100 0
00001011 00010010 0
The bit that was flipped in figure 2 is (15,4):
10110101 10000000 0

Introduction: 1-3
Error Detection and Correction: Two-Dimensional
Parity
Suppose that a packet’s payload consists of 10 eight-bit values (e.g., representing ten ASCII-encoded
characters) shown below. (Here, we have arranged the ten eight-bit values as five sixteen-bit
values):

01111000 00010101 1
00101010 00101001 0
is it possible to detect and correct the bit flips? Yes or No 11000111 11010110 0
10011101 11010110 0
10010000 11101011 0
Yes, with 2D parity, you can detect and correct the single 10010000 11010111 1
flipped bit
Both the payload and parity bits are shown;
Either one or two of the bits have been
flipped.

Introduction: 1-4
Error Detection and Correction: Cyclic Redundancy
Check
Consider the Cyclic Redundancy Check (CRC) algorithm discussed in
Section 6.2.3 of the text.
Suppose that the 4-bit generator (G) is 1001, that the data payload (D) is
10011000 and that r = 3.
What are the CRC bits (R) associated with the data payload D, given that r = 3?

To compute the CRC, we begin by taking the value of D,


10011000, and multiplying it by 2^3, giving 10011000000. We
then divide this number by the generator bits [G] = 1001, using
modulo-2 arithmetic. The final remainder, R, after this division
are then the CRC bits. Here is that calculation
We've computed the remainder as R = 001 and the quotient n =
10001001. You should verify that n*G XOR R is indeed equal to
10011000000.

Introduction: 1-5
Error Detection and Correction: Cyclic Redundancy
Check
Consider the Cyclic Redundancy Check (CRC) algorithm discussed in
Section 6.2.3 of the text. Suppose that the 4-bit generator (G) is , that the
data payload (D) is 10011110 and that r = 3.

What are the CRC bits (R) associated with the data payload D, given that r = 3?

We've computed the remainder as R = 111 and the quotient n = 10001111. You
should verify that n*G XOR R is indeed equal to 10011110000.

Introduction: 1-6
Multiple Access Protocols: Collisions

Consider the figure below, which shows the arrival of 7 messages for
transmission at different multiple access wireless nodes at times
t = <0.3, 1.1, 1.9, 2.5, 3.4, 3.8, 4.6> and each transmission requires exactly
one time unit.

Suppose all nodes are implementing the Slotted Aloha protocol. For each message, indicate
the time at which each transmission begins.

The list of times for frame transmissions is: 1,2,2,3,4,4,5

Introduction: 1-7
Multiple Access Protocols: Collisions

Consider the figure below, which shows the arrival of 7 messages for
transmission at different multiple access wireless nodes at times
t = <0.3, 1.1, 1.9, 2.5, 3.4, 3.8, 4.6> and each transmission requires exactly
one time unit.

Suppose all nodes are implementing the Slotted Aloha protocol. For each message, indicate
the time at which each transmission begins.

The list of times for frame transmissions is: 1,2,2,3,4,4,5

Introduction: 1-8
Multiple Access Protocols: Collisions

Consider the figure below, which shows the arrival of 8 messages for
transmission at different multiple access wireless nodes at times
t = <0.5, 1.1, 2.6, 3.6, 3.7, 4.3, 4.5, 4.7> and each transmission requires
exactly one time unit.

Suppose all nodes are implementing the Aloha protocol. For each message,
indicate the time at which each transmission begins..

The list of times for frame transmissions is: 0.5,1.1,2.6,3.6,3.7,4.3,4.5,4.7

Introduction: 1-9
Multiple Access Protocols: Collisions

Consider the figure below, which shows the arrival of 8 messages for
transmission at different multiple access wireless nodes at times
t = <0.5, 1.1, 2.6, 3.6, 3.7, 4.3, 4.5, 4.7> and each transmission requires
exactly one time unit.

Which messages transmit successfully?

The list of successful frames is: 3

Introduction: 1-10
Random Access Protocols: Aloha
 Assume that there are 2 active nodes, each of which has an infinite supply of frames they want
to transmit, and these frames have a constant size of L bits. If two or more frames collide, then
all nodes will detect the collision.

There are two versions of the Aloha protocol: Slotted and Pure. In this problem we will be
looking at the efficiency of these two variations. In the case of Slotted Aloha, frames will be sent
only at the beginning of a time slot, frames take an entire time slot to send, and the clocks of all
nodes are synchronized.

 Given a probability of transmission p = 0.29, what is the maximum efficiency? Pure? Slotted?

PURE: The efficiency given p = 0.29 is: Np(1 - p)^2(N - 1) = 2 * 0.29 * (1 - 0.29)^2(2 - 1) = 0.29 or 29%
efficiency.

SLOTTED: The efficiency given p = 0.29 is: Np(1 - p)^ (N - 1) = 2 * 0.29 * (1 - 0.29)^ (2 - 1) = 0.41 or 41%
efficiency.

Introduction: 1-11
Learning Switches
 Consider the LAN below consisting of 10 computers
connected by two self-learning Ethernet switches. (You
may want to re-read section 6.4.3 in the text). At t=0
the switch table entries for both switches are empty.
At t = 1, 2, 3, 4, 5, 6, 7, 8, and 9, a source sends to a
destination as shown below, and the destination
replies immediately (well before the next time step).

At t=1, what two nodes communicated? Only K


At t=8, what two nodes communicated? Only F,G
At t=4, what two nodes communicated? Only C,I

At t=5, what two nodes communicated? Only I,K

*Do not be confused with the TTL, In this question, it's just the timeframe of the communication!
For example, if two records with the same time found on the tables, it means these two nodes were communicating at the same time! Introduction: 1-12
What is time-to-live (TTL) in networking?
 Time to live (TTL) refers to the amount of time or “hops” that a
packet is set to exist inside a network before being discarded by a
router.
 It decreases at each hop
 If TTL is ZERO, then it means it should get dropped

Introduction: 1-13

You might also like