File: jenkins8.html

package info (click to toggle)
lg-issue39 2-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,408 kB
  • ctags: 145
  • sloc: ansic: 207; perl: 72; makefile: 37; sh: 4
file content (361 lines) | stat: -rw-r--r-- 15,830 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="StarOffice/5.0 (Unix)">
	<META NAME="AUTHOR" CONTENT="Ron Jenkins">
	<META NAME="CREATED" CONTENT="19990327;17313200">
	<META NAME="CHANGEDBY" CONTENT="Ron Jenkins">
	<META NAME="CHANGED" CONTENT="19990330;21493100">
	<STYLE>
	<!--
		@page { size: 21.59cm 27.94cm; margin-left: 3.18cm; margin-right: 3.18cm; margin-top: 2.54cm; margin-bottom: 2.54cm }
	-->
	</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000">
<!--endcut ============================================================-->

<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<P ALIGN=CENTER STYLE="margin-bottom: 0.00cm"><FONT SIZE=4><B>Linux
Primer Series Part 8</B></FONT></P>
<P ALIGN=CENTER STYLE="margin-bottom: 0.00cm"><FONT SIZE=4><B>Advanced
Network Services version 03.30.1999</B></FONT></P>
<P STYLE="margin-bottom: 0.00cm; font-weight: medium"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm; font-weight: medium"><FONT SIZE=3>Copyright
&copy;1998, 1999 Ron Jenkins.  All rights reserved.</FONT></P>
<P STYLE="margin-bottom: 0.00cm; font-weight: medium"><FONT SIZE=3>I
welcome your suggestions, corrections, criticisms, and comments.  I
may be reached at the following address - <A HREF="mailto:rjenkins62@netscape.net">rjenkins62@netscape.net</A>
.</FONT></P>
<P STYLE="margin-bottom: 0.00cm; font-weight: medium"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm; font-weight: medium"><FONT SIZE=3>This
work is provided on an &quot;as is&quot; basis. The author provides
no warranty whatsoever, either express or implied, regarding the
work, including warranties with respect to its merchantability or
fitness for any particular purpose.</FONT></P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">You may have noticed that my e mail
address has changed again.  My ISP has decided to move to metered
access, just as my last one did.  This seems to be a growing trend,
at least here in the Midwest.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">To eliminate the need for constantly
changing this stuff, I have acquired an account @ Netscape, which
will remain constant, regardless of ISP changes.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">As soon as I can afford it, or can
find a place to house my webpages, I will post it here. 
Unfortunately, I will be unable to have the updates and enhancements
to my column on-line until then.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Before I get a flood of &quot;Get a
Geocities page&quot; messages, let me just say that I have
requirements that Geocities is unwilling to supply.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">The qni.com address will still be
functional for a couple of months, to make the transition as smooth
as possible.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Operating Systems
Covered/Supported: </B>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Slackware version 3.6 </B>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>RedHat version 5.1 </B>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Windows NT Server version 4.0 </B>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Windows NT Workstation version
4.0 </B>
</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>I only test my columns on the
operating systems specified. I don't have access to a MAC, I don't
use Windows 95, and have no plans to use Windows 98.</B></P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>If someone would care to provide
equivalent instructions for any of the above operating systems, I
will be happy to include them in my documents. </B>
</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Advanced Network Services:</B></P>
<P STYLE="margin-bottom: 0.00cm">This month, we will be examining
some advanced services that you may or may not want to use on your
home network.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">In particular, we will be looking at
some options for streamlining the connection scripts, executing
demand dialing, and time synchronization issues.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">In this month's column, we will be
looking at the following areas of interest:</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Customization options for the
connect scripts</P>
<P STYLE="margin-bottom: 0.00cm">Time Synchronization</P>
<P STYLE="margin-bottom: 0.00cm">Demand Dialing</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">As always, I will include ant
distribution specific information as necessary.  Unless indicated
otherwise, the information will apply equally to both distributions.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Customization options for the
connect scripts:</B></P>
<P STYLE="margin-bottom: 0.00cm">I can't stress enough the importance
of assuring that your PPP software is version 2.3 or above.  It is
the added functionality that this software contains that make the
following things possible.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">With version 2.3 or greater, here
are some of the things we can do right from the script, rather than
having to run ancillary programs to accomplish similar functions.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Auto-reconnect - This option is
enabled using the keyword &quot;persist&quot; in the connect script. 
This eliminates the need for the pppupd software we have been using.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Demand Dialing - This option is
enabled using the keyword &quot;demand&quot; in the connect script. 
This eliminates the need for a third party program, such as diald.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Therefore, a new revised script
taking advantage of these options would look something like this:</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Begin connect script example -</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">#!/bin/sh</P>
<P STYLE="margin-bottom: 0.00cm">pppd connect \</P>
<P STYLE="margin-bottom: 0.00cm">'chat -v -f /path/to/chat/script'
/dev/cua1 115200 -detach crtscts modem \</P>
<P STYLE="margin-bottom: 0.00cm">-proxyarp defaultroute demand
persist &amp;</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">End connect script example -</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Note that no changes are required to
your chat script, as this just handles the initial terminal login,
then hands off to the PPP daemon.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Also, if your ISP's interpretation
of the phrase &quot;Unlimited Usage&quot; is like mine, you will be
limited to 10 to 12 hours per day.  I would strongly suggest that if
this is the case, then consider moving to another ISP.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">If you choose to stay, the demand
dialing function will be required, unless you want to connect
manually each time, or if you have a regular period of time during
which you use the Internet, you may want to write a cron job to take
care of connecting and disconnecting.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">For instance, say you connect from
8:00 a.m. To 8:00 p.m. every day, and wish to automate the procedure.
 You would simply open your crontab file with the command &quot;crontab
