=============================================================== Assignment #10 - Internet, Course Linux Server, Linux, Web/HTML =============================================================== - Ian! D. Allen - idallen@idallen.ca - www.idallen.com Read *all* the words in this assignment. Goal: Demonstrate working knowledge of Internet services. Refresh Linux knowledge from previous term. Demonstrate knowledge of basic HTML. Available online: Tuesday November 8, 2011 Deliverables: One correctly-named plain text file uploaded to Blackboard. Upload due date: Upload answer file before 10h00 (10am) on Saturday November 19, 2011 Late assignments or wrong file names may or may not be marked. Answers will be posted shortly after the due date/time and discussed in class, if there are any questions about the answers. Submission method: Create a plain text file using the *exact* name: assignment10.txt Upload the file via the Assignment10 "Upload File" facility in Blackboard. Use "Attach File" and "Submit" to upload your plain text file. No wordprocessor documents. Do not send email. Use only "Attach File". Use the *exact* file name given above. Upload only one single file of plain text, not HTML, not MSWord. No fonts, no word-processing. Plain text only. Did I mention that the format is plain text (VIM/Nano/Pico/Gedit or Notepad)? NO WORD PROCESSOR, PDF, RTF, or HTML DOCUMENTS ACCEPTED. No marks are awarded for submitting under the wrong assignment number. Not all assignments will be marked. See the Week 1 Notes for details. Answers will be posted after the due date/time so that you can check your answers before coming to class and ask questions about the answers in class. Please check your answers (and my answers!). I go over each assignment in class if there are questions about the answers. No questions means no review - I'll presume you know the material. Questions similar to ones on these assignments will appear on your tests and exams. DO THIS: Edit this file and answer the following questions underneath each question, showing the method or formula you used to get the answer. Many of the questions already give you the answer - you must show the full method you use to generate that answer. Upload the file containing the question, methods, formulas, and answers before the due date. Some of the answers below will require reading the links published in the weekly course notes. Full marks are awarded only if you show your method, the same method you will have to use on your midterm test and final exam. Marks are awarded for original work, not for cut-and-paste. Any answers that are found to be cut-and-paste from some other document will require you to resubmit the entire lab as hand-written (and may result in a charge of plagiarism or academic fraud as well). Do your own thinking; write your own answers. ============================================================================== 0. What is the date, time, and room number of your Final Exam? Are you allowed to bring a calculator to your Final Exam? Are you allowed to bring a cell phone or PDA to your Final Exam? How many pencils and erasers are needed at your Final Exam? *** Internet Section *** 1. What byte-order is used on the Internet to transmit data? 2. In the world of Internet standards, what do the letters "RFC" stand for? (Hint: http://en.wikipedia.org/wiki/RFC_Editor) 3. What is the standards group responsible for the Internet standards? Give the full name and the 4-letter acronym. (Hint: http://en.wikipedia.org/wiki/IETF) 4. IPv4 addresses are stored as 32-bits, where each of the four "quads" is stored in its own byte. Encode the dotted-quad IP address 130.66.34.18 as a 32-bit hexadecimal number as it would be sent in Internet byte order: 5. Which of the following URLs are *always* identical to the URL http://idallen.net/content.html ? (May be more than one answer.) a) http://idallen.net/CONTENT.HTML b) http://IDALLEN.NET/content.html c) HTTP://idallen.net/content.html 6. Which of the following email addresses are always identical to the email address idallen@idallen.com ? (May be more than one answer.) a) idallen@IDALLEN.COM b) IDALLEN@idallen.com 7. Which of the following cannot ever be valid dotted-quad IPv4 addresses? (May be more than one answer.) a) 0.0.0.0 b) 1.2.3.4 c) 252.0.255.10 d) 191.0.320.10 e) 255.255.255.255 f) 255.255.260.255 8. True/False: If two machines have similar DNS names, e.g. machine1.example.com and machine2.example.com, their IP addresses will always be on the same or similar networks, e.g. 205.0.32.10 and 205.0.32.11. 9. True/False: If two machines with IP addresses 205.0.32.10 and 205.0.32.11 are on the same network, they will always have similar DNS names, e.g. host1.example.com and host2.example.com . 10. How many bits are used to store the new IPv6 Internet addresses? 11. In Class Notes file 140_attack.txt: Decode the obfuscated IP address assigned in hexadecimal to the $perm variable into standard Internet numeric dotted-quad form. Give the dotted-quad IP address here: Give the 32-bit hexadecimal Big-Endian form here: Give the same address in Little-Endian form (hex): *** Using the Course Linux Server (CLS) cst8281.idallen.ca *** CLS = "Course Linux Server" 12. Use the Linux "host" command to find out the DNS name for the above IP address. 13. In March 2010 the attack email listed in 140_attack.txt was "Received" from machine mail.modaintl.com at 68.236.170.186. Use the Linux "host" command to show the current IP address for mail.modaintl.com. (It isn't 68.236.170.186 today.) 14. The Perl script being fetched for the attack in the EMail "To" line in 140_attack.txt appears to contain a German (.de) address. Use the Linux "traceroute" command to trace the packet routes between your current machine and the German address. (The trace may take some time to complete. It may not be able to trace the name of every router on the way to the destination - some trace points will be asterisks instead of host names.) Copy and paste the traceroute here: *** Operating Systems Review on the Course Linux Server (CLS) *** CLS = "Course Linux Server" 15. What is the absolute pathname of your CLS home directory? Show the command(s) you used to find out this information. 16. Use "ls -lid" to display the permissions on the above directory and paste the full one-line output for your home directory here: 17. What is the absolute pathname of the CLS directory containing your Assignment 09 "minimal.html" file? Show the comands you used. 18. Use "ls -lid" to display the permissions on the above directory and paste the full one-line output here: 19. On the CLS, what is the absolute pathname of the directory containing a copy of all the CST8281 course Notes files for this term, as mentioned in the course notes file for the Course Linux Server? 20. Use "ls -lid" to display the permissions on the above directory and paste the full one-line output here: 21. On the CLS, what is the absolute pathname of the 570_file_transfer.txt file in the preceding CST8281 course Notes directory? 22. How would you use file patterns and "grep" on the CLS to find out which of the many Week Notes files contain the string "IETF"? 23. Give the absolute pathname on the CLS of the file that would be referenced by the following (nonexistent) URL: http://cst8281.idallen.ca:8080/~abcd1234/dir/pic.png Absolute Path: 24. Give two URLs, one private (Algonquin-only) and one public (works on the Internet) for the following absolute (nonexistent) pathname on the CLS: ~abcd1234/public_html/dir/image.png Algonquin-only URL: Internet-wide URL: 25. You are using PSFTP on a Windows computer. Your current Windows directory is C:\Temp and you connect using userid abcd1234 to the CLS. Give the "put" command that will copy a local file "foo.txt" from the "Vmware" folder on your Windows "D:" drive to the CLS so that the following URL will display the contents of that file. Note the new file name used in this URL: http://cst8281.idallen.ca:8080/~abcd1234/tmp/bar.txt (Assume the PSFTP connection connects to the abcd1234 home directory.) (Reference: 570_file_transfer.txt [see heading PSFTP]) 26. Create the directory "public_html/a10" under your CLS home directory. (Do not include the quote marks.) Use "ls -lid" with the above pathname to show the permissions of the a10 directory and paste the full output here: 27. Go to your home directory on the CLS. Redirect the output of the Unix "who" command into the file "who.txt" in the above "a10" directory. (Do not include the quote marks.) Verify that you can see the contents of the who.txt file using a web browser (e.g. Firefox) using the appropriate URL. Give the command used and the URL used. 28. Use "ls -liac" on the "a10" directory to show the permissions of the directory and all the files inside it. Paste the output here: 29. Turn off execute permission for "others" on the "a10" directory. a) What command turns off execute permission for "others"? b) Use "ls -liac" to generate a listing showing the new permissions of the "a10" directory and all its contents and paste the output here: c) Can you still use "cat" or "less" to view the who.txt file [yes]? d) What error message does your browser now give for that file? e) Turn on execute permissions for "others" on the "a10" directory. What command did you use to do this? f) Use "ls -liac" to generate a listing showing the restored permissions of the "a10" directory and its contents and paste it here: g) Verify that you can again view the who.txt file in the web browser. Can you still view the file if you remove read permissions for "others" from the a10 directory? 30. You are in the directory ~abcd1234/public_html/a10 on the CLS. You want to move a file named "foo.txt" from the abcd1234 home directory into the directory ~abcd1234/public_html/a11 using the shortest possible relative path names. What command do you use? *** The Web - [see 600_basic_html.ppt] *** 31. What is the World Wide Web? 32. What is the difference between HTTP and HTML? 33. What gets stored in the disk files that are served up by a Web server? Describe the contents of these files. What kind of stuff is in them? 34. What protocol is used to send Web pages across the Internet? 35. Describe how your Web browser acts to fetch and display a Web page. 36. True/False: Line breaks in HTML appear as line breaks in your Web page. 37. What is the URL of the W3C web page validator service? 38. To what does the name "Apache" refer in the Web? (What is "Apache"?) 39. True/False: Every opening HTML tag has a corresponding closing tag. 40. True/False: A valid Web page could be a single line of text. 41. Give three examples of HTML tags that have no closing tag: 42. What is an HTML "element"? 43. What tag pair are mandatory inside the section? 44. Which heading usually prints smaller,

or

? 45. How do you write a comment in HTML? 46. True/False: You can nest HTML comments inside HTML comments. 47. True/False: This is a valid comment: <-- See -- Saw --> 48. True/False: This is a valid comment: <-- Hello World! --> 49. True/False: This is a valid comment: 50. True/False: This is a valid comment: 51. True/False: This is a valid comment: 52. Give the major attribute of the tag that points to a relative or absolute file or URL address: 53. True/False: the address used in the attribute on an tag must match the text displayed in the browser for that attribute. 54. What is the syntax for an EMail address used in an link? 55. Give the tag attribute that points to the image itself: 56. Write an tag that references the image file "img.png" stored in the parent directory (not in the current directory). The image size is 600x800 pixels and shows a Linux penguin eating herring. 57. Write here, from memory, the smallest valid Web page that displays "Hello World!", including all the mandatory tags. You can omit the details on the DOCTYPE header line (don't memorize it). Full marks are awarded only if you show your method, e.g. Linux commands used to get the answer. Marks are awarded for original work, not for cut-and-paste. Any answers that are found to be cut-and-paste from some other document will require you to resubmit the entire lab as hand-written (and may result in a charge of plagiarism or academic fraud as well). Do your own thinking; write your own answers. -- | Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/