home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / comms / a / freenet / !FreeNet_Docs_Tuning < prev    next >
Encoding:
Text File  |  1995-05-13  |  9.4 KB  |  272 lines

  1.                     Tuning the FreeNet TCP/IP Stack
  2.  
  3.                           (C) Tom Hughes 1995
  4.  
  5. 0. Copyright
  6.  
  7.   The FreeNet module and application and the tools and documentation
  8.   that go with them are all copyright. They are however released as
  9.   freeware subject to certain terms and conditions. These are described
  10.   in the file named 'Licence' which should have accompanied this
  11.   document.
  12.  
  13. 1. Overview
  14.  
  15.   The FreeNet TCP/IP stack has a number of low-level configuration options
  16.   which allow the behaviour of the stack to be tweaked in various ways.
  17.   
  18.   Most of these will not be of interest to most users, as the stack comes
  19.   with the options preset to values which are sensible for most purposes,
  20.   but for those who may need to fiddle with these things, this document
  21.   describes the available options.
  22.   
  23.   The options are all held in the file !FreeUser.Files.Config, where each
  24.   line is divided into three parts. The first part is the 'class' of the
  25.   option, and is used to group related options. The second is the option
  26.   name within the class, and the third is the value to set the option to.
  27.   
  28. 2. The Options
  29.  
  30.   This section lists each of the available options. The name of each option
  31.   is given along with the type of argument it takes, default value for the
  32.   option, and a description of it's effects. Options described as boolean
  33.   options take either 'yes', 'on' or 'true' as a true value, and anything
  34.   else as being false.
  35.   
  36.     Option:      arp timeout
  37.     Type:        Numeric
  38.     Units:       Minutes
  39.     Default:     20
  40.     Description: The length of time that an ARP entry will be cached
  41.                  for. After this expires, a new ARP lookup will be done
  42.                  next time the address is needed.
  43.   
  44.     Option:      ip forwarding
  45.     Type:        Boolean
  46.     Default:     Off
  47.     Description: Controls whether FreeNet will act as a router and
  48.                  forward packets arriving on one interface to other
  49.                  attached networks where necessary.
  50.   
  51.     Option:      ip directedbroadcast
  52.     Type:        Boolean
  53.     Default:     Off
  54.     Description: Controls whether FreeNet will act upon directed
  55.                  broadcasts targeted at attached networks.
  56.   
  57.     Option:      ip localsubnets
  58.     Type:        Boolean
  59.     Default:     Off
  60.     Description: Controls whether all subnets of a directly connected
  61.                  net are considered local, or only the directly connected
  62.                  subnet itself.
  63.   
  64.     Option:      ip ttl
  65.     Type:        Numeric
  66.     Default:     64
  67.     Description: The default TTL for IP datagrams whose TTL is not set
  68.                  more explicitly. This is always overidden for UDP and
  69.                  TCP packets.
  70.   
  71.     Option:      tcp ttl
  72.     Type:        Numeric
  73.     Default:     60
  74.     Description: The default TTL for TCP datagrams whose TTL is not set
  75.                  more explicitly.
  76.   
  77.     Option:      tcp minrto
  78.     Type:        Numeric
  79.     Units:       Centiseconds
  80.     Default:     20
  81.     Description: The minimum value for a TCP retransmission timeout. The
  82.                  stack will always wait this long before retransmitting
  83.                  a TCP segment.
  84.   
  85.     Option:      tcp maxrto
  86.     Type:        Numeric
  87.     Units:       Centiseconds
  88.     Default:     6000
  89.     Description: The maximum value for a TCP retransmission timeout. The
  90.                  stack will never wait any longer than this before
  91.                  retransmitting a TCP segment.
  92.   
  93.     Option:      tcp minmss
  94.     Type:        Numeric
  95.     Units:       Bytes
  96.     Default:     32
  97.     Description: The minimum MSS value for a TCP connection.
  98.   
  99.     Option:      tcp maxmss
  100.     Type:        Numeric
  101.     Units:       Bytes
  102.     Default:     65495
  103.     Description: The maximum MSS value for a TCP connection.
  104.   
  105.     Option:      tcp defaultmss
  106.     Type:        Numeric
  107.     Units:       Bytes
  108.     Default:     536
  109.     Description: The default MSS value for a TCP connection that is
  110.                  not considered to be a local connection.
  111.     
  112.     Option:      tcp timeout
  113.     Type:        Numeric
  114.     Units:       Seconds
  115.     Default:     75
  116.     Description: The length of time before a TCP connection attempt will
  117.                  timeout and report a failure.
  118.     
  119.     Option:      tcp keeptimeout
  120.     Type:        Numeric
  121.     Units:       Minutes
  122.     Default:     120
  123.     Description: The frequency with which keepalive probes are sent on
  124.                  those TCP connections which have them enabled. Only when
  125.                  the connection has received no data for this length of
  126.                  time will it start to actively check if it is still
  127.                  alive.
  128.     
  129.     Option:      tcp keepprobes
  130.     Type:        Numeric
  131.     Default:     8
  132.     Description: The number of probes which will be sent when trying to
  133.                  check if a TCP connection is still alive.
  134.     
  135.     Option:      tcp keepinterval
  136.     Type:        Numeric
  137.     Units:       Seconds
  138.     Default:     75
  139.     Description: The length of time between succesive probes when trying
  140.                  to check if a TCP connection is still alive.
  141.  
  142.     Option:      tcp sendbuf
  143.     Type:        Numeric
  144.     Units:       Bytes
  145.     Default:     4096
  146.     Description: The default size of the send buffer for a TCP connection.
  147.   
  148.     Option:      tcp receivebuf
  149.     Type:        Numeric
  150.     Units:       Bytes
  151.     Default:     4096
  152.     Description: The default size of the receive buffer for a TCP
  153.                  connection.
  154.   
  155.     Option:      udp ttl
  156.     Type:        Numeric
  157.     Default:     60
  158.     Description: The default TTL for UDP datagrams whose TTL is not set
  159.                  more explicitly.
  160.   
  161.     Option:      udp sendbuf
  162.     Type:        Numeric
  163.     Units:       Bytes
  164.     Default:     8192
  165.     Description: The default size of the send buffer for a UDP socket, and
  166.                  the maximum size of packet that may be transmitted via a
  167.                  UDP socket.
  168.   
  169.     Option:      udp receivebuf
  170.     Type:        Numeric
  171.     Units:       Bytes
  172.     Default:     20480
  173.     Description: The default size of the receive buffer for a UDP
  174.                  socket.
  175.   
  176.     Option:      buffers small
  177.     Type:        Numeric
  178.     Default:     128
  179.     Description: The number of small buffers in the buffer pool. These
  180.                  buffers can hold up to 112 bytes of data.
  181.   
  182.     Option:      buffers large
  183.     Type:        Numeric
  184.     Default:     64
  185.     Description: The number of large buffers in the buffer pool. These
  186.                  buffers can hold up to 1500 bytes of data.
  187.    
  188.     Option:      bsd version
  189.     Type:        Numeric
  190.     Default:     44
  191.     Description: The version of BSD which the FreeNet sockets interface
  192.                  conforms to. The value given is multiplied by ten, so 44
  193.                  is BSD 4.4, 43 is BSD 4.3 and so on.
  194.  
  195.     Option:      trace file
  196.     Type:        Filename
  197.     Default:     <FreeUser$Dir>.Trace
  198.     Description: The location of the file used to write packet traces when
  199.                  tracing is enabled for an interface.
  200.   
  201.     Option:      debug file
  202.     Type:        Filename
  203.     Default:     <FreeUser$Dir>.Debug
  204.     Description: The file used to write debugging data. This option is
  205.                  only really of use to developers of the stack who have
  206.                  added code to write debugging information to the file.
  207.   
  208.     Option:      debug state
  209.     Type:        Boolean
  210.     Default:     Off
  211.     Description: Controls whether debugging information is currently
  212.                  being written to the debugging file or not.
  213.   
  214.     Option:      log file
  215.     Type:        Filename
  216.     Default:     <FreeUser$Dir>.LogFile
  217.     Description: The file used to write log messages while the stack is
  218.                  running.
  219.  
  220. 3. Changing Options on a Running Stack
  221.  
  222.   Some of the above options may be changed while the stack is running by
  223.   using the NetConf command, whose syntax is as follows:
  224.   
  225.      NetConf <class> <option> [<value>]
  226.      
  227.   If you don't specify a value, the options current value will be shown,
  228.   otherwise a new value will be set.
  229.  
  230. 4. Interface Filters
  231.  
  232.   It is possible to attach a packet filter to an interface that will
  233.   drop any packets arriving from certain specified hosts. Such a filter
  234.   is described by an interface description file which consists of lines
  235.   of the form:
  236.  
  237.      [allow|deny] <address>/<bits>
  238.  
  239.   Each line either allows reception of packets from an address, or 
  240.   prevents it, depending on the keyword used. The <bits> value is the
  241.   number of bits of the address to be used, allowing whole nets and
  242.   groups of nets to be blocked easily.
  243.  
  244.   The address 'all' can be used to allow/deny all hosts, and is usually
  245.   used as a default, to be overridden by other more specific rules. Note
  246.   that the initial default when the filter is created is 'allow all'.
  247.  
  248.   As an example, consider the following example, which blocks all data
  249.   coming from the 158.152.0.0 class B network, excluding two specified
  250.   subnets. In addition, a host on one of these subnets has been blocked:
  251.  
  252.      # Allow all hosts by default
  253.      allow all
  254.  
  255.      # Block the class B net
  256.      deny 158.152.0.0/16
  257.      
  258.      # But allow two of it's subnets
  259.      allow 158.152.34.0/24
  260.      allow 158.152.35.0/24
  261.  
  262.      # Finally, block one host specifically
  263.      deny 158.152.34.13/32
  264.  
  265.   Once an filter description file is written, it can be attached to an
  266.   interface using ifconfig:
  267.  
  268.      ifconfig <interface> filter <filename>
  269.  
  270.   From that point on, any packet originating from a blocked address will
  271.   be dropped on the floor.
  272.