Sei sulla pagina 1di 11

# CNT5106C Computer Networks, Summer 2010 Instructor: Prof.

Ahmed Helmy Homework #3 & 4 (this is worth the grade of 2 homeworks) On the Data link layer, MAC protocols and Wireless Networking Q1. (9 points: 3 x 3) MAC layer utilization For an Ethernet LAN (shared bus) the data rate was increased from 10Mbps to 100Mbps. I. How will the utilization (U) of this network change? [Calculate U for each case] II. Suggest two ways in which we can return the utilization to what it was before (Increasing or decreasing another parameter and by how much? Show your reasoning.) III. One person argued that increasing the number of stations attached to the LAN would reduce the idle time on the LAN and hence increase the utilization. Do you agree? A1: I. For Ethernet U=1/(1+5a), where a = Tprop/Ttrans. But Ttrans=#bits/data rate. Since the data rate was increased, so Ttrans is decreased (by a factor of 10), and hence a is increased by a factor of 10, and subsequently U is decreased. II. We can either increase the # of bits per frame by a factor of 10 (so that Ttrans would decrease by 10), or decrease the length of the Ethernet network/cable by a factor of 10 (so that Tprop would increase by 10), or a combination thereof (i.e., increase the # of bits by 5 and the length by 2, so on). III. No. Increasing the number of stations would increase the probability of collisions and so will bring the utilization down. Q2. (13 point: 3 + 10) I. Why do we need a medium access control (MAC) protocol? Shouldnt routing, queuing and flow control at the data link layer be sufficient? II. Mention ten MAC protocols and classify them according to their type (e.g., random access, etc.). Ans I. No. Because of collision on the shared medium due to multiple accesses from connected stations. Hence a coordination (or collision resolution, avoidance of detection) mechanism is needed. These functions are not performed by routing, queuing or flow control mechanisms. II. 1. Frequency division multiplexing (FDM), 2. time division multiplexing (TDM), 3.Random access which includes: a. Aloha, b. slotted Aloha, c. CSMA, d. CSMA/CD, e.CSMA/CA, and 4. Token based: a. token ring w/ release after transmission, b. token ring with release after reception, and c. polling based MAC. Q3. (6 points) Reason mathematically about the relationship between the utilization in Aloha and utilization in the slotted Aloha MAC protocols.

A3. Students need to write the formulas used in each of the schemes (depending on the collision probability). For Aloha, probability of collision exists anytime during the slot in which the frame is sent, and also if a frame is already in flight (i.e., that was sent during the previous time slot). P(success by given node) = P(node transmits) . P(no other node transmits in [t0-1,t0] . P(no other node transmits in [t0,t0+1] = p . (1-p)N-1 . (1-p)N-1 = p . (1-p)2(N-1) choosing optimum p and then letting n -> infty ... = 1/(2e) = .18 For slotted Aloha collision can only happen during the allocated slot for transmission (theres a pre-specified time for contention, after which stations are not allowed to transmit). Hence the collision probability goes down by half. P(success by given node) = P(node transmits) . P(no other node transmits during pre-specified time slot) = p . (1-p)N-1 choosing optimum p and then letting n -> infty ... = 1/(e) ~ .37 So the utilization is double that of Aloha. [Note, the students can get the relative ratio between the two without getting exact numbers and thats ok too] Q4. (6 points: 3 x 2) I. Which MAC protocol is used in switched (fast/Gigabit) Ethernet, and why? II. What is frame bursting in switched Ethernet and why is it used? A4. I. The MAC protocol used is still CSMA/CD although in switched Ethernet theres no contention for the shared medium (the switch operates to resolve contentions). The main reason CSMA/CD is used, is for backward compatibility and interoperability with previous (legacy) versions of Ethernet. That was one of the main reasons for the success of Ethernet. II. Frame bursting in switched Ethernet is to send multiple frames (as one burst) without checking for (or detecting) collision. Since there are no collisions, CSMA/CD would

unnecessarily wait for collision detection. Frame bursting raises the utilization of switched Ethernet by reducing idle time. Q5. (13 total points) I. (6 points) Derive an expression for the utilization of the token ring release-aftertransmission algorithm. Comment on your result showing the effect of the change of a on the utilization. II. (4 points) Compare this result to utilization of token ring (release after reception) and Ethernet. (You do not have to draw graphs to answer this question). III. (3 points) What is the difference between the 3 mechanisms (token ring release-aftertransmission, token ring release-after-reception, CSMA/CD) as the number of total stations increases in the network? A5. I. <6 points: 4 points for the derivation, 2 points for comments> For token ring release after transmission (RAT):

Utilization

## where E(Tn) = expected (average) duration of node transmission

So,

Comment: <2 points>As N increases there is less time wasted in propagating the token and utilization increases. As a increases the utilization decreases. (b) <4 points> For token ring release after reception (RAR):

For Ethernet (CSMA/CD): For the same a, we see the u RAT > u RAR > u CSMA/CD When a increases the utilization for all schemes drops, while at small a they exhibit somewhat similar utilization. III. For CSMA/CD the number of probable collisions increases with the increase in N (the number of attached stations). For token ring (release after reception), the number of stations sending per tokenpropagation around the ring increases, but so does the wait time (since each station would wait for its own transmission to be received), so the net result doesnt change the utilization. For token ring (release after transmission) the number of stations sending per tokenpropagation around the ring increases, so the wasted (idle) time decreases, which increases the overall utilization. (this also shows in the utilization formula). Q6. (8 points) I. (2 points) What is the exponential back off mechanism? II. (2 points) Mention two protocols that use such mechanism, one at the transport layer and another at the data link layer. III. (4 points) Discuss how the above two protocols use the exponential back off mechanism differently and why. A6. I. Exponential backoff is a timing mechanisms, that doubles the values (or range fro which the timer value is chosen) with every loss of packet or failure of trial. II. CSMA/CD and CSMA/CA use exponential backoff timers after collisions (they double the interval from which the timer value is chosen randomly), and TCP retransmission timeout is doubled every time the transmission is lost (for the same segment). III. At the data link layer, the timers are used to resolve (and avoid future) collisions on the same LAN (in which the delays are quite small). Hence, the backoff is not doubled exactly for each station (this would lead to deterministic collisions). Rather, the range of values from which a random timer value is chosen is doubled (to reduce the probability of future collisions for the same transmissions). For TCP, the backoff timers are not used to resolve collisions, it is rather providing the network time to recover from congestion and drain its buffers. Also, the timers depend on RTT estimates that are end-to-end and vary from one flow to another. So the timer values an be directly doubled.