=========================preview======================
(ELEC315)mid03_sol.pdf
Back to ELEC315 Login to download
======================================================
1. (a) Since initially the table in switch 1 is empty, so it will send copies to all the output except the port where the packet comes from. So 3 copies. (3)
(b) Since after part a, switch 1 has no idea of the position of C, so it will just send 2 copy to switch 3. (3)
(c) Since after part a, switch 3 has also known the position of A, so it will just send one copy to switch 1. (4)

2. (a) efficiency=

Here tprop=distance/speed and ttrans=length of packet/capacity
Substituting all the data, we get efficiency=86.96% (5)
(b) If we increase the capacity to 10Mbps, that is, 10/3 of the original one. In order to keep the efficiency unchanged, the length of the packet should be also 10/3 of the original one, e.g. 1666bits. (5)

3. (a) A will choose from[0,1]
B will choose from [0,1]
C will choose from [0,1,2,3]
P(no collision)=[A=0,B=1,C=2]+ [A=0,B=1,C=3]+ [A=1,B=0,C=2]+ [A=1,B=0,C=3]=1/4
So p(collision)=1-1/4=3/4 (5)
(b)next transmission is from C means the time slot C chooses should be in front of A and B, or be equal to A or B, so the transmission from C can be either successful or not .
so P=[0,0,0]+[0,1,0]+[1,0,0]+[1,1,0]+[1,1,1]=5/16. (not sure)
4.
a) Two packets sent, both ACK are received.(5 points)



transmitter







receiver



(1) (2) (3) (4)

(1) Initial state, both Ws and Wr are at 0,1,2 & 3.
0A

1B

2D

3C

4F

5E

6D

7E

0A

1C

2F

3D

4H

5E

6H

7C











(2) Packet 0 is correctly transmitted and received by the receiver, Wr advance by 1 (1,2,3 & 4) and ACK 0 sent to the transmitter.
(3) Since ACK 0 is received, Ws advance by 1(1,2,3&4). Packet 1 is correctly transmitted and received by the receiver, Wr advance by 1 (2,3,4 & 5) and ACK 1 sent to the transmitter.
(4) That ACK 1 received by transmitter, Ws advance by 1 (2,3,4 & 5).

(b) No acknowledgement will be sent back. Because accumulative ACK is used, the receiver discard out-of-order packet. If ACKn is received, the all the package with a sequence number up to and including n have been correctly received at the receiver. For example, if receiver receive ACK 1, the receive will assume that the packet 0 and packet 1 are received correctly.(5 points)

5. Translating the decimal to binary, we can get: for port 1, 255=11111111
for port 2, 248=11111000
for port 3, 255=11111111
for port 4, 128=10000000
(a)
251=11111011, doesnt match any of the above, so goes to port 5. (5)


(b)
254=11111110, goes to port 3. (5)




6. (a) efficiency = Packet Transmission Time / Cycle Time

= ttr /( tprop +ttr+ tprocess + tprop+tack+tprocess)
substituting all the data, we can get efficiency=0.055% (5,the detailed