Quiz One Solutions 1. Almost all textbooks and classes in Networks and Digital Communication discuss the seven-layer OSI model. (a) (10 points) What are the two main advantages of a layered architecture for networks? Layers make implementation easier and more flexible. A layer can be implemented regardless of technology/softwarei/hardware used in other layers. Upper layers can insure reliability even if lower levels are not. Upper layers can provide services independent od lower layers. (b) (10 points) What are the two main disadvantages of the OSI model? Session and presentation layers defined in model have had little application in real world. More layers mean more overhead in packets. Many real systems such as ATM don't match OSI model well. 2. (10 points) ATM useds 53 byte packets called cells of which 5 bytes is the header. One of the these header bytes is used as a CRC check over the header. Why is this check done over the header and not the whole cell? Hint: ATM is used over fiber optic lines and can be used for real time communcication. By looking at only address, we can start to forward packet before the whole packet has arrived. Even though fiber optic lines have a low bit error rate, a wrong address can lead to serious errors. In many real time applications, a data error does not cause serious problems. 3. Some systems use a NAK (negative acknowledgement) as part of a stop and wait protocol. The receiving node sends a special NAK packet or a piggybacked NAK whether it detects a bad packet. (a) (5 points) Under what conditions is the use of a NAK possible? It can only work if we are using a dedicated line or a virtual circuit because there cannot be any confusion about who sent the packet. Remember that if any bit is in error, the CRC check fails and we cannot trust any bits in the packet, including address bits. (b) (5 points) What is the main advantage of a NAK in addition to the protocols that we discussed in class. NAKs avoid the sender timing out when the receiver knows a bad packet has been sent. Note that we still need timers in case the packet, its ACK, or its NAK is completely lost. 4. Suppose that we have five computers connected by an Ethernet. Computer A sends a short email to computer B that is small enough that it fits in one Ethernet packet. Due to noise on the cable, one bit is altered in the packet. (a) (10 points) What happens to this packet on each of the four stations other than A? Does A know about the error in transmission? Everyone but A will see the bad packet. Since it is in error and fails the CRC check, everyone will throw it away. B cannot tell the packet was meant for it. A does not see what it has transmitted so cannot tell an error has occurred. (b) (10 points) Can this email ever get to B correctly? Do the Ethernet protocols insure a correct message will get to B? Explain your answer. Yes. That's what the upper layers are for. The LLC layer will time out. Checks will also be made at the transport layer and possibly in the application. 5. (20 points) I dial a phone number and find it is busy. My algorithm for redialing is to wait 1 minute before retrying. If the line is still busy, I wait an additional minute each time I retry, e.g. I wait $k$ minutes after the $k^{th}$ busy signal. Neglecting the dialing and connect times, if the probablity of a busy signal on any call is .2, how long on the average must I wait to successfully complete my call? It is fairly simple to show that the average number of tries is 1.25. it is the same formula we use for the ethernet calcuations. However computing the average time is tricker. If you connect the first time, you had no wait, the second time one second, the third time 3 seconds (1+2), the fourth time seven seconds (1+3+3). You should have been able to write a sum for this. The answer some of you got was by saying the time to connect on the n-th try was n-1 minutes which gives an answer of p/(1-p)=.25 which is a little low. (I think the correct sum has a closed form but it is ugly). 6. (20 points) Consider the following variant of Ethernet. Two stations are 1 km apart and transmit at 10Mbps. Assume that the propagation speed is 200m/$\mu$s. The computers use a CSMA/CD scheme with 256 bit frames of which 32 bits are header and trailer containing addressing and CRC bits. The first bit after a succesful transmisson is reserved for the receiver to send a one bit acknowledgement. What is the data rate of such a system if we assume that there are no collisions? If there are no collisions, then the stations transmit 256 bits in 25.6 us. After 5 us the first bit arrives at the receiver who sends out a one bit ack (0.1 us) which takes 5 us to arrive back. Of the 256 bits sent only 224 are data, so it took 35.7 us to send 224 data bits which gives a rate of 6.27 Mbps.