----------------------------------------------------------------- Mohamed G. Gouda CS 356 Spring 2018 Midterm 1 ----------------------------------------------------------------- Solve any four of the following five problems. ----------------------------------------------------------------- 1. What is the main difference between a client-server application and a P2P application? ----------------------------------------------------------------- 2. The link layer of a host H receives a frame f from the subnetwork attached to H. Then the link layer of H transforms f into a packet p and forwards p to the network layer of H. Then the network layer of H transforms p into a segment s and forwards s to the transport layer of H. (a) What are the headers in p? (b) What are the headers in s? ----------------------------------------------------------------- 3. Where in DNS does one store the set of RRs that can be used to compute the IP address of the "A" DNS server of the s.edu domain? ----------------------------------------------------------------- 4. When a user activates the email application on a client host ch, the user informs its agent (e.g. "outlook") on ch of the user name. What does the user agent do with the user name? ----------------------------------------------------------------- 5. What is the smallest number of distinct DNS servers that need to be visited in order to resolve the host name (www.ab.com) into the corresponding IP address. Explain your answer? ----------------------------------------------------------------- Solutions ----------------------------------------------------------------- 1. To request a service in a client-server application, a client sends requests to and gets back replies from a well-known always- running server. To request a service in a P2P application, a client called peer sends requests to and gets back replies from other peers who happen to be running in the application. ----------------------------------------------------------------- 2. (a) The headers in p are network header, transport header, and application header. (b) The headers in s are transport header and application header. ----------------------------------------------------------------- 3. In DNS, the set of RRs, that can be used to compute the IP address of the "A" DNS server of the s.edu domain, is stored in every edu server. ----------------------------------------------------------------- 4. The user agent uses the user name to know the email server in which the user is registered. Then the agent communicates with this email server to inform it that the user is currently active on the client host ch. ----------------------------------------------------------------- 5. The smallest number of distinct DNS servers that need to be visited in this case is "one" when the IP address of the host name (www.west.ab.com) is currently stored in the cache of the local DNS server. ----------------------------------------------------------------