The textbook is TCP/IP Network Administration, Third Edition by Craig Hunt; OReilly, ISBN 0-596-00297-1.
We begin with networking theory. The first part of the course is theoretical: binary arithmetic, packets, and protocols. The second part of the course is how to configure your Unix box to talk to a network. In the last part, we write clients and servers in C or Perl. A computer attached to a network is called a host. X52.9547 is a course in configuring your Unix host to talk to a network. We will assume that the network already exists (probably an Ethernet), and that you want to attach your host to it. Were not going to build the network.
NYU gives each student a non-root (i.e., non-superuser) account on the Solaris machine i5.nyu.edu. But if you want to perform the actual configuration, youll need a machine where you have the root password. Linux running on your PC would be fine.
A protocol is a set of rules that two communicating programs have agreed to obey. A typical rule is that "data must be divided into packets (segments, datagrams, frames, etc.) for transmission, and reassembled at the receiving end." We describe the relationships between the most important protocols. For example, "each packet of TCP is carried inside of a packet of IP".
Little packets are carried inside big packets, and fragmented if they dont fit. Well eavesdrop on the packets with the packet sniffers snoop and tcpdump, and trace their route with traceroute. We will also cover packet formats and headers, including MAC (Ethernet) addresses, IP addresses; IP address classes, subnetting, and netmasks. Multiple programs on the same machine are identified by TCP/UDP port numbers. Each open port is a potential entrance for a security assault.
Some networking programs are spawned on demand by the the Internet dæmon inetd, configured by the inetd.conf file. We cover Dæmons and background processes.
PPP: Point-to-Point Protocol. If youre using a modem instead of an Ethernet connection, your IP packets will be carried by PPP. Configure your host to be a PPP client using chat and the PPP dæmon pppd. The PPP server will issue your host a temporary IP address.
DHCP: Dynamic Host Configuration Protocol. Instead of writing the IP address of each machine in its startup or configuration files, let DHCP distribute this information to each machine as it is booted up from a central server.
RPC: Remote Procedure Call. RPC is a layer of software that lets a program on one host call procedures (subroutines, functions, etc.) on another host. Our simple example will be written in the language C. We set up RPC because NIS and NFS (see below) are carried by it.
NIS: Network Information System, a.k.a. the Yellow pages Each host has a file (/etc/passwd) listing the people who have accounts on that host. But what would you do if you have to give someone an account on all 100 hosts on a network? Instead of editing the /etc/passwd file on each host, NIS will let you automatically distribute one master copy of this file. We select NIS by configuring the resolver with the resolv.conf file.
NFS: Network File System. Create the illusion that a file on one host is simultaneously present on another host. share commands are stored in the dfstab configuration table.
sendmail: the mail server. Create the sendmail configuration files with the m4 macro processor. See how local and remote mail addresses are rewritten for different mailers.
Set up a Web Server. Well download, decompress, un-tar, configure, compile, link, and install the Apache web server. It speaks HTTP: the Hypertext Transport Protocol. If theres any interest, well do some CGI programming in C or Perl.
Clients and servers often have to perform two or more tasks simultaneously. For example, a server may be willing to talk to multiple clients, and a client or a server may want to perform input and output at the same time. Our servers and clients will do several tasks at the same time by spawning extra processes via the Unix system calls fork, exec, and wait. Well catch the death-of-child signal and harvest zombies.
A normal shellscript can only drive a non-interactive program. But what if a network administrator has to run an interactive program on many machines, or to communicate with many machines? In this case, we drive them by a script in the language Expect, which is a superset of Tcl.