Lab 1 Solutions

  1. The performance of a client-server system is influenced by two network factors: the bandwidth of the network (how many bits/sec it can transport) and the latency (how many seconds it takes for the first bit to get from the client to the server).
    1. Give an example of a data transportation method that exhibits high bandwidth and high latency.
      Data tapes sent by courier are one example of a high bandwidth and high latency method of transporting data.
    2. Give an example of one with low bandwidth and low latency.
      A LAN has low bandwidth and low latency.
    3. In what situations would high bandwidth be desired even with high latency?
      High bandwidth is desired when there is a large amount of data to transport when the time to deliver the data is not a concern.
    4. In what situations would low latency be desired even with low bandwidth?
      Interactive or real-time operations would be best with low latency as quick deliver and/or response is required.
    5. In commercials that advertise "5 times faster", are they referring to bandwidth or latency?
      When the commercials are comparing DSL/cable to either each other or to dial-up, they are referring to bandwidth. When the commercials are comparing two dial-up companies, they are referring to compression.
  2. What is the principle difference between connectionless communication and connection-oriented communication?
    Connection-oriented communication sets up a channel, eg a SYN handshake with TCP, sends the data for the communication and tears down the channel. An example would be a telephone call. Connectionless communication just sends the data with full addressing information and no communication channel is established. An example would be sending letters through the mail system.
  3. Which of the OSI layers handles each of the following:
    1. Dividing the transmitted bit stream into frames
      Data Link Layer
    2. Determining the route through the subnet to use
      Network Layer
  4. List two ways in which the OSI reference model and the TCP/IP reference model are the same. Now list two ways in which they differ.
    Same:
    • Both have a stack of protocols
    • The functionality of the layers are similar
    • The layers are divided into application oriented (end-to-end) and transport oriented (chained) protocols with the application protocols above the transport ones.
    Different:
    • There is a different number of layers in each.
    • OSI makes a clear distinction between service, interface and protocol whereas TCP/IP does not.
    • OSI protocols are better hidden, more like a black box
    • OSI had the model first and then the protocols. The opposite was true with TCP/IP.
    • OSI gave no consideration to internetworking
    • OSI offers only connection-oriented communication to users. TCP/IP offers both connection-oriented and connectionless.
  5. Ethernet and wireless networks have some similarities and differences. One property of Ethernet is that only one frame at a time can be transmitted on an Ethernet. Does 802.11 share this property with Ethernet? Discuss your answer.
    Wireless networks also transmit one frame at a time, but determining when one can send is more difficult. Ethernet is a broadcast bus so the sender can just listen to see if there is any traffic before sending. Due to range issues with wireless, a sender cannot be sure that there are not other transmissions just because it cannot "hear" other transmissions. Wireless senders use either a central base station or use methods discussed in Chapter 4 to avoid collisions.
  6. If a binary signal is sent over a 3-kHz channel whose signal-to-noise ratio is 20dB, what is the maximum achievable data rate?
    First get S/N from 20db.
    20dB = 10 log10(S/N)
    S/N = 100
    Now plug values into Shannon's Law
    max rate = 3000 log2(1 + 100) = 3000 log2(101) = 3000 * 6.66 = 19974.63 bits/sec
    If you didn't convert dB, you would get 13176.95 bits/sec
  7. What signal-to-noise ratio is needed to put a T1 carrier (1.54 megabits per second) on a 50-kHZ line?
    1540000 = 50000 log2(S/N + 1)
       30.8 = log2 (S/N + 1)
    S/N + 1 = 1869493099
        S/N = 1869493098
    
    Convert to dB
    10 log10 (1869493098)
    92.7 dB
    
  8. The dig command can be used to obtain information from the DNS records for a given domain name or IP address. What is the output for the following commands and what is the difference between them?
    1. dig www.cs.csub.edu
    2. dig soa www.cs.csub.edu
    Option (a) looks up the IP address for a given domain name and returns the IP address in the answer section. It also returns the listed nameservers for the domain in the authority section and information about the nameservers in the additional section. The answer section may contain multiple lines if the domain name is an alias for another domain name (CNAME type).

    Option (b) returns the start of authority information for the domain name. In particular, the authority section will give details about the DNS record for that domain name. The answer section will list any alias names, but will not look up the IP address. If the domain name has no aliases, the answer section will be omitted.

  9. You are getting probes from some host in the 209.9.244.* (Class C) network. Which of the following commands will find the Start of Authority record for that network and why?
    1. dig soa 224.9.209.in-addr.arpa
    2. dig soa 209.9.224
    3. ping 224.9.209.in-addr.arpa
    Option (a) will find the start of authority record. It specifies the address in the proper notation for dig as you cannot use the IP address directly by default. Option (b) is close, but is missing the -x option to dig that is required to use just the IP address or portions of the IP address. If you added -x before the IP address, the output would be identical to option (a). Option (c) is wrong because ping only checks round trip times, not start of authority.
  10. You are attempting to connect to ftp.foo.com and get the error message
    --- unknown host ftp.foo.com ---
    What is the likely problem and what commands would you use to investigate the problem?
    This indicates that there is some issue with looking up the domain name ftp.foo.com. First, do a dig on the domain name to see if an IP address is listed in the answer section. If there is no IP address for that domain name, you should at least get a dig response with an authority section for the root domain (foo.com if it existed or com if foo.com does not exist). If dig does not have this information, then your nameservers may be down. Check by pinging your nameservers to see if they are up. If dig does list an authority section for foo.com, then check that foo.com's nameservers are up. You can get the nameservers for foo.com by either using dig foo.com (checks the DNS records) or whois foo.com (checks the registrar records). You can then ping the nameservers to see if they are up. If nameservers are down, retry later on. If all nameservers are up, then this is likely an invalid or no longer used domain name.
  11. Suppose instead you got the message
    Trying 208.207.151.35 ...
    ... Connection timed out.
    How does this differ from the previous error message? What could be causing the issue? How would you investigate it?
    In this case, we have successfully looked up ftp.foo.com and gotten an IP address, so the DNS is working properly. Now we are timing out connecting to the IP address. The most common causes of this are routing issues or some sort of interference connecting to the FTP port such as no FTP service running on the machine, firewalls blocking connection to the FTP port or too much traffic to the server. You can check for routing issues by using ping to see if the server is up and traceroute to check the route from you to the server. If the machine appears to be up, then one of the other causes is at play.