CSD008/COMP3616, Networks & Internet Systems: Problem Set 2 ----------------------------------------------------------- Solutions --------- ("Tanenbaum" refers to the 4th Edition) 1. According to the OSI Model, which layers are implemented in the nodes within a subnet ? Solution: within a subnet only the physical, datalink and network layers are implemented (the bottom 3 layers of the OSI model). 2. Why is the transmission of information between two peer processes in the OSI Model called virtual transmission? Solution: transmission of information between two peer processes is referred to as virtual transmission because the processes are concerned only with the information content being exchanged, and not the way in which this information is actually transmitted. The actual transmission of information is down the protocol stack at the sender, across the physical medium, and up the protocol stack at the receiver, but to the peer processes it appears that they are directly exchanging information. 3. Which layer of the OSI Model handles each of the following functions ? (a) Find a route from source to destination; (b) Encrypt the data for security purposes; (c) Retransmit in reply to an error reported by a neighbouring node; (d) Break the transmitted bit stream into frames. Solution: (a) network; (b) presentation; (c) datalink; (d) datalink. 4. Which of the following correctly explains the term "encapsulation" as used in layered network architectures: (a) each layer may add control information as data is passed down the protocol stack at a sending host, without processing the data itself; (b) each layer is programmed as if it were directly connected to its peer process in another host, although the actual direction of transmission in a protocol stack is vertical; (c) each layer only has interfaces with the layers directly above and below it. Solution: (a) is correct. 5. (Tanenbaum, chapter 1, problem 21) List two ways in which the OSI Reference Model and the TCP/IP Reference Model are the same, and two ways in which they differ. Solution: similarities -- both the OSI and TCP/IP reference models are layered models; both have network, transport, and application layers; in both models the transport layer can provide reliable end-to-end transfer of bytes; in both models the end-users don't have to be concerned about the physical communication network. differences -- OSI model has 7 layers, TCP/IP model has 4 layers; TCP/IP model does not have session and presentation layers; OSI model can provide connectionless or connection-oriented service in the network layer, whereas TCP/IP model only provides a connectionless network layer service. 6. Suppose the network layer uses datagram packet switching. Is it possible for this network architecture to offer connection-oriented communication services to its end users? Solution: yes, it is possible. On top of the network layer, the network architecture should support: end-to-end acknowledgement of correct packets; reordering of packets; and requests for lost packets. For example, TCP and IP combine to support a connection-oriented communication service, although IP itself uses datagram packet switching. 7. Suppose the setup time for a virtual circuit is 100 millisec, and that the virtual circuit contains 3 links. Each node in the network transmits at 56 kbps (in other words, 56 000 bps). Each packet travelling on the virtual circuit has 200 data bits and a 2-byte header (1 byte = 8 bits). If datagram packet switching is used instead, no setup time is needed but the header is 8 bytes long. Assume that the network is lightly loaded so that the queueing delay in all nodes is zero; that the propagation delay is zero on all links; and that the datagrams happen to follow the same path through the network as the packets do on the virtual circuit. Find the time taken to transport N packets end-to-end using the virtual circuit and using datagrams. For what range of values of N is it faster to use virtual circuit transport in this case ? Solution: the transmission time of a packet is different for the virtual circuit and datagram options because the packets are different lengths. Using the notation of the previous problem, VC: p/b = (200 + 2x8)/(56 000) = 3.8571 millisec datagram: p/b = (200 + 8x8)/(56 000) = 4.7143 millisec We are using store-and-forward packet switching in both cases, so both VC and datagram packet switching can take advantage of pipelining as in the previous problem. Denote the time taken to send N packets over the VC by Tvc and the time taken for N packets to travel the same route using datagram transport as Td. If there are 3 links in the route, that means there are 2 intermediate nodes. Accounting for the setup time of the VC, we have Tvc = 100 + (N+2)x(3.8571), in millisec Td = (N+2)x(4.7143), in millisec and therefore Tvc < Td when N > 114.66 packets, or in other words, N greater than or equal to 115 packets. 8. Suppose that a 64,000 bit packet is to be transmitted on a link with the following characteristics: propagation speed: 2 x 10^8 m/sec, link length: 1,000 m. Further suppose that the node can transmit at a rate of 4 Gbps (in other words, 4 x 10^9 bps). (A) What is the transmission time for the packet ? (B) What is the propagation delay on the link? (C) If the node starts transmitting the packet at time t=0, at what time is the packet fully received at the destination? Solution: (A) 64,000 bits / 4 x 10^9 bps = 16 microsec, or equivalently, 16 x 10^-6 seconds (B) 1,000 m / 2 x 10^8 m/s = 5 microsec, or 5 x 10^-6 sec (C) It takes the transmission time to get the packet onto the link. Once there, it is not fully received until the last bit is received: this occurs after the propagation delay. The total time is therefore 16 microsec + 5 microsec = 21 microsec So at t=21 microsec the packet is fully received at the destination.