### CS 455 - Introduction to Computer Networks Homework 5

Due date: see class webpage

• Question 1 (20 pts)

• Two nodes A and B use slotted Aloha to access a channel

We observed the interactions of the two nodes for a long time and found that:

 Node A transmits in 40% of the slots Node B transmits in 30% of the slots

Based on these observations, we will assume that:

 Node A transmits in a slot with probability 0.4 Node B transmits in a slot with probability 0.3

Questions:

• What is the probability that node A completes a transmission successfully in a slot ?

 ``` ```

• Let PA be the probability that node A completes a transmission successfully in a slot (= the answer in the previous question)

What is the probability that node A succeeds for the first time in slot 3 ?

 ``` ```

• What is the probability that node B completes a transmission successfully in a slot ?

 ``` ```

• What fraction of slots will contain successful transmission ?

 ``` ```

• Question 2 (20 pts)

• In an Aloha network, the arrival rate is 20 messages per sec

Messages have the same length and it takes 0.1 sec to transmit a message.

• What is the throughput if the Aloha network uses unslotted transmissions (10 pts)

 ``` ```

• What is the throughput if the Aloha network uses slotted transmissions (10 pts)

 ``` ```

• Question 3 (20 pts)

• The maximum network diameter in Ethernet is 2500 m (= meter).

I.e.:

 the distance between any two nodes on an Ethernet is at most 2500 m.

• The speed of electrical signals in copper is 2×108 m/sec.

Question:

• What is the maximum end-to-end propagation delay in Ethernet ? (10 pts)

(What is the maximum propagation delay from one end of the Ethernet to the other end)

 ``` ```

At time t = 0, an Ethernet host senses that the Ether channel is idle and transmits.

As you know, the Ethernet uses CSMS/CD and Ethernet hosts will sense the channel (while it is transmitting) for possible collision.

Question:

• After how many seconds of sensing can this Ethernet host be 100% certain that there will not be any collisions ?

I.e., when can it stop sensing (because it is sure there won't be a collision). (10 pts)

 ``` ```

• Question 4 (40 pts)

• (This question is adapted from Question 37 in the text book on page 164. --- from an old edition :))

Let A and B be two Ethernet hosts attempting to transmit on an Ethernet network. Each host has a steady queue of frames ready to send.

A's frames will be numbered as A1, A2 and so on, and B's frames will be numbered as B1, B2 and so on.

The backoff time unit T = 50 micro seconds.

Suppose A and B simultaneously (= at the same time) attempt to send frame 1 and the transmissions collide. Then A chooses backoff time 0×T (i.e., A picked the random number 0) and B chooses backoff time 1×T. So A wins the race and transmits its first frame A1 successfully (in the mean time, when B retries at time 1×T, B will sense A's transmission; so B will wait for A to finish its transmission.)

Fact:

• At the end of A's transmission, B will attempt to transmit frame B1 and A will attempt to transmit frame A2.

A and B's transmissions will collide and both nodes will backoff.

A will back off picking a backoff time from: T or T

B will back off picking a backoff time from: T, T, T or T

Each backoff time period is selected with same probability (= equally likely) each outcome is equally likely. In other words:

 A selects 0×T and 1×T each with probability 0.5 B selects 0×T, 1×T, 2×T and 3×T each with probability 0.25

Questions:

• Find the probability that A will win the second backoff race (10 pts)

 ``` ```

• Find the probability that here is a collision in the second backoff race (10 pts)

 ``` ```

Suppose A wins the second backoff race.

A will now attempt to transmit frame A3 while B is still attempting to transmit frame B1.

B will now pick a back-off time from 0×T, 1×T, 2×T, 3×TT, 5×T, 6×T, and 7×T - each outcome is equally likely.

Question:

• Find the probability than A wins the third backoff race (10 pts)

 ``` ```

• Find the probability that there is a collision (10 pts)

 ``` ```