updated documentation a bit
[spider.git] / sgml / adminmanual.sgml
index cc6ba498f7cdbbc2030356d223cf5dcfbc2eb031..d6fb29940ca80701b12555b89ae1fed1aa24cd66 100644 (file)
@@ -36,31 +36,49 @@ handle loops well at all.  It is therefore necessary to have some form
 of protection for these nodes.
 
 <P>
-This is achieved by using filtering on a route basis.  There is a
-default setting to help to protect the network, especially useful for new
-and inexperienced SysOps.  The idea is simple.  When Spider is started
-for the first time and a connection is made to or from another node, 
-the default is to only send the nodes you already have that are in your
-own zone.  For example, in the UK the default setting would be to send
-only UK nodes to any connection.  This can be filtered further (down to
-a single node if needed) or expanded as required.
-
+In fact DXSpider has had a simple system for some time which is called
+<it>isolation</it>. This is similar to what, in other systems such as 
+<bf>clx</bf>, is called <it>passive mode</it>. A more detailed explanation
+of <it>isolation</it> is given further below. This system is still available
+and, for simple networks, is probably all that you need.
+
+<P>
+The new functionality introduced in version 1.48 is filtering the node
+and user protocol frames on a "per interface" basis. We call this
+<it>route filtering</it>. This is used <bf>instead of</bf>
+<it>isolation</it>. 
+
+<p>
+What this really means is that you can control more or less completely
+which PC protocol frames, to do with user and node management, pass to
+each of your partner nodes. You can also limit what comes into your
+node from your partners. You can even control the settings that your
+partner node has for the routing information that it sends to you
+(using the <it>rcmd</it> command).
 
 <sect1>Route Filters
 
-<P>
-As mentioned in the introduction, a default setting exists.  If this is
-all you want to use then that is fine, you have nothing else to do.
-However, if you want to make any alterations then you need to know
-a bit about filters.
-
-<P>
-It is possible to reset the default setting for node connections should
-you wish to do so, however this can be dangerous to the network unless
-you have some experience in how all this works.... be careful!  It is
-also possible to change settings for one connection only.  You can,
-therefore, have many different filters set dependent on the amount of
-node links you have.
+<p>
+Initially when route filters were being tested we generated a
+"default" filter.  Unfortunately it quickly became apparent that this
+might suit the UK cluster network but didn't really fit anybody else.
+However using a default filter is an appropriate thing to do. How, is
+explained further on.
+
+<p>
+The first thing that you must do is determine whether you need to do route filtering <bf>at all</bf>. If you are a "normal" node with two or three partners
+and you arranged in an "official" non-looping tree type network, then <bf>you do 
+not need to do route filtering</bf> and you will feel a lot better for not 
+getting involved. If you are successfully using <it>isolation</it> then you
+also probably don't need to use route filtering.
+
+<p>
+You will only require this functionality if you are
+"well-connected". What that means is that you are connected to several
+different parts of (say) the EU cluster and, at the same time, also
+connected to two or three places in the US which, in turn are
+connected back to the EU. This is called a "loop" and if you are
+seriously looped then you need filtering.
 
 <P>
 I should at this stage give a little bit of background on filters.  All
@@ -69,22 +87,30 @@ accept or reject various options in order to create the filter rules
 you wish to achieve.  Some filters are user settable, others can only
 be altered by the sysop.  Route filtering can only be done by the sysop.
 
-<sect1>The default_node filter
+<P> 
+Anyway, without further discouragement, let me start the process
+of explanation.
+
+<sect1>The node_default filter
 
 <P>
-As discussed previously, a default setting exists that only sends nodes
-from your own zone.  This can be overridden by using the default_node
-filter option like this ...
+All normal systems should have a default routing filter and it should
+usually be set to send only the normal, unlooped, view of your
+"national" network.  Here in the UK that means nodes from the UK and
+Eire, in EU it is more complex as the networks there grew up in a more
+intertwined way.
+
+<p> 
+The generic commands are:-
 
 <tscreen><verb>
-reject/route default_node &lt;filter_option&gt;
+reject/route node_default &lt;filter_option&gt;
 
 or
 
-accept/route default_node &lt;filter_option&gt;
+accept/route node_default &lt;filter_option&gt;
 </verb></tscreen>
 
-<P>
 where filter_option is one of the following ...
 
 <tscreen><verb>
