-------------------------------- 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. Skip over these sections of the text: Linux Text: "rwho" (p.173) 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 (under the course home page). 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 network use is forbidden; only a few select services are allowed into or out of each machine. You may or may not be able to use the "talk", "rcp", "rsh", "rlogin", "ftp", or "finger" commands between different machines here at Algonquin College. If the command just hangs or says "connection refused", ITS is probably blocking you from using that service here at Algonquin. You may be able to use the service from another Internet Service Provider at your home. You can sometimes try to use these commands back into the machine you are on, pretending that the local machine is itself a remote computer on the Internet. At the time this was written, the "ftp" command is also blocked for use at Algonquin by Algonquin's DNS misconfiguration. Many FTP sites will refuse to let you connect to them from any Algonquin labs. Try using ftp from your ACADAIX account instead. - 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. 205.211.41.98 is currently the world-assigned IP number for ACADAIX. You can use the IP number to reach ACADAIX from anywhere on the Internet, even when the name ACADAIX is not recognized. Most people use names for computers; but, the computers want and use only the IP addresses. The most popular way of turning a name into a IP address is via the Domain Name Service (DNS). (The old /etc/hosts file method is almost always augmented by a DNS installation.) All programs that allow you to use names for computers turn the names into IP addresses before they actually use them on the Internet. Most Internet programs that accept host names also accept host IP numbers. For example, you can telnet directly to the IP address 205.211.41.98 (the IP number for the ACADAIX machine), and you can send email to alleni@[205.211.41.98]. (The square brackets are necessary only for an email address - you will have to escape these special characters in your shell command line to protect them from the Unix shell.) The IP numbers can change frequently as the machines move from network to network; the names change less often. The machine ACADAIX changed IP addresses in December 2001 - the DNS system was updated and now the name "acadaix" leads you to its new IP address. Programs using the name "acadaix" still work, even though the machine has moved. Not all computers have public names for their IP addresses. Some computers only have IP addresses. Only the numbers are necessary to connect a machine to the Internet - the name is optional. Some services on the Internet have names that are not associated with actual IP numbers. Often, these names are aliases for other names that do have IP numbers. - Find out from your instructor the IP number of the Linux test computer and "finger" it, using the example syntax given in the textbook chapter. (Note: ITS usually blocks finger traffic - this may not work unless you are actually logged into the Linux test computer itself.) - You can use "rlogin" to connect to Unix systems on the Internet. Here at Algonquin, you can connect from acadaix from acadaix or from the Linux test machine to itself. For example: $ 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 usually blocks rlogin/rsh/rcp traffic - this may not work unless you are actually logged into the computer itself.) - You can use telnet to connect 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) Use of "rsh" and "rcp" is severely hampered by ITS policies at Algonquin. Here's what you can do. On ACADAIX, create a file named ".rhosts" in your HOME directory, with the single host name "acadaix" in it. Then, while on ACADAIX, you will be able to do "rsh acadaix date" without giving your password. If you use the host name "localhost" in the file, you can use "rsh localhost date" instead. ("localhost" is always a name for the local computer.) On the Linux test machine, you can do the same experiment using the single host name "idallen-firewall" or "localhost". You probably can't use rsh between machines at Algonquin due to restrictive ITS policies. You can't use rsh or rcp at all on Floppix - it doesn't have the rsh command or rshd 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 name: $ 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. (We don't teach ssh in this course.) Do not use the r-commands or FTP (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 to a Unix machine. Linux Text: "Using RSH" (p.172) Yes, "rsh" works from ACADAIX to ACADAIX or from the Linux test machine to itself, if you have a .rhosts file that permits it. ITS usually blocks rsh from working between machines at the College. ITS DNS errors at Algonquin may prevent rsh from working between ACADAIX and the Linux test machine. 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. (The FreeNet has ping packets disabled by Carleton U.) Host names to ping (from Algonquin): dns netsrv acadaix algnet outmail inmail localhost 127.0.0.1 205.211.47.1 cpu1808.adsl.bellglobal.com google.com tsx-11.mit.edu hotmail.com (doesn't work - ping is blocked) microsoft.com (doesn't work - ping is blocked) netscape.com (doesn't work - ping is blocked) freenet.carleton.ca (doesn't work - ping is blocked) 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 site is in Africa!) 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 identify 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. At Algonquin, ITS blocks most of the other methods of seeing who is logged in to a remote computer. If you are logged in to ACADAIX, you can try the Sun style "rusers" command instead: rusers localhost Use an option to select the long listing format of "rusers". (RTFM) Linux Text: "Domain Name Service" (p.175) In the news, you might have heard about some new "top-level" domains being added to the DNS in 2001. What are their names? Which end (right or left) of a DNS domain address is the "top" end (the end that changes least frequently)? Which end (right or left) of an Internet numeric IP address is the "top" end (the end that changes least frequently)? Skip over these sections of the text: Linux Text: "rwho" (p.173) 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 on the course home page. Chapter 7 non-Advanced Review Questions: 1,2,5,6,7,8 Unix commands studied: hostname, finger, talk, rlogin, rcp, rsh, telnet, ftp, ping