Hints for Exercises: Chapter 12

  1. Telnet allows us to discover the protocols that are used by various applications. For example, telnet wwwhost 80 will connect to a Web server. Experiment with the HTTP protocol.

    Read the HTTP specification first, but it starts as simply as typing

    % telnet wwwhost 80
    Connected to wwwhost
    Escape character is '^]'.
    GET /
    to get the home page for a site. Italics indicate things you type and there is a blank line at the end to indicate the end of the request. Next, you can experiment with the more sophisticated request mechanisms.
  2. Some files are available both via the Web and via FTP. Determine by experiment which is the more efficient at transmitting (a) large files, (b) small files.

    Experimental. We would expect FTP to be better on large files, but improvements to HTTP have narrowed the gap. It is possible that modern versions of HTTP would be better at lots of small files, but this is unclear.

  3. Use rpcinfo to discover the RPC services available from various machines. Find out what these services do.

    % rpcinfo -p diskhost
       program vers proto   port
        100000    4   tcp    111  portmapper
        100000    3   tcp    111  portmapper
        100000    2   tcp    111  portmapper
        100000    4   udp    111  portmapper
        100000    3   udp    111  portmapper
        100000    2   udp    111  portmapper
        100003    2   udp   2049  nfs
        100003    3   udp   2049  nfs
        100003    2   tcp   2049  nfs
        100003    3   tcp   2049  nfs
        100002    2   udp  53137  rusersd
        100002    3   udp  53137  rusersd
        100002    2   tcp  43955  rusersd
        100002    3   tcp  43955  rusersd
    We expect to find services like NFS and its attendant sub-services, but there may well be others.
  4. Measure the difference in time it takes to read a large file from local disk (on your machine) and from a NFS disk. Repeat for any other remote filesystem you have access to. What is the rate of slowdown? Relate this to the speeds of the network connections.

    Experimental. Watch out for disk caching: the second time you read a file it may still be in memory and the operating system might use that version rather than re-fetching from the disk or the network. You will probably find NFS is several factors of 10, if not 100, slower, and the more remote the disk, the bigger the slowdown.

    Disk rates are on the order of gigabits/sec, while networks are likely a fraction of 100Mb/s.

  5. Read up on XML and its related technologies (CSS, XSL, XSLT and the like). Why do you think that XML has proved so popular?

    There is a lot from the W3C xml.org and Oasis.

  6. Look into using ssh (aka putty). What means of authentication and security does it use?

    At a simple level, ssh is like encrypted telnet. However, it offers many other applications, such as secure FTP, encrypted port forwarding and a basic VPN.

    It uses a RSA and Diffie-Hellman for initial authentication and key exchange, and then standard symmetric key systems like 3DES and AES. Other techniques, like key continuity add to the security.

  7. Investigate the way you normally read email. What protocol is used? Is it secure? Repeat for how you send email.

    It is likely that email is read using POP or IMAP from a mail server. If you are lucky, you are using the secure versions POP3S or IMAPS that use SSL/TLS. If not, your email is visible in transit to your machine.

    Sending is almost always done using SMTP to a mail server: insecure as again it is readable in transit. There is a secure version SMTPS and there are SSL/TLS extensions to the basic SMTP.

    All the above secure protocols encrypt point-to-point, that is, for the duration of the delivery. When stored on the mail servers, the messages are readable by the systems administrators (at least). To ensure only the recipient can read the email, an application layer encryption should be used. Examples are PGP and GnuPG.

  8. Write down and make notes on as many applications that use networks as you can. Concentrate on the protocols they use.

    So many to choose from! Have a look at /etc/services for ideas.

  9. "Layering models are useless. TCP/IP is nothing like the ISO model, and because of ICMP it doesn't even fit its own model". Discuss.

    The problem with ICMP (and it's not alone in this), is that it runs on top of IP, but is conceptually part of the IP layer. So its implementation, while pragmatic, distorts the layering somewhat.

    Of course, layers are useful, but you must be careful not to be too inflexible about implementations. This was part of what killed the ISO layer implementations: sticking too closely to the model produced poor and slow code.

Previous Index Next

Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.