ECE 6: Computer Networks Mid Term Exam 16 November 004. Answer all questions. Always be sure to answer each question concisely but precisely! All questions have points each. 1. What are the different layers of the OSI reference model and briefly what is the purpose of each one? Why adopt a layered architecture? Physical layer: responsible for delivering raw bits from one node to the next. Data link layer: hop-by-hop reliable frame transmission between transmitter and receiver. The layer is also responsible for error and flow control. Network layer: handles packet routing from source to destination. Transport layer: End-to-end reliable packet delivery. Stream multiplexing and demultiplexing. Flow and congestion control. Session layer: Session management and synchronization. Presentation layer: Syntax and semantics of the information transmitted in the network Application layer: Protocols that are needed by the user applications. The layered architecture is needed in order to hide the complexity of the operations handled by one layer from the rest. In addition it achieves modularity making the architecture independent of the implementation. Finally, it makes it easier to make changes in one layer without affecting the operation of the remaining layers.. What is the advantages and disadvantages of Manchester encoding compared to the simple encoding where ones are represented by +1V and zeros by -1V. Manchester encoding also includes the clock pulses making it much easier to achieve transmitter receiver-synchronization. On the other hand, it requires twice as much bandwidth.. The physical layer transmits a continuous bit stream, while the data link layer segments streams into frames. Why are frames necessary? Frames allow for error control and enable reliable transmission. In case of an error, it is only required to retransmit the damaged frame! 4. What is bit stuffing and how it works? Sometimes, frame delimiters like 01111110 may appear in the body of the message. Bit stuffing is the process of inserting bits in a bit stream so that such bit streams are not confused with the frame delimiters. In this case, after consecutive 1s a zero is inserted by the transmitter and it is thrown out by the receiver. 1
. During the negotiation period, the transmitter and receiver have agreed to use the polynomial 1001 for their CRC code. Suppose that a receiver has received the following frame 11001001010. Should the receiver accept or reject the frame? 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 1 The remainder is not equal to zero, thus the packet should be rejected. 6. During a job interview with TMC Ltd (True Mobile Computers), one of the managers is showing you the prototype of their new wireless Ethernet adaptor and he tells you that their R&D team has spent a lot of effort to design a state-of-the-art receiver that consumes extremely low power. He seems very excited with the potential of their new product, however, he is a little concerned because in a couple of experiments the collision detection algorithm did not work very well. During the conversation he mentioned that they have implemented the standard Ethernet CSMA\CD (carrier sense multiple access \ collision detection) and still there are some minor problems. How do you respond assuming that you really want to get the job? CSMA/CD does not work for wireless networks due to the hidden and exposed nodes problem. They should redesign their medium access protocol to include the request to send (RTS) and clear to send messages (CTS). 7. Ethernet is 1-persistent. What does this mean? How does Ethernet handle congestion? Once a node has a frame to transmit, it first senses the channel. If it is idle it starts transmitting. If it is busy, it waits for the station that transmits to finish and immediately after, it starts transmitting (As soon as the channel becomes idle, a node transmits with probability 1). Congestion is handled through the exponential backoff algorithm. After the i-th collision it transmits during any of the next i contention slots with probability -i. 8. What is the minimum frame size of a 1Gbps Ethernet with 7 nodes over a wire that is 00 meters long? Assume that the speed of light in the medium is 6 microseconds per Km. The round trip delay is 6 microseconds. Thus the minimum frame size is 10 9 bps 6 10-6 s= 6Kbits 9. A frame is m bits long and there is a bit error probability p. Suppose we can use an error correcting code that has an overhead of bits and can detect any errors and correct errors of up to 1 bit. What is the probability of a successful transmission? success m ( 1 ) ( ) ( 1 ) + m+ P = p + m+ p p
10. Suppose that a frame is again m bits long with error probability p. Suppose now that an error detection code is used that has an overhead of 1 bit and which can detect any error. Assuming a real time application (no retransmissions) what values of p will justify the error correction of question 9 and what values of p will make error detection more preferable? m 1 For this case, P = ( 1 p ) +. Error correction is justified when success m+ m+ m+ 1 ( p) ( m ) p( p) ( p) ( p) ( m ) p( p) 1 + + 1 > 1 1 + + 1 > 1 + + + + > + + > m + 1 p < m + m + 1 p > m + 1 p p ( m ) p ( m ) p 1 0 ( m 1) p ( m ) p 0 Error detection is justified when 11. Assume a link has a round-trip propagation delay of 100msec. Also, assume an 8Kbps transmitter and a frame with bit sequence numbers. What is the minimum frame size that can guarantee a 0% channel utilization assuming the stop-and-wait protocol? t Let t be the transmission time, then 0. t 100msec t+ 100m > >. If the transmitter is to transmit for 100msec every cycle, then the minimum frame size is 800 bits = 100 bytes. 1. Assume a link has a round-trip propagation delay of 100msec. Also, assume an 8Kbps transmitter and a frame with bit sequence numbers. What is the minimum frame size that can guarantee a 0% channel utilization assuming the go back N protocol? The maximum window can be 7 frames, thus the minimum frame size is 800/7 bits. 1. Assume a link has a round-trip propagation delay of 100msec. Also, assume an 8Kbps transmitter and a frame with bit sequence numbers. What is the minimum frame size that can guarantee a 0% channel utilization assuming the selective repeat protocol? The maximum window can be 4 frames, thus the minimum frame size is 00 bits. 14. Isn t this the most fun exam ever? Of course! 1. Draw the finite state machine for the transmitter of the go back N protocol when the frame sequence number is bits long. Since we have bit long sequence number, the maximum allowable window is. The state represents the sequence number of the unacknowledged packets, for example the state 01 means that the transmitter has sent packets 0, 1 and and it is waiting for the corresponding acknowledgments. Over each transition we write the event that triggers the transition, i.e., either a timeout event (TM OUT) or the reception of an acknowledgement packet (ACK). Finally, under the triggering event we write the action of the transmitter, i.e., send certain packets (Pkt xyz).
TM OUT 0 Pkts 0,1, ACK Pkt ACK Pkt 01 1 ACK Pkts 0,1, Pkts,0,1 ACK 1 Pkts,0 Pkts 0,1 Pkts 1,, ACK 1 Pkt 0 TM OUT 1 Pkts 1,, TM OUT Pkts,1,0 Pkts, ACK Pkts 1, ACK 1 Pkts,,0 01 Pkt 1 ACK 1 0 TM OUT Pkts,,0 16. Draw the finite state machine for the receiver of the go back N protocol when the frame sequence number is bits long. The state of the receiver represents the expected next packet. On top of each transition we write the event that triggered the transition (e.g., arrival of packet 0,, (Pkt x)) and then we write the action taken by the receiver, (e.g., send the right Acknowledgement ACK) Pkt 0 / Pkt 1 / ACK 1 Pkt / Wait Pkt 0 Wait Pkt 1 Wait Pkt Wait Pkt Pkt 0,, Pkt 0,1, ACK 1 Pkt 0,1, Pkt 1,, ACK Pkt / ACK 4
17. For the network shown below, use Dijkstra's algorithm to find the optimal route from A to J. A B C 1 7 E 4 8 F G 6 I 1 D 6 7 H 4 J A B C D E F G H I J A 0 A A A AB A A 7B 9B ABC 4C 4C 9B ABCD 4C 9B 11D ABCDE 8E 1E 7E ABCDEH 8E 1E 1H ABCDEHF 10F 14F 1H ABCDEHFG 1G 1H ABCDEHFGJ 1G ABCDEHFGJI Optimal path is A C E H J with cost 1. 18. Assume the link state algorithm. For the network shown above, what information should A share with the rest of the network? How is this information propagated? A will send the cost of connecting to its immediate neighbors, i.e., it can connect to B with cost, to C with cost and to D with cost. This information will be placed in a packet and will be sent to all other nodes using flooding.
19. Suppose that the table below shows the routing tables at each router. Given these tables, what is the path that a packet that originated at B and destined to I will follow? What is the optimum cost? Also, what is the path that a packet that originated at A and destined to F will follow? Dest A B C D E F G H I C N C N C N C N C N C N C N C N C N A 0 - A A 4 C 4 C 8 E 10 F 7 E 11 H B B 0 - A 6 C B 7 B 9 F 8 E 1 F C C A 0-1 C 1 C E 7 F 4 E 8 H D 4 C 6 A 1 D 0 - C 6 E 8 F E 9 H E 4 C E 1 E C 0-4 E 6 F E 7 H F 8 C 7 F E 6 C 4 F 0 - F 7 E F G 10 C 9 F 7 E 8 C 6 F G 0-9 E 7 F H 7 C 8 E 4 E C H 7 E 9 F 0-4 H I 11 C 1 F 8 E 9 C 7 H I 7 F 4 I 0 - The cost from B to I is 1 and the path goes from B F I The cost from A to G is 10 and the path goes from A C E F G 0. How do you envision the networks of 00? Give me a crystal ball and I will tell you 6