@@ -92,16 +118,66 @@ call &lt;prefixes&gt;
 call_dxcc &lt;numbers&gt;
 call_itu &lt;numbers&gt;
 call_zone &lt;numbers&gt;
-origin &lt;prefixes&gt;
-origin_dxcc &lt;numbers&gt;
-origin_itu &lt;numbers&gt;
-origin_zone &lt;numbers&gt;
+channel &lt;prefixes&gt;
+channel_dxcc &lt;numbers&gt;
+channel_itu &lt;numbers&gt;
+channel_zone &lt;numbers&gt;
 </verb></tscreen>
 
-<P>
 Please be careful if you alter this setting, it will affect 
 <bf><it>ALL</it></bf> your links!
 
+<p>
+For the default routing filter then you have two real choices: either
+a "national" view or the "safe" option of only your own
+callsign. Examples of each (for my node: GB7DJK) are:-
+
+<tscreen><verb>
+acc/route node_default call_dxcc 61,38
+acc/route node_default call gb7djk
+</verb></tscreen>
+
+GB7DJK uses the first of these. The DXCC countries can be obtained from the 
+<it>show/prefix</it> command.
+
+<p>
+The example filters shown control <it>output</it> <bf>TO</bf> all your
+partner nodes unless they have a specific filter applied to them (see
+next section).
+
+<p>
+It is also possible to control the <it>incoming</it> routing
+information that you are prepared to accept <bf>FROM</bf> your partner
+nodes. The reason this is necessary is to make sure that stuff like
+mail, pings and similar commands a) go down the correct links and b)
+don't loop around excessively. Again using GB7DJK as an example a typical
+default input filter would be something like:
+
+<tscreen><verb>
+rej/route node_default input call_dxcc 61,38 and not channel_dxcc 61,38
+</verb></tscreen>
+
+What this does is accept node and user information for our national
+network from nodes that are in our national network, but rejects such
+information from anyone else. Although it doesn't explicitly say so,
+by implication, any other node information (not from the UK and Eire)
+is accepted.
+
+<p>
+As I imagine it will take a little while to get one's head around all of this you
+can study the effect of any rules that you try by watching the debug output
+after having done:-
+
+<tscreen><verb>
+set/debug filter
+</verb></tscreen>
+
+After you have got tired of that, to put it back the way it was:-
+
+<tscreen><verb>
+unset/debug filter
+</verb></tscreen>
+
 <sect1>General route filtering
 
 <P>
@@ -116,20 +192,6 @@ or
 accept/route &lt;node_call&gt; &lt;filter_option&gt; 
 </verb></tscreen>
 
-<P>
-where filter_option is one of the following ...
-
-<tscreen><verb>
-call &lt;prefixes&gt;
-call_dxcc &lt;numbers&gt;
-call_itu &lt;numbers&gt;
-call_zone &lt;numbers&gt;
-origin &lt;prefixes&gt;
-origin_dxcc &lt;numbers&gt;
-origin_itu &lt;numbers&gt;
-origin_zone &lt;numbers&gt;
-</verb></tscreen>
-
 <P>
 Here are some examples of route filters ...
 
@@ -140,6 +202,31 @@ acc/route gb7djk call_dxcc 61,38 (send only UK+EIRE nodes)
 acc/route gb7djk call gb7djk     (equiv to SET/ISOLATE)
 </verb></tscreen>
 
+In practice you will either be opening the default filter out for a
+partner by defining a specific filter for that callsign:-
+<tscreen><verb>
+acc/route gb7baa all
+acc/route gb7baa input all
+</verb></tscreen>
+
+or restricting it quite a lot, in fact making it very nearly like an <it>isolated</it> node, like this:-
+
+<tscreen><verb>
+acc/route pi4ehv-8 call gb7djk
+rej/route pi4ehv-8 input call_dxcc 61,38 
+</verb></tscreen>
+
+This last example takes everything except UK and Eire from PI4EHV-8
+but only sends him my local configuration (just a PC19 for GB7DJK and
+PC16s for my local users).
+
+<p>
+It is possible to do <bf>much</bf> more complex rules, there are up to 10
+accept/reject pairs per callsign per filter. For more information see the 
+next section. 
+
+
 <sect1>General filter rules
 
 <P>
