TCP Lab Exercises



The following exercises are to familiarize you with the TCP protocol and its functionality as discussed in class, specifically with the setup and teardown of TCP's Virtual Circuits. The following commands may be necessary in completing the following steps: telnet, ping, hostname, ifconfig, ethereal and/or tcpdump. If any of these commands are unfamiliar, refer to the man page for that command.

Note: the ethereal sniffer sits on top of tcpdump and provides a nice window based UI for you to examine network packets. Since it sits on top of tcpdump, several of the command inputs are the same, such as the packet filters. This will require you to be familiar with tcpdump (or at least have access to the tcpdump man pages. You have been warned!)

  1. Log on to your machine (using the correct partition) and start an X window session. Start at least 1 terminal window (you may find use for more).
  2. Start ethereal in one window something like: filter: host my_host_name
  3. To observe the TCP connection establishment (3-way handshake), use the ssh application to connect to a remote host and examine the connection segments using a sniffer. You will not need to log into the remote host to observe the connection establishment. Make sure you can identify the relevant segments, the number of relevant segments, the pieces within each segment, and the process that is taking place.

  4. To observe the TCP connection teardown, ssh to a remote host and log in, then as you logout (exit), use the sniffer to examine the teardown segments. Make sure you can identify the relevant segments, the number of relevant segments, the pieces within each segment, and the process that is taking place.

  5. To observe a TCP connection reset, ssh to a remote host, using ssh as follows:

    	ssh -p large # host

    What does the large number represent (consult man pages if unsure). Make sure you can identify the relevant segments, the number of relevant segments, the pieces within each segment, and the process that is taking place.

NOTE: If you choose to print, ALWAYS USE PRINT PACKET, NOT PRINT!