=============================================================== Assignment #10 - Internet, Course Linux Server, Linux, Web/HTML =============================================================== - Ian! D. Allen - idallen@idallen.ca - www.idallen.com Available online: Tuesday March 22, 2011 Upload due date: Upload answer file before 23:59 (midnight) on Monday March 28, 2011 Answers will be posted shortly after the due date/time and discussed in class, if there are any questions about the answers. Late assignments may or may not be marked. 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 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 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. Some of the questions may 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, e.g. Linux commands used to get the answer. ============================================================================== 0. What is the date, time, and room number of your Final Exam? Are you allowed to bring a calculator to your Final Exam? Do you need any pencils for the Final Exam? *** Internet Section *** 1. What byte-order is used on the Internet to transmit data? 2. 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) 3. In the world of Internet standards, what do the letters "RFC" stand for? (Hint: http://en.wikipedia.org/wiki/RFC_Editor) 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 128.65.32.17 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.com/address.html ? (May be more than one answer.) a) HTTP://idallen.com/address.html b) http://IDALLEN.COM/address.html c) http://idallen.com/ADDRESS.HTML 6. Which of the following email addresses are always identical to the email address idallen@idallen.ca ? (May be more than one answer.) a) IDALLEN@idallen.ca b) idallen@IDALLEN.CA 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.256.10 d) 191.0.32.10 e) 255.255.256.255 f) 255.255.255.255 8. True/False: If two machines with IP addresses 192.0.32.10 and 192.0.32.11 are on the same network, they will always have similar DNS names, e.g. host1.example.com and host2.example.com . 9. True/False: If two machines have similar DNS names, e.g. host1.example.com and host2.example.com, their IP addresses will always be on the same or similar networks, e.g. 192.0.32.10 and 192.0.32.11. 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 form here: *** Using the Course Linux Server (CLS) cst8281.idallen.ca *** CLS = "Course Linux Server" 12. Use the Linux "whois" command to find out who owns the above IP address. In what country is that IP address registered? 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 come from 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 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 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. On the CLS, what is the absolute pathname of the directory containing a copy of all the CST8281 course Notes files for this term? 19. On the CLS, what is the absolute pathname of the 570_file_transfer.txt file in the preceding CST8281 course Notes directory? 20. 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"? 21. Give the absolute pathname on the CLS of the file that would be referenced by the following (nonexistent) URL: http://cst8281.idallen.ca:8080/~abcd0001/one/two.jpg Absolute Path: 22. Give two URLs, one private (Algonquin-only) and one public (works on the Internet) for the following absolute (nonexistent) pathname on the CLS: ~abcd0001/public_html/test/image.png Algonquin-only URL: Internet-wide URL: 23. You are using PSFTP on a Windows computer. Your current Windows directory is C:\Temp and you connect using userid abcd0001 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/~abcd0001/tmp/bar.txt (Assume the PSFTP connection connects to the abcd0001 home directory.) (Reference: 570_file_transfer.txt [see heading PSFTP]) 24. 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: 25. 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. 26. Use "ls -liac" on the "a10" directory to show the permissions of the directory and all the files inside it. Paste the output here: 27. 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) Can you still view the who.txt file via URL in the web browser [no]? e) Turn on execute permissions 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) Can you again view the who.txt file in the web browser [yes]? 28. You are in the directory ~abcd0001/public_html/a10 on the CLS. You want to move a file named "foo.txt" from the abcd0001 home directory into the directory ~abcd0001/public_html/tmp using the shortest possible relative path names. What command do you use? *** The Web - [see 600_basic_html.ppt] *** 29. What is the World Wide Web? 30. What is the difference between HTTP and HTML? 31. What gets stored in the disk files that are served up by a Web server? 32. What protocol is used to send Web pages across the Internet? 33. Describe how your Web browser acts to fetch and display a Web page. 34. True/False: Line breaks in HTML appear as line breaks in your Web page. 35. What is the URL of the W3C web page validator service? 36. To what does the name "Apache" refer in the Web? (What is "Apache"?) 37. True/False: Every opening HTML tag has a corresponding closing tag. 38. True/False: A valid Web page could be a single line of text. 39. Give three examples of HTML tags that have no closing tag: 40. What is an HTML "element"? 41. What tag pair are mandatory inside the section? 42. Which heading usually prints larger,

or

? 43. How do you write a comment in HTML? 44. True/False: You can nest HTML comments inside HTML comments. 45. True/False: This is a valid comment: <-- Hello World! --> 46. True/False: This is a valid comment: <-- See -- Saw --> 47. True/False: This is a valid comment: 48. True/False: This is a valid comment: 49. True/False: This is a valid comment: 50. True/False: The major attribute of the tag is "http=" followed by a relative or absolute file or URL address. 51. True/False: the address used in the attribute on an tag must match the text displayed in the browser for that attribute. 52. What is the syntax for an EMail address used in an link? 53. True/False: When using the tag, the attribute that points to the image itself is named "image=". 54. Write an tag that references the image file "foo.png" stored in the parent directory (not in the current directory). The image size is 800x600 pixels and shows a Linux penguin dancing. 55. 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. -- | 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/