Key Assignment 1
October 9, 2022 | Author: Anonymous | Category: N/A
Short Description
Download Key Assignment 1...
Description
Problem 1
Consider an CSMA/CA 802.11 WLAN with three stations: A, B, and C. Node B is the access point and is in full wireless contact with both A and C. The following are the app ap pro rop priat iate parameter valu luees for for this WLAN (note: artificial values are used for the WLAN par parameter ameterss to simplify your ca calculat lculations ions) Timee slot = 1, DIFS = 3, SIFS = 1 Tim Length of RTS, CTS, or ACK = 1 Initial backof backofff range for for a frame is [0,7] [0,7]
At time t= 0, the application layer of station A generated data to be transmitted as a frame of length 10 destined to B. At that same time (t=0), the application layer of station C generated data to be transmitted as a frame of length 10 destined to B. Before transmitting a frame, both node A and node C must wait for DIFS, followed by a random back ran ackoff peri eriod. The hidden node pro rob blem does not exist in this WLAN. Note: Clearl arly indicate the back cko off random counter selected by ea eacch node and give time charts supporting your answer. Consider all possible scenarios that give the correct solution.
Problem 1 (continued) Problem a) Assume the R RTS/CTS TS/CTS mechanism is not used in this WLAN. What is the maximum time T at which both data frames are successfully received and acknowledged by node B without any collision? What is the probability that this maximum time occurs? b) Assume Assume the RTS/CTS mechanism is used in this WLAN. What is the earliest time T at which both data frames are successfully su ccessfully received and acknowledged by node B after exactly one collision? What is the probability that this earliest time is achieved? Assume that after collision, the DIFS idle period overlaps with SIFS.
Probl oblem em 1 Part Part a - So Solu luti tion on Pr t=25 rc = 0
t=21 rc= 1
t=3 ra = 6 rc = 7
ACK
ACK
3
9
19
SIFS
DIFS + 6
t=3 ra = 0 rc = 7
21
t=15 rc= 7
25
35
DIFS +1
t=25 rc = 0
ACK
ACK
DIFS
3
37
13SIFS 15
DIFS +7
25
35
37
Scenario 1 rc=7, ra= 6 →
time
Scenario 7 rc=7, ra=0 →
time
Maximum time Maximum time is achie achieved ved by ch choosi oosing ng the lar largest gest ba backof ckofff value fo forr ra (or for rc). There are 14 scenarios: Scenarios 1-7 → rc =7 an and d ra = 6, 5, 4, 3, 2 ,1 ,1,, 0 Scenarios 8-14
→
ra =7 an and d rc = 6, 5, 4, 3, 2 ,1 ,1,, 0
Maximum finish time = 37 Probability {T {Time ime = 37}
= 14 × (1/8) × (1/8) = = 14/64 7/32 = 0.2187
Problem 1 Part b-Solution Scen Sc enar ario io 1: ra =0 =0,, rc rc=0 =0 th then en ra =0 =0,, rc rc=1 =1 t=3 ra = 0 rc = 0
t=7 ra = 0 rc = 1 RTS
RTS
DIFS
DIFS
3
t=23 rc = 1 ACK
CTS
SIFS
7
9
11
t=27 rc = 0 RTS
ACK
CTS
DIFS +1
21
23
27
29
31
41
43
→
time
b) Earliest time is achieved by choosing the fastest time t ime for the collision (i.e., ra=rc=0)) then choosi ra=rc=0 choosing ng the sm smallest allest va values lues o off ra and rc after coll collision ision such that ra ≠ rc. There are two scenarios: Scenario 1: ra =0, rc=0 to get collis collision ion then ra=0, rc=1 Scenario 2: ra =0, rc=0 to get collis collision ion then ra=1, rc=0
Finish Time = 43 Probability {Scenario 1}
= = Probability {Scenario 2 } = Probability {Time {Time =43 with one
Prob {ra=0 & rc=0 then ra=1 & rc=0 } (1/8) × (1/8) × (1/16) × (1/16) = 1/2^14 1/2^14 collision} = 2 /2^14 = 1/8192 = 0.00012
Problem 2 Consider a Home LAN router equipped with a shared medium Ethernet hub and a WiF iFii acce access ss po poin int. t. Assu Assume me the the fo foll llow owin ing g appr approx oxim imat atee para parame mete terr va valu lues es WiFi slot time = 1, DIFS = 3, SIFS = WiFi AC ACK= 1, CWmin = 7 Ethernet slot time = 5, Ethernet IFG = 1 Et Eth her ern net coll collis isio ion n de dete tect ctio ion n per erio iod d plus lus jam jam sign ignal = 1 // Note: the collision detection period is the length of the partially aborted frame. Two laptops A and B are served by the WiFi LAN and two workstations C and D are served by the Ethernet LAN. At time t=0, the application layer of each of laptop A, workstation C and workstation D generated data to be transmitted as a single frame of length 5, 6, 20, respectively. Note that a node in WiFi must wait for DIFS idle period from t=0 to t=3 while a node in Ethernet must wait for IFG idle period from t=0 to t=1. At time t = 4, the application layer of laptop B generated data to be transmitted as a fra frame of length 10.
Probl Problem em 2 (continued) Denote the finish time of the four frames by Ta , Tb, Tc , Td , where the laptop finish time Ta or Tb is the time when the corresponding WiFi frame is successfully awchkennow tim mne. thleedcgoerdrebsypoth nediancgceEstshp eroninett afn radmth e eiswcoorkmstpalteitoenlyfitnriasnhsm itteedTcwoirthTodutisctohlelistiio Define the overall finish time Tfin to be Tfin = Max { Ta , Tb, Tc , Td }. a) What is the the earl rliiest overall all finish ish time, i.e i.e., the smalles estt value of Tfin? b) What is the probability that the earliest overall finish time computed in part a is actual act ually ly ach achiev ieved? ed? Note: the lengths of the two WiFi frames are 5 and 10 units of time and the lengths of the two Ethernet frames are 6 and 20 of the same units of time. Do not multiply the length of Ethernet fram ames es by 5.
Probl oblem em 2 - So Solu luti tion on Pr Ethernet Frames rc=0 rd=1 Col+jam
IFG
IFG
0 1
2
3
IFG
9
Scenario 1
10
30
→
Minimum time = 30
rc=0 rd=1 Col+jam
IFG
0 1
IFG
2
time
3
IFG
23
Scenario 2
24
30
→
time
The minimum finish finish time has one collision an and d is achieved in two scenarios as shown above. Prob{Time=30} Prob{T ime=30} = Prob{rc=0 & rd=1 OR rc=1 & rd=0} = 0.5×0.5 + 0.5×0.5 = 1/2 = 0.5 = 50%
The Ethernet Ethernet LAN and WiFi LAN are independent. The mini minimum mum finish time Tfin will bel belong ong to Ether Ethernet net becau because se of its long fram frames. es. Tfin= 30 For the WiFi LAN, we need to find the scenarios in which the finish time is less than or equal to 30.
Probl oblem em 2 - So Solu luti tion on Pr There are many WiFi scenarios in which the finish time is less than or equal to 30. 3 0. The solution is based on the assumption that laptop B will start measuring its DIFS idle time at time t=4 and therefore cannot start transmission until time t=6 (when rb=0). Six Scenarios with ra=0 rb=0
ra=0
ACK
DIFS
3
DIFS
SIFS
8
Scenario : ra=0, rb=0 Finish time =25
ACK
9
13
23
25
→
time
ra=0 and and rb = 0, 1, 1, 2, 3, 4, 4, or 5. 5. : Note: the two scenarios ra=0 and rb=6 or 7 give finish time > 30. Five Scenarios with ra=1 ra=1
rb=0
ACK
DIFS + 1
4
SIFS
9
10
ra=1 and and rb = 0, 1, 2, 3, or or 4.
ACK
DIFS
14
24
Scenario : ra=1, rb=0 Finish time =26
26
:
Note: the three scenarios ra=1 and rb=5, 6 or 7 give finish time > 30.
→
time
Probl oblem em 2 - So Solu luti tion on Pr Four Scenarios with ra=2 ra=2
rb=0 ACK
DIFS + 2
5
ACK
DIFS
SIFS
10
11
Example Scenario ra=2, rb=0 Finish time =27
15
25
→
27
time
ra=2 and and rb = 0, 1, 2, or 3. : Note: the the scenarios scenarios ra=2 and rb > 3 give finish ti time me > 30. Example Scenario ra=3, rb=1 Finish time =29
Three Scenarios with ra=3 ra=3
rb=1 ACK
DIFS + 3
6
SIFS
11
12
ACK
DIFS+1
17
ra=3 and rb rb = 0, 1 or 2. : Note: the the scenarios scenarios ra=3 and rb > 2 give finish ti time me > 30.
27
29
→
time
Probl oblem em 2 - So Solu luti tion on Pr Single Scenario ra=4, rb=1 Finish time =30
One Scenarios with ra=4 and rb =2 ra=4 rb=1
rb=1 ACK
DIFS + 4
7
SIFS
12
ACK
DIFS+1
13
18
28
30
→
time
ra=4 and ra=4 and rb = 1. 1. : Note: the scenario ra= 4 and rb=0 causes collision collision and the scenarios ra=4 and rb > 1 give finish time > 30. Single Scenario ra=5, rb=0 Finish time =30
One Scenarios with ra=5 and rb =0 ra=5
rb=0
ra=1 ACK
DIFS + 4
7
SIFS
17
18
ACK
DIFS+1
23
ra=5 and ra=5 and rb = 0. 0. : Note: the scenario ra= 5 and rb=0 give finish time > 30.
28
30
→
time
Probl oblem em 2 - So Solu luti tion on Pr Earliest Earlie st finish finish ti time me Tfin =30
Ethernet LAN There are only two Ethernet Scenarios with Tfin = 30. All other scenarios hav havee larger finish time. Probability{Ethernet finish time = 30} = 0.5
WiFi LAN There are 20 scenarios with finish fi nish time less than or equal 30. Probability{W Probability{ WiFi finis finish h time ≤ 30} = 20 * (1/8)*(1/8) = 20/64 = 0.3125
The two LANs are independent. Probability {minimum {minimum finish Tfin = * 30} 0.5 Ethernet 0.1325 = time = 0.156 = 15.6%
WiFi
Problem 3 Consider a shared-medium Ethernet hub (repeater) with two active nodes, A and B. At time t= 0, the application layer of station A generated data to be transmitted as two frames. At the same time (t=0), the application layer of station B generated data to be transmitted as three frames. The length of each of the five frames is 3 units of time (a unit of time is one Ethernet slot time). The network managed to transmit all five frames by time Tfin, i.e., Tfin is the time when the last bit of the last frame was successfully transmitted. For simplicity, ignore the length of the inter-frame gap and assume that each collision wastes a total of one unit of time (including the collision detection perio riod, the jam signa nall, and the inter-f -frrame gap before and after collisio sion) n).. a) What is the minimum possible value of Tfin? What is the probability that this minimum value is achieved? Show the details of your work. b) Repeat part (a) assuming that the length of each frame is 1 unit of time.
Pr Probl oblem em 3 Part Part a - So Solu luti tion on ra1=0 rb1=1
ra2=0 rb1=1 or 2 or 3
Collision
Collision
0 1
4
5
8
11
14
17
→
time
Minimum time = 17 The minimum number of collisions is two and is achieved in one situation: the two t wo frames from A are transmitted t ransmitted first. Frame Fa1 is transmitted transmitted first after colliding colliding with frame Fb1. In the second collis collision ion for frame Fb1 at t=4, the new frame Fa2 sselects elects ra2 =0 and frame Fb Fb1 1 selects rb1= 1 or 2, or 3. Prob{Time=17} Prob{T ime=17} = Prob{ra1=0 & rb1=1 AND ra2=0 & rb1=1, 2, 3 } = 0.5×0.5× 0.5× (3/4)
= 3/32 = 0.0937 = 9.37%
hree collisions. Note: any other scenario will produce at least tthree
Pr Probl oblem em 3 Part Part b - Sol Solut utio ion n ra1=0 rb1=1
ra2=0 rb1=1
Collision
Collision
0
1
2
3
ra1=1 rb1=0
ra1=2 rb2=0
Collision
Collision
1
4
2
5
Scenario 1
6
7
→
time
Minimum time = 7
0
3
4
5
Scenario 2
6
7
→
time
The minimum number of collisions is two and is achieved in two scenarios: the two frames from A are transmitted first or the three frames from B are transmitted first. Scenario 1: Frame Fa1 is transmitted transmitted first after colliding with frame Fb1. In th thee second collision for frame Fb1 at t=2, the new frame Fa2 selects ra2 =0 and frame Fb1 selects rb1= 1 but not 2 or 3 to minimize the finish time. Scenario 2: Frame Fb1 at is t=2, transm transmitted after colliding frame th thee selects second collision for frame Fa1 theitted newfirst frame Fb2 selects with rb2 =0 and Fa1. frameInFa1 ra1= 2 to wake up at time t= 5 immediately after the transmission of frame Fb3.
Prob{Time= Prob{T ime= 7} =
Prob{ra1=0 & rb1=1 rb1=1 AND ra2=0 & rb1=1 // scenario 1 }
+ Prob{ra1=1 & rb1=0 AND ra1=2 & rb2= 0 // scenario 2 } = 0.5×0.5× 0.5× (1/4) + 0.5×0.5× 0.5× (1/4) = 2/32 = 0.0625 = 6.25%
View more...
Comments