@@ -156,7 +243,7 @@ generally at filtering. There are a number of things you can filter in the
 DXSpider system. They all use the same general mechanism.
 
 <P>
-In general terms you can create a 'reject' or an 'accept' filter which can have 
+In general terms you can create a "reject" or an "accept" filter which can have 
 up to 10 lines in it. You do this using, for example ... 
 
 <tscreen><verb> 
@@ -422,6 +509,25 @@ You can alter this file at any time, including whilst the cluster is running.
 If you alter the file during runtime, the command <em>load/hops</em> will 
 bring your changes into effect.
 
+<sect1>Hop Control on Specific Nodes
+
+<p>You can set a callsign specific hop count for any of the standard filter
+options so:-
+
+<tscreen><verb>
+set/hops gb7djk spot 4
+set/hops node_default route 10
+set/hops gb7baa wcy 5
+</verb></tscreen>
+all work on their specific area of the protocol.
+
+<p>
+The <em>set/hops</em> command overrides any hops that you have set otherwise.
+
+<p>
+You can set what hops have been set using the <em>show/hops</em> command.
+
 <sect1>Isolating networks
 
 <P>
@@ -442,24 +548,13 @@ another network, he can still still send a talk/announce etc message via your
 node and it will be routed across.
 
 <P>
-The only limitation currently is that non-private messages cannot be passed down 
-isolated links regardless of whether they are generated locally. This will change 
-when the bulletin routing facility is added.
-
-<P>
-If you use isolate on a node connection you will continue to receive all 
-information from the isolated partner, however you will not pass any information 
-back to the isolated node.  There are times when you would like to forward only 
-spots across a link (maybe during a contest for example).  To do this, isolate 
-the node in the normal way and put in a filter in the /spider/filter/spots 
-directory to override the isolate.  This filter can be very simple and consists 
-of just one line ....
-
-<tscreen><verb>
-$in = [
-       [ 1, 0, 'd', 0, 3]      # The last figure (3) is the hop count
-];
-</verb></tscreen>
+If you use isolate on a node connection you will continue to receive
+all information from the isolated partner, however you will not pass
+any information back to the isolated node.  There are times when you
+would like to forward only spots across a link (maybe during a contest
+for example).  To do this, isolate the node in the normal way and use
+an <em>acc/spot &gt;call&lt; all</em filter in the
+to override the isolate. 
 
 <sect>Other filters
 
@@ -514,64 +609,65 @@ headers that we do not want to pass on to either the users of the cluster or
 the other cluster nodes that we are linked to.  This is usually because of 
 rules and regulations pertaining to items for sale etc in a particular country.
 
-<sect1>Filtering DX callouts (Depricated)
 
-<P>
-<bf><it>From version 1.47, this method is replaced by the command set/baddx</it></bf>
+<sect1>Filtering words from text fields in Announce, Talk and DX spots
 
-<P>
-In the same way as mail, there are some types of spot we do not wish to pass on 
-to users or linked cluster nodes.  In the /spider/data directory you will find 
-a file called baddx.pl.issue.  Rename this to baddx.pl and edit the file.  The
-original looks like this ....
+<p>
+From version 1.48 onwards the interface to this has changed. You can now
+use the commands <em>set/badword</em> to add words that you are not prepared
+to see on the cluster, <em>unset/badword</em> to allow that word again and 
+<em>show/badword</em> to list the words that you have set.
 
-<tscreen><verb>
+<p>
+If you have a previous <em>/spider/data/badwords</em>, the first time you start
+the node, it will read and convert this file to the new commands. The old style
+file will then be removed.
 
-# the list of dx spot addresses that we don't store and don't pass on
+<sect1>Stopping (possibly bad) DX Spots from Nodes or Spotters
 
+<p> 
+There are a number of commands that control whether a spot progresses
+any further by regarding it as "bad" in some way.
 
-package DXProt;
+<p>
+A DX Spot has a number of fields which can checked to see whether they
+contain "bad" values, they are: the DX callsign itself, the Spotter and
+the Originating Node.
 
-@baddx = qw 
-
- FROG 
- SALE
- FORSALE
- WANTED
- P1RATE
- PIRATE
- TEST
- DXTEST
- NIL
- NOCALL 
-);
+<p>
+There are a set of commands which allow the sysop to control whether a
+spot continues:-
+
+<tscreen><verb>
+set/baddx
+set/badspotter
+set/badnode
 </verb></tscreen>
 
