home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / DOC / HOWTO / OTHER_FO / SGML / NET_2_HO.GZ / NET-2-HOWTO.sgml
Encoding:
SGML Document  |  1996-05-04  |  207.3 KB  |  5,139 lines

  1. <!doctype linuxdoc system>
  2.  
  3. <!-- This is the Linux NET-2/3-HOWTO, please forward any comments or suggestions
  4.      to the author: terry@perf.no.itg.telecom.com.au 
  5.  -->
  6.  
  7. <article>
  8.  
  9. <!-- Title information -->
  10.  
  11. <title>Linux NET-2/3-HOWTO
  12. <author>Terry Dawson, <tt>terry@perf.no.itg.telecom.com.au</tt>
  13. <date>v3.5, 16 January 1996
  14.  
  15. <abstract>
  16. This document aims to describe how to obtain, install and configure the Linux
  17. NET-2 and NET-3 networking software. Some answers to some of the more
  18. frequently asked questions are included in the appendix. This document is not
  19. designed to teach you about tcp/ip networking, though some information of this
  20. kind is included where possible. Pointers to other documentation which does
  21. teach tcp/ip networking principles are listed.
  22. </abstract>
  23.  
  24. <!-- Table of contents -->
  25. <toc>
  26.  
  27. <!-- Begin the document -->
  28.  
  29. <sect><heading>Introduction.
  30.  
  31. <p>
  32. This is the Linux NET-2/3-HOWTO. This document is a complete rewrite of the
  33. earlier NET-FAQ and of the subsequent NET-2-HOWTO versions 1.0+. This document
  34. is for the new NET-2/NET-3 tcp/ip networking code for Linux kernels 1.0 and
  35. above.
  36.  
  37. <sect1><heading>Changes from the previous release.
  38.  
  39. <p>
  40. <verb>
  41. Additions:
  42.  
  43. Corrections/Updates:
  44.     updated ipalias to apply to new 1.3.* kernels
  45.     pointed IPX questions to IPX-HOWTO
  46.  
  47. </verb>
  48.  
  49. <sect1><heading>A brief development history of Linux Networking.
  50.  
  51. <p>
  52. <tt>Ross Biro <biro@yggdrasil.com></tt> wrote the original kernel
  53. based networking code for Linux. He used ethernet drivers written by
  54. <tt>Donald Becker <becker@cesdis1.gsfc.nasa.gov></tt>, a <em>SLIP</em> driver
  55. written by <tt>Laurence Culhane <loz@holmes.demon.co.uk></tt> and a D-Link
  56. driver by <tt>Bj0rn Ekwall <bj0rn@blox.se></tt>.
  57.  
  58. The further development of the Linux networking code was later taken up by
  59. <tt>Fred van Kempen <waltje@hacktic.nl></tt>, who took Ross's code and
  60. produced the <em>NET-2</em> release of network code. NET-2 went through a
  61. number of revisions until release NET-2d, when
  62. <tt>Alan Cox <iialan@iifeak.swan.ac.uk></tt> set about debugging Fred's
  63. code with the aim of producing a stable and working release of code for
  64. incorporation into the standard kernel releases. This code was called
  65. originally called <em>NET-2D(ebugged)</em> and was incorporated into the
  66. standard kernel releases some time before Linux version 1.0 was released.
  67.  
  68. PPP support was added by <tt>Michael Callahan, <callahan@maths.ox.ac.uk></tt>
  69. and <tt>Al Longyear, <longyear@netcom.com></tt>, originally as patches to
  70. the kernel and in later releases as part of the standard kernel distribution.
  71.  
  72. The latest version of the code, NET-3, appears in kernel releases
  73. 1.1.5 and later and is essentially the same code, but with many fixes,
  74. corrections and enhancements.
  75.  
  76. Alan has added such features as IPX and AX.25 modules.
  77. <tt>Florian La Roche, <flla@stud.uni-sb.de></tt> has produced an updated
  78. distribution of network applications.
  79.  
  80. NIIBE Yutaka has enhanced the PLIP driver.
  81.  
  82. Jonathan Naylor has taken up development work on the AX.25 code and has
  83. added many features including NetRom support.
  84.  
  85. Many other people have made contributions by way of bug fixes, ports of
  86. applications and by writing device drivers.
  87.  
  88. <sect><heading>Disclaimer.
  89.  
  90. <p>
  91. The Linux networking code is a brand new implementation of kernel based
  92. tcp/ip networking. It has been developed from scratch and is not a port of
  93. any existing kernel networking code.
  94.  
  95. The Linux networking is some of the newest and most innovative kernel based
  96. networking code around. There are many developers working on pressing it into
  97. service for many new applications and tasks and because of this it is growing
  98. rapidly. It is in a constant state of flux and it may still have a number of
  99. bugs or problems with it and there may be a number of fixes and patches
  100. released.
  101. If you are worried about problems then just stick to the version of network
  102. code released with the standard kernel releases and utility sets. These standard
  103. kernel releases are denoted by an <bf>even</bf> number in the second digit,
  104. 1.2.7 for example is a production release. The kernel versions with an odd
  105. number as the second digit are <bf>alpha</bf> versions and you should expect
  106. to find problems or bugs with these version as they are <em>test</em> releases.
  107. The networking code has a small team of dedicated people working on it, with a
  108. cast of thousands testing the code, collecting and reporting bugs and
  109. problems, providing fixes for problems. Any problem you experience is likely
  110. to have already been reported and be being worked on and will possibly be
  111. corrected soon, so be patient, or if you can help, offer your assistance.
  112.  
  113. We do not and cannot know everything there is to know about the Linux network
  114. software. Please accept and be warned that this document probably does contain
  115. errors. Please read any README files that are included with any of the various
  116. pieces of software described in this document for more detailed and accurate
  117. information. We will attempt to keep this document as error-free and up-to-date
  118. as possible. Versions of software are current as at time of writing.
  119.  
  120. <bf>NOTE:</bf> While its name may appear similar to the <em>Berkeley Software
  121. Distribution NET-2 release</em>, the Linux network code actually has nothing
  122. at all to do with it. Please don't confuse them.
  123.  
  124. <sect><heading>Questions already ?
  125.  
  126. <p>
  127. <em>`The only stupid question is the unasked one.'</em>
  128.  
  129. If you have general configuration questions and you have been unable to
  130. find the answers after reading the other various HOWTO and FAQ files, then
  131. you would be best served to post them to <em>comp.os.linux.networking</em>, or,
  132. if you believe your question to be specifically related to the Linux Network
  133. code, then you could post it to the NET mailing list. <bf>Please include as
  134. much relevant information as possible</bf>, there is nothing more annoying than
  135. to have a bug or problem reported without sufficient information to even
  136. begin searching for it.
  137.  
  138. <bf>Version numbers and revisions of code, a detailed account of the problem,
  139. and the circumstances that caused it to occur, are essential. Trace and
  140. debug messages where available should also be considered mandatory.</bf>
  141.  
  142. If you have a question relating to the configuration of, or problems
  143. experienced with, <bf>any</bf> linux distribution, regardless of who
  144. has provided it, please contact the people who created the distribution
  145. first before attempting to report the problem to the network code
  146. developers. The reason for this is that some of the distributions use
  147. non-standard directory structures and supply test/non-standard versions of
  148. code and utilities. The developers of the NET-2 code cannot be expected to
  149. offer support for the network code as distributed in any form, other than as
  150. described in this document, or as per distributed Alpha test instructions.
  151.  
  152. To join the Linux <bf>linux-net</bf> channel on the mail list server, send
  153. mail to:
  154. <tscreen><verb>
  155. Majordomo@vger.rutgers.edu
  156. </verb></tscreen>
  157. with the line:
  158. <tscreen><verb>
  159. subscribe linux-net
  160. </verb></tscreen>
  161. as the message body and you will be subscribed. The subject line is ignored.
  162. Remember, keep in mind that the <tt>linux-net</tt> channel is for development
  163. discussions only.
  164.  
  165. A PPP list has been established. To join it, use the same procedure as for
  166. joining the <tt>linux-net</tt> channel, except specify <tt>linux-ppp</tt> in
  167. place of <tt>linux-net</tt> in the message body.
  168.  
  169. Note also that a <tt>linux-hams</tt> list has been established. This list has
  170. been established for the discussion of programs related to Amateur Radio. To
  171. join it, follow the same procedure as for joining the <tt>linux-net</tt> or
  172. <tt>linux-ppp</tt> channels, except specify <tt>linux-hams</tt> in place of
  173. <tt>linux-net</tt> in the message body.
  174.  
  175. <sect><heading>Related Documentation. (Where to learn about tcp/ip)
  176.  
  177. <p>
  178. If you are looking for information about tcp/ip networking that this
  179. HOWTO does not cover, then you might try the following sources, as they
  180. provide some very useful information.
  181.  
  182. <tt>Olaf Kirch</tt> has written a substantial document as part of the
  183. <em>Linux Documentation Project</em> entitled the <em>Linux Network
  184. Administration Guide</em>. This is an excellent document. It covers all
  185. aspects of setting up and using the tcp/ip networking under Linux, including
  186. NFS, UUCP, mail, News, nameserver etc.
  187.  
  188. Olaf's book supplements this HOWTO, taking up where this document leaves
  189. off. This document covers the installation and configuration of the
  190. NET code, i.e. `How to put your machine on the net'. If you are new to
  191. unix networking, then I strongly urge you to obtain a copy and read it
  192. first. It will answer a lot of questions for you that are not within the
  193. scope of this document.
  194.  
  195. The current release version is available in:
  196.  
  197. <bf>sunsite.unc.edu</bf>
  198. <tscreen><verb>
  199. /pub/Linux/docs/linux-doc-project/network-guide/*
  200. </verb></tscreen>
  201.  
  202. There are various versions of the document in this directory. The most
  203. common formats are supported, being plain ascii, Postscript, DVI, Latex
  204. and groff.
  205.  
  206. The <em>Linux Network Administrators Guide</em> is Copyright (c) by Olaf Kirch.
  207.  
  208. There are now quite a variety of companies publishing Linux documentation so
  209. if you want to avoid having to retrieve and print the document yourself you
  210. should have little trouble finding Olaf's book in a bound form over the counter
  211. at any good bookshop.
  212.  
  213. You should also read the other HOWTO documents relevant to networking with
  214. Linux.
  215.  
  216. They are:
  217. <p>
  218. The <url url="http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html"
  219. name="Ethernet-HOWTO">, which you should read if you intend using an
  220. ethernet card with Linux. It includes a lot of detail on how to select,
  221. install and configure an ethernet card for Linux and on how to diagnose
  222. problems related to the ethernet driver.
  223.  
  224. The <url url="http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html"
  225. name="PPP-HOWTO"> if you intend using PPP.
  226.  
  227. The <url url="http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html"
  228. name="IPX-HOWTO"> if you would like information relating to IPX support
  229. for Linux.
  230.  
  231. The <url url="http://sunsite.unc.edu/mdw/HOWTO/Serial-HOWTO.html"
  232. name="Serial-HOWTO"> if you intend using SLIP or PPP in server mode.
  233.  
  234. The <url url="http://sunsite.unc.edu/mdw/HOWTO/NIS-HOWTO.html"
  235. name="NIS-HOWTO"> if you are interested in running a version of Sun's
  236. Network Information Service.
  237.  
  238. The <url url="http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html"
  239. name="HAM-HOWTO"> if you are interested in configuring and running
  240. amateur radio software.
  241.  
  242. The <url url="http://sunsite.unc.edu/mdw/HOWTO/Mail-HOWTO.html"
  243. name="Mail-HOWTO"> and the
  244. <url url="http://sunsite.unc.edu/mdw/HOWTO/News-HOWTO.html"
  245. name="News-HOWTO"> for some specific information on setting up Mail and News
  246. on your system.
  247.  
  248. The <url url="http://sunsite.unc.edu/mdw/HOWTO/UUCP-HOWTO.html"
  249. name="UUCP-HOWTO"> if you will be connecting to the net via UUCP.
  250.  
  251. The <url url="http://sunsite.unc.edu/mdw/HOWTO/Firewall-HOWTO.html"
  252. name="Firewall-HOWTO"> if you want to build a Linux based Firewall gateway
  253. for your network.
  254.  
  255. If you are after some basic tutorial information on tcp/ip networking
  256. generally, then I recommend you take a look at the following documents:
  257.  
  258. <descrip>
  259. <tag>tcp/ip introduction
  260. </tag>
  261. <url url="ftp://athos.rutgers.edu/runet/tcp-ip-intro.doc"
  262. name="text version">,
  263. <url url="ftp://athos.rutgers.edu/runet/tcp-ip-intro.ps"
  264. name="postscript version">.
  265. <tag>tcp/ip administration
  266. </tag>
  267. <url url="ftp://athos.rutgers.edu/runet/tcp-ip-admin.doc"
  268. name="text version">,
  269. <url url="ftp://athos.rutgers.edu/runet/tcp-ip-admin.ps"
  270. name="postscript version">.
  271. </descrip>
  272.  
  273. If you are after some more detailed information on tcp/ip networking then
  274. I highly recommend:
  275.  
  276. <tscreen><verb>
  277. "Internetworking with TCP/IP"
  278. by Douglas E. Comer
  279.  
  280. ISBN 0-13-474321-0
  281. Prentice Hall publications.
  282. </verb></tscreen>
  283.  
  284. If you are wanting to learn about how to write network applications in
  285. a Unix compatible environment then I also highly recommend:
  286.  
  287. <tscreen><verb>
  288. "Unix Network Programming"
  289. by W. Richard Stevens
  290.  
  291. ISBN 0-13-949876-1
  292. Prentice Hall publications.
  293. </verb></tscreen>
  294.  
  295. <sect1><heading>New versions of this document.
  296.  
  297. <p>
  298. If your copy of this document is more than two months old then I strongly
  299. recommend you obtain a newer version. The networking support for Linux is
  300. changing very rapidly with new enhancements and features, so this document
  301. also changes fairly frequently. The latest released version of this document
  302. can always be retrieved by anonymous ftp from:
  303.  
  304. <bf>sunsite.unc.edu</bf>
  305. <tscreen><verb>
  306. /pub/Linux/docs/HOWTO/NET-2-HOWTO
  307. </verb></tscreen>
  308. or:
  309. <tscreen><verb>
  310. /pub/Linux/docs/HOWTO/other-formats/NET-2-HOWTO{-html.tar,ps,dvi}.gz
  311. </verb></tscreen>
  312.  
  313. or via the World Wide Web from the
  314. <url url="http://sunsite.unc.edu/mdw/linux.html"
  315. name="Linux Documentation Project Web Server">, at page:
  316. <url url="http://sunsite.unc.edu/mdw/HOWTO/NET-2-HOWTO.html" name="NET-2-HOWTO">
  317. or directly from me, <tt><94004531@postoffice.csu.edu.au></tt>. It will
  318. also be posted to the newsgroups: <tt>comp.os.linux.networking</tt>,
  319. <tt>comp.os.linux.answers</tt> and <tt>news.answers</tt> from time to time.
  320.  
  321. You can find <tt>news.answers</tt> FAQ postings, including this one, archived
  322. on <tt>rtfm.mit.edu:/pub/usenet</tt>.
  323.  
  324. <sect1><heading>Feedback.
  325.  
  326. <p>
  327. Please send any comments, updates, or suggestions to me,
  328. <tt><94004531@postoffice.csu.edu.au></tt>. The sooner I get feedback, the
  329. sooner I can update and correct this document. If you find any problems
  330. with it, please mail me directly as I now very rarely read the newsgroup.
  331. You might also catch me as <em>terryd</em> on the <tt>#linpeople</tt> IRC
  332. channel on the <tt>undernet</tt> IRC network.
  333.  
  334. <sect><heading>Some of the terms used in this document.
  335.  
  336. <p>
  337. You will often see the terms <tt>client</tt> and <tt>server</tt> used in this
  338. document. They are normally fairly specific terms but in this document I have
  339. generalised their definitions a little so that they mean the following:
  340. <descrip>
  341. <tag>client</tag>The machine or program that initiates an action or a
  342. connection for the purpose of gaining use of some service or data.
  343. <tag>server</tag>The machine or program that accepts incoming connections from
  344. multiple remote machines and provides a service or data to those.
  345. </descrip>
  346.  
  347. These definitions are not very reliable either, but they provide a means of
  348. distinguishing the ends of peer to peer systems such as <em>SLIP</em> or
  349. <em>PPP</em> which truly do not actually have clients and servers.
  350. <p>
  351. Other terms you will see are:
  352.  
  353. <descrip>
  354. <tag>IP address</tag>This is a number that uniquely identifies a TCP/IP
  355. host on the network. The address is 4 bytes long and is usually represented
  356. in what is called the "dotted decimal notation", where each byte is
  357. represented in decimal from with dots `.' between them.
  358. <tag>Hardware address</tag>This is a number that uniquely identifies a host
  359. in a physical network at the media access layer. Examples of this are
  360. <em>Ethernet Addresses</em> and <em>AX.25 Addresses</em>.
  361. <tag>datagram</tag>A datagram is a discrete package of data and headers
  362. which contain addresses, which is the basic unit of transmission across an
  363. IP network. You might also hear this called a `packet'.
  364. <tag>MTU</tag>The Maximum Transmission Unit (<em>MTU</em>) is a parameter that
  365. determines the largest datagram than can be transmitted by an IP interface
  366. without it needing to be broken down into smaller units. The MTU should be
  367. larger than the largest datagram you wish to transmit unfragmented. Note, this
  368. only prevents fragmentation locally, some other link in the path may have
  369. a smaller MTU and the datagram will be fragmented there. Typical values
  370. are 1500 bytes for an ethernet interface, or 576 bytes for a SLIP interface.
  371. <tag>MSS</tag>The Maximum Segment Size (<em>MSS</em>) is the largest quantity
  372. of data that can be transmitted at one time. If you want to prevent local
  373. fragmentation MSS would equal MTU-IP header.
  374. <tag>window</tag>The <em>window</em> is the largest amount of data that
  375. the receiving end can accept at a given point in time.
  376. <tag>route</tag>The <em>route</em> is the path that your datagrams take
  377. through the network to reach their destination.
  378. <tag>ARP</tag>This is an acronym for the  <em>Address Resolution Protocol</em>
  379. and this is how a network machine associates an IP Address with a hardware
  380. address.
  381. </descrip>
  382.  
  383. <sect><heading>NET-3 Supported functionality.
  384.  
  385. <p>
  386. The NET code is a complete kernel based implementation of tcp/ip for Linux.
  387.  
  388. <sect1><heading>General Support
  389.  
  390. <p>
  391. The recent NET-3 versions of code support:
  392. <descrip>
  393. <tag>Ethernet Cards
  394. </tag>most popular ethernet cards are supported. Including some portable, 
  395. pocket adaptors and PCI.
  396. <tag>SLIP (Serial Line IP) and PPP (Point to Point Protocol)
  397. </tag>for tcp/ip networking over serial lines such as the telephone via modem,
  398. or a local cable between two machines.
  399. <tag>Van Jacobsen Header Compression
  400. </tag>for compressing the tcp/ip headers to improve SLIP/PPP performance over
  401. low speed lines.
  402. <tag>PLIP (Parallel Lines IP)
  403. </tag>to allow local connections between two machines using your printer ports.
  404. <tag>EQL Load balancing
  405. </tag>allows you to use two (or more) links to connect your machine to another
  406. machine or the Internet (provided your ISP supports it) to effectively double
  407. your bandwidth. New release kernels support this.
  408. <tag>NFS (Networked File System)
  409. </tag>to allow you to remotely mount another machines filesystems across a
  410. network connection.
  411. <tag>IPX (Novell)
  412. </tag>to allow you to write custom IPX applications, or to use Linux as an
  413. IPX router.
  414. <tag>Sun's Network Information System - NIS
  415. </tag>An NIS implementation has been ported to Linux should you wish to use it.
  416. <tag>ARCNet
  417. </tag>An ARCNet driver has been written and is included in recent kernels. It
  418. might not be as fast as ethernet but the cards are much cheaper.
  419. <tag>IBM's Token Ring
  420. </tag>to allow linux to be installed on a Token Ring lan. An experimental Token Ring driver has been written is included in recent kernels.
  421. <tag>Appletalk
  422. </tag>Or is this EtherTalk ? Either way, I think this will let you shares files
  423. and printers with your Macintosh. See `Experimental and Developmental modules.'
  424. below.
  425. <tag>WaveLan Wireless Lan Card support
  426. </tag>to allow you to operate your linux machine in a mobile fashion or at some distance from your network. Support for the WaveLan Wireless lan card is now included in recent
  427. kernels.
  428. <tag>ISDN
  429. </tag>There is some experimental support for some proprietary ISDN cards
  430. available. See `Experimental and Developmental modules.' below.
  431. <tag>ATM
  432. </tag>There is a team of programmers working to provide ATM support for Linux.
  433. <tag>IP firewalling
  434. </tag>to assist in configuring your Linux machine as a secure firewall
  435. gateway.
  436. <tag>IP Accounting
  437. </tag>to allow you to keep track of who is using how much of your network.
  438. <tag>IP tunnelling
  439. </tag>to allow mobile IP experimentation
  440. </descrip>
  441. <p>
  442. The NET-3 network code does not yet currently support:
  443.  
  444. <descrip>
  445. <tag>SPX/NCP (Novell Netware) support
  446. </tag>to allow Linux to serve and mount Novell network filesystems or use
  447. Novell printers. This is being worked on but due to the proprietary nature of
  448. the product it may take some time to do.
  449. <tag>FDDI
  450. </tag>There is currently no support that I know of for FDDI cards for Linux.
  451. <tag>System-V streams
  452. </tag>there is a team of people working on System-V streams for Linux, details
  453. are presented later.
  454. </descrip>
  455.  
  456. <sect1><heading>Supported Ethernet cards.
  457.  
  458. <p>
  459. The 1.2.0 linux kernel release supports the following types of Ethernet
  460. cards:
  461.  
  462. <itemize>
  463. <item>WD80*3 and close compatibles.
  464. <item>SMC Ultra.
  465. <item>AMD LANCE and PCnet (AT1500 and NE2100) and close compatibles.
  466. <item>3Com 3c501 (obsolete and very slow).
  467. <item>3Com 3c503.
  468. <item>3Com 3c505.
  469. <item>3Com 3c507.
  470. <item>3Com 3c509/3c579.
  471. <item>Cabletron E21xx.
  472. <item>DEPCA and close compatibles.
  473. <item>EtherWorks 3.
  474. <item>ARCNet.
  475. <item>AT1700 (not clones).
  476. <item>EtherExpress.
  477. <item>NI5210 and close compatibles.
  478. <item>NI6510.
  479. <item>WaveLAN.
  480. <item>HP PCLAN+ (27247B and 27252A).
  481. <item>HP PCLAN (27245 and other 27xxx series).
  482. <item>NE2000/NE1000 and close compatibles.
  483. <item>SK_G16.
  484. <item>Ansel Communications EISA 3200.
  485. <item>Apricot Xen-II on board ethernet.
  486. <item>DE425, DE434, DE435.
  487. <item>Zenith Z-Note.
  488. <item>AT-LAN-TEC/RealTek pocket adaptor.
  489. <item>D-Link DE600 pocket adaptor and close compatibles.
  490. <item>D-Link DE620 pocket adaptor and close compatibles.
  491. </itemize>
  492.  
  493. Later versions of the Kernel software may support a wider variety of cards.
  494.  
  495. If you intend using an ethernet card with Linux you should read the
  496. <url url="http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html"
  497.     name="Ethernet-HOWTO"> as it contains a lot of very useful information on
  498. the supported ethernet cards, including information on how to choose an
  499. ethernet card if you are intending to purchase some specifically for Linux.
  500.  
  501. As mentioned above, Linux supports other means of network connection if you
  502. don't have access to an ethernet card or connection. Many universities and
  503. businesses worldwide offer some form of dial-up network access. Generally
  504. these forms of access will offer an option of either SLIP or PPP access,
  505. so you will be well catered for. All you will need is a telephone modem,
  506. the one you already have may well be good enough and to configure your
  507. Linux system appropriately. There are sections below that describe exactly
  508. what you need.
  509.  
  510. <sect1><heading>Support for Amateur Radio
  511.  
  512. <p>
  513. Linux now supports a number of features specifically for Amateur Radio. The
  514. latest alpha kernels are now distributed with standard support for:
  515.  
  516. <descrip>
  517. <tag>AX.25 Support
  518. </tag>Alan Cox and Jonathan Naylor have kernel based AX.25 socket support
  519. working.
  520. <tag>NetRom Support
  521. </tag>Jonathan Naylor has developed kernel based NetRom support. It is still
  522. experimental but is progressing well.
  523. <tag>Ottawa PI Card
  524. </tag>A mature driver for the Ottawa PI card has been developed by Dave Perry
  525. of the Ottawa Packet Radio Group.
  526. <tag>Generic SCC card driver
  527. </tag>A generic driver for SCC cards is now included in alpha kernels developed
  528. by Joerg Reuter.
  529. <tag>A kernel user network link driver
  530. </tag>for linking user programs to the kernel without messy pty's.
  531. </descrip>
  532.  
  533. Further detail on the Amateur Radio support can be found in the
  534. <url url="http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html" name="HAM-HOWTO">.
  535.  
  536.  
  537. <sect><heading>Getting the NET-2/NET-3 software.
  538.  
  539. <p>
  540. Before you can configure the networking software you must obtain all of the
  541. bits and pieces that make it up. These include the current version of the
  542. kernel code (version 1.0 or later), the correct system libraries, the tcp/ip
  543. configuration programs and files (e.g. /sbin/ifconfig, /etc/hosts etc.) and
  544. finally a set of network application programs (such as telnet, ftp, rlogin
  545. etc.).
  546.  
  547. If you obtained Linux from a distribution you may already have all that you
  548. need. Check and make sure that you do. For example, some Linux distributions
  549. come with all of the network configuration files, binaries, libraries and
  550. kernel installed, so there's no reason to get the following files.
  551.  
  552. <bf>NOTE: they may be in directories and files different to those specified
  553. in this HOWTO document</bf>
  554.  
  555. If you <bf>DO</bf> have the network software, skip to the `Configuring the
  556. kernel' section. If you <bf>DO NOT</bf> have the network software follow the
  557. following directions.
  558.  
  559. <sect1><heading>The kernel source.
  560.  
  561. <p>
  562. Version 1.2.* of the Linux kernel is the <em>production</em> version. Any of the
  563. Linux kernels 1.3.* are development kernels. If you feel at all concerned
  564. about the possibility of having to patch and modify the kernel source, then
  565. you should stick to this release, as it will do most of what you want it to.
  566. In the case of the networking code though, I strongly suggest you just take a
  567. deep breath and follow the newer releases of code, as there have been many
  568. changes in the newer version kernels that affect networking. I know you hear
  569. it from everyone and everywhere, but when trying out any new version of kernel
  570. software you should always ensure that you have sufficient backups of your
  571. system just in case something goes seriously wrong while you are testing.
  572.  
  573. The current kernel version is found in:
  574.  
  575. <bf>ftp.funet.fi</bf>
  576. <tscreen><verb>
  577. /pub/OS/Linux/PEOPLE/Linus/v1.2/linux-1.2.13.tar.gz
  578. </verb></tscreen>
  579.  
  580. This is a gzipped file, so you will need <em>gzip</em> to uncompress it.
  581.  
  582. To install it, try:
  583.  
  584. <tscreen><verb>
  585. # cd /usr/src
  586. # mv linux linux.old
  587. # gzip -dc linux-1.2.13.tar.gz | tar xvf -
  588. </verb></tscreen>
  589.  
  590. You may also find some files called <tt> patch-1.2.1.gz ...</tt> in the same
  591. directory. These are patch files. If you have a linux kernel that is
  592. version 1.2.1 then what this means is that you have linux kernel version
  593. 1.2.0 with patch 1 applied. So you don't need to patch 1. If there are any
  594. patch files that are greater than the version of kernel you have, you should
  595. obtain <bf>all</bf> of those above and apply them <bf>in sequence</bf>
  596. with something like the following commands:
  597.  
  598. <tscreen><verb>
  599. # cd /usr/src
  600. # for patchfile in .../patch*
  601. > do
  602. > gzip -dc $patchfile | patch -p0 2>>patch.errs
  603. > done
  604.  
  605.  ...
  606. </verb></tscreen>
  607.  
  608. Check the output file (patch.errs) and search for the string <tt>fail</tt>.
  609. If you can't find it then all of the patch files were applied ok. If it is
  610. there, then at least one of the patch files didn't apply correctly. If this
  611. happens what you should do is start again from a clean kernel archive and
  612. apply the patches one by one until you find the patch file that failed. If you
  613. can't work out why it didn't work then report it as a problem.
  614.  
  615. <sect1><heading>The libraries.
  616.  
  617. <p>
  618. You'll want at <bf>least</bf> version 4.4.2 of <em>libc</em>, as there
  619. were problems with earlier version that affected subnet masks.
  620.  
  621. The current a.out libraries (libc-4.6.27) can be found in:
  622.  
  623. <bf>sunsite.unc.edu</bf>
  624. <tscreen><verb>
  625. /pub/Linux/GCC/
  626. </verb></tscreen>
  627.  
  628. You will need at least the following files:
  629.  
  630. <itemize>
  631. <item>image-4.6.27.tar.gz
  632. <item>inc-4.6.27.tar.gz
  633. <item>extra-4.6.27.tar.gz
  634. <item>release.libc-4.6.27
  635. </itemize>
  636.  
  637. When installing libc.4.6.27 you <bf>MUST</bf> read <bf>release.libc-4.6.27</bf>
  638. before you install the libraries. Please note that to use release 4.5.26 or
  639. later you will also need at least GCC version 2.6.2 and Linux kernel 1.1.52
  640. or later.
  641.  
  642. <sect1><heading>The network configuration tool suite.
  643.  
  644. <p>
  645. You will need the utility suite that provides tools to configure your network
  646. support.
  647.  
  648. The current NET-2 utility suite is available from:
  649.  
  650. <bf>ftp.linux.org.uk</bf>
  651. <tscreen><verb>
  652. /pub/linux/Networking/PROGRAMS/NetTools/net-tools-1.2.0.tar.gz
  653. </verb></tscreen>
  654.  
  655. Because the kernel networking code is still changing some changes to the
  656. network tools have been necessary as new kernels are released, so you will
  657. need to choose the version that is appropriate for the kernel version you
  658. intend to use.
  659.  
  660. The filenames reflect the earliest version of kernel that the tools will
  661. work with. Please choose the filename whose version equals, or is less than
  662. the version of kernel source you intend to use.
  663.  
  664. To build and install the tools, you should try:
  665. <tscreen><verb>
  666. # cd /usr/src
  667. # mkdir net-tools
  668. # cd net-tools
  669. # gzip -dc net-tools-1.2.0.tar.gz | tar xvf -
  670. # make
  671. </verb></tscreen>
  672.  
  673. This will automatically run the <tt>Configure.sh</tt> script. If everything
  674. makes ok, then:
  675.  
  676. <tscreen><verb>
  677. # make install
  678. </verb></tscreen>
  679.  
  680. If you use a kernel version 1.1.26 or earlier you should look in:
  681.  
  682. <bf>ftp.linux.org.uk</bf>
  683. <tscreen><verb>
  684. /pub/linux/Networking/PROGRAMS/Other/net032
  685. </verb></tscreen>
  686.  
  687. In this directory you will find three versions of the network tools. The
  688. following table lists net-032 package name with the relevant kernel versions:
  689.  
  690. <tscreen><verb>
  691. net-0.32d-net3.tar.gz     1.1.12+
  692. net-0.32b.tar.gz          1.1.4+
  693. net-0.32.old.tar.gz       pre 1.1.4 kernels
  694. </verb></tscreen>
  695.  
  696. These packages include the essential network configuration programs such as
  697. <em>ifconfig</em>, <em>route</em>, <em>netstat</em> etc. These will be
  698. discussed later.
  699.  
  700. <sect1><heading>The network applications.
  701.  
  702. <p>
  703. You will want a number of network application programs. These are programs
  704. like <em>telnet</em>, <em>ftp</em>, <em>finger</em> and their daemons at
  705. least. <tt>Florian La Roche, <flla@stud.uni-sb.de></tt> has put together
  706. a fairly complete distribution of network applications in both binary and
  707. source form. The tcp/ip application binaries and some sample config files
  708. are found in:
  709.  
  710. <bf>ftp.funet.fi</bf>
  711. <tscreen><verb>
  712. /pub/OS/Linux/PEOPLE/Linus/net-source/base/NetKit-A-0.08.bin.tar.gz
  713. /pub/OS/Linux/PEOPLE/Linus/net-source/base/NetKit-B-0.06.tar.gz
  714. </verb></tscreen>
  715.  
  716. If there are newer versions then use the newer versions. Please read the
  717. <tt>README</tt> file <bf>first</bf> just to make sure that you have the
  718. necessary prerequisites.
  719.  
  720. Florian used to have a binary distribution of the networking applications
  721. (the B file) available but it is no longer there, so you will have to build
  722. the files yourself. You can use the following procedure:
  723.  
  724. <tscreen><verb>
  725. # cd /usr/src
  726. # gzip -dc NetKit-B-0.06.tar.gz | tar xpvlf -
  727. # cd NetKit-B-0.06
  728. </verb></tscreen>
  729.  
  730. Then, read the <tt>README</tt> file. You will need to edit the <tt>Makefile</tt>
  731. and set the <tt>HAVE_SHADOW_PASSWORDS</tt> define appropriately. I don't use
  732. shadow passwords, so I commented it out by placing a <tt>#</tt> at the
  733. start of the line. The rest should not need modifying, so then all you should
  734. have to do is:
  735.  
  736. <tscreen><verb>
  737. # make
  738. # make install
  739. </verb></tscreen>
  740.  
  741. <bf>IMPORTANT NOTE:</bf> Florian has built and prepackaged these tar
  742. files for your convenience. Florian has attempted to make them as
  743. complete as possible and has included a distribution of the binaries
  744. found in the <tt>net-tools-n.n.nn</tt> releases. Unfortunately Florian
  745. has chosen not to use the same directory structure as Alan did when he
  746. prepared the installation script for the net-tools. This will mean that
  747. you should be very careful when installing them. Florian will change this
  748. later so that this difference is not a problem, but until then, I suggest
  749. you do the following instead of the above:
  750.  
  751. <tscreen><verb>
  752. -  Unpack the binaries somewhere safe:
  753. # cd /usr/src
  754. # mkdir NetKit
  755. # cd NetKit
  756. # gzip -dc NetKit-A-0.07.bin.tar.gz | tar xpvlf -
  757. # gzip -dc NetKit-B-0.06.bin.tar.gz | tar xpvlf -
  758.  
  759. -  Remove Florians copies of the network tools previously described:
  760. # rm ./bin/hostname ./sbin/route ./sbin/ifconfig ./sbin/netstat
  761. # rm ./usr/sbin/arp ./usr/sbin/rarp ./usr/sbin/slattach
  762.  
  763. -  Copy Florian's files into their new home:
  764. # cp -vrpd . /
  765. </verb></tscreen>
  766.  
  767. <sect1><heading>Additional drivers or packages.
  768.  
  769. <p>
  770. If you want to add some developmental, or Alpha/Beta test code, such as AX.25
  771. support, you will need to obtain the appropriate support software for those
  772. packages. Please check the relevant sections for those packages in this
  773. document for more detail.
  774.  
  775. <sect><heading>Configuring the kernel.
  776.  
  777. <p>
  778. Before you can use any of the network tools, or configure any network devices,
  779. you must ensure that your kernel has the necessary network support built into
  780. it. The best way of doing this is to compile your own, selecting which options
  781. you want and which you don't.
  782.  
  783. Assuming you have obtained and untarred the kernel source already and applied
  784. any patches that you might need to have applied to get any nonstandard
  785. or developmental software installed, all you have to do is edit
  786. <tt>/usr/src/linux/drivers/net/CONFIG</tt>. This file has many comments
  787. to guide you in editing it and in general you will need to edit very little,
  788. as it has sensible defaults. In my case I don't need to edit it at all.
  789. This file is really necessary if your ethernet card is an unusual one, or is
  790. one that isn't automatically detected by the ethernet driver. It allows you
  791. to hard code some of the elements of your ethernet hardware. For example,
  792. if your ethernet card is a close, but not exact clone of a WD-8013, then
  793. you might have to configure the shared memory address to ensure the
  794. driver detects and drives the card properly. Please check the
  795. The <url url="http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO"
  796.     name="Ethernet-HOWTO"> for more definitive information on this file and
  797. its effect on ethernet cards. This file also contains configurable parameters
  798. for PLIP, though the defaults should again be ok unless you have a particularly
  799. slow machine.
  800.  
  801. When you are happy that the CONFIG file is suitable for your purposes, then
  802. you can proceed to build the kernel. Your first step will be to edit the top
  803. level Makefile to ensure the kernel will be built with the appropriate
  804. VGA settings and then you must run the kernel configuration program:
  805.  
  806. <tscreen><verb>
  807. # cd /usr/src/linux
  808. # make config
  809. </verb></tscreen>
  810.  
  811. You will be asked a series of questions. There are four sections relevant to
  812. the networking code. They are the <tt>General setup</tt>,
  813. <tt>Networking options</tt>, <tt>Network device support</tt> and the
  814. <tt>Filesystems</tt> sections. The most difficult to configure is the
  815. <tt>Network device support</tt> section, as it is where you select what
  816. types of physical devices you want configured. On the whole you can just use
  817. the default values for the other sections fairly safely. The following will
  818. give you an idea of how to proceed:
  819.  
  820. <tscreen><verb>
  821. *
  822. * General setup
  823. *
  824.  ...
  825.  ...
  826. Networking support (CONFIG_NET) [y] y
  827.  ...
  828.  ...
  829. </verb></tscreen>
  830.  
  831. In the <tt>General setup</tt> section you simply select whether you want
  832. network support or not. Naturally you must answer yes.
  833.  
  834. <tscreen><verb>
  835. *
  836. * Networking options
  837. *
  838. TCP/IP networking (CONFIG_INET) [y] 
  839. IP forwarding/gatewaying (CONFIG_IP_FORWARD) [n] 
  840. IP multicasting (CONFIG_IP_MULTICAST) [n] 
  841. IP firewalling (CONFIG_IP_FIREWALL) [n] 
  842. IP accounting (CONFIG_IP_ACCT) [n] 
  843. *
  844. * (it is safe to leave these untouched)
  845. *
  846. PC/TCP compatibility mode (CONFIG_INET_PCTCP) [n] 
  847. Reverse ARP (CONFIG_INET_RARP) [n] 
  848. Assume subnets are local (CONFIG_INET_SNARL) [y] 
  849. Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n] 
  850. The IPX protocol (CONFIG_IPX) [n] 
  851. *
  852. </verb></tscreen>
  853.  
  854. The second half of the <tt>Networking options</tt> section allows you to
  855. enable or disable some funky features that you can safely accept the defaults
  856. on until you have some idea why you want to change them. They are described
  857. briefly later if you are interested.
  858.  
  859. <tscreen><verb>
  860. *
  861. *
  862. * Network device support
  863. *
  864. Network device support? (CONFIG_NETDEVICES) [y] 
  865. Dummy net driver support (CONFIG_DUMMY) [n] 
  866. SLIP (serial line) support (CONFIG_SLIP) [y] 
  867.  CSLIP compressed headers (CONFIG_SLIP_COMPRESSED) [y] 
  868.  16 channels instead of 4 (SL_SLIP_LOTS) [n] 
  869. PPP (point-to-point) support (CONFIG_PPP) [y] 
  870. PLIP (parallel port) support (CONFIG_PLIP) [n] 
  871. Do you want to be offered ALPHA test drivers (CONFIG_NET_ALPHA) [n] 
  872. Western Digital/SMC cards (CONFIG_NET_VENDOR_SMC) [y] 
  873. WD80*3 support (CONFIG_WD80x3) [y] 
  874. SMC Ultra support (CONFIG_ULTRA) [n] 
  875. AMD LANCE and PCnet (AT1500 and NE2100) support (CONFIG_LANCE) [n] 
  876. 3COM cards (CONFIG_NET_VENDOR_3COM) [n] 
  877. Other ISA cards (CONFIG_NET_ISA) [n] 
  878. EISA, VLB, PCI and on board controllers (CONFIG_NET_EISA) [n] 
  879. Pocket and portable adaptors (CONFIG_NET_POCKET) [n] 
  880. *
  881. </verb></tscreen>
  882.  
  883. This section is the most important and the most involved. It is where you
  884. select what hardware devices you want to support. You can see that I have
  885. selected SLIP support with header compression, PPP, the WD80*3 driver and
  886. nothing else. Other options will appear depending on what you select. If you
  887. answered <tt>`n'</tt> to the <tt>`SLIP..'</tt> option you will not be presented
  888. with the <tt>compressed SLIP</tt> or <tt>16 channel</tt> options. Simply answer
  889. <tt>`y'</tt> to whatever you want to play with and <tt>`n'</tt> to those that
  890. you don't.
  891.  
  892. <tscreen><verb>
  893. *
  894. * Filesystems
  895. *
  896.  ...
  897.  ...
  898. /proc filesystem support (CONFIG_PROC_FS) [y] 
  899. NFS filesystem support (CONFIG_NFS_FS) [y] 
  900.  ...
  901.  ...
  902. </verb></tscreen>
  903.  
  904. If you wish to run an NFS client then you will want to include the NFS
  905. filesystem type. You will need to include the <tt>/proc</tt> filesystem
  906. because a number of the network utilities use it.
  907.  
  908. After you have completed the configuration, all that remains is to actually
  909. compile the kernel:
  910.  
  911. <tscreen><verb>
  912. # make dep
  913. # make
  914. </verb></tscreen>
  915.  
  916. Don't forget to <tt>make zlilo</tt> if the new kernel compiles and tests ok.
  917.  
  918. <sect1><heading>What do all those funky Networking options actually do?
  919.  
  920. <p>
  921. Newer kernels have a number of options that you are asked about when
  922. you do a <tt>make config</tt>. Generally you will not need to change
  923. these, but some of the options might be useful to you in certain
  924. circumstances.
  925.  
  926. <descrip>
  927. <tag>TCP/IP networking</tag>This one is obvious, it selects whether you
  928. configure the tcp/ip suite of protocols into your kernel. Chances are if
  929. you are reading this then you will want to answer `y' to this one.
  930. <tag>Dummy networking device</tag>This was added to allow SLIP and PPP users
  931. to configure an address on their linux machine that would not be dependent on
  932. their serial link being established. It is an easy way to give your linux
  933. machine two addresses.
  934. <tag>IP forwarding/gatewaying</tag>This determines what your kernel will do
  935. when it receives a datagram that has a destination address that is not
  936. one of its own devices. You <bf>must</bf> have this option selected if
  937. you want your kernel to act as an IP router. Most SLIP and PPP servers will
  938. want this option selected.
  939. <tag>IP multicasting</tag>This is alpha test code support for IP
  940. multicasting, examples of which include services such as `Internet Talk Radio'
  941. and live video. You will need additional programs to make use of this facility,
  942. this is just the kernel support.
  943. <tag>IP firewalling</tag>This option allows you to provide flexible security
  944. options for your linux machine. You can selectively enable/disable access to
  945. tcp/ip ports from any address ranges you choose. This also needs additional
  946. programs to support it.
  947. <tag>IP accounting</tag>This option is for those people that want to use
  948. their Linux machine to provide internet connectivity to others on a
  949. commercial basis. It allows you to count and record incoming and outgoing
  950. bytes on a per port and address basis. With the addition of suitable software
  951. this would allow you to produce seperate usage charges for each person using
  952. your systems networking capabilities.
  953. <tag>PC/TCP compatibility mode</tag>This option provides a work-around for
  954. a bug that causes problems when using the PC/TCP networking programs to talk
  955. to your linux machine. There is a PC/TCP bug which provokes a difficult to
  956. remedy Linux bug and this option prevents the two clashing. Normally you
  957. would leave this disabled, but if you have users on your network who use
  958. PC/TCP then you may have to enable this option to prevent problems.
  959. <tag>Reverse ARP</tag>This option allows you to configure the RARP protocol
  960. into your kernel. This option was added to allow the booting of Sun 3
  961. systems. This is not generally very useful otherwise.
  962. <tag>Assume subnets are local</tag>This option selects whether you assume
  963. that your whole subnet is directly connected to your linux machine, or
  964. whether it might be bridged or otherwise subdivided at a lower layer. In
  965. practice it will make little difference if you leave it set at the default.
  966. <tag>Disable NAGLE algorithm</tag>This is a timing option that determines
  967. when a datagram should be transmitted. The default setting provides for the best
  968. throughput in most situations and you should leave this set as it is, as
  969. disabling it will degrade your throughput. This option can be selectively
  970. changed from within a program with a socket option and you would normally
  971. be much better off leaving it set at the default and specifically writing
  972. your programs to disable the NAGLE algorithm if they require extremely
  973. fast interactivity.
  974. <tag>The IPX protocol</tag>This option selects whether you compile the IPX
  975. protocol support into your kernel. The IPX protocol is an inter-networking
  976. protocol similar in function to the IP protocol. This protocol is one of
  977. those used by the Novell suite.
  978. <tag>Amateur Radio AX.25 Level 2</tag>This option selects whether you compile
  979. in the Amateur Radio AX.25 protocol suite. If you select this option then
  980. a new class of network sockets are available for programming. The AX.25
  981. protocol is used primarily by Amateur Radio Operators for packet radio
  982. use.
  983. </descrip>
  984.  
  985. <sect><heading>Configuring the Network Devices.
  986.  
  987. <p>
  988. If everything has gone ok so far, then you will have a Linux kernel which
  989. supports the network devices you intend to use and you also have the network
  990. tools with which to configure them. <em>Now comes the fun part!</em> You'll
  991. need to configure each of the devices you intend to use. This configuration
  992. generally amounts to telling each device things like what its IP address will
  993. be and what network it is connected to.
  994.  
  995. In past versions of this document I have presented near complete versions of
  996. the various configuration files and included comments to modify or delete
  997. lines from them as appropriate. From this version onwards I will take a
  998. slightly different approach which I hope will result in you having a complete
  999. set of uncluttered configuration files that you have built from scratch so you
  1000. know exactly what is in them and why. I'll describe each of these files,
  1001. and their function, as we come to them.
  1002.  
  1003. <sect1><heading>Configuring the special device files in /dev
  1004.  
  1005. <p>
  1006. You do not need to configure any special device files in the <tt>/dev</tt>
  1007. directory for Linux Networking. Linux does not need or use them as other
  1008. operating systems might. The devices are built dynamically in memory by the
  1009. kernel and since they are only names there is no need for them to have an
  1010. appearance directly to you. The kernel provides all of the programming hooks
  1011. and interfaces that you need to utilize them effectively.
  1012.  
  1013. <sect1><heading>What information do I need before I begin ?
  1014.  
  1015. <p>
  1016. Before you can configure the networking software, you will need to know
  1017. a number of pieces of information about your network connection. Your
  1018. network provider or administrator will be able to provide you with most
  1019. of them.
  1020.  
  1021. <sect2><heading>IP Address.
  1022.  
  1023. <p>
  1024. This is the unique machine address, in dotted decimal notation, that your
  1025. machine will use. An example is <tt>128.253.153.54</tt>. Your network
  1026. administrator will provide you with this information.
  1027.  
  1028. If you will be using a SLIP or plip connection you may not need this
  1029. information, so skip it until we get to the SLIP device.
  1030.  
  1031. If you're using the loopback device only, ie no ethernet, SLIP or plip support,
  1032. then you won't need an ip address as the loopback port always uses the
  1033. address <tt>127.0.0.1</tt>.
  1034.  
  1035. <sect2><heading>Network Mask (`netmask').
  1036.  
  1037. <p>
  1038. For performance reasons it is desirable to limit the number of hosts on
  1039. any particular segment of a network. For this reason it is common for
  1040. network administrators to divide their network into a number of smaller
  1041. networks, known as <em>subnets</em>, which each have a portion of the
  1042. network addresses assigned to them. The <em>network mask</em> is a pattern
  1043. of bits, which when overlayed onto an address on your network, will tell you
  1044. which subnetwork it belongs to. This is very important for routing and if
  1045. you find for example, that you can happily talk to people outside your network,
  1046. but not to some people on your own network, then it is quite likely that you
  1047. have specified an incorrect subnet mask.
  1048.  
  1049. Your network administrators will have chosen the netmask when the network
  1050. was designed and therefore they should be able to supply you with the
  1051. correct mask to use. Most networks are class-C subnetworks which use
  1052. <tt>255.255.255.0</tt> as their netmask. Other larger networks use class-B
  1053. netmasks (<tt>255.255.0.0</tt>). The NET-2/NET-3 code will automatically
  1054. select a default mask when you assign an address to a device. The default
  1055. assumes that your network has <bf>not</bf> been subnetted.
  1056.  
  1057. The NET-2/NET-3 code will choose the following masks by default:
  1058.  
  1059. <tscreen><verb>
  1060. For addresses with the first byte:
  1061. 1-127         255.0.0.0         (Class A)
  1062. 128-191       255.255.0.0       (Class B)
  1063. 192+          255.255.255.0     (Class C)
  1064. </verb></tscreen>
  1065.  
  1066. if one of these doesn't work for you, try another. If this doesn't work
  1067. ask your network administrator or local network guru (dime a dozen) for
  1068. help.
  1069.  
  1070. You don't need to worry about a netmask for the loopback port, or if you are
  1071. running SLIP/plip.
  1072.  
  1073. <sect2><heading>Network Address.
  1074.  
  1075. <p>
  1076. This is your IP address masked (bitwise AND) with your netmask.
  1077. For example:
  1078. <tscreen><verb>
  1079. If your netmask is:           255.255.255.0
  1080. and your IP address is:       128.253.154.32    &&
  1081.                       ---------------
  1082. your Network address is:      128.253.154.0     =
  1083. </verb></tscreen>
  1084.  
  1085. <sect2><heading>Broadcast Address.
  1086.  
  1087. <p>
  1088. <em>`A shout is a whisper that everyone hears whether they need to or not'</em>
  1089.  
  1090. This is normally your network address logically ORed with your netmask
  1091. inverted. This is simpler than it sounds. For a Class-C network, with
  1092. network mask <tt>255.255.255.0</tt>, your <em>Broadcast Address</em> will
  1093. be your network address (calculated above), logically ORed with
  1094. <tt>0.0.0.255</tt>, the network mask inverted.
  1095.  
  1096. A worked example might look like:
  1097. <tscreen><verb>
  1098. If your netmask is:          255.255.255.0      !
  1099. the netmask inverted is:       0.  0.  0.255    =
  1100. If your Network address is:  128.253.154.0      ||
  1101.                               ----------------
  1102. Your broadcast address is:   128.253.154.255    =
  1103. </verb></tscreen>
  1104.  
  1105. Note that for historical reasons some networks use the network address as
  1106. the broadcast address. If you have any doubts contact your network
  1107. administrator.
  1108.  
  1109. If you have access to a <em>sniffer</em>, or some other device capable of
  1110. providing you with a trace of your network traffic, then you might be able to
  1111. determine both the network and broadcast addresses by watching other traffic
  1112. on the lan. Keep an eye open for, (or filter everything except), ethernet
  1113. frames destined for the ethernet broadcast address: <tt>ff:ff:ff:ff:ff:ff</tt>.
  1114. If any of them has an IP source address of your local router and the
  1115. protocol ID is not ARP, then check the destination IP address, because this
  1116. datagram may well be a RIP routing broadcast from your router, in which case
  1117. the destination IP address will be your broadcast address.
  1118.  
  1119. Once again, if you're not sure, check with your network administrator,
  1120. they'd rather help you, than have you connect your machine in a misconfigured
  1121. way.
  1122.  
  1123. <sect2><heading>Router (`Gateway') Address.
  1124.  
  1125. <p>
  1126. <em>`There must be some way out of here.'</em>
  1127.  
  1128. This is the address of the machine that connects your network to the
  1129. rest of the Internet. It is your `gateway' to the outside world. A couple
  1130. of conventions exist for allocating addresses to routers which your network
  1131. might follow, they are: The router is the lowest numbered address on the
  1132. network, the router is the highest numbered host on the network.
  1133. Probably the most common is the first, where the router will have an address
  1134. that is mostly the same as your own, except with a <tt>.1</tt> as the last
  1135. byte. eg. if your address is <tt>128.253.154.32</tt>, then your router might
  1136. be <tt>128.253.154.1</tt>. The router can in fact have any address valid on
  1137. your network and function properly, the address doesn't matter at all. There
  1138. may in fact even be more than one router on your network. You will probably
  1139. need to talk to your network administrator to properly identify your router
  1140. address.
  1141.  
  1142. If you're using only loopback then you don't need a router address. If you're
  1143. using PPP then you also don't need your router address, because PPP will
  1144. automatically determine the correct address for you. If you're using SLIP,
  1145. then your router address will be your SLIP server address.
  1146.  
  1147. <sect2><heading>Nameserver Address.
  1148.  
  1149. <p>
  1150. Most machines on the net have access to a name server which translates
  1151. human tolerable hostnames into machine tolerable addresses and <em>vice
  1152. versa</em>. Your network administrators will again tell you the address
  1153. of your nearest nameserver. You can in fact run a nameserver on your own
  1154. machine by running <em>named</em>, in which case your nameserver
  1155. address will be <tt>127.0.0.1</tt>, the <em>loopback</em> port address.
  1156. However it is not required that you run <em>named</em> at all; see section
  1157. `named' for more information.
  1158.  
  1159. If you're only using loopback then you don't need to know the nameserver
  1160. address since you're only going to be talking to your own machine.
  1161.  
  1162. <sect2><heading>NOTE for SLIP/PLIP/PPP users.
  1163.  
  1164. <p>
  1165. You may or may not in fact need to know any of the above information.
  1166. Whether you do or not will depend on exactly how your network connection
  1167. is achieved and the capabilities of the machine at the other end of 
  1168. the link. You'll find more detail in the section relevant to configuration of
  1169. the SLIP/PLIP and PPP devices.
  1170.  
  1171. <sect1><heading>/etc/rc.d/rc.inet1,2 or /etc/rc.net or /etc/init.d/network
  1172.  
  1173. <p>
  1174. While the commands to configure your network devices can be typed manually
  1175. each time, you will probably want to record them somewhere so that your
  1176. network is configured automatically when you boot your machine.
  1177.  
  1178. The <tt>`rc'</tt> files are specifically designed for this purpose. For the
  1179. non-unix-wizard: <tt>`rc'</tt> file are run at bootup time by the <em>init</em>
  1180. program and start up all of the basic system programs such as <em>syslog</em>,
  1181. <em>update</em> and <em>cron</em>. They are analogous to the MS-DOS
  1182. <em>autoexec.bat</em> file and <em>rc</em> might stand for <em>`runtime
  1183. commands'</em>. By convention these files are kept under the <tt>/etc</tt>
  1184. directory. The Linux Filesystem Standard doesn't go so far as to describe
  1185. exactly where your <tt>rc</tt> files should go, stating that it is ok for them
  1186. to follow either the BSD (/etc/rc.*) or System-V (/etc/rc.d/rc*) conventions.
  1187. Alan, Fred and I all use the System-V convention, so that is what you will
  1188. see described here. This means that these files are found in <tt>/etc/rc.d</tt>
  1189. and are called <tt>rc.inet1</tt> and <tt>rc.inet2</tt>. The first <tt>rc</tt>
  1190. file that gets called at bootup time is <tt>/etc/rc</tt> and it in turn calls
  1191. others, such as <tt>rc.inet1</tt>, which in turn might called <tt>rc.inet2</tt>.
  1192. It doesn't really matter where they are kept, or what they are called, so long
  1193. as <em>init</em> can find them.
  1194.  
  1195. In some distributions the <tt>rc</tt> file for the network is called
  1196. <tt>rc.net</tt> and is in the <tt>/etc</tt> subdirectory. The <tt>rc.net</tt>
  1197. file on these systems is simply the <tt>rc.inet1</tt> and the <tt>rc.inet2</tt>
  1198. files combined into one file that gets executed.
  1199.  
  1200. Some equivalences:
  1201. <tscreen><verb>
  1202. Document Convention   Slackware     Debian and other newer.
  1203. ===================   ===========   =======================
  1204. /etc/rc.d/rc.inet1    /etc/rc.net   /etc/init.d/network
  1205.  
  1206. /etc/rc.d/rc.inet2    /etc/rc.net   /etc/init.d/netbase
  1207.                                     /etc/init.d/netstd_init
  1208.                                     /etc/init.d/netstd_nfs
  1209.                                     /etc/init.d/netstd_misc
  1210. </verb></tscreen>
  1211.  
  1212. <bf>It doesn't matter where the commands appear, so long as you configure the
  1213. interfaces before starting the network daemons and applications.</bf>
  1214.  
  1215. I will refer to these files as <em>rc.inet1</em> and <em>rc.inet2</em> and
  1216. I keep them in the <tt>/etc/rc.d</tt>, so if you are using one of the
  1217. distributions that uses some other convention, or you want to keep the files
  1218. somewhere else, then you will have to make appropriate adjustments as you go.
  1219.  
  1220. We will be building these files from scratch as we go.
  1221.  
  1222. <sect2><heading>rc.inet1
  1223.  
  1224. <p>
  1225. The <em>rc.inet1</em> file configures the basic tcp/ip interfaces for your
  1226. machine using two programs: <em>/sbin/ifconfig</em> and <em>/sbin/route</em>.
  1227.  
  1228. <descrip>
  1229. <tag>ifconfig</tag><em>/sbin/ifconfig</em> is used for configuring your
  1230. interfaces with the parameters that they require to function, such as their
  1231. IP address, network mask, broadcast addresses and similar. You can use the
  1232. <em>ifconfig</em> command with no parameters to display the configuration of
  1233. all network devices. Please check the <em>ifconfig</em> man page for more
  1234. detail on its use.
  1235. <tag>route</tag><em>/sbin/route</em> is used to create, modify and delete
  1236. entries in a table (the routing table) that the networking code will look at
  1237. when it has a datagram that it needs to transmit. The routing table lists
  1238. destination address and the interface that that address is reachable via.
  1239. You can use the <em>route</em> command with no parameters to display the
  1240. contents of the routing table. Please check the <em>route</em> man page for
  1241. more detail on its use.
  1242. </descrip>
  1243.  
  1244. <sect2><heading>rc.inet2
  1245.  
  1246. <p>
  1247. The <em>rc.inet2</em> file starts any network daemons such as <em>inetd</em>,
  1248. <em>portmapper</em> and so on. This will be covered in more detail in section
  1249. `rc.inet2', so for the moment we will concentrate on <em>rc.inet1</em>. I have
  1250. mentioned this file here so that if you have some other configuration, such
  1251. as a single <em>rc.net</em> file you will understand what the second half of
  1252. it represents. it is important to remember that you must start your network
  1253. applications and daemons <bf>after</bf> you have configured your network
  1254. devices.
  1255.  
  1256. <sect1><heading>Configuring the Loopback device (mandatory).
  1257.  
  1258. <p>
  1259. The loopback device isn't really a hardware device. It is a software
  1260. construct that looks like a physical interface. Its function is to
  1261. happily allow you to connect to yourself and to test network software
  1262. without actually having to be connected to a network of any kind. This is
  1263. great if you are developing network software and you have a SLIP connection.
  1264. You can write and test the code locally and then when you are ready to test
  1265. it on a live network, establish your SLIP connection and test it out. You
  1266. won't hurt others users if your program misbehaves.
  1267.  
  1268. By convention, the loopback device always has an IP address of
  1269. <tt>127.0.0.1</tt> and so you will use this address when configuring it.
  1270.  
  1271. The loopback device for Linux is called <em>`lo'</em>. You will now
  1272. make the first entry into your <em>rc.inet1</em> file. The following
  1273. code fragment will work for you:
  1274.  
  1275. <tscreen><verb>
  1276. #!/bin/sh
  1277. #
  1278. # rc.inet1   --  configures network devices.
  1279. #
  1280. # Attach the loopback device.
  1281. /sbin/ifconfig lo 127.0.0.1
  1282. #
  1283. # Add a route to point to the loopback device.
  1284. /sbin/route add 127.0.0.1
  1285. # End loopback
  1286. #
  1287. </verb></tscreen>
  1288.  
  1289. You have used the <em>ifconfig</em> program to give the loopback interface
  1290. its IP address and <em>route</em> program to create an entry in the routing
  1291. table that will ensure that all datagrams destined for <tt>127.0.0.1</tt>
  1292. will be sent to the loopback port.
  1293.  
  1294. There are two important points to note here.
  1295.  
  1296. Firstly, the netmask and broadcast addresses have been allowed to take the
  1297. default values for the loopback device described earlier in section `Network
  1298. Mask'. To see what they are, try the <em>ifconfig</em> program without any
  1299. arguments.
  1300.  
  1301. <tscreen><verb>
  1302. # ifconfig
  1303. lo        Link encap Local Loopback  
  1304.           inet addr 127.0.0.1  Bcast 127.255.255.255  Mask 255.0.0.0
  1305.           UP BROADCAST LOOPBACK RUNNING  MTU 2000  Metric 1
  1306.           RX packets 0 errors 0 dropped 0 overrun 0
  1307.           TX packets 30 errors 0 dropped 0 overrun 0
  1308. #
  1309. </verb></tscreen>
  1310.  
  1311. Secondly, its not obvious how the <em>route</em> command chose the
  1312. loopback device as the device for the route to <tt>127.0.0.1</tt>.
  1313. The <em>route</em> program is smart enough to know that <tt>127.0.0.1</tt>
  1314. belongs to the network supported by the loopback device. It works this out
  1315. by checking the IP address and the netmask. You can use the <em>route</em>
  1316. command with no arguments to display the contents of the routing table:
  1317.  
  1318. <tscreen><verb>
  1319. # route
  1320. Kernel routing table
  1321. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  1322. 127.0.0.0       *               255.0.0.0       U     0      0       30 lo
  1323. </verb></tscreen>
  1324.  
  1325. <bf>Note:</bf> You might want to use the <tt>-n</tt> argument if your name
  1326. resolver is not yet configured properly. The <tt>-n</tt> argument tells
  1327. <em>route</em> to just display the <bf>n</bf>umeric addresses and to not
  1328. bother looking up the name.
  1329.  
  1330. <sect1><heading>Configuring an ethernet device. (optional)
  1331.  
  1332. <p>
  1333. You'll only be interested in this section  if you wish to configure an
  1334. ethernet card, if not then skip on ahead to the next section.
  1335.  
  1336. To configure an ethernet card is only slightly more complicated than
  1337. configuring the loopback device. This time you should probably specify
  1338. explicitly the network mask and the broadcast address, unless you are sure
  1339. that the defaults will work ok and they probably will.
  1340.  
  1341. For this you will need the IP address that you have been assigned, the network
  1342. mask in use on your network and the broadcast address in use.
  1343.  
  1344. The first ethernet device for a <em>Linux</em> system is called <em>`eth0'</em>,
  1345. the second <em>`eth1'</em> and so forth. You will now <bf>add</bf> a section
  1346. to your <em>rc.inet1</em> file. The following code fragment will work for you
  1347. if you change the addresses specified for real ones:
  1348.  
  1349. <tscreen><verb>
  1350. #
  1351. # Attach an ethernet device
  1352. #
  1353. #  configure the IP address, netmask and broadcast address.
  1354. /sbin/ifconfig eth0 IPA.IPA.IPA.IPA
  1355. /sbin/ifconfig eth0 netmask NMK.NMK.NMK.NMK
  1356. /sbin/ifconfig eth0 broadcast BCA.BCA.BCA.BCA
  1357. #
  1358. # add a network route to point to it:
  1359. /sbin/route add -net NWA.NWA.NWA.NWA device eth0
  1360. #
  1361. # End ethernet
  1362. #
  1363. </verb></tscreen>
  1364.  
  1365. Where:
  1366. <descrip>
  1367. <tag>IPA.IPA.IPA.IPA</tag>represents your IP Address.
  1368. <tag>NMK.NMK.NMK.NMK</tag>represents your netmask.
  1369. <tag>BCA.BCA.BCA.BCA</tag>represents your Broadcast address.
  1370. <tag>NWA.NWA.NWA.NWA</tag>represents your Network Address.
  1371. </descrip>
  1372.  
  1373. Note the use of the <tt>-net</tt> argument to the <em>route</em> command.
  1374. This tells <em>route</em> that the route to be added is a route to a
  1375. <em>network</em> and not to a <em>host</em>. There is an alternative
  1376. method of achieving this, you can leave off the <tt>-net</tt> if you have
  1377. the network address listed in the <em>/etc/networks</em> file. This is
  1378. covered later in section `/etc/networks'.
  1379.  
  1380. <sect1><heading>Configuring a SLIP device (optional)
  1381.  
  1382. <p>
  1383. SLIP (Serial Line Internet Protocol) allows you to use tcp/ip over a serial
  1384. line, be that a phone line with a dialup modem, or a leased line of some sort.
  1385. Of course to use SLIP you need access to a <em>SLIP-server</em> in your
  1386. area. Many universities and businesses provide SLIP access all over the
  1387. world.
  1388.  
  1389. Slip uses the serial ports on your machine to carry IP datagrams. To do this
  1390. it must take control of the serial device. Slip device names are named
  1391. <em>sl0</em>, <em>sl1</em> etc. How do these correspond to your serial
  1392. devices ? The networking code uses what is called an <em>ioctl</em> (i/o
  1393. control) call to change the serial devices into SLIP devices. There are
  1394. two programs supplied that can do this, they are called <em>dip</em> and
  1395. <em>slattach</em>
  1396.  
  1397. <sect2><heading>dip
  1398.  
  1399. <p>
  1400. <em>dip</em> (Dialup IP) is a smart program that is able to set the speed of
  1401. the serial device, command your modem to dial the remote end of the link,
  1402. automatically log you into the remote server, search for messages sent to you
  1403. by the server and extract information for them such as your IP address and
  1404. perform the <em>ioctl</em> necessary to switch your serial port into
  1405. SLIP mode. <em>dip</em> has a powerful scripting ability and it is this
  1406. that you can exploit to automate your logon procedure.
  1407.  
  1408. <em>dip</em> used to be supplied with the <em>net-tools</em>, but since
  1409. development of <em>dip</em> is now seperate, you have to source it seperately.
  1410. There have been a number of other versions of <em>dip</em> produced which offer
  1411. a variety of new features. The <tt>dip-uri</tt> version seems to be the more
  1412. popular, but I suggest you take a close look at each to determine which offers
  1413. enhancements that you find useful. Since <tt>dip-uri</tt> is is so popular,
  1414. the examples described in this document are based on current versions of it.
  1415.  
  1416. You can find it at:
  1417.  
  1418. <bf>sunsite.unc.edu</bf>
  1419. <tscreen><verb>
  1420. /pub/Linux/system/Network/serial/dip337j-uri.tgz
  1421. </verb></tscreen>
  1422.  
  1423. To install it, try the following:
  1424. <tscreen><verb>
  1425. #
  1426. # cd /usr/src
  1427. # gzip -dc dip337j-uri.tgz | tar xvf -
  1428. # cd dip.3.3.7j
  1429.  
  1430. <edit Makefile>
  1431.  
  1432. # make install
  1433. #
  1434. </verb></tscreen>
  1435.  
  1436. <p>
  1437. The <tt>Makefile</tt> assumes the existence of a group called <em>uucp</em>,
  1438. but you might like to change this to either <em>dip</em> or <em>SLIP</em>
  1439. depending on your configuration.
  1440.  
  1441. <sect2><heading>slattach
  1442.  
  1443. <p>
  1444. <em>slattach</em> as contrasted with <em>dip</em> is a very simple program,
  1445. that is very easy to use, but does not have the sophistication of <em>dip</em>.
  1446. It does not have the scripting ability, all it does is configure your
  1447. serial device as a SLIP device. It assumes you have all the information you
  1448. need and the serial line is established before you invoke it. <em>slattach</em>
  1449. is ideal to use where you have a permanent connection to your server, such as
  1450. a physical cable, or a leased line.
  1451.  
  1452. <sect2><heading>When do I use which ?
  1453.  
  1454. <p>
  1455. You would use <em>dip</em> when your link to the machine that is your SLIP
  1456. server is a dialup modem, or some other temporary link. You would use
  1457. <em>slattach</em> when you have a leased line, perhaps a cable, between your
  1458. machine and the server and there is no special action needed to get the link
  1459. working. See section `Permanent Slip connection' for more information.
  1460.  
  1461. Configuring SLIP is much like configuring an Ethernet interface (read section
  1462. `Configuring an ethernet device' above). However there are a few key
  1463. differences.
  1464.  
  1465. First of all, SLIP links are unlike ethernet networks in that there is
  1466. only ever two hosts on the network, one at each end of the link. Unlike
  1467. an ethernet that is available for use as soon are you are cabled, with
  1468. SLIP, depending on the type of link you have, you may have to initialize
  1469. your network connection in some special way.
  1470.  
  1471. If you are using <em>dip</em> then this would not normally be done at
  1472. boot time, but at some time later, when you were ready to use the link.
  1473. It is possible to automate this procedure. If you are using <em>slattach</em>
  1474. then you will probably want to add a section to your <em>rc.inet1</em> file.
  1475. This will be described soon.
  1476.  
  1477. There are two major types of SLIP servers: Dynamic IP address servers and
  1478. static IP address servers. Almost every SLIP server will prompt you to
  1479. login using a username and password when dialing in. <em>dip</em> can
  1480. handle logging you in automatically.
  1481.  
  1482. <sect2><heading>Static SLIP server with a dialup line and DIP.
  1483.  
  1484. <p>
  1485. A static SLIP server in one in which you have been supplied an IP address
  1486. that is exclusively yours. Each time you connect to the server, you will
  1487. configure your SLIP port with that address. The static SLIP server will
  1488. answer your modem call, possibly prompt you for a username and password,
  1489. and then route any datagrams destined for your address to you via that
  1490. connection. If you have a static server, then you may want to put entries
  1491. for your hostname and IP address (since you know what it will be) into your
  1492. <tt>/etc/hosts</tt>. You should also configure some other files such as:
  1493. <tt>rc.inet2</tt>, <tt>host.conf</tt>, <tt>resolv.conf</tt>,
  1494. <tt>/etc/HOSTNAME</tt> and <tt>rc.local</tt>. Remember that when configuring
  1495. <tt>rc.inet1</tt>, you don't need to add any special commands for your SLIP
  1496. connection since it is <em>dip</em> that does all of the hard work for you in
  1497. configuring your interface. You will need to give <em>dip</em> the appropriate
  1498. information and it will configure the interface for you after commanding the
  1499. modem to establish the call and logging you into your SLIP server.
  1500.  
  1501. If this is how your SLIP server works then you can move to section `Using Dip'
  1502. to learn how to configure <em>dip</em> appropriately.
  1503.  
  1504. <sect2><heading>Dynamic SLIP server with a dialup line and DIP.
  1505.  
  1506. <p>
  1507. A <em>dynamic</em> SLIP server is one which allocates you an IP address
  1508. randomly, from a pool of addresses, each time you logon. This means that
  1509. there is no guarantee that you will have any particular address each time,
  1510. and that address may well be used by someone else after you have logged off.
  1511. The network administrator who configured the SLIP server will have assigned
  1512. a pool of address for the SLIP server to use, when the server receives a new
  1513. incoming call, it finds the first unused address, guides the caller through
  1514. the login process and then prints a welcome message that contains the IP
  1515. address it has allocated and will proceed to use that IP address for the
  1516. duration of that call.
  1517.  
  1518. Configuring for this type of server is similar to configuring for a static
  1519. server, except that you must add a step where you obtain the IP address that
  1520. the server has allocated for you and configure your SLIP device with that.
  1521.  
  1522. Again, <em>dip</em> does the hard work and new versions are smart enough to
  1523. not only log you in, but to also be able to automatically read the IP address
  1524. printed in the welcome message and store it so that you can have it configure
  1525. your SLIP device with it.
  1526.  
  1527. If this is how your SLIP server works then you can move to section `Using Dip'
  1528. to learn how to configure <em>dip</em> appropriately.
  1529.  
  1530. <sect2><heading>Using DIP.
  1531.  
  1532. <p>
  1533. As explained earlier, <em>dip</em> is a powerful program that can simplify
  1534. and automate the process of dialing into the SLIP server, logging you in,
  1535. starting the connection and configuring your SLIP devices with the
  1536. appropriate <em>ifconfig</em> and <em>route</em> commands.
  1537.  
  1538. Essentially to use <em>dip</em> you'll write a `dip script', which is
  1539. basically a list of commands that <em>dip</em> understands that tell
  1540. <em>dip</em> how to perform each of the actions you want it to perform. See
  1541. <tt>sample.dip</tt> that comes supplied with <em>dip</em> to get an idea
  1542. of how it works. <em>dip</em> is quite a powerful program, with many options.
  1543. Instead of going into all of them here you should looks at the <em>man</em>
  1544. page, README and sample files that will have come with your version of
  1545. <em>dip</em>.
  1546.  
  1547. You may notice that the <tt>sample.dip</tt> script assumes that you're using
  1548. a static SLIP server, so you know what your IP address is beforehand. For
  1549. dynamic SLIP servers, the newer versions of <em>dip</em> include a command
  1550. you can use to automatically read and configure your SLIP device with the
  1551. IP address that the dynamic server allocates for you. The following sample
  1552. is a modified version of the <tt>sample.dip</tt> that came supplied with
  1553. <em>dip337j-uri.tgz</em> and is probably a good starting point for you.
  1554. You might like to save it as <tt>/etc/dipscript</tt> and edit it to suit your
  1555. configuration:
  1556.  
  1557. <tscreen><verb>
  1558. #
  1559. # sample.dip    Dialup IP connection support program.
  1560. #
  1561. #        This file (should show) shows how to use the DIP
  1562. #       This file should work for Annex type dynamic servers, if you
  1563. #       use a static address server then use the sample.dip file that
  1564. #       comes as part of the dip337-uri.tgz package.
  1565. #
  1566. #
  1567. # Version:    @(#)sample.dip    1.40    07/20/93
  1568. #
  1569. # Author:    Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  1570. #
  1571.  
  1572. main:
  1573. # Next, set up the other side's name and address.
  1574. # My dialin machine is called 'xs4all.hacktic.nl' (== 193.78.33.42)
  1575. get $remote xs4all.hacktic.nl
  1576. # Set netmask on sl0 to 255.255.255.0
  1577. netmask 255.255.255.0
  1578. # Set the desired serial port and speed.
  1579. port cua02
  1580. speed 38400
  1581.  
  1582. # Reset the modem and terminal line.
  1583. # This seems to cause trouble for some people!
  1584. reset
  1585.  
  1586. # Note! "Standard" pre-defined "errlevel" values:
  1587. #  0 - OK
  1588. #  1 - CONNECT
  1589. #  2 - ERROR
  1590. #
  1591. # You can change those grep'ping for "addchat()" in *.c...
  1592.  
  1593. # Prepare for dialing.
  1594. send ATQ0V1E1X4\r
  1595. wait OK 2
  1596. if $errlvl != 0 goto modem_trouble
  1597. dial 555-1234567
  1598. if $errlvl != 1 goto modem_trouble
  1599.  
  1600. # We are connected.  Login to the system.
  1601. login:
  1602. sleep 2
  1603. wait ogin: 20
  1604. if $errlvl != 0 goto login_trouble
  1605. send MYLOGIN\n
  1606. wait ord: 20
  1607. if $errlvl != 0 goto password_error
  1608. send MYPASSWD\n
  1609. loggedin:
  1610.  
  1611. # We are now logged in.
  1612. wait SOMEPROMPT 30
  1613. if $errlvl != 0 goto prompt_error
  1614.  
  1615. # Command the server into SLIP mode
  1616. send SLIP\n
  1617. wait SLIP 30
  1618. if $errlvl != 0 goto prompt_error
  1619.  
  1620. # Get and Set your IP address from the server.  
  1621. #   Here we assume that after commanding the SLIP server into SLIP
  1622. #   mode that it prints your IP address
  1623. get $locip remote 30
  1624. if $errlvl != 0 goto prompt_error
  1625.  
  1626. # Set up the SLIP operating parameters.
  1627. get $mtu 296
  1628. # Ensure "route add -net default xs4all.hacktic.nl" will be done
  1629. default
  1630.  
  1631. # Say hello and fire up!
  1632. done:
  1633. print CONNECTED $locip ---> $rmtip
  1634. mode CSLIP
  1635. goto exit
  1636.  
  1637. prompt_error:
  1638. print TIME-OUT waiting for sliplogin to fire up...
  1639. goto error
  1640.  
  1641. login_trouble:
  1642. print Trouble waiting for the Login: prompt...
  1643. goto error
  1644.  
  1645. password:error:
  1646. print Trouble waiting for the Password: prompt...
  1647. goto error
  1648.  
  1649. modem_trouble:
  1650. print Trouble occurred with the modem...
  1651. error:
  1652. print CONNECT FAILED to $remote
  1653. quit
  1654.  
  1655. exit:
  1656. exit
  1657. </verb></tscreen>
  1658.  
  1659. The above example assumes you are calling a <em>dynamic</em> SLIP server, if
  1660. you are calling a <em>static</em> SLIP server, then the <tt>sample.dip</tt>
  1661. file that comes with <em>dip337j-uri.tgz</em> should work for you.
  1662. <p>
  1663. When <em>dip</em> is given the <em>get $local</em> command it 
  1664. searches the incoming text from the remote end for a string that looks like an
  1665. IP address, ie strings numbers separated by `.' characters. This modification
  1666. was put in place specifically for <em>dynamic</em> SLIP servers, so that the
  1667. process of reading the IP address granted by the server could be automated.
  1668. <p>
  1669. The example above will automatically create a default route via your SLIP link,
  1670. if this is not what you want, you might have an ethernet connection that should
  1671. be your default route, then remove the <em>default</em> command from the script.
  1672. After this script has finished running, if you do an <em>ifconfig</em> command,
  1673. you will see that you have a device <em>sl0</em>. This is your SLIP device.
  1674. Should you need to, you can modify its configuration manually, after the
  1675. <em>dip</em> command has finished, using the <em>ifconfig</em> and
  1676. <em>route</em> commands.
  1677.  
  1678. Please note that <em>dip</em> allows you to select a number of different
  1679. protocols to use with the <tt>mode</tt> command, the most common example is
  1680. <em>cSLIP</em> for SLIP with compression. Please note that both ends of the
  1681. link must agree, so you should ensure that whatever you select agrees with
  1682. what your server is set to.
  1683.  
  1684. The above example is fairly robust and should cope with most errors. Please
  1685. refer to the <em>dip</em> man page for more information. Naturally you could,
  1686. for example, code the script to do such things as redial the server if it
  1687. doesn't get a connection within a prescribed period of time, or even try
  1688. a series of servers if you have access to more than one.
  1689.  
  1690. <sect2><heading>Permanent SLIP connection using a leased line and slattach.
  1691.  
  1692. <p>
  1693. If you have a cable between two machines, or are fortunate enough to have a
  1694. leased line, or some other permanent serial connection between your machine
  1695. and another, then you don't need to go to all the trouble of using
  1696. <em>dip</em> to set up your serial link. <em>slattach</em> is a very simple
  1697. to use utility that will allow you just enough functionality to configure your
  1698. connection.
  1699.  
  1700. Since your connection will be a permanent one, you will want to add some
  1701. commands to your <tt>rc.inet1</tt> file. In essence all you need to do for
  1702. a permanent connection is ensure that you configure the serial device to
  1703. the correct speed and switch the serial device into SLIP mode. <em>slattach</em>
  1704. allows you to do this with one command. <bf>Add</bf> the following to your
  1705. <tt>rc.inet1</tt> file:
  1706.  
  1707. <tscreen><verb>
  1708. #
  1709. # Attach a leased line static SLIP connection
  1710. #
  1711. #  configure /dev/cua0 for 19.2kbps and cslip
  1712. /sbin/slattach -p cslip -s 19200 /dev/cua0 &
  1713. /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
  1714. #
  1715. # End static SLIP.
  1716. </verb></tscreen>
  1717.  
  1718. Where:
  1719. <descrip>
  1720. <tag>IPA.IPA.IPA.IPA</tag>represents your IP address.
  1721. <tag>IPR.IPR.IPR.IPR</tag>represents the IP address of the remote end.
  1722. </descrip>
  1723.  
  1724. <em>slattach</em> allocated the first unallocated SLIP device to the serial
  1725. device specified. <em>slattach</em> starts with <em>sl0</em>. Therefore
  1726. the first <em>slattach</em> command attaches SLIP device <em>sl0</em> to
  1727. the serial device specified and <em>sl1</em> the next time, etc.
  1728.  
  1729. <em>slattach</em> allows you to configure a number of different protocols with
  1730. the <tt>-p</tt> argument. In your case you will use either <em>SLIP</em> or
  1731. <em>cSLIP</em> depending on whether you want to use compression or not.
  1732. Note: both ends must agree on whether you want compression or not.
  1733.  
  1734. <sect1><heading>Configuring a PLIP device. (optional)
  1735.  
  1736. <p>
  1737. <em>plip</em> (Parallel Line IP), is like SLIP, in that it is used for
  1738. providing a <em>point to point</em> network connection between two machines,
  1739. except that it is designed to use the parallel printer ports on your machine
  1740. instead of the serial ports. Because it is possible to transfer more than one
  1741. bit at a time with a parallel port, it is possible to attain higher speeds
  1742. with the <em>plip</em> interface than with a standard serial device. In
  1743. addition, even the simplest of parallel ports, printer ports, can be used, in
  1744. lieu of you having to purchase comparatively expensive 16550AFN UART's for your
  1745. serial ports.
  1746.  
  1747. Please note that some laptops use chipsets that will not work with PLIP
  1748. because they do not allow some combinations of signals that PLIP relies on,
  1749. that printers don't use.
  1750.  
  1751. The Linux <em>plip</em> interface is compatible with the <em>Crynwyr Packet
  1752. Driver PLIP</em> and this will mean that you can connect your Linux machine
  1753. to a DOS machine running any other sort of tcp/ip software via <em>plip</em>.
  1754.  
  1755. You have two options in using the PLIP driver. You can either compile the
  1756. driver into your kernel, or use the modules package to load the module
  1757. dynamically. I recommend just compiling it into your kernel as it is
  1758. probably the easiest and in most circumstances you will want the driver
  1759. there all the time anyway.
  1760.  
  1761. When compiling the kernel, there is only one file that might need to be looked
  1762. at to configure <em>plip</em>. That file is
  1763. <tt>/usr/src/linux/driver/net/CONFIG</tt> and it contains <em>plip</em>
  1764. timers in mS. The defaults are probably ok in most cases. You will probably
  1765. need to increase them if you have an especially slow computer, in which case
  1766. the timers to increase are actually on the <bf>other</bf> computer.
  1767.  
  1768. The driver assumes the following defaults:
  1769. <tscreen><verb>
  1770. device  i/o addr    IRQ
  1771. ------  --------    -----
  1772. plip0    0x3BC        5
  1773. plip1    0x378        7
  1774. plip2    0x278        2 (9)
  1775. </verb></tscreen>
  1776.  
  1777. If your parallel ports don't match any of the above combinations then you
  1778. can change the IRQ of a port using the <em>ifconfig</em> command using the
  1779. `irq' parameter. Be sure to enable IRQ's on your printer ports in your
  1780. ROM BIOS if it supports this option.
  1781. <p>
  1782. To configure a <em>plip</em> interface, you will need to <bf>add</bf> the
  1783. following lines to your <tt>rc.inet1</tt> file:
  1784.  
  1785. <tscreen><verb>
  1786. #
  1787. # Attach a PLIP interface
  1788. #
  1789. #  configure first parallel port as a plip device
  1790. /sbin/ifconfig plip0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
  1791. #
  1792. # End plip
  1793. </verb></tscreen>
  1794.  
  1795. Where:
  1796. <descrip>
  1797. <tag>IPA.IPA.IPA.IPA</tag>represents your IP address.
  1798. <tag>IPR.IPR.IPR.IPR</tag>represents the IP address of the remote machine.
  1799. </descrip>
  1800.  
  1801. The <em>pointopoint</em> parameter has the same meaning as for SLIP,
  1802. in that it specifies the address of the machine at the other end of the
  1803. link.
  1804.  
  1805. In almost all respects you can treat a <em>plip</em> interface as though it
  1806. were a <em>SLIP</em> interface, except that neither <em>dip</em> nor
  1807. <em>slattach</em> need be, nor can be, used.
  1808.  
  1809. <sect2><heading>PLIP cabling diagram.
  1810.  
  1811. <p>
  1812. <em>plip</em> has been designed to use cables with the same pinout as those
  1813. commonly used by the better known of the MS-DOS based pc-pc file transfer
  1814. programs.
  1815.  
  1816.  
  1817. The pinout diagram (taken from <tt>/usr/src/linux/drivers/net/plip.c</tt>)
  1818. looks as follows:
  1819.  
  1820. <tscreen><verb>
  1821. Pin Name    Connect pin - pin
  1822. ---------   -------------------------------
  1823. GROUND      25 - 25
  1824. D0->ERROR   2 - 15
  1825. ERROR->D0   15 - 2
  1826. D1->SLCT    3 - 13
  1827. SLCT->D1    13 - 3
  1828. D2->PAPOUT  4 - 12
  1829. PAPOUT->D2  12 - 4
  1830. D3->ACK     5 - 10
  1831. ACK->D3     10 - 5
  1832. D4->BUSY    6 - 11
  1833. BUSY->D4    11 - 6
  1834. D5          7*
  1835. D6          8*
  1836. D7          9*
  1837. STROBE      1*
  1838. FEED        14*
  1839. INIT        16*
  1840. SLCTIN      17*
  1841. </verb></tscreen>
  1842.  
  1843. Notes:
  1844. Do not connect the pins marked with an asterisk `*'.
  1845. Extra grounds are 18,19,20,21,22,23 and 24.
  1846.  
  1847. If the cable you are using has a metallic shield, it should be connected to the
  1848. metallic DB-25 shell at <bf>one end only</bf>.
  1849.  
  1850. <bf>Warning: A miswired PLIP cable can destroy your controller card.</bf> Be
  1851. very careful and double check every connection to ensure you don't cause
  1852. yourself any unnecessary work or heartache.
  1853.  
  1854. While you may be able to run PLIP cables for long distances, you should
  1855. avoid it if you can. The specifications for the cable allow for a cable
  1856. length of about 1 metre or so. Please be very careful when running long
  1857. plip cables as sources of strong electromagnetic fields such as lightning,
  1858. power lines and radio transmitters can interfere with and sometimes even
  1859. damage your controller. If you really want to connect two of your computers
  1860. over a large distance you really should be looking at obtaining a pair of
  1861. thin-net ethernet cards and running some coaxial cable.
  1862.  
  1863. <sect><heading>Routing. (mandatory)
  1864.  
  1865. <p>
  1866. After you have configured all of your network devices you need to think about
  1867. how your machine is going to route IP datagrams. If you have only one network
  1868. device configured then your choice is easy, as all datagrams for any machine
  1869. other than yours must go via that interface. If you have more than one network
  1870. interface then your choice is a little more complicated. You might have both
  1871. an ethernet device and SLIP connection to your machine at home. In this
  1872. situation you must direct all datagrams for your machine at home via your SLIP
  1873. interface and all else via the ethernet device. Routing is actually a very
  1874. simple mechanism, but don't worry if you find it slightly difficult to
  1875. understand at first; everybody does.
  1876.  
  1877. You can display the contents of your routing table by using the
  1878. <em>route</em> command without any options.
  1879.  
  1880. There are four commonly used routing mechanisms for unix network configurations.
  1881. I'll briefly discuss each in turn.
  1882.  
  1883. <sect1><heading>Static/Manual Routes.
  1884.  
  1885. <p>
  1886. Static routing, as its name implies, is `hard coded' routing, that is, it will
  1887. not change if your network suffers some failure, or if an alternate route becomes
  1888. available. Static routes are often used in cases where you have a very simple
  1889. network with no alternate routes available to a destination host, that is,
  1890. there is only one possible network path to a destination host, or where you
  1891. want to route a particular way to a host regardless of network changes.
  1892.  
  1893. In Linux there is a special use for manual routes and that is for adding a
  1894. route to a SLIP or plip host where you have used the
  1895. <em>ifconfig pointopoint</em> parameter. If you have a SLIP/plip link and have
  1896. the <em>pointopoint</em> parameter specifying the address of the remote host,
  1897. then you should add a static route to that address so that the ip routing
  1898. software knows how to route datagrams to that address. The <em>route</em>
  1899. command you would use for the SLIP/plip link via leased line example presented
  1900. earlier would be:
  1901.  
  1902. <tscreen><verb>
  1903. #/sbin/route add IPR.IPR.IPR.IPR
  1904. </verb></tscreen>
  1905.  
  1906. Where:
  1907. <descrip>
  1908. <tag>IPR.IPR.IPR.IPR</tag>represents the IP address of the remote end.
  1909. </descrip>
  1910.  
  1911. <sect1><heading>Default Route.
  1912.  
  1913. <p>
  1914. The <em>default route</em> mechanism is probably the most common and most
  1915. useful to most end-user workstations and hosts on most networks. The
  1916. <em>default</em> route is a special static route that matches every destination
  1917. address, so that if there is no more specific route for a datagram to be sent
  1918. to, then the <em>default</em> route will be used.
  1919.  
  1920. If you have a configuration where you have only a single ethernet interface, or
  1921. a single SLIP interface device defined then you should point your default route
  1922. via it. In the case of an ethernet interface, the Linux kernel knows where to
  1923. send datagrams for any host on your network. It works this out using the
  1924. network address and the network mask as discussed earlier. This means that
  1925. the only datagrams the kernel won't know how to properly route will be those
  1926. for people not on your network. To make this work you would normally have your
  1927. default route point to your <em>router</em> address, as it is your means of
  1928. getting outside of your local network. If you are using a SLIP connection, then
  1929. your <em>SLIP server</em> will be acting as your <em>router</em>, so your
  1930. default route will be via your <em>SLIP server</em>.
  1931.  
  1932. To configure your default route, <bf>add</bf> the following to your
  1933. <tt>rc.inet1</tt> <bf>after</bf> all of your network device configurations:
  1934.  
  1935. <tscreen><verb>
  1936. #
  1937. # Add a default route.
  1938. #
  1939. /sbin/route add default gw RGA.RGA.RGA.RGA
  1940. #
  1941. </verb></tscreen>
  1942.  
  1943. Where:
  1944. <descrip>
  1945. <tag>RGA.RGA.RGA.RGA</tag>represents your Router/Gateway Address.
  1946. </descrip>
  1947.  
  1948. <sect1><heading>Proxy ARP.
  1949.  
  1950. <p>
  1951. <bf>This method is ugly, hazard prone and should be used with extreme care</bf>,
  1952. some of you will want to use it anyway.
  1953.  
  1954. Those with the greatest need for <em>proxy arp</em> will be those of you who
  1955. are configuring your Linux machine as a SLIP dial-in server. For those of you
  1956. who will be using PPP, the PPP daemon simplifies and automates this task, making
  1957. it a lot safer to use.
  1958.  
  1959. Normally when a tcp/ip host on your ethernet network wants to talk to you,
  1960. it knows your IP address, but doesn't know what hardware (ethernet) address
  1961. to send datagrams to. The ARP mechanism is there specifically to provide that
  1962. mapping function between network address and hardware address. The ethernet
  1963. protocol provides a special address that is recognised by all ethernet
  1964. cards, this is called the broadcast address. ARP works by sending a specially
  1965. formatted datagram containing the IP address of the host it wishes to discover
  1966. the hardware address of and transmits it to the ethernet broadcast address.
  1967. Every host will receive this datagram and the host that is configured with
  1968. the matching IP address will reply with its hardware address. The host that
  1969. performed the arp will then know what hardware address to use for the
  1970. desired IP address.
  1971.  
  1972. If you want to use your machine as a server for other machines, you must get
  1973. your machine to answer ARP requests for their IP addresses on their behalf, as
  1974. they will not be physically connected to the ethernet network. Lets say that
  1975. you have been assigned a number of IP addresses on your local network that you
  1976. will be offering to dial-in SLIP users. Lets say those addresses are:
  1977. <tt>128.253.154.120-124</tt> and that you have an ethernet card with a
  1978. hardware address of <tt>00:00:C0:AD:37:1C</tt>. (You can find the
  1979. hardware address of your ethernet card by using the <em>ifconfig</em>
  1980. command with no options). To instruct your Linux server to answer arp requests
  1981. by proxy for these addresses you would need to <bf>add</bf> the following
  1982. commands to the end of your <tt>rc.inet1</tt> file:
  1983.  
  1984. <tscreen><verb>
  1985. #
  1986. # Proxy ARP for those dialin users who will be using this
  1987. #           machine as a server:
  1988. #
  1989. /sbin/arp -s 128.263.154.120 00:00:C0:AD:37:1C pub
  1990. /sbin/arp -s 128.263.154.121 00:00:C0:AD:37:1C pub
  1991. /sbin/arp -s 128.263.154.122 00:00:C0:AD:37:1C pub
  1992. /sbin/arp -s 128.263.154.123 00:00:C0:AD:37:1C pub
  1993. /sbin/arp -s 128.263.154.124 00:00:C0:AD:37:1C pub
  1994. #
  1995. # End proxy arps.
  1996. </verb></tscreen>
  1997.  
  1998. The <tt>pub</tt> argument stands for <em>`publish'</em>. It is this argument
  1999. that instructs your machine to answer requests for these addresses, even though
  2000. they are not for your machine. When it answers it will supply the hardware
  2001. address specified, which is of course its own hardware address.
  2002.  
  2003. Naturally you will need to ensure that you have routes configured in your
  2004. linux server that point these addresses to the SLIP device on which they
  2005. will be connecting.
  2006.  
  2007. If you are using PPP, you don't need to worry about manually messing with the
  2008. arp table, as the <em>pppd</em> will manage those entries for you if you use
  2009. the <em>proxyarp</em> parameter and as long as the IP addresses of the
  2010. remote machine and the server machine are in the same network. You will need
  2011. to supply the netmask of the network on the server's <em>pppd</em> command
  2012. line.
  2013.  
  2014. <sect1><heading>gated - the routing daemon.
  2015.  
  2016. <p>
  2017. <em>gated</em> could be used in place of <em>proxy arp</em> in some cases and
  2018. would certainly be much cleaner, but its primary use is if you want your linux
  2019. machine to act as an intelligent <em>ip router</em> for your network.
  2020. <em>gated</em> provides support for a number of routing protocols. Among
  2021. these are RIP, BGP, EGP, HELLO and OSPF. The most commonly used in small
  2022. networks being <em>rip</em>. <em>rip</em> stands for <em>`Routing Information
  2023. Protocol'</em>. If you run <em>gated</em>, configured for <em>rip</em>, your
  2024. linux machine will periodically broadcast a copy of its <em>routing table</em>
  2025. to your network in a special format. In this way, all of the other machines on
  2026. your network will know what addresses are accessible via your machine.
  2027.  
  2028. <em>gated</em> can be used to replace <em>proxy arp</em> when all hosts on
  2029. your network run either <em>gated</em> or <em>routed</em>. If you have a
  2030. network where you use a mixture of manual and dynamic routes, you should
  2031. mark any manual routes as <tt>passive</tt> to ensure that they aren't destroyed
  2032. by <em>gated</em> because it hasn't received an update for them. The best way
  2033. to add static routes if you are using <em>gated</em> is to add a
  2034. <tt>static</tt> stanza to your <tt>/etc/gated.conf</tt> file. This is described
  2035. below.
  2036.  
  2037. <em>gated</em> would normally be started from your <tt>rc.inet2</tt> which
  2038. is covered in the next section. You might already see a daemon called
  2039. <em>routed</em> running. <em>gated</em> is superior to <em>routed</em> in
  2040. that it is more flexible and more functional. So you should use <em>gated</em>
  2041. and not <em>routed</em>.
  2042.  
  2043. <sect2><heading>Obtaining <em>gated</em>
  2044.  
  2045. <p>
  2046. Gated is available from:
  2047.  
  2048. <bf>sunsite.unc.edu</bf>
  2049. <tscreen><verb>
  2050. /pub/Linux/system/Network/daemons/gated11_bin.tgz
  2051. </verb></tscreen>
  2052.  
  2053. <sect2><heading>Installing <em>gated</em>
  2054.  
  2055. <p>
  2056. The <em>gated</em> binary distribution comprises three programs and two sample
  2057. configuration files.
  2058.  
  2059. The programs are:
  2060.  
  2061. <descrip>
  2062. <tag>gated
  2063. </tag>the actual <em>gated</em> daemon.
  2064. <tag>gdc
  2065. </tag>the operational user interface for <em>gated</em>. <em>gdc</em> is for
  2066. controlling the <em>gated</em> daemon, stopping and starting it, obtaining
  2067. its status and the like.
  2068. <tag>ripquery
  2069. </tag>a diagnostic tool to query the known routes of a gateway using either
  2070. a `rip query' or a `rip poll'.
  2071. </descrip>
  2072.  
  2073. The configuration files are:
  2074.  
  2075. <descrip>
  2076. <tag>gated.conf
  2077. </tag>this is the actual configuration file for the <em>gated</em> daemon. It
  2078. allows you to specify how <em>gated</em> will behave when it is running. You
  2079. can enable and disable any of the routing protocols and control the behaviour
  2080. of those routing protocols running.
  2081. <tag>gated.version
  2082. </tag>a text file that describes the version number of the <em>gated</em>
  2083. daemon
  2084. </descrip>
  2085.  
  2086. The <em>gated</em> binary distribution will not install the <em>gated</em>
  2087. files in the correct place for you. Fortunately there aren't very many,
  2088. so its fairly simple to do.
  2089.  
  2090. To install the binaries try the following:
  2091.  
  2092. <tscreen><verb>
  2093. # cd /tmp
  2094. # gzip -dc .../gated.linux.bin.tgz | tar xvf -
  2095. # install -m 500 bin/gated /usr/sbin
  2096. # install -m 444 bin/gated.conf bin/gated.version /etc
  2097. # install -m 555 bin/ripquery bin/gdc /sbin
  2098. # rm -rf /tmp/bin
  2099. </verb></tscreen>
  2100.  
  2101. I keep the networking daemons in <tt>/usr/sbin</tt>, if yours are somewhere
  2102. else then naturally you'll have to change the target directory. The sample
  2103. <em>gated</em> configuration file included configures <em>gated</em> to
  2104. emulate the old <em>routed</em> daemon. It will probably work for you in
  2105. most circumstances and it looks like this:
  2106.  
  2107. <tscreen><verb>
  2108. #
  2109. #  This configuration emulates routed.  It runs RIP and only sends
  2110. #  updates if there are more than one interfaces up and IP forwarding is
  2111. #  enabled in the kernel.
  2112. #
  2113. #    NOTE that RIP *will not* run if UDP checksums are disabled in
  2114. #    the kernel.
  2115. #
  2116. rip yes ;
  2117. traceoptions all;
  2118. #
  2119. </verb></tscreen>
  2120.  
  2121. If you have any static routes you wish to add, you can add them in a
  2122. <tt>static</tt> stanza appended to your <tt>/etc/gated.conf</tt> as follows:
  2123.  
  2124. <tscreen><verb>
  2125. #
  2126. static {
  2127. 37.0.0.0 mask 255.0.0.0 gateway 44.136.8.97 ;
  2128. host 44.136.8.100 gateway 44.136.8.97 ;
  2129. } ;
  2130. #
  2131. </verb></tscreen>
  2132.  
  2133. The above example would create a static route to the Class A network
  2134. <tt>37.0.0.0</tt> via gateway <tt>44.136.8.97</tt> and a static route to a
  2135. host with address <tt>44.136.8.100</tt> via gateway <tt>44.136.8.97</tt>.
  2136. If you do this you do not need to add the routes using the <em>route</em>
  2137. command, <em>gated</em> will add and manage the routes for you.
  2138.  
  2139. <p>
  2140. To install the <em>man</em> files, try the following:
  2141.  
  2142. <tscreen><verb>
  2143. # cd /tmp
  2144. # gzip -dc .../gated.linux.man.tgz | tar xvf -
  2145. # install -m 444 man/*.8 /usr/man/man8
  2146. # install -m 444 man/*.5 /usr/man/man5
  2147. # rm -rf /tmp/man
  2148. </verb></tscreen>
  2149.  
  2150. The <em>man</em> files contain concise and detailed information on the
  2151. configuration and use of <em>gated</em>. For information on configuring
  2152. <em>gated</em>, refer to the <tt>gated-config</tt> <em>man</em> page.
  2153.  
  2154. <sect><heading>Configuring the network daemons.
  2155.  
  2156. <p>
  2157. As mentioned earlier, there are other files that you will need to complete your
  2158. network installation. These files concern higher level configurations of the
  2159. network software. Each of the important ones are covered in the following
  2160. sub-sections, but you will find there are others that you will have to
  2161. configure as you become more familiar with the network suite.
  2162.  
  2163. <sect1><heading>/etc/rc.d/rc.inet2 (the second half of rc.net)
  2164.  
  2165. <p>
  2166. If you have been following this document you should at this stage have built
  2167. an <em>rc</em> file to configure each of your network devices with the correct
  2168. addresses and set up whatever routing you will need for your particular network
  2169. configuration. You will now need to actually start some of the higher level
  2170. network software.
  2171.  
  2172. Now would be a really good time to read Olaf's <em>Network Administrators
  2173. Guide</em>, as it really should be considered the definitive document for
  2174. this stage of the configuration process. It will help you decide what to
  2175. include in this file and more importantly perhaps, what <bf>not</bf> to
  2176. include in this file. For the security conscious it is a fair statement
  2177. to say that the more network services you have running, the more likely the
  2178. chance of your system having a security hole: Run only what you need.
  2179.  
  2180. There are some very important <em>daemons</em> (system processes that run
  2181. in the background) that you will need to know a little about. The <em>man</em>
  2182. pages will tell you more, but they are:
  2183.  
  2184. <sect2><heading>inetd.
  2185.  
  2186. <p>
  2187. <em>inetd</em> is a program that sits in the background and manages internet
  2188. connection requests and the like. It is smart enough that you don't need to
  2189. leave a whole bunch of servers running when there is nothing connected to them.
  2190. When it sees an incoming request for a particular service, eg <em>telnet</em>,
  2191. or <em>ftp</em>, it will check the <tt>/etc/services</tt> file, find what
  2192. server program needs to be run to manage the request, start it and hand
  2193. the connection over to it. Imagine it as a master server for your internet
  2194. servers. It also has a few simple standard services inbuilt. These are
  2195. <em>echo</em>, <em>discard</em> and <em>generate</em> services used for various
  2196. types of network testing. <em>inetd</em> doesn't manage <bf>all</bf>
  2197. servers and services that you might run, but it manages most of the usual
  2198. ones. Normally services such as <tt>udp</tt> based services, or services
  2199. that manage their own connection multiplexing such as World Wide Web
  2200. servers or muds would be run independently of <em>inetd</em>. Generally
  2201. the documentation accompanying such servers will tell you whether to use
  2202. <em>inetd</em> or not.
  2203.  
  2204. <sect2><heading>syslogd.
  2205.  
  2206. <p>
  2207. <em>syslogd</em> is a daemon that handles all system logging. It accepts
  2208. messages generated for it and will distribute them according to a set of rules
  2209. contained in <tt>/etc/syslogd.conf</tt>. For example, certain types of messages
  2210. you will want to send to the console and also to a log file, where others
  2211. you will want only to log to a file. <em>syslogd</em> allows you to specify
  2212. what messages should go where.
  2213.  
  2214. <sect1><heading>A sample rc.inet2 file.
  2215.  
  2216. <p>
  2217. The following is a sample rc.inet2 file that Fred built. It starts a large
  2218. number of servers, so you might want to trim it down to just those services
  2219. that you actually want to run. To trim it down, simply delete or comment out
  2220. the stanzas (<em>if</em> to <em>fi</em>) that you don't need. All each stanza
  2221. does is test that the relevant module is a file, that it exists, echoes a
  2222. comment that you can see when you boot your machine and then executes the
  2223. commands with the arguments supplied to ensure that it runs happily in the
  2224. background. For more detailed information on each of the deamons, check either
  2225. the <em>Network Administrators Guide</em> or the relevant <em>man</em> pages.
  2226.  
  2227. <tscreen><verb>
  2228. #! /bin/sh
  2229. #
  2230. # rc.inet2      This shell script boots up the entire INET system.
  2231. #               Note, that when this script is used to also fire
  2232. #               up any important remote NFS disks (like the /usr
  2233. #               distribution), care must be taken to actually
  2234. #               have all the needed binaries online _now_ ...
  2235. #
  2236. # Version:      @(#)/etc/rc.d/rc.inet2  2.18    05/27/93
  2237. #
  2238. # Author:       Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  2239. #
  2240.  
  2241. # Constants.
  2242. NET="/usr/sbin"
  2243. IN_SERV="lpd"
  2244. LPSPOOL="/var/spool/lpd"
  2245.  
  2246. # At this point, we are ready to talk to The World...
  2247. echo -e "\nMounting remote file systems ..."
  2248. /bin/mount -t nfs -v            # This may be our /usr runtime!!!
  2249.  
  2250. echo -e "\nStarting Network daemons ..."
  2251. # Start the SYSLOG daemon.  This has to be the first server.
  2252. # This is a MUST HAVE, so leave it in.
  2253. echo -n "INET: "
  2254. if [ -f ${NET}/syslogd ]
  2255. then
  2256. echo -n "syslogd "
  2257. ${NET}/syslogd
  2258. fi
  2259.  
  2260. # Start the SUN RPC Portmapper.
  2261. if [ -f ${NET}/rpc.portmap ]
  2262. then
  2263. echo -n "portmap "
  2264. ${NET}/rpc.portmap
  2265. fi
  2266.  
  2267. # Start the INET SuperServer
  2268. # This is a MUST HAVE, so leave it in.
  2269. if [ -f ${NET}/inetd ]
  2270. then
  2271. echo -n "inetd "
  2272. ${NET}/inetd
  2273. else
  2274. echo "no INETD found.  INET cancelled!"
  2275. exit 1
  2276. fi
  2277.  
  2278. # Start the NAMED/BIND name server.
  2279. # NOTE: you probably don't need to run named.
  2280. #if [ ! -f ${NET}/named ]
  2281. #then
  2282. #        echo -n "named "
  2283. #        ${NET}/named
  2284. #fi
  2285.  
  2286. # Start the ROUTEd server.
  2287. # NOTE: routed is now obsolete. You should now use gated.
  2288. #if [ -f ${NET}/routed ]
  2289. #then
  2290. #        echo -n "routed "
  2291. #        ${NET}/routed -q #-g -s
  2292. #fi
  2293.  
  2294. # Start the GATEd server.
  2295. if [ -f ${NET}/gated ]
  2296. then
  2297. echo -n "gated "
  2298. ${NET}/gated
  2299. fi
  2300.  
  2301. # Start the RWHO server.
  2302. if [ -f ${NET}/rwhod ]
  2303. then
  2304. echo -n "rwhod "
  2305. ${NET}/rwhod -t -s
  2306. fi
  2307.  
  2308. # Start the U-MAIL SMTP server.
  2309. if [ -f XXX/usr/lib/umail/umail ]
  2310. then
  2311. echo -n "umail "
  2312. /usr/lib/umail/umail -d7 -bd &etago;dev/null >/dev/null 2>&1 &
  2313. fi
  2314.  
  2315. # Start the various INET servers.
  2316. for server in ${IN_SERV}
  2317. do
  2318. if [ -f ${NET}/${server} ]
  2319. then
  2320.         echo -n "${server} "
  2321.         ${NET}/${server}
  2322. fi
  2323. done
  2324.  
  2325. # Start the various SUN RPC servers.
  2326. if [ -f ${NET}/rpc.portmap ]
  2327. then
  2328. if [ -f ${NET}/rpc.ugidd ]
  2329. then
  2330.         echo -n "ugidd "
  2331.         ${NET}/rpc.ugidd -d
  2332. fi
  2333. if [ -f ${NET}/rpc.mountd ]
  2334. then
  2335.         echo -n "mountd "
  2336.         ${NET}/rpc.mountd
  2337. fi
  2338. if [ -f ${NET}/rpc.nfsd ]
  2339. then
  2340.         echo -n "nfsd "
  2341.         ${NET}/rpc.nfsd
  2342. fi
  2343.  
  2344. # Fire up the PC-NFS daemon(s).
  2345. if [ -f ${NET}/rpc.pcnfsd ]
  2346. then
  2347.         echo -n "pcnfsd "
  2348.         ${NET}/rpc.pcnfsd ${LPSPOOL}
  2349. fi
  2350. if [ -f ${NET}/rpc.bwnfsd ]
  2351. then
  2352.         echo -n "bwnfsd "
  2353.         ${NET}/rpc.bwnfsd ${LPSPOOL}
  2354. fi
  2355.  
  2356. fi
  2357. echo network daemons started.
  2358. # Done!
  2359. </verb></tscreen>
  2360.  
  2361. <sect1><heading>Other necessary network configuration files.
  2362.  
  2363. <p>
  2364. There are other network configuration files that you will need to
  2365. configure if you want to have people connect to and use your machine
  2366. as a host. If you have installed your linux from a distribution then
  2367. you will probably already have copies of these files so just check them
  2368. to make sure they look ok and if not you can use the following samples.
  2369.  
  2370. <sect2><heading>A sample /etc/inetd.conf file.
  2371.  
  2372. <p>
  2373. Your <tt>/etc/rc.d/rc.inet2</tt> file will have started <em>inetd</em>,
  2374. <em>syslogd</em> and the various <em>rpc</em> servers for you. You will
  2375. now need to configure the network daemons that will be managed by
  2376. <em>inetd</em>. <em>inetd</em> uses a configuration file called
  2377. <tt>/etc/inetd.conf</tt>.
  2378.  
  2379. The following is an example of how a simple configuration might look:
  2380.  
  2381. <tscreen><verb>
  2382. #
  2383. # The internal services.
  2384. #
  2385. # Authors:      Original taken from BSD UNIX 4.3/TAHOE.
  2386. #               Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  2387. #
  2388. echo    stream tcp nowait root  internal
  2389. echo    dgram  udp wait   root  internal
  2390. discard stream tcp nowait root  internal
  2391. discard dgram  udp wait   root  internal
  2392. daytime stream tcp nowait root  internal
  2393. daytime dgram  udp wait   root  internal
  2394. chargen stream tcp nowait root  internal
  2395. chargen dgram  udp wait   root  internal
  2396. #
  2397. # Standard services.
  2398. #
  2399. ftp     stream tcp nowait root  /usr/sbin/tcpd in.ftpd ftpd
  2400. telnet  stream tcp nowait root  /usr/sbin/tcpd in.telnetd
  2401. #
  2402. # Shell, login, exec and talk are BSD protocols.
  2403. #
  2404. shell   stream tcp nowait root  /usr/sbin/tcpd in.rshd
  2405. login   stream tcp nowait root  /usr/sbin/tcpd in.rlogind
  2406. exec    stream tcp nowait root  /usr/sbin/tcpd in.rexecd
  2407. talk    dgram  udp wait   root  /usr/sbin/tcpd in.talkd
  2408. ntalk   dgram  udp wait   root  /usr/sbin/tcpd in.talkd
  2409. #
  2410. # Status and Information services.
  2411. #
  2412. finger  stream tcp nowait root  /usr/sbin/tcpd in.fingerd
  2413. systat  stream tcp nowait guest /usr/sbin/tcpd /usr/bin/ps -auwwx
  2414. netstat stream tcp nowait guest /usr/sbin/tcpd /bin/netstat
  2415. #
  2416. # End of inetd.conf.
  2417. </verb></tscreen>
  2418.  
  2419. The <em>inetd</em> man page describes what each of the fields are, but
  2420. put simply, each entry describes what program should be executed when
  2421. an incoming connection is received on the socket listed as the first
  2422. entry. Those entries which have <tt>incoming</tt> where the program
  2423. name and arguments would be are those services that are provided internally
  2424. by the <em>inetd</em> program.
  2425.  
  2426. The conversion between the service name in the first column and
  2427. the actual socket number it refers to is performed by the
  2428. <tt>/etc/services</tt> file.
  2429.  
  2430. <sect2><heading>A sample /etc/services file.
  2431.  
  2432. <p>
  2433. The <tt>/etc/services</tt> file is a simple table of Internet service names
  2434. and the socket number and protocol is uses. This table is used by a number
  2435. of programs including <em>inetd</em>, <em>telnet</em> and <em>tcpdump</em>.
  2436. It makes life a little easier by allowing us to refer to services by name
  2437. rather than by number.
  2438.  
  2439. The following is a sample of what a simple <tt>/etc/services</tt> file
  2440. might look like:
  2441.  
  2442. <tscreen><verb>
  2443. #
  2444. # /etc/services - database of service name, socket number
  2445. #                 and protocol.
  2446. #
  2447. # Original Author:
  2448. #     Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  2449. #
  2450. tcpmux     1/tcp
  2451. echo       7/tcp
  2452. echo       7/udp
  2453. discard    9/tcp   sink null
  2454. discard    9/udp   sink null
  2455. systat     11/tcp  users
  2456. daytime    13/tcp
  2457. daytime    13/udp
  2458. netstat    15/tcp
  2459. chargen    19/tcp  ttytst source
  2460. chargen    19/udp  ttytst source
  2461. ftp-data   20/tcp
  2462. ftp        21/tcp
  2463. telnet     23/tcp
  2464. smtp       25/tcp  mail
  2465. time       37/tcp  timserver
  2466. time       37/udp  timserver
  2467. name       42/udp  nameserver
  2468. whois      43/tcp  nicname    # usually to sri-nic
  2469. domain     53/tcp
  2470. domain     53/udp
  2471. finger     79/tcp
  2472. link       87/tcp  ttylink
  2473. hostnames  101/tcp hostname   # usually to sri-nic
  2474. sunrpc     111/tcp
  2475. sunrpc     111/tcp portmapper # RPC 4.0 portmapper TCP
  2476. sunrpc     111/udp
  2477. sunrpc     111/udp portmapper # RPC 4.0 portmapper UDP
  2478. auth       113/tcp authentication
  2479. nntp       119/tcp usenet     # Network News Transfer
  2480. ntp        123/tcp            # Network Time Protocol
  2481. ntp        123/udp            # Network Time Protocol
  2482. snmp       161/udp
  2483. snmp-trap  162/udp
  2484. exec       512/tcp            # BSD rexecd(8)
  2485. biff       512/udp comsat
  2486. login      513/tcp            # BSD rlogind(8)
  2487. who        513/udp whod       # BSD rwhod(8)
  2488. shell      514/tcp cmd        # BSD rshd(8)
  2489. syslog     514/udp            # BSD syslogd(8)
  2490. printer    515/tcp spooler    # BSD lpd(8)
  2491. talk       517/udp            # BSD talkd(8)
  2492. ntalk      518/udp            # SunOS talkd(8)
  2493. route      520/udp routed     # 521/udp too
  2494. timed      525/udp timeserver
  2495. mount      635/udp            # NFS Mount Service
  2496. pcnfs      640/udp            # PC-NFS DOS Authentication
  2497. bwnfs      650/udp            # BW-NFS DOS Authentication
  2498. listen     1025/tcp listener  # RFS remote_file_sharing
  2499. ingreslock 1524/tcp           # ingres lock server
  2500. nfs        2049/udp           # NFS File Service
  2501. irc        6667/tcp           # Internet Relay Chat
  2502. # End of services.
  2503. </verb></tscreen>
  2504.  
  2505. The <em>telnet</em> entry tells us that the <em>telnet</em> service uses
  2506. socket number 23 and the <em>tcp</em> protocol. The <em>domain</em> entry
  2507. tells us that the Domain Name Service uses socket number 52 and both
  2508. <em>tcp</em> and <em>udp</em> protocols. You should have an appropriate
  2509. <tt>/etc/services</tt> entry for each <tt>/etc/inetd.conf</tt> entry.
  2510.  
  2511. <sect2><heading>A sample /etc/protocols file.
  2512.  
  2513. <p>
  2514. The <tt>/etc/protocols</tt> file is a table of protocol name with its
  2515. corresponding protocol number. Since the number of protocols in use is
  2516. small this file is quite trivial.
  2517.  
  2518. <tscreen><verb>
  2519. #
  2520. # /etc/protocols - database of protocols.
  2521. #
  2522. # Original Author:
  2523. #   Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  2524. #
  2525. ip   0   IP   # internet protocol
  2526. icmp 1   ICMP # internet control message protocol
  2527. igmp 2   IGMP # internet group multicast protocol
  2528. ggp  3   GGP  # gateway-gateway protocol
  2529. tcp  6   TCP  # transmission control protocol
  2530. pup  12  PUP  # PARC universal packet protocol
  2531. udp  17  UDP  # user datagram protocol
  2532. idp  22  IDP
  2533. raw  255 RAW
  2534. #
  2535. # End of protocols.
  2536. </verb></tscreen>
  2537.  
  2538. <sect1><heading>Name Resolution.
  2539.  
  2540. <p>
  2541. Name Resolution is the process of converting a hostname in the familiar
  2542. dotted notation (e.g. <tt>tsx-11.mit.edu</tt>) into an IP address which
  2543. the network software understands. There are two principal means of achieving
  2544. this in a typical installation, one simple and one more complex.
  2545.  
  2546. <sect2><heading>/etc/hosts
  2547.  
  2548. <p>
  2549. <tt>/etc/hosts</tt> contains a list of ip addresses and the hostnames they map
  2550. to. In this way, you can refer to other machines on the network by name, as
  2551. well as their ip address. Using a nameserver (see section `named') allows
  2552. you to do the same name->ip address translation automatically. (Running
  2553. <em>named</em> allows you to run your own nameserver on your linux machine).
  2554. This file needs to contain at least an entry for <tt>127.0.0.1</tt> with the
  2555. name <tt>localhost</tt>. If you're not only using loopback, you need to add
  2556. an entry for your ip address, with your full hostname (such as
  2557. <tt>loomer.vpizza.com</tt>). You may also wish to include entries for your
  2558. gateways and network addresses.
  2559.  
  2560. For example, if <tt>loomer.vpizza.com</tt> has the ip address
  2561. <tt>128.253.154.32</tt>, the <tt>/etc/hosts</tt> file would contain:
  2562.  
  2563. <tscreen><verb>
  2564. # /etc/hosts
  2565. # List of hostnames and their ip addresses
  2566. 127.0.0.1               localhost
  2567. 128.253.154.32          loomer.vpizza.com loomer
  2568. # end of hosts
  2569. </verb></tscreen>
  2570.  
  2571. Once again you will need to edit this file to suit your own needs. If you're
  2572. only using loopback, the only line in <tt>/etc/hosts</tt> should be for
  2573. <tt>127.0.0.1</tt>, with both <tt>localhost</tt> and your hostname after it.
  2574.  
  2575. Note that in the second line, above, there are two names for
  2576. <tt>128.253.154.32</tt>: <tt>loomer.vpizza.com</tt> and just <tt>loomer</tt>.
  2577. The first name is the full hostname of the system, called the "Fully Qualified
  2578. Domain Name" and the second is an alias for it. The second allows you to
  2579. type only <em>rlogin loomer</em> instead of having to type the entire hostname.
  2580. You should ensure that you put the Fully Qualified Domain Name in the line
  2581. before the alias name.
  2582.  
  2583. <sect2><heading>named - do I need thee ?
  2584.  
  2585. <p>
  2586. <em>`I dub thee ..'</em>
  2587.  
  2588. <em>named</em> is the nameserver daemon for many unix-like operating systems.
  2589. It allows your machine to serve the name lookup requests, not only for itself,
  2590. but also for other machines on the network, that is, if another machine wants
  2591. to find the address for <tt>`goober.norelco.com'</tt> and you have this machines
  2592. address in your <em>named</em> database, then you can service the request and
  2593. tell other machines what <tt>`goobers'</tt> address is.
  2594.  
  2595. Under older implementations of Linux tcp/ip, to create aliases for machine
  2596. names, (even for your own machine), you had to run <em>named</em> on your
  2597. Linux machine to do the hostname to IP address conversion. One problem with
  2598. this is that <em>named</em> is comparatively difficult to set up properly and
  2599. maintain.
  2600. To solve this problem, a program called <tt>hostcvt.build</tt> was made
  2601. available on Linux systems to translate your <tt>/etc/hosts</tt> file into the
  2602. many files that make up <em>named</em> database files. However even with this
  2603. problem overcome, <em>named</em> still uses CPU overhead and causes network
  2604. traffic.
  2605.  
  2606. The only reason you may want to run <em>named</em> would be if:
  2607.  
  2608. <itemize>
  2609. <item>You're setting up a network of machines and need a nameserver for one
  2610. of them and don't have a nameserver out on the net somewhere.
  2611. <item>Your network administrators want you to run your Linux system as a
  2612. nameserver for some reason.
  2613. <item>You have a slow SLIP connection and want to run a small cache-only
  2614. nameserver on your Linux machine so that you don't have to go out on
  2615. the serial line for every name lookup that occurs. If you're only going to
  2616. be connecting to a small number of hosts on the net and you know what
  2617. their addresses are, then you can put them in your <tt>hosts</tt> file and not
  2618. need to query a nameserver at all. Generally namelookup isn't that slow and
  2619. should work fine over a SLIP link anyway.
  2620. <item>You want to run a nameserver for fun and excitement.
  2621. </itemize>
  2622.  
  2623. In general, <bf>you do NOT need to run named</bf>: this means that you can
  2624. comment it out from your <tt>rc.inet2</tt> file and you don't have to
  2625. run <tt>hostcvt.build</tt>. If you want to alias machine names, for example,
  2626. if you want to refer to <tt>loomer.vpizza.com</tt> as just <tt>loomer</tt>,
  2627. then you can add as alias in <tt>/etc/hosts</tt> instead. There is no reason to
  2628. run <em>named</em> unless you have a specific requirement to do so. If you
  2629. have access to a nameserver, (and your network administrators will tell you its
  2630. address) and most networks do, then don't bother running <em>named</em>.
  2631.  
  2632. If you're only using loopback, you can run <em>named</em> and set your
  2633. nameserver address to <tt>127.0.0.1</tt>, but since you are the only machine
  2634. you can talk to, this would be quite bizarre, as you'd never need to call it.
  2635.  
  2636. <sect2><heading>/etc/networks
  2637.  
  2638. <p>
  2639. The <tt>/etc/networks</tt> file lists the names and addresses of your own,
  2640. and other, networks. It is used by the <em>route</em> command and allows you
  2641. to specify a network by name, should you so desire.
  2642.  
  2643. Every network you wish to add a route to using the <em>route</em> command
  2644. should have an entry in the <tt>/etc/networks</tt> file, unless you also
  2645. specify the <tt>-net</tt> argument in the <em>route</em> command line.
  2646.  
  2647. Its format is similar to that of <tt>/etc/hosts</tt> file above and an
  2648. example file might look like:
  2649.  
  2650. <tscreen><verb>
  2651. #
  2652. # /etc/networks: list all networks that you wish to add route commands
  2653. #                for in here
  2654. #
  2655. default         0.0.0.0         # default route    - recommended
  2656. loopnet         127.0.0.0       # loopback network - recommended
  2657. mynet           128.253.154.0   # Example network CHANGE to YOURS
  2658. #
  2659. # end of networks
  2660. </verb></tscreen>
  2661.  
  2662. <sect2><heading>/etc/host.conf
  2663.  
  2664. <p>
  2665. The system has some library functions called the resolver library. This file
  2666. specifies how your system will lookup host names. It should contain at least
  2667. the following two lines:
  2668.  
  2669. <tscreen><verb>
  2670. order hosts,bind
  2671. multi on
  2672. </verb></tscreen>
  2673.  
  2674. These two lines tell the <em>resolve</em> libraries to first check the
  2675. <tt>/etc/hosts</tt> file and then to ask the nameserver (if one is present).
  2676. The <em>multi</em> entry allows you to have multiple IP addresses for a given
  2677. machine name in <tt>/etc/hosts</tt>.
  2678.  
  2679. This file comes from the implementation of the <em>resolv+</em> bind library
  2680. for Linux. You can find further documentation in the <em>resolv+(8)</em>
  2681. man page if you have it. If you don't, it can be obtained from:
  2682.  
  2683. <bf>sunsite.doc.ic.ac.uk</bf>
  2684. <tscreen<verb>
  2685. /computing/comms/tcpip/nameserver/resolv+/resolv+2.1.1.tar.Z
  2686. </verb></tscreen>
  2687.  
  2688. This file contains the <em>resolv+.8</em> man page for the resolver library.
  2689.  
  2690. <sect2><heading>/etc/resolv.conf
  2691.  
  2692. <p>
  2693. This file actually configures the system name resolver and contains two
  2694. types of entries: The addresses of your nameservers (if any) and the name of
  2695. your domain, if you have one. If you're running your own nameserver (i.e
  2696. running <em>named</em> on your Linux machine), then the address of your
  2697. nameserver is <tt>127.0.0.1</tt>, the loopback address.
  2698.  
  2699. Your domain name is your fully qualified hostname (if you're a registered
  2700. machine on the Internet, for example), with the hostname component removed.
  2701. That is, if your full hostname is <tt>loomer.vpizza.com</tt>, then your
  2702. domain name is <tt>vpizza.com</tt>, without the hostname <tt>loomer</tt>.
  2703.  
  2704. For example, if you machine is <tt>goober.norelco.com</tt> and has a
  2705. nameserver at the address <tt>128.253.154.5</tt>, then your
  2706. <tt>/etc/resolv.conf</tt> file would look like:
  2707.  
  2708. <tscreen><verb>
  2709. domain norelco.com
  2710. nameserver 128.253.154.5
  2711. </verb></tscreen>
  2712.  
  2713. You can specify more than one nameserver. Each one must have a
  2714. <em>nameserver</em> entry in the <tt>resolv.conf</tt> file.
  2715.  
  2716. Remember, if you're running on loopback, you don't need a nameserver.
  2717.  
  2718. <sect2><heading>Configuring your Hostname - /etc/HOSTNAME
  2719.  
  2720. <p>
  2721. After you have configured everything else, there is one small task that
  2722. remains, you need to configure your own machine with a name. This is so that
  2723. application programs like <em>sendmail</em> can know who you are to
  2724. accept mail and so that your machine can identify itself to other
  2725. machines that it might be connected to.
  2726.  
  2727. There are two programs that are used to configure this sort of information,
  2728. and they are commonly misused. They are <em>hostname</em> and
  2729. <em>domainname</em>.
  2730.  
  2731. If you are using a release of <tt>net-tools</tt> earlier than <tt>1.1.38</tt>
  2732. then you can include a command in your <tt>/etc/rc</tt> file that looks like
  2733. this:
  2734.  
  2735. <tscreen><verb>
  2736. /bin/hostname -S
  2737. </verb></tscreen>
  2738.  
  2739. and this will cause the <em>hostname</em> command to read a file called
  2740. <tt>/etc/HOSTNAME</tt> which it expects will contain a "Fully Qualified
  2741. Domain Name", that is, your machines hostname <bf>including</bf> the
  2742. domainname. It will split the F.Q.D.N. into its DNS hostname and domainname
  2743. components and set them appropriately for you.
  2744.  
  2745. For example, the machine above would have the file <tt>/etc/HOSTNAME</tt>:
  2746.  
  2747. <tscreen><verb>
  2748. goober.norelco.com
  2749. </verb></tscreen>
  2750.  
  2751. If you are using the <em>hostname</em> that came with <tt>net-tools-1.1.38</tt>
  2752. or later, then you would add a command at the end of your
  2753. <tt>/etc/rc.d/rc.inet1</tt> file like:
  2754.  
  2755. <tscreen><verb>
  2756. /bin/hostname goober.norelco.com
  2757. </verb></tscreen>
  2758.  
  2759. or if you have upgraded from a previous release, you could add:
  2760.  
  2761. <tscreen><verb>
  2762. /bin/hostname -F /etc/HOSTNAME
  2763. </verb></tscreen>
  2764.  
  2765. and it would behave in the same way as for the earlier version.
  2766.  
  2767. The <tt>/bin/domainname</tt> command is for setting the <bf>N.I.S.</bf>
  2768. domain name <bf>NOT</bf> the D.N.S. domain name. You do not need to set
  2769. this unless you are running <em>NIS</em>, which is briefly described
  2770. later.
  2771.  
  2772. <sect1><heading>Other files.
  2773.  
  2774. <p>
  2775. There are of course many other files in the <tt>/etc</tt> directory which
  2776. you may need to dabble with later on. Instead of going into them here, I'm
  2777. going to provide the bare minimum to get you on the net. More information
  2778. is available in Olaf's <em>Network Administration Guide</em>. It picks up
  2779. where this <em>HOWTO</em> ends and some more information will be provided in
  2780. later versions of this document.
  2781.  
  2782. Once you have all of the files set up and everything in the right place, you
  2783. should be able to reboot your new kernel and net away to your hearts content.
  2784. However I strongly suggest that you keep a bootable copy of your old
  2785. kernel and possibly even a `recovery disk' in case something goes wrong
  2786. so that you can get back in and fix it. You might try HJLu's `single disk boot
  2787. disk', or `disk1' from a Linux distribution.
  2788.  
  2789. <sect><heading>Advanced Configurations.
  2790.  
  2791. <p>
  2792. The configurations above have described how a typical Linux workstation
  2793. might be configured for normal end-user operation. Some of you will have other
  2794. requirements which will require slightly more advanced configurations. What
  2795. follows are examples of some the more common of these.
  2796.  
  2797. The details of the AX.25, Ottawa PI and generic SCC drivers have been
  2798. moved to the <url url="http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html"
  2799. name="HAM-HOWTO">.
  2800.  
  2801. <sect1><heading>PPP - Point to Point Protocol.
  2802.  
  2803. <p>
  2804. The <em>Point to Point Protocol</em> is a modern and efficient protocol for
  2805. conveying multiple protocols, tcp/ip for one, across serial links, that a lot
  2806. of people use in place of SLIP. It offers enhanced functionality, error
  2807. detection and security options. It corrects a number of deficiencies that
  2808. are found in SLIP and is suitable for both asynchronous links and synchronous
  2809. links alike.
  2810.  
  2811. An important feature of PPP operation is the ability to negotiate such
  2812. parameters as IP address allocation automatically and with ease and this
  2813. feature will almost certainly be exploited by your PPP server. This feature
  2814. allows a PPP client, with a specially formatted frame, to request its address
  2815. from the server. In this way configuration is somewhat less messy than with
  2816. SLIP, since this ability to retrieve your address must occur outside of the
  2817. protocol.
  2818.  
  2819. The authors of the Linux port are <tt>Michael Callahan,
  2820. <callahan@maths.ox.ac.uk></tt> and <tt> Al Longyear,
  2821. <longyear@netcom.com></tt>. Most of this information has come from
  2822. the documentation that accompanies the PPP software. The documentation
  2823. is quite complete and will tell you much more than I present here.
  2824.  
  2825. The Linux PPP code is now well and truly a public release. The 1.0.0 Linux PPP
  2826. code is based on Paul Mackerras's free PPP for BSD-derivative operating
  2827. systems. The 1.0.0 release is based on version 2.1.1 of the free PPP code.
  2828.  
  2829. The PPP code comes in two parts. The first is a kernel module which handles
  2830. the assembly and disassembly of the frames and the second is a set of 
  2831. protocols called LCP, IPCP, UPAP and CHAP, for negotiating link options,
  2832. bringing the link into a functioning state and for authentication.
  2833.  
  2834. <sect2><heading>Why would I use PPP in place of SLIP ?
  2835.  
  2836. <p>
  2837. You would use PPP in place of SLIP for a few reasons. The most common are:
  2838.  
  2839. <descrip>
  2840. <tag>Your Internet Provider supports only PPP
  2841. </tag>The most obvious reason you would use PPP in favour of SLIP is when your
  2842. Internet Provider supports PPP and not SLIP. Ok, I said it was obvious.
  2843. <tag>You have a normally noisy serial line
  2844. </tag>PPP provides a frame check sequence for each and every frame transmitted,
  2845. SLIP does not. If you have a noisy serial line and you are using SLIP, your
  2846. error correction will be performed end to end, that is between your machine and
  2847. the destination machine, whereas with PPP the error detection occurs locally,
  2848. between your machine and the PPP server. This makes for faster recovery from
  2849. errors.
  2850. <tag>You need to make use of some other feature PPP offers.
  2851. </tag>PPP provides a number of features that SLIP does not. You might for
  2852. example want to carry not only IP, but also DECNET, or AppleTalk frames over
  2853. your serial link. PPP will allow you to do this.
  2854. </descrip>
  2855.  
  2856. <sect2><heading>Where to obtain the PPP software.
  2857.  
  2858. <p>
  2859. The PPP software is available from:
  2860.  
  2861. <bf>sunsite.unc.edu</bf>
  2862. <tscreen><verb>
  2863. /pub/Linux/system/Networking/serial/ppp-2.1.2d.tar.gz
  2864. </verb></tscreen>
  2865.  
  2866. This file contains the kernel source and the <em>pppd</em> source and binary.
  2867. Version 1.0.0 is meant for use with kernels 1.0.x and 1.1.x. Version 2.1.2
  2868. is intended for kernel version 1.2.x, and the latest 2.2.0 pppd is intended
  2869. for kernels 1.3.x.
  2870.  
  2871. <sect2><heading>Installing the PPP software.
  2872.  
  2873. <p>
  2874. Installation of the PPP software is fairly straightforward.
  2875.  
  2876. <sect3><heading>The kernel driver.
  2877.  
  2878. <p>
  2879. Some support for <em>ppp</em> has been built into the kernel for some time.
  2880. so you are advised to run a modern kernel. Configuring the kernel is fairly
  2881. easy, the following should work ok:
  2882.  
  2883. <tscreen><verb>
  2884. # make config   (remembering to answer yes to PPP support)
  2885. # make dep
  2886. # make          (remember to install the new kernel after recompiling!)
  2887. </verb></tscreen>
  2888.  
  2889. When you reboot with the new kernel you should see messages at boot time
  2890. that look something like these:
  2891.  
  2892. <tscreen><verb>
  2893. PPP: version 0.2.7 (4 channels) NEW_TTY_DRIVERS OPTIMIZE_FLAGS
  2894. TCP compression code copyright 1989 Regents of the University of California
  2895. PPP line discipline registered.
  2896. </verb></tscreen>
  2897.  
  2898. These indicate that the PPP support has in fact been compiled into your
  2899. kernel.
  2900.  
  2901. Now, try looking at the contents of <tt>/proc/net/dev</tt>. You should be
  2902. careful not to use <em>more</em> or <em>less</em> on the files in the
  2903. <tt>/proc</tt> filesystem, as some of them check the filesize first and it
  2904. is a feature of the <tt>/proc</tt> filesystem that the files are zero length,
  2905. so use:
  2906. <tscreen><verb>
  2907. # cat /proc/net/dev
  2908. </verb></tscreen>
  2909.  
  2910. It should look something like this:
  2911.  
  2912. <tscreen><verb>
  2913. Inter-|   Receive                  |  Transmit
  2914.  face |packets errs drop fifo frame|packets errs drop fifo colls carrier
  2915. lo:        0    0    0    0    0        0    0    0    0     0    0
  2916. ppp0:      0    0    0    0    0        0    0    0    0     0    0
  2917. ppp1:      0    0    0    0    0        0    0    0    0     0    0
  2918. ppp2:      0    0    0    0    0        0    0    0    0     0    0
  2919. ppp3:      0    0    0    0    0        0    0    0    0     0    0
  2920. </verb></tscreen>
  2921.  
  2922. This indicates that the kernel driver is installed correctly.
  2923.  
  2924. <sect3><heading>pppd
  2925.  
  2926. <p>
  2927. To extract the ppp software and associated utilities the following should
  2928. work ok:
  2929.  
  2930. <tscreen><verb>
  2931. # cd /usr/src
  2932. # gzip -dc ppp-2.1.2d.tar.gz | tar xvf -
  2933. </verb></tscreen>
  2934.  
  2935. If you want to recompile <em>pppd</em>, type <em>make</em> in the <tt>pppd</tt>
  2936. subdirectory of the installation.  There will be some warnings when compiling
  2937. <tt>lcp.c</tt>, <tt>upap.c</tt> and <tt>chap.c</tt> but these are OK.
  2938.  
  2939. If you want to recompile <em>chat</em>, consult <tt>README.linux</tt> in the
  2940. <tt>chat</tt> directory.
  2941.  
  2942. To install, type <em>make install</em> in the <tt>chat</tt> and <tt>pppd</tt>
  2943. directories.   This will put <em>chat</em> and <em>pppd</em> binaries in
  2944. <tt>/usr/sbin</tt> and the <tt>pppd.8</tt> manual page in
  2945. <tt>/usr/man/man8</tt>.
  2946.  
  2947. <tt>pppd</tt> needs to be run as <tt>root</tt>. You can either make it suid
  2948. root or just use it when you are root. <em>make install</em> will try to
  2949. install it suid root, so if you are root when you try to install it, it should
  2950. work ok.
  2951.  
  2952. <sect2><heading>Configuring and using the PPP software.
  2953.  
  2954. <p>
  2955. Like SLIP, you can configure the PPP software as either a client or a server.
  2956. The <em>chat</em> program performs a similar function to the <em>dip</em>
  2957. program in that it is used to automate the dialing and login procedure to the
  2958. remote machine, unlike <em>dip</em> though, it does not perform the
  2959. <em>ioctl</em> to convert the serial line into a PPP line. This is performed
  2960. by the <em>pppd</em> program. <em>pppd</em> can act as either the client or the
  2961. server. When used as a client, it normally invokes the <em>chat</em> program
  2962. to perform the connection and login and then it takes over by performing
  2963. the <em>ioctl</em> to change the line discipline to <em>ppp</em>, performs
  2964. a number of steps in configuring your machine to talk to the remote machine and
  2965. then steps out of the way to let you operate.
  2966.  
  2967. Please refer to the <em>pppd</em> and <em>chat</em> man pages for more
  2968. information. Please also refer to the README file that comes with the
  2969. ppp software, as its description of the operation of these utilities is much
  2970. more complete than I have described here.
  2971.  
  2972. <sect3><heading>Configuring a PPP client by dial-up modem.
  2973.  
  2974. <p>
  2975. This is perhaps what most of you will want to do, so it appears first.
  2976. You would use this configuration when you have a network provider who supports
  2977. ppp by dialup modem. When you want to establish your connection you simply
  2978. invoke the <em>pppd</em> program with no arguments. This configuration assumes
  2979. that your PPP server will assign you an address dynamically. What to do if
  2980. you have a static address is explained later.
  2981.  
  2982. The <em>pppd</em> program has a number of command line arguments that govern
  2983. its behaviour. These arguments can all be placed in a configuration file
  2984. so that the commands do not appear in the argument list when someone on the
  2985. system uses the <em>ps</em> command. This is particularly important when
  2986. <em>pppd</em> invokes the chat program as it needs the password to use
  2987. to login to the server and you don't normally want this visible to users
  2988. of the system.
  2989.  
  2990. The file that <em>pppd</em> uses is called the <tt>/etc/ppp/options</tt> file.
  2991.  
  2992. A good starting point for a `typical' PPP installation might look like:
  2993.  
  2994. <tscreen><verb>
  2995. connect /etc/ppp/ppp-connect
  2996. /dev/ttyS1
  2997. 19200
  2998. crtscts
  2999. modem
  3000. lock
  3001. asyncmap 0
  3002. defaultroute
  3003. </verb></tscreen>
  3004.  
  3005. This specifies that:
  3006. <enum>
  3007. <item><em>pppd</em> should use the <tt>/etc/ppp/ppp-connect</tt> script to
  3008. dial the modem and login.
  3009. <item><em>pppd</em> should use the <tt>ttyS1</tt> device at <tt>19200</tt>
  3010. bits per second, with <tt>crtscts</tt> hardware handshaking and respect the
  3011. modem signals (Carrier Detect particularly) to detect if the modem is still
  3012. on-line or if the call has finished.
  3013. <item><em>pppd</em> should create a <tt>lock</tt> file for the <tt>tty</tt>
  3014. device to ensure that other processes do not attempt to open it while
  3015. <em>pppd</em> is using it.
  3016. <item>That the line is `8 bit clean', that is, that all characters are able to
  3017. pass freely across the line. The <tt>asyncmap</tt> option determines which
  3018. characters the <em>pppd</em> should escape and by default this is set to all
  3019. control characters. Most modern PPP servers are 8 bit clean and setting the
  3020. <tt>asyncmap</tt> to <tt>0</tt> tells <em>pppd</em> not to escape any
  3021. characters.
  3022. <item><em>pppd</em> should create a <tt>defaultroute</tt> via the ppp device
  3023. when the connection is successfully established.
  3024. </enum>
  3025.  
  3026. The next step is to configure the <tt>/etc/ppp/ppp-connect</tt> script.
  3027. You would normally use the <em>chat</em> program that comes with <em>pppd</em>
  3028. within this script as it is very simple to use and quite lightweight.
  3029.  
  3030. To start, you need to know what the login sequence for your PPP server looks
  3031. like. The following is a fictional example that I'll base the sample script on:
  3032.  
  3033. <tscreen><verb>
  3034. CONNECT 14400
  3035.  
  3036. Welcome to XYZ PPP server!
  3037.  
  3038. login:                      <you enter your username>^M
  3039. password:                   <you enter your password>^M
  3040.  
  3041. Now entering PPP:
  3042. </verb></tscreen>
  3043.  
  3044. The <em>chat</em> program expects as arguments a send/expect sequence, meaning
  3045. that it wants a series of `<em>what it should expect</em>, followed by 
  3046. <em>what it should send</em>' pairs. The <tt>/etc/ppp/ppp-connect</tt>
  3047. should <bf>not</bf> not be world readable. A sample to deal with the hypothetical example above might look like:
  3048.  
  3049. <tscreen><verb>
  3050. #!/bin/sh
  3051. # A chat script to login to the XYZ PPP server.
  3052. #
  3053. NUM=5552857
  3054. UID=terryd
  3055. PASSWD=secret1
  3056. #
  3057. /usr/sbin/chat -v "" ATZ OK ATDT$NUM CONNECT ogin: $UID word: \\q$PASSWD PPP:
  3058. </verb</tscreen>
  3059.  
  3060. I've embellished the script with a sequence to initialise the modem before
  3061. dialling (the <tt>ATZ</tt>. It is good practise to initialise your modem to
  3062. something sensible before you start).
  3063.  
  3064. Note the <tt>""</tt> argument, this means `<em>wait for nothing</em>' and is
  3065. used when you want to start the sequence by sending something.
  3066.  
  3067. The <tt>-v</tt> argument tells <em>chat</em> to be <bf>verbose</bf>. In this
  3068. mode it will send a transcript of the logon to <em>syslog</em> so that you
  3069. can see what is happening. Note the <tt>\\q</tt> before the
  3070. <tt>$PASSWD</tt> in the script. This tells <em>chat</em> not to echo
  3071. the following text to <em>syslog</em>. In this way your password won't be
  3072. logged in the system log.
  3073.  
  3074. You would want to use the <tt>chmod 600 /etc/ppp/ppp-connect</tt> to ensure
  3075. that other users cannot read the script file and obtain your password.
  3076.  
  3077. To start your PPP session with the above configuration you would need only
  3078. type: <em>pppd</em> and it all should happen automagically. You should observe
  3079. the logon occurring in the system log and when it is finished you should see
  3080. a <tt>default</tt> route in your routing table when you use the:
  3081. <tt>route -n</tt> command pointed via your new <tt>ppp0</tt> device.
  3082.  
  3083. If you use a static IP address you can specify that by including a line similar
  3084. to the following in your <tt>/etc/ppp/options</tt> file:
  3085.  
  3086. <tscreen><verb>
  3087. nnn.nnn.nnn.nnn:
  3088. </verb></tscreen>
  3089.  
  3090. Where: <tt>nnn.nnn.nnn.nnn</tt> is your IP addresss. Note this will only
  3091. work if your Internet Service Providers is configured to allow you to do
  3092. so. The colon `:' is important.
  3093.  
  3094. There are many other options you may want to read about that you can include
  3095. in your <tt>options</tt> file. Please refer to the <em>pppd</em> and
  3096. <em>chat</em> man pages for more information.
  3097.  
  3098. <sect3><heading>Configuring a PPP client via a leased line.
  3099.  
  3100. <p>
  3101. Configuring a PPP client via a leased line is very simple. You will still use
  3102. the <em>pppd</em> program, but since you won't need to establish the modem link
  3103. the arguments to the chat program can be much simpler.
  3104.  
  3105. The example I'm presenting here assumes that the ppp server doesn't require
  3106. any special login procedure. I do this because every login procedure will be
  3107. different and if you are simply running a local connection then it is
  3108. possible that you might have it set up this way.
  3109.  
  3110. <tscreen><verb>
  3111. pppd defaultroute noipdefault debug \
  3112. kdebug 2 /dev/cua0 9600
  3113. </verb></tscreen>
  3114.  
  3115. This will open the serial device, generate the <em>ioctl</em> to change it into
  3116. a <em>ppp</em>device, set your default route via the <em>ppp</em> interface.
  3117. The <em>noipdefault</em> argument instructs the <em>pppd</em> program to
  3118. request the address to use for this device from the server. Debug messages
  3119. will go to <em>syslog</em>. The <em>kdebug 2</em> argument causes the debug
  3120. messages to be set to level 2, this will give you slightly more information
  3121. on what is going on. It will use <tt>/dev/cua0</tt> at 9600 bps.
  3122.  
  3123. If your ppp server does require some sort of login procedure, you can easily
  3124. use the <em>chat</em> program as in the example for the dialup server to
  3125. perform that function for you.
  3126.  
  3127. Please refer to the <em>pppd</em> and <em>chat</em> man pages for more
  3128. information. Please also refer to the README file that comes with the
  3129. ppp software, as its description of the above is much more complete than
  3130. I have described here.
  3131.  
  3132. <sect3><heading>Configuring a PPP server.
  3133.  
  3134. <p>
  3135. Configuring a PPP server is similar to establishing a SLIP server.
  3136. You can create a special `ppp' account, which uses an executable script
  3137. as its login shell. The <tt>/etc/passwd</tt> entry might look like:
  3138.  
  3139. <tscreen><verb>
  3140. ppp:EncPasswd:102:50:PPP client login:/tmp:/etc/ppp/ppplogin
  3141. </verb></tscreen>
  3142.  
  3143. and the <tt>/etc/ppp/ppplogin</tt> script might look like:
  3144.  
  3145. <tscreen><verb>
  3146. #!/bin/sh
  3147. exec /usr/sbin/pppd passive :192.1.2.23
  3148. </verb></tscreen>
  3149.  
  3150. The address that you provide will be the address that the <bf>calling</bf>
  3151. machine will be assigned.
  3152.  
  3153. Naturally, if you want multiple users to have simultaneous access you would
  3154. have to create a number of startup scripts and individual accounts for each
  3155. to use, as you can only put one ip address in each script.
  3156.  
  3157. <sect2><heading>Where to obtain more information on PPP, or report bugs.
  3158.  
  3159. <p>
  3160. The <url url="http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html"
  3161. name="PPP-HOWTO"> is an excellent reference to obtain more comprehensive
  3162. information than I have provided here.
  3163.  
  3164. Most discussion on PPP for Linux takes place on the PPP mailing list.
  3165.  
  3166. To join the Linux <bf>linux-ppp</bf> channel on the mail list server, send
  3167. mail to:
  3168.  
  3169. <tscreen><verb>
  3170. Majordomo@vger.rutgers.edu
  3171. </verb></tscreen>
  3172. with the line:
  3173. <tscreen><verb>
  3174. subscribe linux-ppp
  3175. </verb></tscreen>
  3176. in the message body. The subject line is ignored.
  3177.  
  3178. Please remember that when you are reporting bugs or problems you should
  3179. include as much information relevant to the problem as you can to assist
  3180. those that will help you understand your problem.
  3181.  
  3182. You might also like to check out:
  3183.  
  3184. RFCS 1548, 1331, 1332, 1333 and 1334. These are the definitive documents for
  3185. PPP.
  3186.  
  3187. W. Richard Stevens also describes PPP in his book `TCP/IP Illustrated Volume 1',
  3188. (Addison-Wessley, 1994, ISBN 0-201-63346-9).
  3189.  
  3190. <sect1><heading>Configuring Linux as a Slip Server.
  3191.  
  3192. <p>
  3193. If you have a machine that is perhaps network connected, that you'd like
  3194. other people be able to dial into and provide network services, then you
  3195. will need to configure your machine as a server. If you want to use SLIP
  3196. as the serial line protocol, then currently you have three options as to how
  3197. to configure your Linux machine as a SLIP server. My preference would be to
  3198. use the first presented, <em>sliplogin</em>, as it seems the easiest to
  3199. configure and understand, but I will present a summary of each, so you make
  3200. your mind. 
  3201.  
  3202. <sect2><heading>Slip Server using <em>sliplogin</em>.
  3203.  
  3204. <p>
  3205. <em>sliplogin</em> is a program that you can use in place of the normal login
  3206. shell for SLIP users that converts the terminal line into a SLIP line. It
  3207. allows you to configure your Linux machine as either a <em>static address
  3208. server</em>, users get the same address everytime they call in, or a
  3209. <em>dynamic address server</em>, where users get an address allocated for
  3210. them which will not necessarily be the same as the last time they called.
  3211. <p>
  3212. The caller will login as per the standard login process, entering their username
  3213. and password, but instead of being presented with a shell after their login,
  3214. <em>sliplogin</em> is executed which searches its configuration file
  3215. (<tt>/etc/slip.hosts</tt>) for an entry with a login name that matches that of
  3216. the caller. If it locates one, it configures the line as an 8bit clean line,
  3217. and uses an <em>ioctl</em> call to convert the line discipline to SLIP. When
  3218. this process is complete, the last stage of configuration takes place, where
  3219. <em>sliplogin</em> invokes a shell script which configures the SLIP interface
  3220. with the relevant ip address, netmask and sets appropriate routing in place.
  3221. This script is usually called <tt>/etc/slip.login</tt>, but in a similar manner
  3222. to <em>getty</em>, if you have certain callers that require special
  3223. initialisation, then you can create configuration scripts called
  3224. <tt>/etc/slip.login.loginname</tt> that will be run instead of the default
  3225. specifically for them.
  3226. <p>
  3227. There are either three or four files that you need to configure to get
  3228. <em>sliplogin</em> working for you. I will detail how and where to
  3229. get the software and how each is configured in detail. The files are:
  3230.  
  3231. <itemize>
  3232. <item><tt>/etc/passwd</tt>, for the dialin user accounts.
  3233. <item><tt>/etc/slip.hosts</tt>, to contain the information unique to each
  3234. dial-in user.
  3235. <item><tt>/etc/slip.login</tt>, which manages the configuration of the routing
  3236. that needs to be performed for the user.
  3237. <item><tt>/etc/slip.tty</tt>, which is required only if you are configuring
  3238. your server for <em>dynamic address allocation</em> and contains a table
  3239. of addresses to allocate
  3240. <item><tt>/etc/slip.logout</tt>, which contains commands to clean up after the
  3241. user has hung up or logged out.
  3242. </itemize>
  3243.  
  3244. <sect3><heading>Where to get <em>sliplogin</em>
  3245.  
  3246. <p>
  3247. <em>sliplogin</em> can be obtained from:
  3248.  
  3249. <bf>sunsite.unc.edu</bf>
  3250. <tscreen><verb>
  3251. /pub/Linux/system/Network/serial/sliplogin-2.0.tar.gz
  3252. </verb></tscreen>
  3253.  
  3254. The tar file contains both source, precompiled binaries and a <em>man</em> page.
  3255. <p>
  3256. To ensure that only authorised users will be able to run <em>sliplogin</em>
  3257. program, you should add an entry to your <tt>/etc/group</tt> file similar to
  3258. the following:
  3259.  
  3260. <tscreen><verb>
  3261.  ..
  3262. SLIP::13:radio,fred
  3263.  ..
  3264. </verb></tscreen>
  3265.  
  3266. When you install the <em>sliplogin</em> package, the <tt>Makefile</tt> will
  3267. change the group ownership of the <em>sliplogin</em> program to <tt>SLIP</tt>,
  3268. and this will mean that only users who belong to that group will be able
  3269. to execute it. The example above will allow only users radio and fred to
  3270. execute <em>sliplogin</em>.
  3271. <p>
  3272. To install the binaries into your <tt>/sbin</tt> directory and the <em>man</em>
  3273. page into section 8, do the following:
  3274.  
  3275. <tscreen><verb>
  3276. # cd /usr/src
  3277. # gzip -dc .../sliplogin-2.0.tar.gz | tar xvf -
  3278. # <..edit the Makefile if you don't use shadow passwords..>
  3279. # make install
  3280. </verb></tscreen>
  3281.  
  3282. If you want to recompile the binaries before installation, add a
  3283. <tt>make clean</tt> before the <tt>make install</tt>. If you want to install
  3284. the binaries somewhere else, you will need to edit the <tt>Makefile</tt>
  3285. <em>install</em> rule.
  3286. <p>
  3287. Please read the <tt>README</tt> files that come with the package for more
  3288. information.
  3289.  
  3290. <sect3><heading>Configuring <tt>/etc/passwd</tt> for Slip hosts.
  3291.  
  3292. <p>
  3293. Normally you would create some special logins for Slip callers in your
  3294. <tt>/etc/passwd</tt> file. A convention commonly followed is to use the
  3295. <em>hostname</em> of the calling host with a capital `S' prefixing it. So,
  3296. for example, if the calling host is called <tt>radio</tt> then you could
  3297. create a <tt>/etc/passwd</tt> entry that looked like:
  3298.  
  3299. <tscreen><verb>
  3300. Sradio:FvKurok73:1427:1:radio SLIP login:/tmp:/sbin/sliplogin
  3301. </verb></tscreen>
  3302.  
  3303. It doesn't really matter what the account is called, so long as it is
  3304. meaningful to you.
  3305. <p>
  3306. Note: the caller doesn't need any special home directory, as they will not
  3307. be presented with a shell from this machine, so <tt>/tmp</tt> is a good choice.
  3308. Also note that <em>sliplogin</em> is used in place of the normal login shell.
  3309.  
  3310. <sect3><heading>Configuring <tt>/etc/slip.hosts</tt>
  3311.  
  3312. <p>
  3313. The <tt>/etc/slip.hosts</tt> file is the file that <em>sliplogin</em>
  3314. searches for entries matching the login name to obtain configuration details
  3315. for this caller. It is this file where you specify the ip address and netmask
  3316. that will be assigned to the caller and configured for their use. Sample
  3317. entries for two hosts, one a static configuration for host <tt>radio</tt> and
  3318. another, a dynamic configuration for user host <tt>albert</tt> might look like:
  3319.  
  3320. <tscreen><verb>
  3321. #
  3322. Sradio    44.136.8.99    44.136.8.100   0xffffff00   normal
  3323. Salbert   44.136.8.99    DYNAMIC        0xffffff00   compressed
  3324. #
  3325. </verb></tscreen>
  3326.  
  3327. The <tt>/etc/slip.hosts</tt> file entries are:
  3328.  
  3329. <enum>
  3330. <item>the login name of the caller.
  3331. <item>ip address of the server machine, ie this machine.
  3332. <item>ip address that the caller will be assigned. If this field is coded
  3333. <tt>DYNAMIC</tt> then an ip address will be allocated based on the information
  3334. contained in your <tt>/etc/slip.tty</tt> file discussed later. <bf>Note:</bf>
  3335. you must be using at least version 1.3 of sliplogin for this to work.
  3336. <item>the netmask assigned to the calling machine in hexadecimal notation
  3337. eg 0xffffff00 for a Class C network mask.
  3338. <item>optional parameters to enable/disable compression and other features.
  3339. </enum>
  3340.  
  3341. Note: You can use either hostnames or IP addresses in dotted decimal notation
  3342. for fields 2 and 3. If you use hostnames then those hosts must be resolvable,
  3343. that is, your machine must be able to locate an ip address for those hostnames,
  3344. otherwise the script will fail when it is called. You can test this by
  3345. trying trying to telnet to the hostname, if you get the
  3346. <em>Trying nnn.nnn.nnn...</em> message then your machine has been able to find
  3347. an ip address for that name. If you get the message <em>Unknown host</em>, then
  3348. it has not. If not, either use ip addresses in dotted decimal notation, or fix
  3349. up your name resolver configuration (See section <tt>Name Resolution</tt>).
  3350.  
  3351. The most commonly used optional parameters for the <tt>opt1</tt> and
  3352. <tt>opt2</tt> fields are:
  3353.  
  3354. <descrip>
  3355. <tag>normal
  3356. </tag>to enable normal uncompressed SLIP.
  3357. <tag>compressed
  3358. </tag>to enable van Jacobsen header compression (cSLIP)
  3359. </descrip>
  3360.  
  3361. Naturally these are mutually exclusive, you can use one or the other. For more
  3362. information on the other options available, refer to the <em>man</em> pages.
  3363.  
  3364. <sect3><heading>Configuring the <tt>/etc/slip.login</tt> file.
  3365.  
  3366. <p>
  3367. After <em>sliplogin</em> has searched the <tt>/etc/slip.hosts</tt> and found
  3368. a matching entry, it will attempt to execute the <tt>/etc/slip.login</tt> file
  3369. to actually configure the SLIP interface with its ip address and netmask.
  3370.  
  3371. The sample <tt>/etc/slip.login</tt> file supplied with the <em>sliplogin</em>
  3372. package looks like this:
  3373.  
  3374. <tscreen><verb>
  3375. #!/bin/sh -
  3376. #
  3377. #       @(#)slip.login  5.1 (Berkeley) 7/1/90
  3378. #
  3379. # generic login file for a SLIP line.  sliplogin invokes this with
  3380. # the parameters:
  3381. #     $1       $2        $3       $4         $5        $6    $7-n
  3382. #   SLIPunit ttyspeed loginname local-addr remote-addr mask opt-args
  3383. #
  3384. /sbin/ifconfig $1 $4 pointopoint $5 mtu 1500 -trailers up
  3385. /sbin/route add $5
  3386. arp -s $5 <hw_addr> pub
  3387. exit 0
  3388. #
  3389. </verb></tscreen>
  3390.  
  3391. You will note that this script simply uses the <em>ifconfig</em> and
  3392. <em>route</em> commands to configure the SLIP device with its ipaddress,
  3393. remote ip address and netmask and creates a route for the remote address via
  3394. the SLIP device. Just the same as you would if you were using the
  3395. <em>slattach</em> command.
  3396. <p>
  3397. Note also the use of <em>Proxy ARP</em> to ensure that other hosts on the same
  3398. ethernet as the server machine will know how to reach the dial-in host.
  3399. The <tt><hw_addr></tt> field should be the hardware address of the ethernet
  3400. card in the machine. If your server machine isn't on an ethernet network then
  3401. you can leave this line out completely.
  3402.  
  3403. <sect3><heading>Configuring the <tt>/etc/slip.logout</tt> file.
  3404.  
  3405. <p>
  3406. When the call drops out, you want to ensure that the serial device is restored
  3407. to its normal state so that future callers will be able to login correctly.
  3408. This is achieved with the use of the <tt>/etc/slip.logout</tt> file. It is
  3409. quite simple in format.
  3410.  
  3411. <tscreen><verb>
  3412. #!/bin/sh -
  3413. #
  3414. #               slip.logout
  3415. #
  3416. /sbin/ifconfig $1 down
  3417. /sbin/route del $5
  3418. arp -d $5
  3419. exit 0
  3420. #
  3421. </verb></tscreen>
  3422.  
  3423. All it does is `down' the interface and delete the manual route previously
  3424. created. It also uses the <em>arp</em> command to delete any proxy arp put
  3425. in place, again, you don't need the <em>arp</em> command in the script if your
  3426. server machine does not have an ethernet port.
  3427.  
  3428. <sect3><heading>Configuring the <tt>/etc/slip.tty</tt> file.
  3429.  
  3430. <p>
  3431. If you are using dynamic ip address allocation (have any hosts configured
  3432. with the <tt>DYNAMIC</tt> keyword in the <tt>/etc/slip.hosts</tt> file, then
  3433. you must configure the <tt>/etc/slip.tty</tt> file to list what addresses
  3434. are assigned to what port. You only need this file if you wish your server
  3435. to dynamically allocate addresses to users.
  3436. <p>
  3437. The file is a table that lists the <em>tty</em> devices that will support
  3438. dial-in SLIP connections and the ip address that should be assigned to users
  3439. who call in on that port.
  3440.  
  3441. Its format is as follows:
  3442. <tscreen><verb>
  3443. # slip.tty    tty -> IP address mappings for dynamic SLIP
  3444. # format: /dev/tty?? xxx.xxx.xxx.xxx
  3445. #
  3446. /dev/ttyS0      192.168.0.100
  3447. /dev/ttyS1      192.168.0.101
  3448. #
  3449. </verb></tscreen>
  3450.  
  3451. <p>
  3452. What this table says is that callers that dial in on port <tt>/dev/ttyS0</tt>
  3453. who have their remote address field in the <tt>/etc/slip.hosts</tt> file
  3454. set to <tt>DYNAMIC</tt> will be assigned an address of <tt>192.168.0.100</tt>.
  3455. <p>
  3456. In this way you need only allocate one address per port for all users who do
  3457. not require an dedicated address for themselves. This helps you keep the number
  3458. of addresses you need down to a minimum to avoid wastage.
  3459.  
  3460. <sect2><heading>Slip Server using <em>dip</em>.
  3461.  
  3462. <p>
  3463. Let me start by saying that some of the information below came from the
  3464. <em>dip</em> man pages, where how to run Linux as a SLIP server is briefly
  3465. documented. Please also beware that the following has been based on
  3466. the <em>dip337j-uri.tgz</em> package and probably will not apply to other
  3467. versions of <em>dip</em>.
  3468.  
  3469. <em>dip</em> has an input mode of operation, where it automatically locates
  3470. an entry for the user who invoked it and configures the serial line as
  3471. a SLIP link according to information it finds in the <tt>/etc/diphosts</tt>
  3472. file. This input mode of operation is activated by invoking <em>dip</em>
  3473. as <em>diplogin</em>. This therefore is how you use <em>dip</em> as a SLIP
  3474. server, by creating special accounts where <em>diplogin</em> is used as the
  3475. login shell.
  3476.  
  3477. The first thing you will need to do is to make a symbolic link as follows:
  3478.  
  3479. <tscreen><verb>
  3480. # ln -sf /usr/sbin/dip /usr/sbin/diplogin
  3481. </verb></tscreen>
  3482.  
  3483. You then need to add entries to both your <tt>/etc/passwd</tt> and your
  3484. <tt>/etc/diphosts</tt> files. The entries you need to make are formatted
  3485. as follows:
  3486.  
  3487. To configure Linux as a SLIP server with <em>dip</em>, you need to create some
  3488. special SLIP accounts for users, where <em>dip</em> (in input mode) is used as
  3489. the login shell. A suggested convention is that of having all SLIP accounts
  3490. begin with a capital `S', eg `Sfredm'.
  3491.  
  3492. A sample <tt>/etc/passwd</tt> entry for a SLIP user looks like:
  3493.  
  3494. <tscreen><verb>
  3495. Sfredm:ij/SMxiTlGVCo:1004:10:Fred:/tmp:/usr/sbin/diplogin
  3496. ^^         ^^        ^^  ^^   ^^   ^^   ^^
  3497. |          |         |   |    |    |    \__ diplogin as login shell
  3498. |          |         |   |    |    \_______ Home directory
  3499. |          |         |   |    \____________ User Full Name
  3500. |          |         |   \_________________ User Group ID
  3501. |          |         \_____________________ User ID
  3502. |          \_______________________________ Encrypted User Password
  3503. \__________________________________________ Slip User Login Name
  3504. </verb></tscreen>
  3505.  
  3506. After the user logs in, the <em>login(1)</em> program, if it finds and verifies
  3507. the user ok, will execute the <em>diplogin</em> command. <em>dip</em>, when
  3508. invoked as <em>diplogin</em> knows that it should automatically assume that it
  3509. is being used a login shell. When it is started as <em>diplogin</em> the first
  3510. thing it does is use the <em>getuid()</em> function call to get the userid of
  3511. whoever has invoked it. It then searches the <tt>/etc/diphosts</tt> file for
  3512. the first entry that matches either the userid or the name of the <em>tty</em>
  3513. device that the call has come in on and configures itself appropriately.
  3514. By judicious decision as to whether to give a user an entry in the
  3515. <tt>diphosts</tt> file, or whether to let the user be given the default
  3516. configuration you can build your server in such a way that you can have
  3517. a mix of static and dynamically assigned address users.
  3518.  
  3519. <em>dip</em> will automatically add a `Proxy-ARP' entry if invoked in input
  3520. mode, so you do not need to worry about manually adding such entries.
  3521.  
  3522. <sect3><heading>Configuring <tt>/etc/diphosts</tt>
  3523.  
  3524. <p>
  3525. <tt>/etc/diphosts</tt> is used by <em>dip</em> to lookup preset
  3526. configurations for remote hosts. These remote hosts might be users
  3527. dialing into your linux machine, or they might be for machines that you dial
  3528. into with your linux machine.
  3529.  
  3530. The general format for <tt>/etc/diphosts</tt> is as follows:
  3531.  
  3532. <tscreen><verb>
  3533.  ..
  3534. Suwalt::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
  3535. ttyS1::145.71.34.3:145.71.34.2:255.255.255.0:Dynamic ttyS1:CSLIP,296
  3536.  ..
  3537. </verb></tscreen>
  3538.  
  3539. The fields are:
  3540. <enum>
  3541. <item><tt>login name</tt>: as returned by getpwuid(getuid()) or tty name.
  3542. <item><tt>unused</tt>: compat. with passwd
  3543. <item><tt>Remote Address</tt>: IP address of the calling host, either numeric or by name
  3544. <item><tt>Local Address</tt>: IP address of this machine, again numeric or by name
  3545. <item><tt>Netmask</tt>: in dotted decimal notation
  3546. <item><tt>Comment field</tt>: put whatever you want here.
  3547. <item><tt>protocol</tt>: Slip, CSlip etc.
  3548. <item><tt>MTU</tt>: decimal number
  3549. </enum>
  3550.  
  3551. An example <tt>/etc/net/diphosts</tt> entry for a remote SLIP user might be:
  3552.  
  3553. <tscreen><verb>
  3554. Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:SLIP,296
  3555. </verb></tscreen>
  3556.  
  3557. which specifies a SLIP link with remote address of 145.71.34.1 and MTU of 296,
  3558. or:
  3559.  
  3560. <tscreen><verb>
  3561. Sfredm::145.71.34.1:145.71.34.2:255.255.255.0:SLIP uwalt:CSLIP,1006
  3562. </verb></tscreen>
  3563.  
  3564. which specifies a cSLIP-capable link with remote address 145.71.34.1 and MTU
  3565. of 1006.
  3566.  
  3567. Therefore, all users who you wish to be allowed a statically allocated dial-up
  3568. IP access should have an entry in the <tt>/etc/diphosts</tt> and if you want
  3569. users who call a particular port to have their details dynamically allocated
  3570. you must have an entry for the <tt>tty</tt> device and do not configure a
  3571. user based entry. You should remember to configure at least one entry for
  3572. each <tt>tty</tt> device that your dialup users use to ensure that a suitable
  3573. configuration is available for them regardless of which modem they call in on.
  3574.  
  3575. When a user logs in, they will receive a normal login and password prompt, at
  3576. which they should enter their SLIP-login userid and password. If they check out
  3577. ok, then the user will see no special messages, they should just change into
  3578. SLIP mode at their end and then they should be able to connect ok and be
  3579. configured with the parameters from the <tt>diphosts</tt> file.
  3580.  
  3581. <sect2><heading>SLIP server using the <em>dSLIP</em> package.
  3582.  
  3583. <p>
  3584. Matt Dillon <tt><dillon@apollo.west.oic.com></tt> has written a package
  3585. that does not only dial-in but also dial-out SLIP. Matt's package is
  3586. a combination of small programs and scripts that manage your connections
  3587. for you. You will need to have <em>tcsh</em> installed as at least one
  3588. of the scripts requires it. Matt supplies a binary copy of the <em>expect</em>
  3589. utility as it too is needed by one of the scripts. You will most likely need
  3590. some experience with <em>expect</em> to get this package working to your
  3591. liking, but don't let that put you off.
  3592. <p>
  3593. Matt has written a good set of installation instructions in the
  3594. README file, so I won't bother repeating them.
  3595. <p>
  3596. You can get the <em>dSLIP</em> package from its home site at:
  3597.  
  3598. <bf>apollo.west.oic.com</bf>
  3599. <tscreen><verb>
  3600. /pub/linux/dillon_src/dSLIP203.tgz
  3601. </verb></tscreen>
  3602.  
  3603. or from:
  3604.  
  3605. <bf>sunsite.unc.edu</bf>
  3606. <tscreen><verb>
  3607. /pub/Linux/system/Network/serial/dSLIP203.tgz
  3608. </verb></tscreen>
  3609.  
  3610. Read the <tt>README</tt> file and create the <tt>/etc/passwd</tt> and
  3611. <tt>/etc/group</tt> entries <bf>before</bf> doing a <tt>make install</tt>.
  3612.  
  3613.  
  3614. <sect1><heading>Using the Automounter Daemon - AMD.
  3615.  
  3616. <p>
  3617. This section has been supplied by <tt>Mitch DSouza</tt> and I've included
  3618. it with minimal editing, as he supplied it. Thanks Mitch.
  3619.  
  3620. <sect2><heading>What is an automounter and why would I use one ?
  3621.  
  3622. <p>
  3623. An <em>automounter</em> provides a convenient means of mounting filesystems on
  3624. demand, i.e. when required. This will reduce both the server and the client
  3625. load and provides a great deal of flexibility even with non-NFS mounts. It
  3626. also offers a redundancy mechanism whereby a mount point will automatically
  3627. switch to a secondary server should a primary one be unavailable. A rather
  3628. useful mount called the <em>union</em> mount gives the <em>automounter</em>
  3629. the ability to <em>merge</em> the contents of multiple directories into a
  3630. single directory. The documentation MST be read thoroughly to make full use
  3631. of its extensive capabilities.
  3632.  
  3633. A few important points must be remembered - (in no particular order):
  3634.  
  3635. <itemize>
  3636. <item><em>amd</em> maps are <bf>not</bf> compatible with Sun maps, which in turn
  3637. are <bf>not</bf> compatible with HP maps <em>ad infinitum</em>. The point here
  3638. however is that <em>amd</em> is freely available and compatible with all the
  3639. systems mentioned above and more, thus giving you the ability to share maps
  3640. if <em>amd</em> is installed throughout your network. Mitch uses it with a
  3641. mixture of Linux/Dec/NeXt/Sun machines.
  3642. <item><em>Sun</em> automount maps can be converted to <em>amd</em> style maps
  3643. by using the <em>perl</em> script in the <tt>contrib</tt> directory -
  3644. <tt>automount2amd.pl</tt>.
  3645. <item>You <bf>must</bf> have the <em>portmapper</em> running <bf>before</bf>
  3646. starting <em>amd</em>.
  3647. <item>UFS mounts <bf>do not</bf> timeout.
  3648. <item>UFS mounts, in the case of Linux <bf>only</bf>, have been extended to
  3649. deal with <bf>all</bf> varieties of native filesystems (i.e. minix, ext, ext2,
  3650. xiafs ...) with the default being minix. This undocumented feature is accessed
  3651. in the <em>opts</em> option like:
  3652. <tscreen><verb>
  3653.  ..., opts:=type=msdos,conv=auto
  3654. </verb></tscreen>
  3655. <item>Do not mount over existing directories unless you use a <em>direct</em>
  3656. automount option, otherwise it is like mounting your disk on <tt>/home</tt>
  3657. when some user directory is <tt>/home/fred</tt>.
  3658. <item><bf>Always</bf> turn on full logging with the `-x all' option to <em>amd</em>
  3659. if you have any troubles. Check also what the command:
  3660. <tscreen><verb>
  3661. % amq -ms
  3662. </verb></tscreen>
  3663. reports, as it will indicate problems as they occur.
  3664. <item>GNU <em>getopt()</em> is too clever for its own good sometimes. You
  3665. should always use `--' before the non-options e.g.
  3666. <tscreen><verb>
  3667. # /etc/amd -x all -l syslog -a /amd -- /net /etc/amd.net
  3668. </verb></tscreen>
  3669. </itemize>
  3670.  
  3671. <sect2><heading>Where to get AMD, the automounter daemon.
  3672.  
  3673. <p>
  3674. <em>amd</em> can be obtained from:
  3675.  
  3676. <bf>sunsite.unc.edu</bf>
  3677. <tscreen><verb>
  3678. /pub/Linux/system/Misc/mount/amd920824upl67.tar.gz
  3679. </verb></tscreen>
  3680.  
  3681. This contains ready-to-run binaries, full sources and documentation in texinfo
  3682. format.
  3683.  
  3684. <sect2><heading>An example AMD configuration.
  3685.  
  3686. <p>
  3687. You do not configure the <em>automounter</em> from the <tt>/etc/fstab</tt>
  3688. file, which you will already be using to contain information about your
  3689. filesystems, instead it is command line driven.
  3690.  
  3691. To mount two <em>nfs</em> filesystems using your <tt>/etc/fstab</tt> file
  3692. you would use two entries that looked like:
  3693.  
  3694. <tscreen><verb>
  3695. server-1:/export/disk  /nfs/server-1  nfs  defaults
  3696. server-2:/export/disk  /nfs/server-2  nfs  defaults
  3697. </verb></tscreen>
  3698.  
  3699. i.e. you were <em>nfs</em> mounting <tt>server-1</tt> and <tt>server-2</tt>
  3700. on your linux disk on the <tt>/nfs/server-1</tt> and <tt>/nfs/server-2</tt>
  3701. directories.
  3702.  
  3703. After commenting out, or deleting the above lines from your <tt>/etc/fstab</tt>
  3704. file, you could <em>amd</em> to perform the same task with the following
  3705. syntax:
  3706.  
  3707. <tscreen><verb>
  3708. /etc/amd -x all -l syslog -a /amd -- /nfs /etc/amd.server
  3709. |      | |    | |       | |     |  | |  | |             |
  3710. |      | |    | |       | |     |  | |  | |             |
  3711. `------' `----' `-------' `-----' -' `--' `-------------'
  3712. |        |      |         |      |   |    |
  3713. (1)      (2)    (3)       (4)    (5) (6)  (7)
  3714. </verb></tscreen>
  3715.  
  3716. Where:
  3717.  
  3718. <enum>
  3719. <item>The full <em>amd</em> binary path (obviously optional) depending on your
  3720. $PATH setting, so just <em>`amd'</em> may be specified here.
  3721. <item>`-x all' means turn full logging on. Read the documentation for the other
  3722. logging levels
  3723. <item>`-l syslog' means log the message via the <em>syslog</em> daemon. This
  3724. could mean put it to a file, dump it, or pass it, to an unused tty console. This
  3725. (<em>syslog</em>) can be changed to the name of a file, i.e. `-l foo' will
  3726. record to a file called <em>foo</em>.
  3727. <item>`-a /amd' means use the <tt>/amd</tt> directory as a temporary place for
  3728. automount points. This directory is created automatically by <em>amd</em>
  3729. and should be removed before starting <em>amd</em> in your
  3730. <tt>/etc/rc</tt> scripts.
  3731. <item>`--' means tell <em>getopt()</em> to stop attempting to parse the rest of
  3732. the command line for options. This is especially useful when specifying the
  3733. `type:=' options on the command line, otherwise <em>getopt()</em> tries to
  3734. decode it incorrectly.
  3735. <item>`/nfs' is the <bf>real</bf> nfs mount point. Again this is automatically
  3736. created and should <bf>not</bf> generally contain subdirectories unless the
  3737. `type:=direct' option is used.
  3738. <item>The <em>amd</em> map (i.e. a file) named `amd.server' contains the lines:
  3739. <tscreen><verb>
  3740.  
  3741. # /etc/amd.server
  3742. /defaults    opts:=rw;type:=nfs
  3743. server-1     rhost:=server-1;rfs:=/export/disk
  3744. server-2     rhost:=server-2;rfs:=/export/disk
  3745. </verb></tscreen>
  3746.  
  3747. </enum>
  3748.  
  3749. Once started and successfully running, you can query the status of the
  3750. mounts with the command:
  3751.  
  3752. <tscreen><verb>
  3753. % amq -ms
  3754. </verb></tscreen>
  3755.  
  3756. Now if you say:
  3757.  
  3758. <tscreen><verb>
  3759. % ls /nfs
  3760. </verb></tscreen>
  3761.  
  3762. you should see no files. However the command:
  3763.  
  3764. <tscreen><verb>
  3765. % ls /nfs/server-1
  3766. </verb></tscreen>
  3767.  
  3768. will mount the host `server-1' automatically. <em>voila</em>! <em>amd</em> is
  3769. running. After the default timeout has expired, this will automatically be
  3770. unmounted. Your <tt>/etc/password</tt> file could contain entries like:
  3771.  
  3772. <tscreen><verb>
  3773.  ...
  3774. linus:EncPass:10:0:God:/nfs/server-1/home/linus:/bin/sh
  3775. mitch:EncPass:20:10:Mitch DSouza:/nfs/server-1/home/mitch:/bin/tcsh
  3776. matt:EncPass:20:10:Matt Welsh:/nfs/server-1/home/matt:/bin/csh
  3777. </verb></tscreen>
  3778.  
  3779. which would mean that when Linus, Matt, or Mitch are logged in, their
  3780. home directory will be remotely mounted from the appropriate server and
  3781. unmounted when they log out.
  3782.  
  3783. <sect1><heading>Using Linux as a router
  3784.  
  3785. <p>
  3786. Linux will function just fine as a router. You should run a routing daemon
  3787. such as <em>gated</em>, or if you have simple routing requirements use
  3788. hard coded routes. If you are using a late version kernel (1.1.*) then
  3789. you should ensure that you have answered `y' to:
  3790.  
  3791. <tscreen><verb>
  3792. IP forwarding/gatewaying (CONFIG_IP_FORWARD) [y] y
  3793. </verb></tscreen>
  3794.  
  3795. when building your kernel.
  3796.  
  3797. Olaf Kirch's Network Administrators Guide discusses network design and
  3798. routing issues and you should read it for more information. A reference
  3799. to it is in the "Related Documentation" section of this document.
  3800.  
  3801. <sect1><heading>NIS - Sun Network Information System.
  3802.  
  3803. <p>
  3804. There is now an <url url="http://sunsite.unc.edu/mdw/HOWTO/NIS-HOWTO.html"
  3805. name="NIS-HOWTO"> which you should read if you are interested in using
  3806. NIS. It details how to obtain, install and configure the NIS system for
  3807. Linux.
  3808.  
  3809.  
  3810. <sect><heading>Experimental and Developmental modules.
  3811.  
  3812. <p>
  3813. There are a number of people developing new features and modules for the Linux
  3814. networking code. Some of these are in quite an advanced state (read
  3815. <em>working</em>) and it is these that I intend to include in this section
  3816. until they are standard release code, when they will be moved forward.
  3817. <p>
  3818. The AX25 section has been relocated into the
  3819. <url url="http://sunsite.unc.edu/mdw/HOWTO/HAM-HOWTO.html" name="HAM-HOWTO">
  3820. because it was fairly specific to Amateur Radio.
  3821.  
  3822. <sect1><heading>snmp agent.
  3823.  
  3824. <p>
  3825. There is an experimental snmp agent for linux, ported from the cmu-snmp
  3826. source by <tt>Erik Schoenfelder, <schoenfr@ibr.cs.tu-bs.de></tt>.
  3827.  
  3828. It is available from:
  3829.  
  3830. <bf>ftp.ibr.cs.tu-bs.de</bf>
  3831. <tscreen><verb>
  3832. /pub/local/cmu-snmp2.1.2l3-src.tar.gz
  3833. </verb></tscreen>
  3834.  
  3835. Please <bf>read</bf> the file called <tt>cmu-snmp2.1.2l3.README</tt>, as it
  3836. contains information that you will need to know about the package.
  3837.  
  3838. This package provides a nearly complete MIB-II variable set. and parts of the
  3839. host MIB. Setting of system group variables is provided. The private community
  3840. string is settable in the config file.
  3841.  
  3842. <tt>nstat.tar.gz</tt> contains a formatter of the output from
  3843. <tt>/proc/net/snmp</tt> called <em>nstat</em>.
  3844.  
  3845. You will need Linux v1.1.60 and libc v4.6.27 or higher to compile and run
  3846. the agent.
  3847.  
  3848. <sect1><heading>Experimental Token Ring driver
  3849.  
  3850. <p>
  3851. An experimental Token Ring driver is being developed by <tt>Peter De Schrijver
  3852. <stud11@cc4.kuleuven.ac.be></tt>. His latest version, at the time of
  3853. writing is available in the Linux 1.3.* kernel release kernels.
  3854. For older kernel versions the driver patches are located at:
  3855.  
  3856. <bf>linux3.cc.kuleuven.ac.be</bf>
  3857. <tscreen><verb>
  3858. /pub/Linux/TokenRing/TokenRing.patch-1.2.0.gz
  3859. </verb></tscreen>
  3860.  
  3861. <bf>ftp.cs.kuleuven.ac.be</bf>
  3862. <tscreen><verb>
  3863. /pub/unix/linux/TokenRing.patch-1.1.64.gz
  3864. </verb></tscreen>
  3865.  
  3866. There are a number of patch files against various kernel versions. Just pick
  3867. the one that suits your kernel.
  3868.  
  3869. Note also that there are versions of the network tools to suit Token Ring in
  3870. the same directory at <tt>linux3.cc.kuleven.ac.be</tt>.
  3871.  
  3872. Most boards based on IBM's TROPIC chipset should work now. The following boards
  3873. are known to be working with the driver :
  3874.  
  3875. <itemize>
  3876. <item>IBM Token Ring Adapter II
  3877. <item>IBM Token Ring 16/4 Adapter
  3878. <item>IBM Token Ring Adapter/A
  3879. <item>IBM Token Ring 16/4 Adapter/A
  3880. <item>HyperRing Classic 16/4
  3881. </itemize>
  3882.  
  3883. Boards which use the TI chipset or busmastering DMA won't work with the current
  3884. driver. However someone is working on a driver for the IBM busmaster adapters.
  3885.  
  3886. <sect1><heading>V.35 interface board
  3887.  
  3888. <p>
  3889. V.35 is a C.C.I.T.T. standard interface that provides a high speed balanced
  3890. serial interface suitable for speeds up to about 2 Mbps. The use of differential
  3891. pair balanced transmission allows the V.35 interface to support longer cables
  3892. than can the more familiar V.24/RS232C type interface and higher data rates.
  3893.  
  3894. <sect2><heading>Internet Technologies International XNET-1
  3895.  
  3896. <p>
  3897. Matti Aarnio <tt><mea@mea.utu.fi></tt> represents
  3898. <url url="mailto:intec@digiw.fi" name="Internet Technologies International">.
  3899. They have an 8 bit X.21 card available called the <tt>XNET-1</tt> which will
  3900. work for V.35 with an appropriate cable. You can obtain information on the
  3901. card itself from:
  3902.  
  3903. <tscreen><verb>
  3904. Internet Technologies International OY,
  3905. Helsinki, Finland  <intec@digiw.fi>
  3906. Internet Technologies International OY (Ltd)
  3907. PO BOX 51
  3908. 00641 Helsinki
  3909. FINLAND
  3910. Fax: +356-0-7523939
  3911. </verb></tscreen>
  3912. <p>
  3913. The driver for the card is available from
  3914. <url url="ftp://ftp.funet.fi/pub/Linux/kernel/xnet-sync-driver.tar.gz"
  3915.     name="ftp.funet.fi">.
  3916.  
  3917. <sect2>SDL Communications N2 card.
  3918.  
  3919. <p>
  3920. <url url="http://www.ici.net/cust_pages/sdl/sdl.html"
  3921.     name="SDL Communications"> produce a variety of controller cards
  3922. supporting V.35 for ISA based machines.
  3923.  
  3924. The beta release driver can be found at:
  3925.  
  3926. <bf>ftp.sdlcomm.com</bf>
  3927. <tscreen><verb>
  3928. /business/sdlcomm/n2/linux
  3929. </verb></tscreen>
  3930.  
  3931. For further information you can contact
  3932. <url url="mailto:sales@sdlcomm.com" name="Rubin Dhillon at SDL Sales">
  3933.  
  3934. <sect1><heading>Demand Dial SLIP/PPP package
  3935.  
  3936. <p>
  3937. Eric Schenk <tt><schenk@cs.toronto.edu></tt> has written a demand dial
  3938. daemon that will work with either SLIP or PPP. It relies on you having
  3939. a SLIP device configured which the daemon connects to via a pty. When your
  3940. SLIP connection is not active all datagrams for non local hosts will be
  3941. routed to this device and the daemon will detect them, when it receives
  3942. a datagram it executes a script to activate your network link and then
  3943. reroutes datagrams to that link.
  3944. <p>
  3945. The software is available at:
  3946.  
  3947. <bf>sunsite.unc.edu</bf>
  3948. <tscreen><verb>
  3949. /pub/Linux/system/Network/serial/diald-0.7.tar.gz
  3950. </verb></tscreen>
  3951.  
  3952. <bf>Note:</bf> You must configure your kernel so that it includes the
  3953. SLIP driver, even if you only want to run PPP.
  3954.  
  3955. The included documentation describes how to install and configure the
  3956. software.
  3957.  
  3958. <sect1><heading>ISDN support
  3959.  
  3960. <p>
  3961. There are various ISDN support efforts underway. The ones that I know of
  3962. are:
  3963.  
  3964. <sect2><heading>3Com-Sonix PC/Arpeggio driver
  3965.  
  3966. <p>
  3967. Alan Cox has started a driver for the 3Com arpeggio ISDN card. It is currently
  3968. capable of supporting Async PPP only.
  3969.  
  3970. <bf>sunsite.unc.edu</bf>
  3971. <tscreen><verb>
  3972. /pub/Linux/kernel/patches/network/sonix.tgz
  3973. </verb></tscreen>
  3974.  
  3975. <sect2><heading>DIEHL SCOM card
  3976.  
  3977. <p>
  3978. <bf>sunsite.unc.edu</bf>
  3979. <tscreen><verb>
  3980. /pub/Linux/kernel/patches/network/isdndrv-0.1.1.tar.gz
  3981. </verb></tscreen>
  3982.  
  3983. <sect2><heading>ICN ISDN and/or Teles ISDN card and/or Creatix AVM ISDN board
  3984.  
  3985. <p>
  3986. Fritz Elfert, Jan den Ouden and Thinking Objects have written a linux driver
  3987. for the ICN ISDN card. Some of the documentation for this driver is in German.
  3988. There seem to be various versions of this driver around that apparently
  3989. support other ISDN cards, if you obtain one and it doesn't support your
  3990. card take a look at another of the sites. You can obtain them from:
  3991.  
  3992. <bf>ftp.franken.de</bf>
  3993. <tscreen><verb>
  3994. /pub/isdn4linux/
  3995. </verb></tscreen>
  3996.  
  3997. or:
  3998. <bf>ftp.gwdg.de</bf>
  3999. <tscreen><verb>
  4000. /pub/linux/misc/isdn4linux/
  4001. </verb></tscreen>
  4002.  
  4003. <sect2><heading>Euro-ISDN card ?
  4004.  
  4005. <p>
  4006. Matthias Urlichs <tt><urlichs@smurf.noris.de></tt> has developed
  4007. some experimental Streams based ISDN support for Linux. The most recent
  4008. version was for kernel version 1.3.* and is reported to work.
  4009.  
  4010. It is available at:
  4011.  
  4012. <bf>ftp.uni-stuttgart.de</bf>
  4013. <tscreen><verb>
  4014. /pub/systems/linux/isdn/ftp.noris.de/
  4015. </verb></tscreen>
  4016.  
  4017. Be warned, the documentation is in German and the code is designed to
  4018. support the european ISDN network. Matthias is working on a english version
  4019. of the documentation.
  4020.  
  4021. <sect2><heading>Combinet's Everyware 1000 ISDN card
  4022.  
  4023. <p>
  4024. Joel Katz <tt><stimpson@panix.com></tt> has developed a driver for
  4025. Combinet's <tt>Everyware 1000</tt> series of plug-in ISDN cards.
  4026.  
  4027. It is available from:
  4028. <bf>sunsite.unc.edu</bf>
  4029. <tscreen><verb>
  4030. /pub/Linux/kernel/patches/network/combinet1000isdn-1.02.tar.gz
  4031. </verb></tscreen>
  4032.  
  4033. <sect2><heading>More information:
  4034.  
  4035. <p>
  4036. Harald Milz has put together a World Wide Web page for Linux ISDN support and
  4037. it is available at
  4038. <url url="http://www.ix.de/ix/linux/linux-isdn.html"
  4039.     name="Linux ISDN Web Page">.
  4040. A more generic site containing information about ISDN is available at
  4041. <url url="http://alumni.caltech.edu/~dank/isdn/"
  4042.     name="Dan Kegel's ISDN home page">.
  4043.  
  4044. <sect1><heading>System-V Streams
  4045.  
  4046. <p>
  4047. The LiS (Linux Streams) project has formed to develop and implement System-V
  4048. Streams for Linux. They have a World Wide Web page at
  4049. <url url="http://www.uc3m.es/~LiS/" name="Linux Streams Web Page"> where
  4050. the status of the project can be obtained and where you can locate contact
  4051. information and test code.
  4052.  
  4053. <sect1><heading>ATM (Asynchronous Transfer Mode) support.
  4054.  
  4055. <p>
  4056. Werner Almesberger has put together a World Wide site on the topic of
  4057. Linux support for ATM. It is available at
  4058. <url url="http://lrcwww.epfl.ch/linux-atm/" name="lrcwww.epfl.ch">.
  4059. There is experimental software which supports raw ATM connections and some
  4060. basic IP over ATM available at the pre-alpha stage and this can be obtained
  4061. from the Web Site. The site contains a good deal of interesting information
  4062. on ATM.
  4063.  
  4064. A mail list has been established to discuss ATM for Linux and you can subscribe
  4065. by sending a mail message with the body <tt>subscribe linux-atm</tt> to:
  4066. <tt>majordomo@vger.rutgers.edu</tt>
  4067.  
  4068. <sect1><heading>X.25 support.
  4069.  
  4070. <p>
  4071. Many people have enquired about X.25 support for Linux. There is some
  4072. development work taking place but the apparently small community of people
  4073. that are interested in it don't seem to have enough momentum to produce
  4074. very quickly. If you are interested in X.25 support then you might volunteer
  4075. some assistance to help accelerate the existing development effort. The
  4076. only information that I have available on X.25 development efforts are
  4077. a note on Alan Cox's webserver to say that someone has volunteered to do
  4078. the job and the following World Wide Web site which provides information
  4079. about two development efforts that seem to be making some progress:
  4080.  
  4081. X.25 for Linux is at: 
  4082. <url url="http://www.ping.be/~ping0778/linux-x.25/" name="www.ping.be">
  4083.  
  4084.  
  4085. <sect1><heading>Appletalk support.
  4086.  
  4087. <p>
  4088. If you have some Apple machines on your network that you'd like your
  4089. linux machine to be able to share filesystems and printers with then
  4090. the linux appletalk support is what you are after.
  4091.  
  4092. The following information was supplied mostly by Cees de Groot
  4093. <tt><cg@tricbbs.fn.sub.org</tt> who compiled it from his own experience
  4094. with assistance from Dana Basken <tt><dana@millenium.tiac.net></tt> and
  4095. others on the net.
  4096.  
  4097. <sect2><heading>Building the kernel with Appletalk DDP support
  4098.  
  4099. <p>
  4100. Alan Cox has developed some experimental and working support for the Apple
  4101. Ethertalk specification. It is now a part of the later 1.2.* revision kernels
  4102. and the new linux 1.3.* revision kernels so to build the kernel support for
  4103. it you need only compile up a recent kernel, make sure you select the
  4104. following configuration option:
  4105.  
  4106. <tscreen><verb>
  4107. #
  4108. # cd /usr/src/linux
  4109. # make config
  4110.  ...
  4111.  ...
  4112.     Appletalk DDP ? y
  4113.  ...
  4114.  ...
  4115. #
  4116. </verb></tscreen>
  4117.  
  4118. <sect2><heading>Building the Appletalk configuration tools and daemons.
  4119.  
  4120. <p>
  4121. You will need some additional software as the kernel support only provides
  4122. enough to do basic networking, none of the higher layer protocols are implemented
  4123. in the kernel.
  4124.  
  4125. Wesley Craig <tt><netatalk@umich.edu</tt> represents a team called the
  4126. Research Systems Unix Group at the University of Michigan and they have
  4127. produced a package called <em>netatalk</em> which provides software that
  4128. implements the Appletalk protocol stack and some useful utilities.
  4129.  
  4130. You can obtain it from:
  4131.  
  4132. <url url="ftp://terminator.rs.itd.umich.edu/unix/netatalk/"
  4133.     name="University of Michigan">
  4134.  
  4135. you will need at least version 1.3.3b2 as earlier versions did not support
  4136. Linux.
  4137.  
  4138. To build and install that package something like:
  4139.  
  4140. <tscreen><verb>
  4141. # cd /usr/src
  4142. # tar xvfz .../netatalk
  4143. - You may want to edit the `Makefile' at this point, specifically to change
  4144.   the DESTDIR variable which defines where the files will be installed later.
  4145.   The default of /usr/local/atalk is fairly safe.
  4146. - You should then just have to make the software. My `uname' program wasn't
  4147.   in the /bin directory so I edited the Makefile to reflect this change too.
  4148. # make
  4149. - as root:
  4150. # make install
  4151. </verb></tscreen>
  4152.  
  4153. You should then end up with a whole range of new commands to play with.
  4154.  
  4155. <sect2><heading>Configuring the Appletalk software.
  4156.  
  4157. <p>
  4158. The first thing you need to do to make it all work is add the contents of
  4159. the services.atalk file to your /etc/services file, just append it to the
  4160. end of the file.
  4161.  
  4162. The next step is to create the appletalk configuration files in the
  4163. <tt>/usr/local/atalk/etc</tt> directory (or wherever you installed the
  4164. package).
  4165.  
  4166. The first file to create is the <tt>/usr/local/atalk/etc/Atalkd.conf</tt> file.
  4167. To start this file needs only one line that gives the name of the network
  4168. device that support the network that your Apple machines are on:
  4169.  
  4170. <tscreen><verb>
  4171. eth0
  4172. </verb></tscreen>
  4173.  
  4174. The Appletalk daemon program will add extra details after it is run.
  4175.  
  4176. <sect2><heading>Exporting a Linux filesystems via Appletalk.
  4177.  
  4178. <p>
  4179. You can export filesystems from your linux machine to the network so that
  4180. Apple machine on the network can share them.
  4181.  
  4182. To do this you must configure the
  4183. <tt>/usr/local/atalk/etc/AppleVolumes.system</tt> file.
  4184.  
  4185. Full details on how to do this and what the various options are can be found
  4186. in the <em>afpd</em> man page.
  4187.  
  4188. A sample would look like:
  4189.  
  4190. <tscreen><verb>
  4191. /tmp Scratch
  4192. /home/ftp/pub Public
  4193. </verb></tscreen>
  4194.  
  4195. Which would export your <tt>/tmp</tt> filesystem as AppleShare Volume
  4196. `Scratch' and your ftp public directory as AppleShare Volume `Public'.
  4197. The volume names are not mandatory, the daemon will choose some for you,
  4198. but it won't hurt to specify them anyway.
  4199.  
  4200. <sect2><heading>Sharing your Linux printer across Appletalk.
  4201.  
  4202. <p>
  4203. You can share your linux printer with your Apple machines quite simply.
  4204. You need to run the <em>papd</em> program which is the Appletalk
  4205. Printer Access Protocol Daemon. When you run this program it will accept
  4206. requests from your Apple machines and spool the print job to your local
  4207. line printer daemon for printing.
  4208.  
  4209. You need to edit the <tt>/usr/local/atalk/etc/papd.conf</tt> file to configure
  4210. the daemon. The syntax of this file is the same as that of your usual
  4211. <tt>/etc/printcap</tt> file. The name you give to the definition is
  4212. registered with the Appletalk naming protocol, NBP.
  4213.  
  4214. A sample configuration might look like:
  4215.  
  4216. <tscreen><verb>
  4217. TricWriter:\
  4218.    :pr=lp:op=cg:
  4219. </verb></tscreen>
  4220.  
  4221. Which would make a printer named `TricWriter' available to your Appletalk
  4222. network and all accepted jobs would be printed to the linux `lp' printer
  4223. using <em>lpd</em>.
  4224.  
  4225. <sect2><heading>Starting the appletalk software.
  4226.  
  4227. <p>
  4228. Ok, you should now be ready to test this basic configuration. There is an
  4229. <em>rc</em> file supplied with the <em>netatalk</em> package that should
  4230. work ok for you, so all you should have to do is:
  4231.  
  4232. <tscreen><verb>
  4233. # /usr/local/atalk/etc/rc.atalk
  4234. </verb></tscreen>
  4235.  
  4236. and all should startup and run ok. You should see no error messages and
  4237. the software will send messages to the console indicating each stage as it
  4238. starts.
  4239.  
  4240. <sect2><heading>Testing the appletalk software.
  4241.  
  4242. <p>
  4243. To test that the software is functioning properly, go to one of your Apple
  4244. machines, pull down the Apple menu, select the Chooser, click on AppleShare,
  4245. and your Linux box should appear.
  4246.  
  4247. <sect2><heading>Caveats of the appletalk software.
  4248.  
  4249. <p>
  4250. <itemize>
  4251. <item>You may need to start the Appletalk support before you configure your
  4252. IP network. If you have problems starting the Appletalk programs, or if
  4253. after you start them you have trouble with your IP network, then try starting
  4254. the Appletalk software before you run your <tt>/etc/rc.d/rc.inet1</tt> file.
  4255. <item>The <em>afpd</em> (Apple Filing Protocol Daemon) severely messes up your
  4256. hard disk. Below the mount points it creates a couple of directories:
  4257. <tt>.AppleDesktop</tt> and <tt>Network Trash Folder</tt>. Then, for each
  4258. directory you access it will create a <tt>.AppleDouble</tt> below it so it can
  4259. store resource forks, etc. So think twice before exporting <tt>/</tt>, you will
  4260. have a great time cleaning up afterwards.
  4261. <item>The <em>afpd</em> program expects clear text passwords from the Macs.
  4262. Security could be a problem, so be very careful when you run this daemon on a
  4263. machine connected to the Internet, you have yourself to blame if somebody
  4264. nasty does something bad.
  4265. <item>The existing diagnostic tools such as <em>netstat</em> and
  4266. <em>ifconfig</em> don't support Appletalk. The raw information is available
  4267. in the <tt>/proc/net/</tt> directory if you need it.
  4268. </itemize>
  4269.  
  4270. <sect1><heading>IP_MASQUERADE - allow a number of hosts to pretend to be one.
  4271.  
  4272. <p>
  4273. If you are one of the many people who have some sort of local network at
  4274. home, whether it be a couple of machine connected via a SLIP/plip/ppp link
  4275. to each other, or a number of machines connected to a private ethernet network
  4276. who also has a dial-up Internet connection then you have probably at one
  4277. time or another wanted the machines not directly connected to be able
  4278. to communicate with the Internet. This is normally achieved by getting
  4279. a valid register IP network address for your local network and asking
  4280. your Internet Service Provider to kindly provide a network route to
  4281. your network connection instead of the single host route they were previously
  4282. providing. Unfortunately many Internet Service Providers will ask you to
  4283. provide a good deal more dollars for the privilege of better utilising
  4284. the bandwidth of your connection and you probably don't much like that
  4285. idea.
  4286.  
  4287. IP_MASQUERADING provides a clever solution to this problem by making all of
  4288. the machines on your network look like one very active networked machine.
  4289. It does this by performing real-time, on the fly address translations. Most
  4290. of the code was authored by Pauline Middelink
  4291. <tt><middelin@polyware.iaf.nl></tt>.
  4292.  
  4293. Ken Eaves <tt><keves@eves.com</tt> provided most the information contained
  4294. below so if you find the following helpful, thank Ken.
  4295.  
  4296. <sect2>Obtaining the `masq' software.
  4297.  
  4298. <p>
  4299. The IP_Masquerade software currently comes as a patch to the later
  4300. linux 1.2.* series kernels and a new version of the <em>ipfw</em> command.
  4301. The <em>ipfw</em> program that comes with the <tt>net-tools</tt> software
  4302. releases to configure it does not yet have the `masquerade' option built into
  4303. it. The kernel you are using must support the <tt>ip_firewalling</tt> option
  4304. for ip_masquerade to work.
  4305.  
  4306. The patch file is available from:
  4307.  
  4308. <bf>ftp.eves.com</bf>
  4309. <tscreen><verb>
  4310. /pub/masq
  4311. </verb></tscreen>
  4312.  
  4313. In this directory you will find patch files, new versions of the <em>ipfw</em>
  4314. command and Ken's original Masquerade FAQ on which this text is based.
  4315.  
  4316. The patch file is called <tt>masq-patch.1.2.n</tt>, so you must retrieve
  4317. it. The files <tt>ipfw</tt> and <tt>ipfw-for-1.3.10</tt> are for kernel
  4318. version 1.2.* and 1.3.10 respectively.
  4319.  
  4320. <sect2><heading>How do I install and compile the patch ?
  4321.  
  4322. <p>
  4323. Assuming you have the source to a recent 1.2.* version kernel installed in
  4324. the <tt>/usr/src/linux</tt> directory you would do the following:
  4325.  
  4326. <tscreen><verb>
  4327. #
  4328. # cd /usr/src
  4329. # patch -p0 <.../masq-patch.1.2.n 2>patch.errs
  4330. - check the patch.errs file for the string `fail'. If you can't find
  4331.   it then the patch applied successfully. If you can find it then something
  4332.   may have gone wrong double check that you have the correct version of
  4333.   kernel source.
  4334. # cd /usr/src/linux
  4335. # make config
  4336. - You must answer `y' to:
  4337.   ...
  4338.   IP: forwarding/gatewaying (CONFIG_IP_FORWARD) [y]
  4339.   IP: firewalling (CONFIG_IP_FIREWALL) [y]
  4340.   IP: masquerading (ALPHA) [y]
  4341.   ...
  4342. - The rest of the options you should answer as you normally would.
  4343. # make dep
  4344. # make clean
  4345. - Build as you normally would, normally this would be:
  4346. # make zlilo
  4347. #
  4348. </verb></tscreen>
  4349.  
  4350. After making sure that you are actually running your newly built kernel you
  4351. need only ensure that you have a working copy of the <em>ipfw</em> program.
  4352. <em>ipfw</em> is normally installed in the <tt>/sbin</tt> so after testing
  4353. the masquerade version you can simply copy it to <tt>/sbin/ipfw</tt>.
  4354. This is all that is necessary to get the kernel support installed.
  4355.  
  4356. <sect2>How do I configure the IP_MASQUERADE software ?
  4357.  
  4358. <p>
  4359. How you configure the IP_MASQUERADE function depends completely on how
  4360. your network is built. The general idea is as follows: all of your local
  4361. machine that you want to have access to the Internet must have their network
  4362. default route pointing to your linux machine supporting IP_MASQUERADE.
  4363. Secondly, you must have an entry in the linux firewall table that says
  4364. that your local machines should be masqueraded.
  4365.  
  4366. To configure the IP-MASQUERADE function you use the <em>ipfw</em> command.
  4367. The <em>ipfw</em> command is normally used to configure the Linux firewall
  4368. facility and because your masquerading host is acting as a firewall of sorts
  4369. <em>ipfw</em> has been modified to take on this additional function.
  4370.  
  4371. I'll present two example configurations that will probably cover most
  4372. situations, if you have anything more complicated than these designs then
  4373. you probably have the experience to work it out for yourself.
  4374.  
  4375. Two machines connected to each other by SLIP or ppp:
  4376.  
  4377. <tscreen><verb>
  4378.  .-------.             .-------.
  4379.  |       |    SLIP     | linux |   SLIP/ppp
  4380.  | local |-----//------| masq  |-----//-------> To ISP
  4381.  |       |             | svr   |
  4382.  ._______.             ._______.
  4383.  
  4384.          ^            ^         ^
  4385.          |            |         |
  4386.     192.168.0.2   192.168.0.1  dynamically assigned
  4387. </verb></tscreen>
  4388.  
  4389.  
  4390. Your /etc/rc.d/rc.inet1 file would have something like the following appended:
  4391.  
  4392. <tscreen><verb>
  4393.  ...
  4394.  ...
  4395. # Allow machine 192.168.0.2 to be masqueraded to everybody
  4396. ipfw a m all from 192.168.0.2/32 to 0.0.0.0/0
  4397.  ...
  4398.  ...
  4399. </verb></tscreen>
  4400.  
  4401. Note the <tt>iii.iii.iii.iii/nn</tt> syntax. You might wonder what the
  4402. <tt>/nn</tt> means and how you calculate it. This syntax is a means of
  4403. encoding both an ip address and a netmask. What this syntax says is
  4404. all addresses in which the first <tt>nn</tt> bits match those of
  4405. <tt>iii.iii.iii.iii</tt>. The above example is for a single host, so
  4406. all bits must match, since there are 32 bits in an IP address the syntax
  4407. is <tt>/32</tt>.
  4408.  
  4409. A private ethernet network of machines sharing a single internet link:
  4410.  
  4411. <tscreen><verb>
  4412.  .-------.    _
  4413.  |       | .2 |
  4414.  | local |----|
  4415.  |       |    | <-- Ethernet lan
  4416.  ._______.    |     192.168.0.0 netmask 255.255.255.0
  4417.               |
  4418.               |
  4419.  .-------.    |        .-------.
  4420.  |       | .3 |     .1 | linux |   SLIP/ppp
  4421.  | local |----|--------| masq  |-----//-------> To ISP
  4422.  |       |    |        | svr   |
  4423.  ._______.    -        ._______.
  4424.  
  4425.                                 ^
  4426.                                 |
  4427.                                dynamically assigned
  4428. </verb></tscreen>
  4429.  
  4430. For this configuration you have a single entry that describes the whole
  4431. network, so you would use something like:
  4432.  
  4433. <tscreen><verb>
  4434.  ...
  4435.  ...
  4436. # Allow all machines on network 192.168.0.0 to be masqueraded to everybody
  4437. ipfw a m all from 192.168.0.2/24 to 0.0.0.0/0
  4438.  ...
  4439.  ...
  4440. </verb></tscreen>
  4441.  
  4442. Again note the relationship between the netmask (255.255.255.0) and the
  4443. <em>ipfw</em> syntax. A class C network (255.255.255.0) has 24 bits in
  4444. its netmask.
  4445.  
  4446. To make the job a little easier for you, here is a table of common network
  4447. masks against matching bits:
  4448.  
  4449. <tscreen><verb>
  4450. netmask             ipfw
  4451. ---------------     ----
  4452. 255.0.0.0           /8
  4453. 255.255.0.0.0       /16
  4454. 255.255.255.0       /24
  4455. 255.255.255.128     /25
  4456. 255.255.255.192     /26
  4457. 255.255.255.224     /27
  4458. 255.255.255.240     /28
  4459. 255.255.255.248     /29
  4460. 255.255.255.255     /32
  4461. </verb></tscreen>
  4462.  
  4463. <sect2><heading>Where is IP_MASQUERADE being discussed ?
  4464.  
  4465. <p>
  4466. There was a support mailing list at masq@eves.com. Unfortunately it has
  4467. now closed down.
  4468.  
  4469. <sect1><heading>IPALIAS - multiple address per interface.
  4470.  
  4471. <p>
  4472. If you are running a world wide web server and want to supports multiple
  4473. virtual servers, or your network support multiple subnets on the same piece
  4474. of wire then you'll need to be able to have your machine respond to more
  4475. than one address per interface.
  4476.  
  4477. A facility called <em>ipalias</em> allows you to configure more than
  4478. one address per interface.
  4479.  
  4480. Robert Sanders <tt><rsanders@mindspring.com></tt> has written linux
  4481. support for this feature as patches against version 1.2.* kernels and
  4482. Juan Jose Ciarlante <tt><jjciarla@raiz.uncu.edu.ar></tt> has developed
  4483. a brand new and very sophisticated implementation for version 1.3.50++ kernels.
  4484.  
  4485. <sect2><heading>Support for 1.2.* kernels
  4486.  
  4487. <p>
  4488. You can obtain the patch from:
  4489.  
  4490. <bf>ftp.procyon.com</bf>
  4491. <tscreen><verb>
  4492. /pub/linux/ipalias
  4493. </verb></tscreen>
  4494.  
  4495. To install it you need the 1.2.1 kernel source installed and then:
  4496.  
  4497. <tscreen><verb>
  4498. # cd /usr/src/linux
  4499. # patch -p1 .../alias-patch-1.2.1-v1
  4500. # make config
  4501. # make dep; make clean; make zlilo
  4502. </verb></tscreen>
  4503.  
  4504. You will also need to get the <tt>alias-net-tools.tar.gz</tt> file as
  4505. it contains new versions of the <em>ifconfig</em> and <em>netstat</em>
  4506. commands.
  4507.  
  4508. <sect3><heading>Configuring ip aliases for 1.2.*.
  4509.  
  4510. <p>
  4511. To configure an ip alias use the new <em>ifconfig</em> command as follows:
  4512.  
  4513. <tscreen><verb>
  4514. # ifconfig eth0 alias 198.71.200.5
  4515. </verb></tscreen>
  4516.  
  4517. This presumes that you already have the device configured to operate on
  4518. your network and that you want <tt>198.71.200.5</tt> configured as a second
  4519. address.
  4520.  
  4521. <sect2><heading>Support for 1.3.50++ kernels
  4522.  
  4523. <p>
  4524. You do not need any patches, simply answer yes to the question:
  4525. <tt>Network aliasing (CONFIG_NET_ALIAS) [N/y/?]</tt> when prompted
  4526. during <tt>make config</tt>.
  4527.  
  4528. <sect3><heading>Configuring IP_ALIAS for 1.3.50++
  4529.  
  4530. <p>
  4531. The new ip_alias facilities actually create new network interfaces to
  4532. more properly. To check if your kernel actually has proper support for
  4533. the new facility you should look for <tt>/proc/net/alias*</tt>. If your
  4534. kernel has been properly built then two file will exist, <tt>aliases</tt>
  4535. and <tt>alias_types</tt> in the <tt>/proc/net</tt> directory.
  4536. <p>
  4537. To configure aliases you use a special trick using a normal unmodified
  4538. <em>ifconfig</em> program. The new alias ports are specified by including
  4539. a suffix for the physical port name as follows:
  4540. <tscreen><verb>
  4541. # ifconfig eth0:0 192.168.1.1
  4542. # route add -host 192.168.1.1 dev eth0:0
  4543. </verb></tscreen>
  4544. Note that aliases start at '0'. So <tt>eth0:1</tt> would be the second
  4545. alias for the physical <tt>eth0</tt> device.
  4546. <p>
  4547. To delete an alias you again use the <em>ifconfig</em> command as follows:
  4548. <tscreen><verb>
  4549. # ifconfig eth0:0- 0
  4550. </verb></tscreen>
  4551. The '-' character signifies to the kernel that the alias should be deleted
  4552. and all routes and arp entries that point to it should be deleted.
  4553.  
  4554. <sect><heading>Diagnostic tools - How do I find out what is wrong?
  4555.  
  4556. <p>
  4557. In this section I'll briefly describe some of the commonly used diagnostic
  4558. tools that are available for your Linux network and how you might use them to
  4559. identify the cause of your network problems, or to teach yourself a bit more
  4560. about how tcp/ip networking works. I'll gloss over some of the detail of
  4561. how the tools work because this document is not an appropriate forum for
  4562. describing that sort of detail, but I hope I'll have presented enough
  4563. information that you'll have an understanding of how to use the tool and
  4564. to better understand the relevant <em>man</em> page or other documentation.
  4565.  
  4566. <sect1><heading>ping - are you there?
  4567.  
  4568. <p>
  4569. The <em>ping</em> tool is located in the NetKit-B distribution as detailed
  4570. above in the `Network Applications' section. <em>ping</em>, as the name
  4571. implies, allows you to transmit a datagram at another host that it will
  4572. reflect back at you if it is alive and working ok and the network in between
  4573. is also ok. In its simplest form you would simply say:
  4574.  
  4575. <tscreen><verb>
  4576. # ping gw
  4577. PING gw.vk2ktj.ampr.org (44.136.8.97): 56 data bytes
  4578. 64 bytes from 44.136.8.97: icmp_seq=0 ttl=254 time=35.9 ms
  4579. 64 bytes from 44.136.8.97: icmp_seq=1 ttl=254 time=22.1 ms
  4580. 64 bytes from 44.136.8.97: icmp_seq=2 ttl=254 time=26.0 ms
  4581. ^C
  4582.  
  4583. --- gw.vk2ktj.ampr.org ping statistics ---
  4584. 3 packets transmitted, 3 packets received, 0% packet loss
  4585. round-trip min/avg/max = 22.1/28.0/35.9 ms
  4586. #
  4587. </verb></tscreen>
  4588.  
  4589. What <em>ping</em> has done is resolved the hostname to an address and
  4590. using the <em>icmp</em> protocol has transmitted an <em>icmp echo request</em>
  4591. datagram to the remote host periodically. For each <em>echo request</em> that
  4592. the remote host receives it will formulate an <em>icmp echo reply</em>
  4593. datagram which it will transmit back to you. Each line beginning with
  4594. `64 bytes from ...' represents an <em>echo reply</em> received in response
  4595. to an <em>echo request</em>. Each line tells you the address of the host that
  4596. sent you the reply, the sequence number to which the reply was for, the
  4597. <em>time to live</em> field and the total <em>round trip time</em> that was
  4598. taken. The <em>round trip time</em> is the time between when the <em>echo
  4599. request</em> datagram is transmitted and the corresponding <em>echo reply</em>
  4600. is received. This can be used as a measure of how fast or slow the network
  4601. connection between the two machines is.
  4602. <p>
  4603. The last two lines tell you how many datagrams were transmitted, how many
  4604. valid responses were received and what percentage of the datagrams were
  4605. lost. The percentage lost figure is a measure of how good or error free the
  4606. network connection is. High percentage lost figures indicate such problems
  4607. as a high error rate on a link somewhere between the hosts, exhausted
  4608. capacity on a router or link somewhere, or high collision rate on an ethernet
  4609. lan. You can use <em>ping</em> to identify where this problem might be by
  4610. running <em>ping</em> sessions to each of the routed points that make up
  4611. the network path. When you find that you can ping somewhere without any
  4612. datagram loss, but pinging anywhere past there causes you packet loss, you
  4613. can deduce that the problem lies somewhere between those two points.
  4614.  
  4615. <sect1><heading>traceroute - How do I get there?
  4616.  
  4617. <p>
  4618. The <em>traceroute</em> tool is found in the NetKit-A distribution detailed
  4619. earlier. <em>traceroute</em> is primarily used for testing and displaying the
  4620. path that your network connection would take to a destination host.
  4621. <em>traceroute</em> also uses the <em>icmp</em> protocol, but it uses a
  4622. clever trick to get each point along the path to send it back a reply
  4623. as it creeps its way along. Its trick is to manually manipulate the
  4624. <em>time to live</em> field of the datagrams it transmits. The <em>time to
  4625. live</em> field is a mechanism that ensures that rogue datagrams do not
  4626. get caught in a routing loop. Each time a datagram passes through a router
  4627. it decrements the <em>time to live</em> field by one. If the <em>time to live</em> reaches zero then that router or host sends an <em>icmp time to live expired</em> message back to the host who transmitted the datagram to let it know the
  4628. datagram has expired. <em>traceroute</em> uses this mechanism by sending
  4629. a series of <em>udp</em> datagrams with the <em>time to live</em> beginning
  4630. set at one and incrementing each step it takes. By recording the addresses
  4631. from the <em>icmp time to live expired</em> replies it receives in response to
  4632. the datagrams dying it can determine the path taken to get to the destination.
  4633. An example of its use would look something like:
  4634.  
  4635. <tscreen><verb>
  4636. # traceroute minnie.vk1xwt.ampr.org
  4637. traceroute to minnie.vk1xwt (44.136.7.129), 30 hops max, 40 byte packets
  4638.  1  gw (44.136.8.97)  51.618 ms  30.431 ms  34.396 ms
  4639.  2  gw.uts (44.136.8.68) 2017.322 ms  2060.121 ms 1997.793 ms
  4640.  3  minnie.vk1xwt (44.136.7.129) 2205.335 ms  2319.728 ms  2279.643 ms
  4641. #
  4642. </verb></tscreen>
  4643.  
  4644. The first column tells us how many hops away (what the <em>ttl</em> value was),
  4645. the second column is the hostname and address that responded if it could be
  4646. resolved or just its address if it could not. The third, fourth and fifth
  4647. columns are the round trip time for three consecutive datagrams to that point.
  4648. This tells us that the first hop in the network route is via gw.vk2ktj and
  4649. the three figures following are the round trip times to that router. The next
  4650. hop was via gw.uts.ampr.org and minnie.vk1xwt.ampr.org is one hop further away.
  4651. You can deduce information about the network route by looking at the difference
  4652. in times between each step in the route. You can see that the round trip
  4653. times to gw are fairly fast, it is an ethernet connected host. gw.uts is
  4654. substantially slower to get to than gw, it is across a low speed radio link,
  4655. so you have the ethernet time plus the radio link time added together.
  4656. minnie.vk1xwt is only slightly slower than gw.uts, they are connected via
  4657. a high speed network.
  4658. <p>
  4659. If you perform a traceroute and you see the string <tt>!N</tt> appear after
  4660. the time figure, this indicates that your traceroute program received a
  4661. <em>network unreachable</em> response. This message tells you that the host
  4662. or router who sent you the message did not know how to route to the destination
  4663. address. This normally indicates that there is a network link down somewhere.
  4664. The last address listed is as far as you get before you find the faulty link.
  4665. <p>
  4666. Similarly if you see the string <tt>!H</tt> this indicates that a
  4667. <em>host unreachable</em> message has been received. This might suggest that
  4668. you got as far as the ethernet that the remote host is connected to, but the
  4669. host itself is not responding or is faulty.
  4670.  
  4671. <sect1><heading>tcpdump - capturing and displaying network activity.
  4672.  
  4673. <p>
  4674. Adam Caldwell <acaldwel@103mort2.cs.ohiou.edu> has ported the
  4675. <em>tcpdump</em> utility to linux. <em>tcpdump</em> allows you to take traces
  4676. of network activity by intercepting the datagrams on their way in and
  4677. out of your machine. This is useful for diagnosing difficult to identify
  4678. network problems.
  4679.  
  4680. You can find the source and binaries at:
  4681. <url url="ftp://ftp.funet.fi/pub/OS/Linux/PEOPLE/Linus/net-source/tools/tcpdump-3.0.3.tar.gz"
  4682.     name="103mor2.cs.ohiou.edu">
  4683.  
  4684. <em>tcpdump</em> decodes each of the datagrams that it intercepts and displays
  4685. them in a slightly cryptic looking format in text. You would use
  4686. <em>tcpdump</em> if you were trying to diagnose a problem like protocol
  4687. errors, or strange disconnections, as it allows you to actually see what has
  4688. happened on the network. To properly use <em>tcpdump</em> you would need
  4689. some understanding of the protocols and how they work, but it is useful
  4690. for simpler duties such as ensuring that datagrams are actually leaving
  4691. your machine on the correct port if you are trying to diagnose routing
  4692. problems and for seeing if you are receiving datagrams from remote destinations.
  4693.  
  4694. A sample of tcpdump output looks like this:
  4695.  
  4696. <tscreen><verb>
  4697. # tcpdump -i eth0
  4698. tcpdump: listening on eth0
  4699. 13:51:36.168219 arp who-has gw.vk2ktj.ampr.org tell albert.vk2ktj.ampr.org
  4700. 13:51:36.193830 arp reply gw.vk2ktj.ampr.org is-at 2:60:8c:9c:ec:d4
  4701. 13:51:37.373561 albert.vk2ktj.ampr.org > gw.vk2ktj.ampr.org: icmp: echo request
  4702. 13:51:37.388036 gw.vk2ktj.ampr.org > albert.vk2ktj.ampr.org: icmp: echo reply
  4703. 13:51:38.383578 albert.vk2ktj.ampr.org > gw.vk2ktj.ampr.org: icmp: echo request
  4704. 13:51:38.400592 gw.vk2ktj.ampr.org > albert.vk2ktj.ampr.org: icmp: echo reply
  4705. 13:51:49.303196 albert.vk2ktj.ampr.org.1104 > gw.vk2ktj.ampr.org.telnet: S 700506986:700506986(0) win 512 <mss 1436>
  4706. 13:51:49.363933 albert.vk2ktj.ampr.org.1104 > gw.vk2ktj.ampr.org.telnet: . ack 1103372289 win 14261
  4707. 13:51:49.367328 gw.vk2ktj.ampr.org.telnet > albert.vk2ktj.ampr.org.1104: S 1103372288:1103372288(0) ack 700506987 win 2048 <mss 432>
  4708. 13:51:49.391800 albert.vk2ktj.ampr.org.1104 > gw.vk2ktj.ampr.org.telnet: . ack 134 win 14198
  4709. 13:51:49.394524 gw.vk2ktj.ampr.org.telnet > albert.vk2ktj.ampr.org.1104: P 1:134(133) ack 1 win 2048
  4710. 13:51:49.524930 albert.vk2ktj.ampr.org.1104 > gw.vk2ktj.ampr.org.telnet: P 1:28(27) ack 134 win 14335
  4711.  
  4712.  ..
  4713. #
  4714. </verb></tscreen>
  4715.  
  4716. When you start <em>tcpdump</em> without arguments it grabs the first (lowest
  4717. numbered) network device that is not the loopback device. You can specify
  4718. which device to monitor with a command line argument as shown above.
  4719. <em>tcpdump</em> then decodes each datagram transmitted or received and
  4720. displays them, one line each, in a textual form. The first column is
  4721. obviously the time the datagram was transmitted or received. The remainder of
  4722. the line is then dependent on the type of datagram. The first two lines in
  4723. the sample are what an arp request from albert.vk2ktj for gw.vk2ktj look
  4724. like. The next four lines are two pings from albert.vk2ktj to gw.vk2ktj,
  4725. note that <em>tcpdump</em> actually tells you the name of the <em>icmp</em>
  4726. datagram transmitted or received. The greater-than (>) symbol tells you
  4727. which way the datagram was transmitted, that is, from who, to who. It points
  4728. from the sender, to the receiver. The remainder of the sample trace are the
  4729. establishment of a telnet connection from albert.vk2ktj to gw.vk2ktj.
  4730. <p>
  4731. The number or name at the end of each hostname tells you what socket number
  4732. is being used. <em>tcpdump</em> looks in your /etc/services file to do this
  4733. translation.
  4734. <p>
  4735. <em>tcpdump</em> explodes each of the fields and so you can see the values
  4736. of the window and mss parameters in some of the datagrams.
  4737. <p>
  4738. The <em>man</em> page documents all of the options available to you.
  4739.  
  4740. <bf>Note for PPP users</bf>: The version of <em>tcpdump</em> that is currently
  4741. available does not support the PPP suite of protocols. Al Longyear has
  4742. produced a pair of patches to correct this, but these have not been built
  4743. into a <em>tcpdump</em> distribution yet. The patch files are located in
  4744. the same directory on <tt>sunsite.unc.edu</tt> as the <em>tcpdump</em>
  4745. package.
  4746.  
  4747. <sect1><heading>icmpinfo - logs icmp messages received.
  4748.  
  4749. <p>
  4750. ICMP then Internet Control Message Protocol conveys useful information about
  4751. the health of your IP network. Often ICMP messages are received and acted
  4752. on silently with you never knowing of their presence. <em>icmpinfo</em> is
  4753. a tool that will allow you to view ICMP messages much like tcpdump does.
  4754. Laurent Demailly <tt><dl@hplyot.obspm.fr></tt> took the bsd ping source
  4755. and modified it heavily.
  4756.  
  4757. Version 1.10 is available from:
  4758.  
  4759. <bf>hplyot.obspm.fr</bf>
  4760. <tscreen><verb>
  4761. /net/icmpinfo-1.10.tar.gz
  4762. </verb></tscreen>
  4763.  
  4764. Compilation is as simple as:
  4765.  
  4766. <tscreen><verb>
  4767. # cd /usr/src
  4768. # cd icmpinfo-1.10
  4769. # gzip -dc icmpinfo-1.10.tar.gz | tar xvf -
  4770. # make
  4771. </verb></tscreen>
  4772.  
  4773. You must be root to run <em>icmpinfo</em>. <em>icmpinfo</em> can either
  4774. decode to the tty it was called from or send its output to the <em>syslog</em>
  4775. utility.
  4776.  
  4777. To test out how it works, try running <em>icmpinfo</em> and starting
  4778. a <em>traceroute</em> to a remote host. You will see the icmp messages
  4779. that <em>traceroute</em> uses listed on the output.
  4780.  
  4781.  
  4782. <sect><heading>Some Frequently Asked Questions, with brief Answers.
  4783.  
  4784. <p>
  4785. Following are some questions and answers that are commonly asked.
  4786.  
  4787. <sect1><heading>General questions:
  4788.  
  4789. <p>
  4790. <descrip>
  4791.  
  4792. <tag>I have only a dialin terminal access to a machine on the net, can I use
  4793. this as a network connection ?
  4794. </tag>Yes you can, take a look at TERM. TERM allows you you to run network
  4795. connections over a normal terminal session. It requires some modifications
  4796. to the network applications to work with it, but binaries and sources are
  4797. available for the most common ones already. take a look at the
  4798. <url url="http://sunsite.unc.edu/mdw/HOWTO/Term-HOWTO.html"
  4799. name="TERM-HOWTO"> for lots more information.
  4800.  
  4801. <tag>When I telnet/ftp/rlogin to my machine it takes forever, why?
  4802. </tag>You do not have your name resolver configured properly. Reread the
  4803. section on <tt>/etc/resolv.conf</tt>. You must have at least a nameserver
  4804. entry configured.
  4805.  
  4806. <tag>I want to build my own standalone network, what addresses do I use ?
  4807. </tag>RFC1597 has specifically reserved some IP addresses for private networks.
  4808. You should use these as they prevent anything nasty happening if you accidentally
  4809. get connected to the Internet. The addresses reserved are:
  4810. <tscreen><verb>
  4811. 10.0.0.0        -   10.255.255.255
  4812. 172.16.0.0      -   172.31.255.255
  4813. 192.168.0.0     -   192.168.255.255
  4814. </verb></tscreen>
  4815.  
  4816. Note, reserved network addresses are of classes A, B and C, so you are not
  4817. restricted in your network design or size. Since you won't be connecting to
  4818. the Internet it doesn't matter if you use the same address as some other
  4819. group or network, just so long as the addresses you use are unique within
  4820. your network.
  4821.  
  4822. <tag>I want the machines on my local network to work via my dial-ip Internet connection, how do I do it?
  4823. </tag>You have three options. They are as follows:
  4824. <itemize>
  4825. <item>Ask your Internet Service Provider to provide a network route to you
  4826. instead of a host route. This is likely to be expensive but is the best
  4827. performing and technical option.
  4828. <item>Set up your machine that supports your dial-up link as a `SOCKS' based
  4829. firewall. This will inherently provide a <em>proxy</em> function where the
  4830. outside world thinks it is your router machine doing the talking where in
  4831. fact it is doing it on behalf of the machines on your network. Check the
  4832. <url url="http://sunsite.unc.edu/mdw/HOWTO/Firewall-HOWTO.html"
  4833.     name="Firewall-HOWTO"> for detailed information on how to do this. This
  4834. will require the machines on your network to have client programs that support
  4835. the SOCKS capability.
  4836. <item>Configure and run the <tt>IP-Masquerade</tt> software. This is probably
  4837. the simplest way, as it is fairly straightforward to do and doesn't require
  4838. special clients on your machines. This software very cleverly performs
  4839. address translations that make the machines on your network look like they
  4840. are the machine supporting your dial-up connection. There are some limitations
  4841. to how well this will work, but it is much lighter-weight than running a
  4842. full firewall gateway.
  4843. </itemize>
  4844.  
  4845. <tag>If ftp.linux.org.uk is down, how do I get the files specified ?
  4846. </tag>Alan's archive is mirrored on:
  4847.  
  4848. <bf>ftp.Uni-Mainz.DE</bf>
  4849. <tscreen><verb>
  4850. /pub/Linux/packages/Net2Debugged
  4851. </verb></tscreen>
  4852.  
  4853. and/or:
  4854.  
  4855. <bf>ftp.infomagic.com</bf>
  4856. <tscreen><verb>
  4857. /pub/mirrors/linux/sunacm
  4858. </verb></tscreen>
  4859.  
  4860. <tag>How do I know what version of kernel/net code I am running ?
  4861. </tag>The network code and kernel now have synchronised version numbers, so
  4862. try:
  4863.  
  4864. <tt>uname -a</tt>
  4865.  
  4866. or:
  4867.  
  4868. <tt>cat /proc/version</tt>
  4869.  
  4870. <tag>How do I change the message that telnet users are given at connect?
  4871. </tag>The <tt>/etc/issue</tt> is the message that is given to normal
  4872. getty users when they login. Some <em>telnetd</em> programs use a different
  4873. file <tt>/etc/issue.net</tt> instead. So if you find that changing your
  4874. <tt>issue</tt> file doesn't work, try changing the other.
  4875.  
  4876. </descrip>
  4877.  
  4878. <sect1><heading>Error messages:
  4879.  
  4880. <p>
  4881. <descrip>
  4882.  
  4883. <tag>I keep getting the error `eth0: transmit timed out'. What does this mean?
  4884. </tag>This usually means that your Ethernet cable is unplugged, or that the
  4885. setup parameters for your card (I/O address, IRQ, etc.) are not set correctly.
  4886. Check the messages at boot time and make sure that your card is recognized with
  4887. the correct Ethernet address. If it is, check that there is no conflict with
  4888. any other hardware in your machine, eg you might have a soundblaster sharing
  4889. the same IRQ or i/o control port.
  4890.  
  4891. <tag>I get errors `check Ethernet cable' when using the network.
  4892. </tag>You probably have your Ethernet card configured incorrectly. Double check
  4893. the settings in /usr/src/linux/drivers/net/CONFIG. If this checks out ok, you
  4894. may in fact have a cabling problem, check the cables are plugged in securely.
  4895.  
  4896. </descrip>
  4897.  
  4898. <sect1><heading>Routing questions:
  4899.  
  4900. <p>
  4901. <descrip>
  4902.  
  4903. <tag>Why do I get the message `obsolete route request' when I use the route command ?
  4904. </tag>
  4905. You are using a version of route that is older than your kernel. You should
  4906. upgrade to a newer version of route. Refer to the "The network configuration tool suite" section of this document for information on where to obtain the tool set.
  4907.  
  4908. <tag>Why do I get a `network unreachable' message when I try and network?
  4909. </tag>This message means that yours, or some other, machine doesn't know
  4910. how to route to the host that you are attempting to ping or connect to. If
  4911. it occurs for all hosts that you try, then it is probable that you don't have
  4912. your default route set up properly, reread the `routing' section.
  4913.  
  4914. <tag>I can ping my server/gateway, but can't ping or connect to anyone remote.
  4915. </tag>This is probably due to a routing problem. Reread the `routing' section
  4916. in this document. If this looks ok, then make sure that the host you are
  4917. attempting to connect to has a route to you. If you are a dialin user then
  4918. this is a common cause of problems, ensure that your server is either running
  4919. a routing program like <em>gated</em> or <em>routed</em>, or that it is
  4920. <em>`proxy arping'</em> for you, otherwise you will be able to get datagrams
  4921. to the remote host, but it won't know how to return datagrams to you.
  4922.  
  4923. </descrip>
  4924.  
  4925. <sect1><heading>Using Linux with Novell fileservers or NFS:
  4926.  
  4927. <p>
  4928. <descrip>
  4929.  
  4930. <tag>How do I use my existing Novell fileserver with my Linux machine ?
  4931. </tag>You should read the
  4932. <url url="http://sunsite.unc.edu/mdw/HOWTO/IPX-HOWTO.html"
  4933.     name="IPX-HOWTO"> as it has information on Linux software that will
  4934. allow you to do this without having to worry about using NFS.
  4935.  
  4936. <tag>Files get corrupted when running NFS over a network.
  4937. </tag>Certain vendors (Sun primarily) shipped many machines running NFS without
  4938. UDP checksums. Great on ethernet, suicide otherwise. UDP checksums can be
  4939. enabled on most file servers. Linux has it enabled by default from pl13
  4940. onwards - but both ends need to have it enabled...
  4941.  
  4942. <tag>Why are my NFS files all read only ?
  4943. </tag>The Linux NFS server defaults to read only. RTFM the `exports' and nfsd
  4944. manual pages. With non Linux servers you may also need to alter /etc/exports
  4945.  
  4946. </descrip>
  4947.  
  4948. <sect1><heading>SLIP questions:
  4949.  
  4950. <p>
  4951. <descrip>
  4952.  
  4953. <tag>What do I do if I don't know my SLIP servers address ?
  4954. </tag><em>dip</em> doesn't really need to know the address of your SLIP
  4955. server for SLIP to function. The <em>remote</em> option was added as
  4956. a convenience so that <em>dip</em> could automate the <em>ifconfig</em>
  4957. and <em>route</em> commands for you. If you don't know and cannot find out
  4958. the address of your SLIP server then Peter D. Junger
  4959. <tt>Junger@samsara.law.cwru.edu</tt> has suggested that he simply used his own
  4960. address wherever a dip script called for a remote address. This is a small
  4961. kludge but it works ok, as the server's address never actually appears in
  4962. the SLIP headers anyway.
  4963.  
  4964. <tag>`dip' only works for root. How do I make it work for others?
  4965. </tag><em>dip</em> needs to be setuid root to do some of the things it
  4966. needs to do, such as modifying the routing table. Uri Blumenthal recommends
  4967. the following:
  4968. <itemize>
  4969. <item>Create a new group called <em>dip</em> in your <tt>/etc/group</tt>
  4970. file and place each person who you want to allow dial out operation in it.
  4971. <item>Then when logged in as root, do the following:
  4972. <verb>
  4973. # chown root.dip /usr/bin/dip
  4974. # chmod u=rx,g=x,o= /usr/bin/dip
  4975. # chmod u+s /usr/bin/dip
  4976. </verb>
  4977. </itemize>
  4978.  
  4979. Dial-In users will be restricted in what they can do by what is contained in
  4980. the <tt>/etc/diphosts</tt> file.
  4981.  
  4982. <tag>I get `<tt>DIP: tty: set_disc(1): Invalid argument</tt>', why?
  4983. </tag>This usually suggests that your kernel has not been compiled with
  4984. <em>SLIP</em> support in it. Check that <tt>/proc/net/dev</tt> contains
  4985. devices called <tt>sl0</tt>, <tt>sl1</tt> etc. It could also mean that
  4986. your version of dip is very old. You should upgrade to a newer version.
  4987.  
  4988. <tag>When I ping a host I get `<tt>wrong data byte #17...</tt>', why?
  4989. </tag>This generally means that you have your modem configured for
  4990. XON/XOFF flow control. SLIP <bf>must</bf> have an eight bit clean line,
  4991. so you cannot use XON/XOFF flow control. Hardware handshaking works
  4992. better anyway, use it.
  4993.  
  4994. <tag>With SLIP I can ping my server and other hosts, but telnet or ftp don't
  4995. work.
  4996. </tag>This is most likely caused by a disagreement on the use of header
  4997. compression between your server and your machine. Double check that both
  4998. ends either are, or are not, using compression. They must match.
  4999.  
  5000. <tag>How can I hang up the phone line when I'm done using SLIP?
  5001. </tag>If you use dip to dial out on the SLIP line, just `dip -k' should do
  5002. the trick. If not, try to kill the dip process that is running. When dip dies
  5003. it should hang up the call. To give it the best chance to clean up after
  5004. itself, try killing the process in the following sequence: `kill <pid>',
  5005. `kill -hup <pid>' and finally, if the dip process still refuses to die,
  5006. try `kill -9 <pid>'. The same philosophy should be applied to all unix
  5007. processes that you are attempting to kill.
  5008.  
  5009. <tag>I see a lot of overrun errors on my SLIP port, why ?
  5010. </tag>The older network tools incorrectly report number of packets compressed
  5011. as the number of packets overrun. This has been corrected and shouldn't
  5012. occur of you are running the new version kernel and tools. If it still is
  5013. it probably indicates that your machine isn't keeping up with the rate of
  5014. data incoming. If you are not using 16550AFN UARTs then you should upgrade to
  5015. them. 16450, or 8250 generate an interrupt for every character they receive
  5016. and are therefore very reliant on the processor to be able to find time to
  5017. stop what it is doing an collect the character from them to ensure none get
  5018. lost. The 16550AFN has a 16 character FIFO and they only generate interrupts
  5019. when the FIFO is nearly full, or when they have had character waiting, this
  5020. means that less interrupts get generated for the same amount of data and that
  5021. less time is spent servicing your serial port. If you want to use multiple
  5022. serial ports you should mandatorily upgrade to 16550AFN UARTs anyway.
  5023.  
  5024. <tag>Can I use two SLIP interfaces ?
  5025. </tag>Yes. If you have, for example, three machines which you would like to
  5026. interconnect, then you most certainly could use two SLIP interfaces on one
  5027. machine and connect each of the other machines to it. Simply configure the
  5028. second interface as you did the first. NOTE that the second interface will
  5029. require a different IP address to the first. You may need to play with the
  5030. routing a bit to get it to do what you want, but it should work.
  5031.  
  5032. <tag>I have a multiport i/o card, how do I use more than 4 SLIP ports ?
  5033. </tag>The kernel SLIP comes with a default of a maximum of 4 SLIP devices
  5034. configured, this is set in the <tt>/usr/src/linux/drivers/net/slip.h</tt> file.
  5035. To increase it, say to <tt>16</tt>, change the <tt>#define SL_NRUNIT</tt> to
  5036. <tt>16</tt>, in place of the <tt>4</tt> that will be there. You also need to
  5037. edit <tt>/usr/src/linux/drivers/net/Space.c</tt> and add sections for <tt>sl4</tt>,
  5038. <tt>sl5</tt> etc. You can copy the existing driver definition as a template to
  5039. make it easier. You will need to recompile the kernel for the change to take
  5040. effect.
  5041.  
  5042. </descrip>
  5043.  
  5044. <sect1><heading>PPP questions.
  5045.  
  5046. <p>
  5047. You should refer to the
  5048. <url url="http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html" name="PPP-HOWTO">
  5049. for a list of PPP questions and answers compiled by Al Longyear.
  5050.  
  5051. <sect><heading>Quick Guide - SLIP or PPP Server
  5052.  
  5053. <p>
  5054. Configuring your linux machine as a SLIP or PPP server is a deceptively simple
  5055. thing to do. The actual process is simple, but there are a number of different
  5056. aspects to the configuration and understanding how each of the stages interact
  5057. with each other is what will help you diagnose any problems you experience.
  5058. Here are the steps that you must follow to configure your linux machine
  5059. as a SLIP or PPP server:
  5060.  
  5061. <enum>
  5062. <item>Assemble your hardware. Avoid IRQ and shared memory conflicts. Test each of the serial ports by connecting a dumb terminal to each of the ports and use a null modem cable and a comms program like <em>minicom</em> or <em>seyon</em> to talk to each. Make sure you can send and receive characters. If you intend running a number of serial ports then try to use a smart serial board and use <tt>16550AFN</tt> UART's. This will help ease some of the work of handling interrupts generated by the serial ports.
  5063. <item>Build your kernel, make sure it has networking configured, <tt>IP Forwarding</tt> enabled if you want users to route via your server and <tt>SLIP</tt> or <tt>PPP</tt> configured as is appropriate for your configuration. Make sure you configure <tt>CSLIP</tt> if you wish to use it. Double check you have <tt>IP Forwarding</tt> enabled if you don't then dialin users will only be able to connect directly to your machine.
  5064. <item>Install your kernel. Test the kernel. Check the <tt>/proc/net/dev</tt> file and make sure that you have <tt>sl*</tt> <tt>ppp*</tt> devices listed. If not then you have probably made some error in configuring your kernel, or you are not actually running your new kernel. Double check that you have actually run lilo to install the new kernel.
  5065. <item>Configure a <em>getty</em> on the serial port(s) that you wish to use for your incoming calls. You should refer to the <url url="http://sunsite.unc.edu/mdw/HOWTO/Serial-HOWTO.html" name="Serial-HOWTO"> for a description of how to do this. Remember to configure your modem so that the <tt>DCD</tt> pin tracks received carrier, this is how most <em>getty</em> programs detect an incoming call (<tt>mgetty</tt> is an exception to this and uses the <tt>RING</tt> message so you must be sure you have your modem configured to generate it: <tt>ATQ0V1</tt> is usually enough).
  5066. <item>Test the <em>getty</em> to make sure it works. It is important that you do this before you start worrying about the actual SLIP or PPP configuration. Try dialing into your system, you should get a <tt>login:</tt> prompt and be able to login to a shell account normally. Check for lost or garbled characters that
  5067. might indicate a flow control problem.
  5068. <item>Decide how you want your server to allocate addresses. If you want your users to get the same address each time they call then you want a <tt>static</tt> server, if you want to minimise the number of addresses you use and don't care what address your users are allocated then you want a <tt>dynamic</tt> server.
  5069. <item>Decide how you are going to build the SLIP or PPP server, whether you are going to use <em>sliplogin</em>, <em>dip</em> or <em>dSLIP</em> for SLIP for example. If you wish to use the <em>sliplogin</em> package then refer to the "Slip Server using Sliplogin" section. If you are going to use <em>dip</em> then refer to section "Slip Server using DIP". If you want to build your SLIP server using the <em>dSLIP</em> package then refer to section "Slip Server using dSLIP". For PPP you will need to use the <em>pppd</em> program, so make sure you read the <url url="http://sunsite.unc.edu/mdw/HOWTO/PPP-HOWTO.html" name="PPP-HOWTO"> on how to configure this. Ensure you have the appropriate software, that it is a recent version and that it is compiled and installed if necessary.
  5070. <item>If the addresses you are allocating to you SLIP users are part of your ethernet network, then make sure you read the Proxy ARP section and configure a proxy arp for each address. You may do this in the <tt>/etc/sliplogin<tt> and </tt>/etc/SLIPlogout</tt> files if you are using the <em>sliplogin</em> package. If you are configuring a PPP server then make sure you use the <em>pppd</em> <tt>proxyarp</tt> option. If the addresses you are allocating are from a network seperate to your ethernet network then you will need to use a routing daemon program like <em>gated</em>. If you use <em>gated</em> then refer to the "gated" section.
  5071. <item>Test your SLIP/PPP server.
  5072. <item>Get someone else to test your SLIP/PPP server.
  5073. </enum>
  5074.  
  5075. <sect><heading>Known Bugs.
  5076.  
  5077. <p>
  5078. The Linux networking code is still an evolving thing. It still has bugs though
  5079. they are becoming less frequently reported now. The
  5080. <url url="http://iifeak.swan.ac.uk/NetNews.html" name="Linux Networking News">
  5081. is a World Wide Web page maintained by Alan Cox which contains information
  5082. on the status of the NET-3 networking code. You can obtain information
  5083. on what is known and what isn't, by reading the
  5084. <tt>/usr/src/linux/net/inet/README</tt> file that accompanies the kernel
  5085. source, or by joining the <tt>linux-net</tt> channel.
  5086.  
  5087. <sect><heading>Copyright Message.
  5088.  
  5089. <p>
  5090. The NET-2-HOWTO is Copyright (c) 1995 Terry Dawson and Matt Welsh.
  5091.  
  5092. Permission is granted to make and distribute verbatim copies of
  5093. this document provided the copyright notice and this permission notice
  5094. are preserved on all copies.
  5095.  
  5096. Permission is granted to copy and distribute modified versions of this
  5097. document under the conditions for verbatim copies above, provided a notice
  5098. clearly stating that the document is a modified version is also included in
  5099. the modified document.
  5100.  
  5101. Permission is granted to copy and distribute translations of this document
  5102. into another language, under the conditions specified above for modified
  5103. versions.
  5104.  
  5105. Permission is granted to convert this document into another media under
  5106. the conditions specified above for modified versions provided the requirement
  5107. to acknowledge the source document is fulfilled by inclusion of an obvious
  5108. reference to the source document in the new media. Where there is any
  5109. doubt as to what defines 'obvious' the copyright owner reserves the right
  5110. to decide.
  5111.  
  5112. <sect><heading>Miscellaneous and Acknowledgements.
  5113.  
  5114. <p>
  5115. There are so many people who have contributed comments and suggestions for
  5116. this update that I have forgotten who you are. <bf>Thanks</bf>.
  5117.  
  5118. Please, if you have any comments or suggestions then mail them to me.
  5119. I'm fairly busy these days, so I might not get back to you straight away,
  5120. but I will certainly consider any suggestion you have.
  5121.  
  5122. The Linux networking code has come a long way and it hasn't been an easy
  5123. trip, but the developers, all of them, have done an excellent job in getting
  5124. together something that is functional, versatile, flexible and free for us
  5125. to use. We all owe them a great debt of thanks. Linus, Ross, Fred, Alan,
  5126. the Alpha/Beta testers, the tools developers and those offering moral support
  5127. have all contributed to the code as it is today.
  5128.  
  5129. For those that have an itch they want to scratch, happy hacking, here it is.
  5130.  
  5131. <p>
  5132. regards
  5133. <tt>Terry Dawson, vk2ktj.</tt>
  5134. <p>
  5135. <tt><94004531@postoffice.csu.edu.au>, or <terry@perf.no.telecom.com.au></tt>
  5136.  
  5137. </article>
  5138.