|------------------------| | Syed Shahad Ali | | CS-742 | | Assignmnet # 5 | | Login id ssali | |------------------------| (1)(Answer 1) Hard copy is submitted (2)(Answer 7) HDLC Sequence that should never appear is 01111111 This situation indicates error in the frame In BISYN case three EXT should not appear back to back i.e one after another. If they does occur it means error condition. (3)(Answer 11) Two dimentional parity mechanism detects error and also locate the correct position of that erro by pointing the position of error in the form of row and column that has the erro. It can successfully detects one bit error location. DATA Parity sent with data ---- --------------------- 0101001 1 1101001 0 1011110 1 0001110 1 Parity 0010000 1 Now assume that 3rd bit in 3rd column is currupted and becomes '0' DATA Parity sent with data New Parity Calculated by receiver ---- --------------------- --------------------------------- 0101001 1 1 1101001 0 0 1001110 1 0 <--- Error here 0001110 1 1 Parity 0010000 1 New Parity 0000000 Calculated ^ | | error here (4)(Answer 18) With only NAK's sent, the protocol would not get an ACK, and would therefore have to assume that messages were received properly unless a NAK was received. In order to detect a lost packet, the sender would either have to get a NAK indicating that a later packet was out of order, or it would have to get a NAK indicating that too much time had passed since the last receive. So the receiver would have to have a timer to tell it when to send such a message. The sender would send one or more packets and then wait for the NAK which would indicate the packets that had been received before going on. Also, it would need a timer to tell it if the NAK were overdue, since it could also get lost. (5)(Answer 19) we are given distance=20 km and we also know speed of light = 2*10^8 m/s (a) So the propogation delay would be = 20000/speed of light = 0.0001 sec. = 100 micro seconds (b) time out=2*100 micro seconds Since we require data to sent and also acknowledgement to be received (c) So timeout possiblilty exist at the receiving side. Since it might happen that processing time takes longer than anticipated. (6)(Answer 20) Since bandwidth is 1Mbps and frame length is 1KBytes => (8*10^3 bits/sec) / 1^6 bits = 0.008 sec are required to completely send first frame @ t = 1.25+0.008 = 1.258 sec it will arrive at moon @ t = 1.255+1.25 = 2.508 sec ACK will come to sender So sender has to wait 2.508 sec before sending new windows. In the mean time it can send 2.508/0.008 = 313.5 frames before ACK is received => Windows = W = 314 frame also, maximum sequence # = 2W = 2*314=628 And to represent 628 we need 10 bits (7)(Answer 27) Here we can have only 0,1,2 & 3 sequence number. Since only two bits are alloted for sequenceing. Now if we sent 4 data packets and the 1st one is lost then after timeout sender will send 5th data packet with the sequence number of 0 again. Now if the first data packet's acknowledge received with the sequnce number 0 then sender will be confused and will consider it as acknowledgement of data packet 5. (8)(Answer 36) We have given bandwidth as 100Mbps and delay as 46.4 microseconds. (a) Since we know the formula for the channel capacity delay* bandwidth product = 46.6x10^6 * 100x10^6 = 4640 Packet size = 4640+48 = 4688 (b) If we set packet size to be very large then network is exposed to low efficiecny. If a large packet is currupted or lost then network will send it again that is bandwidth consuming and increases latency. (c) If compatibility is not and issue then a samller mininumin packet size specifications could be written after considering the maximum bandwidth link. Because the link that has maximum bandwidth will allow the minimum lenght for a packet to travel and that packet will be the smallest amongst all of them. For instance in 10Mbps link, a pakcet could travel to 180 meters. But in 100Mbps link this limit is reduced. (9)(Answer 46) If the sender of the frame died itself than this situation indicates problem and frame would travle infinitely on the ring. In this situation Ring Monitor role is significant. Monitor checks every frame that passes through it and sets an special bit that indicates that monitor has seen this frame. Now if monitor sees the same frame again then it come to know that it is an old frame and then discard it. (10)(Answer 48) (a) The efficiency would be (output/input ) * 100 So by virtue of this we can say, Efficiency = ( THT/(THT+Ring Latency) ) (b) In case of just one active station, THT should be set so that THT <= Ring Latency (c) For N active node TRT = Ring Latency + nTHT (11)(Answer 49) Given, Ring Latency = 200 micro seconds Bandwidth = 4Mbps packet size = 1kB = 1024*8 bits Effective throughput = ? Bandwidth=4Mbps ~~~~~~~~~~~~~~ THT = packet size/bandwidth = 2048 microseconds Single Host: TRT=N*THT+Ring Latency =1*2048+200 =2248 microseconds Effective throughput = packet size /TRT = {8* 2^10/200+2048} * 10^6 =3.6 Mbps For N number of host: ~~~~~~~~~~~~~~~~~~~~ TRT=N*THT + Ring Latency =N*(2048) +200 Effective Throughput = packet size /TRT = 8192/(N(2048) + 200)) Bandwidth= 100Mbps ~~~~~~~~~~~~~~~~~~ THT = packet size/bandwidth =81.92 microseconds TRT = 81.92 +200 = 281.92 Microseconds Effective Throughput = packet size /TRT = {8*2^10/281.92} * 10^6 =29.05 Mbps For N number host: ~~~~~~~~~~~~~~~~~ TRT = N*THT+Ring Latency = N*(81.92) +200 Effective Throughput = packet size /TRT =(8192)/(N(81.92)+200) =1/(0.01N+0.0244)