-<P>
-Again, this is simply a list of names we do not want to see in the spotted 
-field of a DX callout.
+These work in the same as the <em>set/badword</em> command, you can add
+any words or callsigns or whatever to the appropriate database. For
+example, to stop a spot from a particular node you do:
 
+<tscreen><verb>
+set/badnode gb7djk gb7dxc
+</verb></tscreen>
 
-<sect1>Filtering words from text fields in Announce, Talk and DX spots
-
-<P>
-Create a file in /spider/data called <em>badwords</em>.  The format is quite
-simple.  Lines beginning with # are ignored so comments can be added.  An
-example file is below ...
+a bad spotter:
 
 <tscreen><verb>
-# Below is a list of words we do not wish to see on the cluster
-grunge grunged grunging
-splodge splodger splodging
-grince
-fluffle
+set/badspotter b0mb p1rat nocall
 </verb></tscreen>
 
-Multiple words can be used on the same line as shown.  Obviously these
-are just examples :-)
+and some bad dx:
 
-<P>
-You can reload the file from the cluster prompt as sysop with load/badwords.
+<tscreen><verb>
+set/baddx video wsjt
+</verb></tscreen>
+
+You can remove a word using the appropriate unset command
+(<em>unset/baddx, unset/badspotter, unset/badnode</em>) or list them
+using one of <em>show/baddx, show/badspotter</em> and
+<em>show/badnode</em>.
 
 <sect>Mail
 
@@ -766,6 +862,47 @@ Please be careful not to flood the cluster network with unnecessary mail.
 Make sure you only send mail to the clusters that want it by using the
 Forward.pl file very carefully.
 
+<sect>Scripts
+
+<p>
+From 1.48 onwards it will become increasingly possible to control DXSpider's
+operation with scripts of various kinds.
+
+<p>
+In the first instance, in 1.48, the sysop can create, with their favorite 
+text editor, files in the directory <em>/spider/scripts</em> which contain
+any legal command for a callsign or class of connection which will be executed
+at logon.
+
+<p> 
+The filename are the callsign of the connection that you want the script to 
+operate on, eg: <em>/spider/scripts/g1tlh</em>. The filenames are always in 
+lower case on those architectures where this makes a difference.
+
+<p>
+In addition to the callsign specific scripts there are three others:-
+
+<tscreen><verb>
+startup
+user_default
+node_default
+</verb></tscreen>
+  
+The <em>startup</em> script is executed immediately after all
+initialisation of the node is done, but before any connections are
+possible.
+
+<p>
+The <em>user_default</em> script is executed for every user that does
+<bf>NOT</bf> already have a specific script.
+
+<p>
+The <em>node_default</em> script is executed for every node that doesn't
+have a specific script.
+
+<p>
+There are a couple of examples in the <em>/spider/scripts</em> directory.
+
 <sect>Databases
 
 <P>
@@ -2176,19 +2313,6 @@ Reload the /spider/cmd/Aliases file after you have editted it. You will need to
 do this if you change this file whilst the cluster is running in order for the
 changes to take effect.
 
-
-<sect1>load/baddx (9)
-
-<P>
-<tt>
-<bf>load/baddx</bf> Reload the bad DX table
-</tt>
-
-<P>
-Reload the /spider/data/baddx.pl file if you have changed it manually whilst
-the cluster is running. This table contains the DX Calls that, if spotted, 
-will not be passed on. FR0G and TEST are classic examples.
-
 <sect1>load/badmsg (9)
 
 <P>
@@ -2202,21 +2326,6 @@ the cluster is running. This table contains a number of perl regular
 expressions which are searched for in the fields targetted of each message. 
 If any of them match then that message is immediately deleted on receipt. 
 
-<sect1>load/badwords (9)
-
-<P>
-<tt>
-<bf>load/badwords</bf> Reload the badwords file
-</tt>
-
-<P>
-Reload the /spider/data/badwords file if you have changed it manually whilst
-the cluster is running. This file contains a list of words which, if found
-on certain text portions of PC protocol, will cause those protocol frames
-to be rejected. It will all put out a message if any of these words are
-used on the announce, dx and talk commands. The words can be one or 
-more on a line, lines starting with '#' are ignored.
-
 <sect1>load/bands (9)
 
 <P>