-e&quot; and enter the following two lines:</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">0 8 * *
*	/path/to/your/connect/script</P>
<P STYLE="margin-bottom: 0.00cm">0 20 * *
*	/path/to/your/ppp-off/script</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">or staying with our examples we have
been using:</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">0 8 * * *	/sbin/unicom</P>
<P STYLE="margin-bottom: 0.00cm">0 20 * * *	/usr/sbin/ppp-off</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Time Synchronization:</B></P>
<P STYLE="margin-bottom: 0.00cm">Although we don't often think about
it, time is very important to the proper operation of computers and
programs.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Y2K issues aside, many services on
your network or individual systems depend on an accurate measurement
of time.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">UNIX and Linux in particular are
very picky about time discrepancies, and tend to do nasty things to
your processes and data if two machines disagree about the time.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Briefly, there are two methods of
acquiring an accurate measurement of time:</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">From an internal device (such as
your CMOS clock,) or from an external source, such as a time server
or frequency standard.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">This will be old hat to those of you
who come from an amateur radio background, but the government has
just such a source available, and several different options for
availing yourself of its use.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Your internal CMOS clock is
unreliable, and dependent upon a constant power source.  So in this
area we will concentrate on synchronizing our machines, and our
network to an external source.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">The &quot;absolute standard&quot;
for time is an atomic clock housed at the National Institutes of
Standards and Technology (NIST) in Fort Collins, Colorado.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">There are many ways to use this
standard to synchronize your network, ranging from Radio Frequency
receivers to modem dial up connections, to Global Positioning
Satellites (GPS.)</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Here we will concentrate on using
the Internet to accomplish this synchronization.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">The de facto standard for this
purpose is something called the Network Time Protocol, or NTP.  Some
systems, particularly RedHat based systems, often come with ntp or
xntp pre-installed.  Check the documentation and man pages for more
information.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">If you are using a Slackware based
machine, you will have a utility called netdate that will serve the
same function.  You can initiate netdate manually, trough a script,
or from a cron job.  Check the man page for more details.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Either system will require you to
specify one or more time servers from which accurate data can be
obtained.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Time Servers are machines that
collect and dispense accurate time data.  They are organized in to
&quot;stratums&quot; with the lower numbers being the more accurate.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Stratum one servers are usually
servers that have some sort of direct logical connection to the
atomic clock, either by radio satellite or modem, and an accurate
external device to make this connection.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Stratum two servers acquire data
from the stratum one machines, and pass it along to other stratum two
machines, or peers, and down to stratum three machines, and so on.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">For most home applications, and
business applications that do not require a &quot;real time clock,&quot;
stratum two servers are more than adequate for your needs.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">For a list of time servers, as well
as the ntp software, see the resources section.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Demand Dialing:</B></P>
<P STYLE="margin-bottom: 0.00cm">If you have followed the above
instructions, then this should be a moot point.  If you cannot or
will not upgrade your PPP software to 2.3 or above, you will need to
use diald or something similar to initiate the demand dialing
function.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">Configuration of diald or one of the
other programs is beyond the scope of this document.    Check your
preferred program documentation and man pages for more information.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm">If enough people express interest, I
will devote a column specifically to this subject in the future.</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Next month, we will conquer Print
Services.  See 'ya then!</B></P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>References:</B></P>
<P STYLE="margin-bottom: 0.00cm">PPP HOW-TO</P>
<P STYLE="margin-bottom: 0.00cm">pppd man pages</P>
<P STYLE="margin-bottom: 0.00cm">netdate man pages</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P STYLE="margin-bottom: 0.00cm"><B>Resources:</B></P>
<P STYLE="margin-bottom: 0.00cm">http://www.nist.gov/</P>
<P STYLE="margin-bottom: 0.00cm"><BR>
</P>
<P> <HR> <P> 
<center><H4>Previous ``Linux Primer'' Columns</H4></center>
<p>
<A HREF="../issue32/jenkins1.html">Linux Primer #1, September 1998</A><BR>
<A HREF="../issue33/jenkins2.html">Linux Primer #2, October 1998</A><BR> 
<A HREF="../issue34/jenkins3.html">Linux Primer #3, November 1998</A><BR> 
<A HREF="../issue35/jenkins4.html">Linux Primer #4, December 1998</A><BR> 
<A HREF="../issue36/jenkins5.html">Linux Primer #5, January 1999</A><BR> 
<A HREF="../issue37/jenkins6.html">Linux Primer #6, February 1999</A><BR> 
<A HREF="../issue38/jenkins7.html">Linux Primer #7, March 1999</A><BR> 

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1999, Ron Jenkins <BR> 
Published in Issue 39 of <i>Linux Gazette</i>, April 1999</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./lg_toc39.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./woods.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./richardson.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->