-------------------------------- DAT2330 - Unix - Prof. Ian Allen -------------------------------- Here are questions you should be able to answer. You will likely find questions similar to these on tests and exams. Chapter 7 - Networking and the Internet Learning to use network commands at Algonquin College is difficult due to the restrictions that ITS places on network traffic. Most Internet use is forbidden; only a few select services are allowed in or out. You won't be able to use the "talk", "rcp", "rsh", "rlogin", or "finger" commands over the Internet at Algonqin. You can use them locally, pretending that ACADAIX or Floppix is itself a remote computer. - What kind of network (broadband, token ring, point-to-point) is connected to the network card on your lab computer? Which type of network is commonly used by a dial-up modem? - Do network routers contain a fixed or dynamic map of the Internet? Linux Text: "Host Addresses" (p.161) Hosts on the Internet are identified by "IP Numbers", e.g. 192.197.88.4 is currently the number for ACADAIX. You can use this number to reach ACADAIX from anywhere on the Internet. Most Internet programs that accept host names also accept host IP numbers. (For example, you can send email to 'alleni@[192.197.88.4]'.) Most people use names for computers; the most popular way of turning a name into a number is via the Domain Name Service (DNS). (The old /etc/hosts file is almost always augmented by a DNS installation.) The numbers can change frequently as the machines move from network to network; the names change less often. Not all computers have public names; only the numbers are necessary to connect a machine to the Internet. - Find out from your instructor the IP number of his office computer and "finger" it. (Note: ITS blocks finger traffic from going out onto the Internet from the College; you cannot try the Internet examples in the textbook from within the College.) - You can use "rlogin" to connect to Unix systems on the Internet. Here at Algonquin, you can connect from acadaix from acadaix: $ rlogin acadaix Password: Academic unix (AIX) server ...etc... $ who am i alleni pts/0 May 27 20:26 (acadaix.algonqui) $ exit Connection closed $ (Note: ITS blocks rlogin/rsh/rcp traffic from going out onto the Internet from the College.) - You can use telnet to Internet hosts. Try telnet to "telnet.ncf.carleton.ca" and login as "guest". $ telnet telnet.ncf.carleton.ca ...etc... The Library of Congress example in the text will also work. Linux Text: "Trusted Hosts" (p.168) Yes, you can do this on ACADAIX. Create a file named ".rhosts" in your HOME directory, with the word "acadaix" in it, and you will be able to do "rsh acadaix date" or use the "rcp" command without giving your password. You can't do this on Floppix - it doesn't have the rsh command or service installed. Linux Text: "Using RCP and FTP" (p.169) Yes, "rcp" works on ACADAIX, if you have a .rhosts file that permits your trusted host: $ hostname acadaix $ date >foo $ rcp foo acadaix:bar rshd: 0826-813 Permission is denied. $ echo acadaix >>.rhosts $ rcp foo acadaix:bar $ ls -l foo bar -rw-r--r-- 1 alleni 29 May 27 20:50 bar -rw-r--r-- 1 alleni 29 May 27 20:50 foo $ diff foo bar $ rcp foo acadaix:foo rcp: /thome/alleni/foo and /thome/alleni/foo refer to the same file (not copied). These r-commands (rcp, rsh, rlogin) are useful on a private, trusted network of Unix machines; but, they are not safe to use over the Internet because of domain name security issues. Both the r-commands and FTP have been replaced by "scp" and "ssh" (Secure Shell) programs that use encryption and public key infrastructure. Do not use these commands (except for anonymous ftp) on the Internet. You can try the text FTP example (to tsx-11.mit.edu). The archive is a bit larger than it was in 1997! To get a long listing (including sizes), use "ls -l" instead of just "ls". Rememer to select "binary" mode to transfer GZIP files via FTP. Binary mode is appropriate for 99% of the Unix content you will ever download. Linux Text: "Using RSH" (p.172) Yes, "rsh" works on ACADAIX, if you have a .rhosts file that permits it. ITS blocks rsh from leaving the College. Linux Text: "Ping" (p.172) You can usually ping most anything that has an Internet name. For security reasons, some sites do not permit PING packets to enter. Hosts to ping (from Algonquin): dns netsrv acadaix algnet localhost 127.0.0.1 205.211.47.1 cpu1808.adsl.bellglobal.com google.com tsx-11.mit.edu hotmail.com (NO) microsoft.com (NO) netscape.com (NO) freenet.carleton.ca (NO) Which host has the longest round-trip time? Another useful command (not mentioned in the text) is "traceroute". It is available on many Linux distributions, and on ACADAIX: $ traceroute google.com $ traceroute -n -m 50 www.eomw.net This command prints the actual route taken by the IP packets as they travel through the Internet, through each gateway and router along the way. The trace will be somewhat faster if you turn off DNS lookups ("-n") on all the names that are displayed. Some sites do not permit traceroute packets to enter or leave their routers - these sites will print as asterisks. Linux Text: "RWHO" (p.173) Nothing at Algonquin is running the rwho service; rwho will report nothing. On ACADAIX, you can try the Sun "rusers" command instead. Select the long listing format of "rusers". (RTFM) Linux Text: "Domain Name Service" (p.175) In the news, you'll hear about some new top-level domains being added this year. What are their names? Which end of a DNS domain address is the "top" end? Which end of an Internet numeric IP address is the "top" end? - Skip over these sections of the text: Linux Text: "NIS" (p.176) Linux Text: "NFS" (p.177) Linux Text: "Network Services / Daemons" (p.178) Linux Text: "Internet Services" (p.179-197) - Skip over the above sections of the text. Review the "Internet Basics" Web page unde the "Unix" button on the course home page. Chapter 7 non-Advanced Review Questions: 1,2,5,6,7,8