-------------------------------- 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 from Algonquin. You can use them locally, pretending that ACADAIX, Floppix, or the Linux test machine is itself a remote computer. The "ftp" command is also blocked for use at Algonquin by Algonquin's DNS misconfiguration and many sites will refuse to let you connect to them from any Algonquin labs. Try using ftp from ACADAIX 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. 192.197.88.4 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 Internet programs that accept host names also accept host IP numbers. For example, you can telnet directly to the IP address 192.197.88.4, and you can send email to alleni@[192.197.88.4]. (You will have to escape the special characters to protect them from the Unix shell.) 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 method is almost always augmented by a DNS installation.) The IP 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. 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. (Note: ITS blocks finger traffic from going out onto the Internet from the College; you cannot try the finger Internet examples in the textbook from within the College. If you have a private ISP at home, you can try doing the examples there.) - 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 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 can't use rsh between machines 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. 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 blocks rsh from leaving the College. ITS DNS errors at Algonquin prevent rsh from working between ACADIX 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 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 or the Linux test machine, you can try the Sun style "rusers" command instead: rusers acadaix Use an option to 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 on the course home page. Chapter 7 non-Advanced Review Questions: 1,2,5,6,7,8