HOMEWORK 1 F14
Q1] The Unix utility whois can be used to find the domain name corresponding to an
organization, or vice versa. Read the man page documentation for whois and experiment with it. Try whois princeton.edu and whois princeton, for starters. As an alternative, explore the whois interface at http://www.internic.net/whois.htm http://www.internic.net/whois.html. l. Q2] Calculate Q2] Calculate the total time required to transfer a 1,000-KB file in the following cases, assuming an RTT of 50 ms, a packet size of 1-KB data, and an initial 2×RTT of “handshaking” before data is sent. (a) The bandwidth is 1.5 Mbps, and data packets can be sent continuously. (b) The bandwidth is 1.5 Mbps, but after we finish sending each data packet we must wait one RTT before sending the next. (c) The bandwidth is “infinite,” meaning that we take transmit time to be zero, and up to 20 packets can be sent per RTT. (d) The bandwidth is infinite, and during the first RTT we can send one packet (21−1), during the second RTT we can send two packets (22−1), during the third we can send four (23−1), and so on. Solution: Solution: Transfer time = RTT + ((1/Bandwidth) * Transfer size) (a) Bandwidth = 1.5 Mbps, RTT = 50 ms The RTT in the transfer time calculation will be the propagation delay, which in this case is 50ms /2 = 25ms. The initial handshaking time before data is sent is 2*50 ms = 100ms. This will be added to the above transfer time equation to get the total transfer time. Transfer time = (25*10^-3) + ((8192000/1500000)) + (100*10^-3) Transfer time = 5.5863 seconds. seconds . (b) In this case, after sending each data packet we must wait one RTT before sending the next packet. Number of packets required = 1000KB / 1KB = 1000 Hence, transfer time here can be calculated as: Transfer time = Transfer time from calculation in (a) + 999 RTTs (the number of RTTs between packet 1 and packet 1000 = 5.5863 + 50 Transfer time = 55.5863 seconds. (c) Since the bandwidth is infinite, considering the above formula the transfer time depends only on RTTs required to send data. 20 packets can be sent per RTT. Hence, total number of RTTs required to transmit transmit entire 1000 packets of data = 1000/20 = 50. Transfer time = Initial handshaking time + 50 RTTs = (100*10^-3) + (50*50*10^-3) Transfer time = 2.6 seconds. (d) Bandwidth in this case is infinite. The other o ther condition is that during one RTT we can send 1 packet (2^1-1), during the next RTT 2 packets (2^2-1), during the next 2^3-1 and so on till 2^n. 1+2+4+...2^n = (2^(n+1)) -1 packets Therefore,
Number of RTTs “n” required to send 1000 packets: (2^(n+1)) -1 = 1000 n = (log(1000)/log(2)) – 1) = 8.96 ~= 9 Transfer time = Initial handshaking time + 9 RTTs = 11 RTTs Transfer time = 550ms
Q3] Give an example of a situation in which multicast addresses might be beneficial. Answer: Internet Protocol supports the ability to have one device send a message to a set of recipients. The idea behind IP multicasting is to allow a device on an IP internetwork to send datagrams not to just one recipient but to a collection of other devices. Streaming media applications on the internet and private networks involve similar data requests from a set of users. To service such requests using unicast addressing would take a significant amount of time and bandwidth over the network. Multicast addressing is beneficial for such applications as a group of interested receivers can be serviced with a single transmission. For example, in the case of Internet television when the user changes from one TV channel to another. IP multicast scales to a larger receiver population by not requiring prior knowledge of identity and the number of receivers. Multicast uses network infrastructure efficiently by requiring the source to send a packet only once, even if it needs to be delivered to a large number of receivers. The nodes in the network take care of replicating the packet to reach multiple receivers only when necessary. Consider the below situation: B C
D A
E
F
A is a streaming medium from which B, C and F are requesting the same data. Here, B, C and F are nodes which can be on the same or a different network. An IP multicast group address is used by sources and the receivers to send and receive multicast messages. Sources use the group address as the IP destination address in their data packets. Receivers use this group address to inform the network that they are interested in receiving packets sent to that group. For example, if some content is associated with group 230.1.1.1, the source will send data packets destined to 230.1.1.1. Receivers for that content will inform the network that they are interested in receiving data packets sent to the group 230.1.1.1. The receiver joins 230.1.1.1. Here, B,C,F will join a multicast group by using IGMP protocol. In this way, the data stream sent by A over this multicast group will be received by B,C, F at the same time. Using unicast addressing will require A to send packets to each of the receivers separately holding their respective IP addresses. Each router examines the destination address of an incoming packet and looks up the destination in a table to determine which interface to use in order for that packet to get closer to its destination. The source address is irrelevant to the router. However, in multicast routing, the source address (which is a simple unicast address) is used to determine data stream direction. The source of the multicast traffic is considered upstream. The router determines which downstream interfaces are destinations for this multicast group (the destination address), and sends the packet out through the appropriate interfaces. IP Multicast efficiently supports this type of transmission by enabling sources to send a single copy of a message to multiple recipients who explicitly want to receive the information. This is far more efficient than requiring the source to send an individual copy of a message to each requester, in which case the number of receivers is limited by the bandwidth available to the sender. It is also more efficient than broadcasting one copy of the message to all nodes (broadcast) on the network, since many nodes may not want the message, and because broadcasts are limited to a single subnet.
Q4] What differences in traffic patterns account for the fact that STDM is a cost-effective form of multiplexing for a voice telephone network and FDM is a cost-effective form of multiplexing for television and radio networks, yet we reject both as not being cost-effective for a generalpurpose computer network? Answer: A voice telephone network involves transfer of sampled voice over a data link. Television and radio networks broadcast audio/video over the data links. Both these networks involve synchronous transfer of data over the network. Whenever a link is formed, a large amount of continuous data is transmitted. A general purpose computer network is a user driven system. Data is transmitted over the network only when a user requests for it. On comparing the traffic patterns of a voice, television/radio and computer networks, we can observe that the supply of data is synchronous for voice and television networks. This reduces the idle periods over such networks. Hence, these networks do not require dynamic allocation of bandwidth to minimize the transmission delay and use the bandwidth efficiently. To handle such continuous form of data, it is feasible to use synchronous time division multiplexing and frequency division multiplexing wherein each of the channels is given an equal share of time/frequency to transmit data. However, in case of computer networks the data transfer is asynchronous. Only when a user requests for certain data will the network work towards fetching it. For computer communication, the amount of time that a link is idle is very large. Hence, using techniques like synchronous TDM or frequency division multiplexing will reduce the efficiency of the network due to the idle time over the link. Also, STDM and FDM are limited to situations in which the maximum number of flows is fixed and known ahead of time. Hence, it is not practical to resize the quantum or to add additional quanta in case of STD or add new frequencies in case of FDM. For efficient data transfer over computer networks, statistical multiplexing is used. It involves transfer of data on demand rather than during a predetermined time slot. It is this avoidance of idle time that gives packet switching in computer networks their efficiency.
Q5] Suppose a 1-Gbps point-to-point link is being set up between Earth and a new lunar colony. The distance from the moon to Earth is approximately 385,000 km, and data travels over the link at the speed of light —3×10^8 m/s. (a) Calculate the minimum RTT for the link. (b) Using the RTT as the delay, calculate the delay × bandwidth product for the link. (c) What is the significance of the delay × bandwidth product computed in (b)? (d) A camera on the lunar base takes pictures of Earth and saves them in digital format to disk. Suppose Mission Control on Earth wishes to download the most current image, which is 25 MB. What is the minimum amount of time that will elapse between when the request for the data goes out and the transfer is finished? Solution: (a) The propagation delay for the point-to-point link can be calculated as: Distance from moon to earth/speed of light Propagation delay = 385000*10^3 / 3*10^8 = 1.2833 seconds Thus, the minimum RTT for the link = 2 * propagation delay Minimum RTT for the link = 2.5667 seconds (b) The delay X bandwidth product for the link is: 1.2833 * 1*10^9 = 1.2833 GB Delay X Bandwidth product = 1.2833 GB (c) The term “delay” signifies the time taken for the bits to travel from one end of a link to another. The term “bandwidth” denotes the total number of bits which can be transmitted over a link in a certain period of time. The delay X bandwidth product signifies the maximum number of bits that can be in transit over a communication link at any given instant of time. It is a very important performance
parameter as it corresponds to the number of bits a sender must transmit before the first bit arrives at the receiver. This product determines high performance because if the sender does not send the number of bits equal to the delay X bandwidth product before it stops to wait for a signal, the sender would not fully utilize the network thus impacting the overall optimum performance. (d) Transmit delay for 25MB data = (25MB * 8)/1Gbps = 209715200 bits / 1*10^9 bits/sec = 0.2097 seconds. Thus, minimum amount of time that will elapse between when the request was made and the transfer finished = transmit delay + propagation delay = 0.2097 + 1.2833 Minimum amount of time elapsed between request and transfer of data = 1.4930 seconds Q6] Calculate the effective bandwidth for the following cases. For (a) and (b) assume there is a steady supply of data to send; for (c) simply calculate the average over 12 hours. (a) A 10-Mbps Ethernet through three store-and-forward switches as in Exercise 18(b). Switches can send on one link while receiving on the other. (b) Same as (a) but with the sender having to wait for a 50-byte acknowledgment packet after sending each 5,000-bit data packet. (c) Overnight (12-hour) shipment of 100 compact discs (650 MB each). Solution:
Q7] Suppose a host has a 1-MB file that is to be sent to another host. The file takes 1 second of CPU time to compress 50%, or 2 seconds to compress 60%. (a) Calculate the bandwidth at which each compression option takes the same total compression+transmission time. (b) Explain why latency does not affect your answer. Solution: (a) To get the needed bandwidth, we need to calculate the total compression + transmission time for both options. For the first option, 2 seconds are required to compress the entire file. For the second option, 3.33 seconds are required to compress the entire file. Hence, for each option to take the same amount of compression+transmission time we can simply add the compression times: Total time = 2 + 3.33 = 5.33 seconds Bandwidth = Size of file/Total time = 8388608 bits/5.33 seconds Bandwidth = 1.57 Mbps (b) Here, we see that since the volume of the data to be transmitted, in this case the 1MB file, is large the bandwidth would dominate the performance of the link. The more bandwidth is available, the faster the file can be sent. Suppose the latency of the channel is 1ms. The total time would be = 5.33s + 0.001s = 5.331ms Bandwidth = 1.573 Mbps Now, if we consider the latency to be 100ms. The total time would be = 5.33s + 0.1s = 5.430ms Bandwidth = 1.544 Mbps
As we see above, the latency does not affect the total number of bits being transmitted a great deal. The difference between the 5.331ms response time and 5.430ms response time is negligible. Q8] The Unix utility ping can be used to find the RTT to various Internet hosts. Read the man page for ping, and use it to find the RTT to www.cs.princeton.edu in New Jersey and www.cisco.com in California. Measure the RTT values at different times of d ay, and compare the results. What do you think accounts for the differences? Answer: The server at www.cs.princeton.edu was not accessible at various times of the d ay and the request would get timed out. I have used www.cs.pudue.edu to demonstrate the results in the tools exercise below. Ping was used to find the RTT to www.cs.pudue.edu and www.cisco.com. RTT at 10am: ping www.cs.pudue.edu - Average 66ms ping www.cisco.com - Average 19ms RTT at 1pm: ping www.cs.pudue.edu – Average 85ms ping www.cisco.com – Average 54ms RTT at 4pm: ping www.cs.pudue.edu – Average 59ms ping www.cisco.com – Average 44ms
The below factors account for the differences in the RTTs to the given servers: Each time we ping a server, the IP may use a different route calculated by the routing algorithms in the routers. This results in varied latency for the data to reach the destination and the source getting a response. Each of the routes results into a certain number of hops for the packets to reach the destination and back. These hops are individual network d evices which the packets have to pass through to get to the destination. Each hop will take come processing time. The network devices would have differing queue sizes at each hop and at different times of the day. This results in a varying delay. Also, the number of hops would vary depending upon the route taken. At one time of the day, the routing protocol would determine that one route is optimum and at another time it may go for a different route depending upon the traffic over the network. Congestion over network routes plays an important part in deciding the hops and hence the RTT. Suppose a link over a network is down which was up and functioning earlier when we had measured the round trip time. This will affect the RTT significantly. In the above examples, it can be seen that at 10 am, the RTT is lesser for both servers as compared to the RTT at 1pm. This denotes that the traffic over the links was less at 10am compared to the traffic at 1pm. Consider the RTT to both servers at 4pm. We can see that the RTT to www.cs.pudue.edu has reduced while the RTT to www.cisco.com is comparatively high. Hence, we can say that the peak traffic times can vary with the geographical location of the servers.
Q9] The Unix utility traceroute, or its Windows equivalent tracert, can be used to find the sequence of routers through which a message is routed. Use this to find the path from your site
to some others. How well does the number of hops correlate with the RTT times from ping? How well does the number of hops correlate with geographical distance? Answer: Tracert was used to find the path from the host pc to different servers. Please find attached results. The results correlate well with the RTT times from ping. For example, the server www.cs.purdue.edu shows 14 hops to reach the destination. The time taken from the source to each of the hops is returned in the result. The total time taken to reach the Purdue server matches with the average RTT retrieved in the ping utility. We can conclude here that the RTT values given by ping utility is the amount o time required to reach the destination via different hops. The tracert utility returns the exact path taken by the packets to reach the destination. The number of hops are very much related to the geographical distance from the server. The servers which are located near the host require lesser number of hops to reach the destination. For example, sending data to the Cisco server located in California requires 5 hops, which is closer to Colorado. On the other hand, sending data to the Purdue server requires 14 hops as it is located farther away in Indiana. Each specific hop is calculated by the routing protocols used in IP. The number of hops taken is directly proportional to the RTT and hence the time taken for data retrieval from a particular server.