BSD 3 development
[unix-history] / usr / doc / berknet / systemmanual.n
CommitLineData
1f4ae402
ES
1.TL
2Network System Manual
3.AU
4Eric Schmidt
5.SH
6Introduction
7.LP
8This documentation should be read by people responsible for
9maintaining the network (and the systems it runs on).
10It is divided into the following sections:
11.DS
12Maintaining the Network
13Setting up the Network
14Future Plans
15For Berkeley
16Bugs
17.DE
18Besides the commands described in the net introduction,
19there are a number of network-internal commands and
20statistics files.
21.SH
22Maintaining the Network
23.IP 1.
24Check the network:
25.RS
26.IP a)
27See if the network daemons are running with the command
28.DS
29% ps ax | grep net
30.DE
31If not running, see below.
32.IP b)
33Check the network queue to see how long commands have been waiting to
34be sent.
35.RE
36.IP 2.
37To restart the network daemons, try
38.RS
39.IP a)
40See if they are running, as above.
41.IP b)
42If so, there should be two net daemon processes per machine connection\(em
43``kill \-9'' the child named ``netdaemon'' and the parent ``netstart'' will start
44a new one.
45.IP c)
46If there are no ``netstart's'' or ``netdaemon's'', executing
47.DS
48% /usr/net/bin/start
49.DE
50will start up all the daemons on your machine.
51.IP d)
52To have two ``netdaemons'' pointing to the same machine is to invite disaster.
53What happens is that a few small requests get through,
54and then the error rate goes up by a factor of a hundred.
55The first thing to do when you see this is to check the
56number of net daemons.
57.LP
58(All this must be done as super-user).
59.RE
60.IP 3.
61There are files /usr/net/plogfile? with a log for each
62directly-connected machine.
63Example:
64.DS
65% tail /usr/net/plogfiley
66.DE
67will tell you in a cryptic form what the network
68has done on the Cory machine.
69This is a good file to inspect to see if transmissions
70are failing, etc.
71It is readable only by ``schmidt'' and ``root'' (and ``staff'' on Cory).
72.IP
73Basically, ``sends'' begin ``^S'' and end ``^T''.
74If a send fails for some reason, ``^F'' is printed instead of ``^T''.
75``^R'' is printed when a receive begins.
76``RCV'' is entered when the command is received and executed.
77``^P'' indicates a pass through.
78.IP
79The file /usr/net/netstat?, one per directly-connected machine,
80have various statistics about the usage of the network, and
81the system load.
82.IP 4.
83The overloading on various machines is causing high error rates.
84If these rates persist, the network can overload to the point
85where the queues are immense and nothing gets through.
86The only thing that can be done at this point is to remove the files (using
87.I netrm
88as super-user) and adjust the delay times in the `initfile'.
89.IP 5.
90If free space is a scarce commodity, truncate logfile and plogfile?,
91and check /usr/net/send? and /usr/net/rcv.
92If there are any files there which are quite old,
93use your judgement to remove them.
94.IP 6.
95Net news should be provided periodically
96(usually in `/usr/help' or `/usr/news').
97.SH
98Setting up the Network
99.IP 1.
100Hardware
101.RS
102.PP
103For another machine to join the network, there must be some hardware link,
104such as tty lines, special character-oriented
105hardware, or DMA lines between the two machines.
106The software does not require the link to be reliable or fast.
107The best way to start is with slow-speed TTY lines
108(say 1200 baud) which demonstrate the network's usefulness at low cost.
109The highest transfer speed on a TTY link is about
110one-half the link speed (at best),
111because of processing time, the 3 \(-> 4 character
112expansion from 8 bits to 6, and the responses.
113.RE
114.IP 2.
115Software
116.RS
117.PP
118There is a subdirectory ``src/net''
119with all the network source files and a ``makefile''.
120The file ``READ_ME'' has information about
121the different conditional compilation
122option available, and table entries which must be made in the `.c' files.
123.PP
124Assuming the options have been specified in the makefile, the command
125.DS
126% make all
127.DE
128will make all the necessary files.
129Then the command
130.DS
131% make install DESTDIR=
132.DE
133will install the user commands and service programs.
134The directories are specified as options in the makefile.
135Finally,
136.DS
137% make clean
138.DE
139removes all the `.o' and executable files.
140.PP
141There are also other little-used programs, made by ``make othernet''.
142Included are programs to send and receive packets and files, and a program
143to simulate TTY lines using pipes.
144It should not be necessary to run these.
145.RE
146.IP 3.
147Directories and Files.
148.RS
149.PP
150The central directory is `/usr/net',
151which has subdirectories `bin', `rcv', and `send?', where
152the `?' represents the one-letter codes of the directly-connected machines.
153For various reasons, the support programs
154.I
155(netdaemon, netstart, mmail, mwrite,
156.R
157etc.) must be in `bin'.
158The user programs may be anywhere but the pathnames in "Paths.h"
159must be reset correctly.
160.PP
161The logfiles are `logfile' and `plogfile?',
162one for each directly-connected machine.
163If not present in `/usr/net', they are not created.
164.PP
165The file `bin/start' should start up all the net daemons on the current machine.
166This file is normally executed by `/etc/rc'.
167The file `initfile' has a format similar to `.netrc'
168but is read by the net daemons when they are started.
169It has the network device names, speed and various tuning parameters.
170The complete list is in the source file `sub.c'.
171It is generally possible to change almost anything about the network
172through the `initfile' and restarting the daemon.
173.PP
174The program `bin/netstart' is a simple program to
175start up a net daemon, and if it should abort for any reason, restart it.
176.PP
177There must be an account `network', which executes
178all responses and the free commands.
179Its login directory should be `/usr/net/network' and
180login shell should be `nsh' in that directory.
181The list of free commands can be changed in `nsh.c'.
182.PP
183The `cat' command must be in `/bin' (used by
184.I netcp).
185.PP
186At Berkeley, we follow the convention that the TTY
187special files are named `/dev/net-X', where `X'
188is the remote machine name.
189.PP
190The
191.UX
192mail program should be modified to recognize
193remote names and to fork a ``sendmail'' command.
194If possible, a `\-r' option should be added (see `mmail.c').
195.RE
196.SH
197Future Plans
198.PP
199It is important to understand the scope of this network;
200what it is and what it is not.
201Since it is ``batched'', there are a lot of things it cannot do.
202Our experience is that remote file copying, mailing and printing between
203.UX
204machines are adequate for our immediate needs.
205.PP
206In the future, we will concentrate on improving
207the hardware and speeding up the network, rather than major user-interface
208changes.
209.PP
210This is a list of the things that have been planned for the future
211for the network.
212.IP 1.
213Use Bill Joy's retrofit library to simulate the version 7 system calls.
214This would reduce the dependence on conditional compilation for V6 code.
215.IP 2.
216The file length restriction is a major inconvenience.
217One way to allow large files would be to
218send large files (over 100,000 chars) only when there are no smaller ones.
219This would be non-preemptive, but might be workable.
220Another way would be to have two hardware links,
221and two sets of daemons, one for large files and one for small ones.
222.IP 3.
223Bob Fabry has suggested generalizing the machine name to
224be user-definable as a login/machine pair, to
225make it easier for people with multiple accounts on multiple machines.
226.IP 4.
227It is possible to share binaries between all
228the similar machine configurations (e.g. the Comp. Center machines).
229This involves ``patching'' the local machine in the binary.
230.IP 5.
231Ed Gould suggested that the notion of ``default'' machine
232was too restrictive\(em
233that an appropriate default for, say, ``netlpr'' was a
234nearby machine with a quality printer, whereas the default for ``net''
235should be the logical most useful machine.
236.IP 6.
237Security \(em
238I have just recently bullet-proofed the network
239so `root' commands are very restricted.
240However, the presence of passwords in the `.netrc' files
241poses a hazard to other machines when one machine is broken into.
242As long as the root password is not in a file, the root is safe.
243I am fairly convinced there is no way using encryption
244to handle the `.netrc' files.
245The introductory documentation is very explicit about
246the threat these passwords pose.
247.IP 7.
248Certain other more exotic requests are unlikely
249to get done until things change:
250.RS
251.IP a)
252Having the same user-id's across machines.
253.IP b)
254Adding an option to ``net'' to wait until a response has been received.
255.IP c)
256There should be a net status command which would
257give things like load averages, the number of users, etc.
258.IP d)
259The notion of a local queue is not general enough\(em
260.I netq
261should print out relevant queues on other machines.
262.IP e)
263Files on intermediate machines can't be \fInetrm\fP'ed.
264.RE
265.SH
266For Berkeley
267.IP 1.
268The root-ownership of
269.I netlpr
270queue files is a problem.
271No easy solution to this problem is known at this time.
272.IP 2.
273There are hooks in for the B, INGRES, and Q
274machines, and I would love to have them added to the network.
275.IP 3.
276I'd like to see the following things happen:
277.RS
278.LP
279A driver for the network links to avoid character
280processing, which would make 9600-baud practical.
281On the Computer Center machines, this could be accomplished
282using a high speed link through the Bussiplexor.
283.LP
284It has also been suggested that all the mail programs
285look at a file to see if they should forward
286this message to an account on another machine.
287This would allow people to get all their mail on one machine.
288.RE
289.SH
290Bugs
291.IP 1.
292Extra files beginning with `df...' are created in the `send?'
293directories, with no control files (`cf...').
294They should be removed periodically.
295.I netrm
296will remove them.
297.IP 2.
298.I Netcp
299creates files with filenames as login names.
300They will never be sent and subsequent requests
301will be blocked.
302Their net queue files should be removed.
303.IP 3.
304In general, some requests can block the queue until removed.
305Shorter requests will get through, and longer ones will not.
306Again, their net queue files should be removed.