Lab 6: Using the network

Due Tuesday, March 8, at 10:30 AM

As usual, place the commands you used to solve each of the 5 problems into a file called lab6
  1. Use wget to download this lab assignment. You can address the machine using either localhost, the IP address, or
  2. Use netcat (nc) to open a port and listen for incoming connections.
  3. Use nmap to show that you have successfully opened a port (answering #2). It will be easiest to open a second terminal for this purpose, although you could use screen or background the listening process.
  4. Use netcat and cat to pipe a file into the port you have opened, so that it appears in the terminal you have netcat listening in. Note that using nmap as in problem 3 will stop netcat from listening, and you will have to start it again for this question.
  5. Use traceroute to determine the route from your computer or tux to a server located on another continent. Be careful, major websites tend to have servers in North America in addition to other places, and will redirect your query a nearer server. Check for reverse DNS lookup (type an IP address into the box, and you will see a listing of information about the ownership of that IP. As a reminder, the answer to this question is a command using traceroute.
  6. Build the quicksort demo with g++ described at the beginning of the file, and then time how long it takes to run the entire demo using the time command. Then, recompile it adding the -O3 optimization flag, and time it again. Did adding -O3 help? Note that wget is an easy way to retrieve the quicksort file on isoptera. You don't have to edit the file at all.
Turn in your lab by creating a file named "lab6" with no extension in your home directory, with permissions set so that only you can view the file. This assignment is worth 35 points, 5 from correct naming and permissions permissions, and 5 from each of the problems above.