Tute 1 Sol
Tute 1 Sol
Tute 1 Sol
Semester 2, 2011
Tutorial 1 - Solutions
Question 1
IPv4 addresses are usually written as four decimal numbers separated by dots, where each decimal number represents one byte (8 binary bits). a) Convert this dotted-decimal IP address into a 32-bit binary IP address: 192.168.1.62 11000000 10101000 00000001 00111110 b) Convert this binary IP address into dotted-decimal format: 00001010 00010010 10011000 11000000 10.18.152.192
Question 2
Consider the following two binary numbers: 10011011 00101101 a) Calculate the sum of these two numbers directly in binary, showing working. Convert the binary result into a decimal number. 10011011 00101101 + ---------11001000 = 200 b) Convert each of the numbers to a decimal number and then calculate their sum using decimal arithmetic. [Hint: the result should match your answer from a) above.] 10011011 = 155 00101101 = 45 + ------200 c) Repeat a) and b), but calculate the product (i.e. multiply rather than add). 10011011 00101101 x -----------10011011 000000000 1001101100 10011011000 000000000000 1001101100000 ----------------1101100111111 = 6975 10011011 00101101 = = 155 45 x ------
Question 3
48-bit ethernet addresses are conventionally represented in hexadecimal notation as six colon-separated pairs of digits. A pair of hexadecimal digits represents one byte. a) Convert this ethernet address into it's 48-bit binary form: 00:24:2B:6F:13:B9 0 0000 4 0100 8 1000 1 0001 2 0010 5 0101 6 0110 9 1001 A 1010
3 0011 7 0111 B 1011 F 1111 00000000 00100100 00101000 01101111 00010011 10111001 b) Rewrite this ethernet address in hexadecimal form: 00000110 00001110 00111100 01011110 11110011 01111100 06:0E:3C:5E:F3:7C
Question 4
Name the five layers in the 5-layered network model. List some advantages of using a layered model for network architecture. Are there any disadvantages? Physical, Link, Network, Transport, Application Advantages: decomposes complexity into manageable chunks; modularity facilitates easy replacement of implementations and addition of new services. Disadvantage: efficiency processing overhead with multiple layers of function calls; space/bandwidth overhead with multiple layers of encapsulation/headers.
Question 5
What was the ARPANet? What was it's major contribution to computer networking? The ARPANet was the first functioning packet-switched network. There are other things that could be said too, including that its packet-switchedness facilitated resilience by allowing re-routing around failed links/nodes.
Question 6
Consider a basic connection-oriented client-server protocol, accessed from the layer above using the six service primitives: LISTEN, CONNECT, ACCEPT, RECEIVE, SEND, and DISCONNECT. a) Draw a pair of state transition diagrams (one for the client, one for the server) showing the state transitions necessary for successful processing of client requests and server responses.
b) Give an example of a possible sequence of operations that should never occur, and that would generate confusion if it did occur. c) Propose for discussion one or more options for handling the scenario in c). As discussed in tutorial class.
Question 7
Define bandwidth and latency. Bandwidth: the number of bits that can be transmitted onto a link in one second. Latency: the time taken for one (small) message to travel from one end of a network (or link) to the other. Latency = Transmission + Propagation + Queuing. List several applications for which bandwidth is the dominant consideration. File transfer, web browsing. List several applications for which latency is the dominant consideration. IP telephony demands consistently low latency. Audio/Video streaming work best if latency is consistent/predictable (minimal jitter), but depending on the scenario it may not be imperative that the latency is especially low.
Question 8
Suppose a 100Mbps point-to-point link is being set up between Earth and a new lunar colony. The distance from the earth to the moon is approximately 381,550 km. Data travels over the link at the speed of light 299,792 km/s. a) Calculate the minium RTT (Round Trip Time) for the link. RTT = 2 * distance / speed = 2 * 381550 / 299792 = 2.5454 seconds b) Using the RTT as a delay, calculate the delay * bandwidth product for the link. 2.5454 * 100 * 106 bits = 254.54 Mb (megabits) = 31.82 MB (megabytes) c) What is the significance of the delay * bandwidth product calculated in b)? It is the minimum amount of data you would be able to transmit before an acknowledgment for the first packet sent could arrive back at the sender. Therefore, if implementing reliable delivery, you should plan on being able to buffer at least this much data at the sender's end. d) A camera on the lunar surface takes pictures of Earth and saves them in digital format to disk. Suppose mission control wants to download a picture which is 25MB in size. What is the minimum amount of time that will elapse between the request being sent from Earth and the last byte of the image file arriving on Earth? Assume processing/turnaround time is negligible (which it might not be, but we have no info to go on), and that the request packet is small, the minimum possible time would be: 1 * RTT + transmit time for 25 MB onto a 100Mbps link = 2.5454 + ( 25 MB * 8 bits/byte / 100Mbps) = 2.5454 + ( 25 * 220 * 8 / 108 ) = 2.5454 + 2.0972 = 4.6426 seconds
Question 9
[Tanenbaum, chap 1 ex 11] The president of Specialty Paint Corp. gets the idea to work with a local beer brewer to produce an invisible beer can (as an anti-litter measure). The president tells her legal department to look into it, and they in turn ask engineering for help. As a result, the chief engineer calls his counterpart at the brewery to discuss the technical aspects of the project. The engineers then report back to their respective legal departments, which then confer by telephone to arrange the legal aspects. Finally, the two corporate presidents discuss the financial side of the deal. Is this an example of protocol layering in the sense of the OSI model? Justify. No. In a strictly layered communication model, ALL communication between layer-peers happens ONLY via lower layers except for the bottom layer where the peers do communicate directly. When the legal departments communicate directly by phone (not via engineering), and when the presidents talk directly (not via legal and then via engineering), they break the layered model that OSI would require. NOTE: The OSI model is not ideal for interpersonal communication and relationships(!).
Question 10
[based on Tanenbaum] Bernie the St Bernard has been trained to carry a box of 5 DVDs instead of brandy. These DVDs can each contain up to 4.5GB of data. Bernie can travel at 18 km/hour. For what range of distances does Bernie have a higher bandwidth than a 155Mbps ATM line? Taking a straightforward view: Bandwidth = data volume / time = data volume / ( distance/speed ) = data volume * speed / distance So if BATM = BBernie, then 155Mbps = 22.5GB * 18 km/h / distance => distance = (22.5 * 10243 * 8) * 18 / (155 * 106 * 3600) = 6.23 km However, to maintain this transfer rate for a large multi-trip data delivery, Bernie would need to allow time to return to base to collect the next batch of DVDs. Making this allowance, his bandwidth is better than the 155 Mbps ATM line for ranges less than half of the 6.23 km (i.e. 3.2 km).