home *** CD-ROM | disk | FTP | other *** search
- Tuning the FreeNet TCP/IP Stack
-
- (C) Tom Hughes 1995
-
- 0. Copyright
-
- The FreeNet module and application and the tools and documentation
- that go with them are all copyright. They are however released as
- freeware subject to certain terms and conditions. These are described
- in the file named 'Licence' which should have accompanied this
- document.
-
- 1. Overview
-
- The FreeNet TCP/IP stack has a number of low-level configuration options
- which allow the behaviour of the stack to be tweaked in various ways.
-
- Most of these will not be of interest to most users, as the stack comes
- with the options preset to values which are sensible for most purposes,
- but for those who may need to fiddle with these things, this document
- describes the available options.
-
- The options are all held in the file !FreeUser.Files.Config, where each
- line is divided into three parts. The first part is the 'class' of the
- option, and is used to group related options. The second is the option
- name within the class, and the third is the value to set the option to.
-
- 2. The Options
-
- This section lists each of the available options. The name of each option
- is given along with the type of argument it takes, default value for the
- option, and a description of it's effects. Options described as boolean
- options take either 'yes', 'on' or 'true' as a true value, and anything
- else as being false.
-
- Option: arp timeout
- Type: Numeric
- Units: Minutes
- Default: 20
- Description: The length of time that an ARP entry will be cached
- for. After this expires, a new ARP lookup will be done
- next time the address is needed.
-
- Option: ip forwarding
- Type: Boolean
- Default: Off
- Description: Controls whether FreeNet will act as a router and
- forward packets arriving on one interface to other
- attached networks where necessary.
-
- Option: ip directedbroadcast
- Type: Boolean
- Default: Off
- Description: Controls whether FreeNet will act upon directed
- broadcasts targeted at attached networks.
-
- Option: ip localsubnets
- Type: Boolean
- Default: Off
- Description: Controls whether all subnets of a directly connected
- net are considered local, or only the directly connected
- subnet itself.
-
- Option: ip ttl
- Type: Numeric
- Default: 64
- Description: The default TTL for IP datagrams whose TTL is not set
- more explicitly. This is always overidden for UDP and
- TCP packets.
-
- Option: tcp ttl
- Type: Numeric
- Default: 60
- Description: The default TTL for TCP datagrams whose TTL is not set
- more explicitly.
-
- Option: tcp minrto
- Type: Numeric
- Units: Centiseconds
- Default: 20
- Description: The minimum value for a TCP retransmission timeout. The
- stack will always wait this long before retransmitting
- a TCP segment.
-
- Option: tcp maxrto
- Type: Numeric
- Units: Centiseconds
- Default: 6000
- Description: The maximum value for a TCP retransmission timeout. The
- stack will never wait any longer than this before
- retransmitting a TCP segment.
-
- Option: tcp minmss
- Type: Numeric
- Units: Bytes
- Default: 32
- Description: The minimum MSS value for a TCP connection.
-
- Option: tcp maxmss
- Type: Numeric
- Units: Bytes
- Default: 65495
- Description: The maximum MSS value for a TCP connection.
-
- Option: tcp defaultmss
- Type: Numeric
- Units: Bytes
- Default: 536
- Description: The default MSS value for a TCP connection that is
- not considered to be a local connection.
-
- Option: tcp timeout
- Type: Numeric
- Units: Seconds
- Default: 75
- Description: The length of time before a TCP connection attempt will
- timeout and report a failure.
-
- Option: tcp keeptimeout
- Type: Numeric
- Units: Minutes
- Default: 120
- Description: The frequency with which keepalive probes are sent on
- those TCP connections which have them enabled. Only when
- the connection has received no data for this length of
- time will it start to actively check if it is still
- alive.
-
- Option: tcp keepprobes
- Type: Numeric
- Default: 8
- Description: The number of probes which will be sent when trying to
- check if a TCP connection is still alive.
-
- Option: tcp keepinterval
- Type: Numeric
- Units: Seconds
- Default: 75
- Description: The length of time between succesive probes when trying
- to check if a TCP connection is still alive.
-
- Option: tcp sendbuf
- Type: Numeric
- Units: Bytes
- Default: 4096
- Description: The default size of the send buffer for a TCP connection.
-
- Option: tcp receivebuf
- Type: Numeric
- Units: Bytes
- Default: 4096
- Description: The default size of the receive buffer for a TCP
- connection.
-
- Option: udp ttl
- Type: Numeric
- Default: 60
- Description: The default TTL for UDP datagrams whose TTL is not set
- more explicitly.
-
- Option: udp sendbuf
- Type: Numeric
- Units: Bytes
- Default: 8192
- Description: The default size of the send buffer for a UDP socket, and
- the maximum size of packet that may be transmitted via a
- UDP socket.
-
- Option: udp receivebuf
- Type: Numeric
- Units: Bytes
- Default: 20480
- Description: The default size of the receive buffer for a UDP
- socket.
-
- Option: buffers small
- Type: Numeric
- Default: 128
- Description: The number of small buffers in the buffer pool. These
- buffers can hold up to 112 bytes of data.
-
- Option: buffers large
- Type: Numeric
- Default: 64
- Description: The number of large buffers in the buffer pool. These
- buffers can hold up to 1500 bytes of data.
-
- Option: bsd version
- Type: Numeric
- Default: 44
- Description: The version of BSD which the FreeNet sockets interface
- conforms to. The value given is multiplied by ten, so 44
- is BSD 4.4, 43 is BSD 4.3 and so on.
-
- Option: trace file
- Type: Filename
- Default: <FreeUser$Dir>.Trace
- Description: The location of the file used to write packet traces when
- tracing is enabled for an interface.
-
- Option: debug file
- Type: Filename
- Default: <FreeUser$Dir>.Debug
- Description: The file used to write debugging data. This option is
- only really of use to developers of the stack who have
- added code to write debugging information to the file.
-
- Option: debug state
- Type: Boolean
- Default: Off
- Description: Controls whether debugging information is currently
- being written to the debugging file or not.
-
- Option: log file
- Type: Filename
- Default: <FreeUser$Dir>.LogFile
- Description: The file used to write log messages while the stack is
- running.
-
- 3. Changing Options on a Running Stack
-
- Some of the above options may be changed while the stack is running by
- using the NetConf command, whose syntax is as follows:
-
- NetConf <class> <option> [<value>]
-
- If you don't specify a value, the options current value will be shown,
- otherwise a new value will be set.
-
- 4. Interface Filters
-
- It is possible to attach a packet filter to an interface that will
- drop any packets arriving from certain specified hosts. Such a filter
- is described by an interface description file which consists of lines
- of the form:
-
- [allow|deny] <address>/<bits>
-
- Each line either allows reception of packets from an address, or
- prevents it, depending on the keyword used. The <bits> value is the
- number of bits of the address to be used, allowing whole nets and
- groups of nets to be blocked easily.
-
- The address 'all' can be used to allow/deny all hosts, and is usually
- used as a default, to be overridden by other more specific rules. Note
- that the initial default when the filter is created is 'allow all'.
-
- As an example, consider the following example, which blocks all data
- coming from the 158.152.0.0 class B network, excluding two specified
- subnets. In addition, a host on one of these subnets has been blocked:
-
- # Allow all hosts by default
- allow all
-
- # Block the class B net
- deny 158.152.0.0/16
-
- # But allow two of it's subnets
- allow 158.152.34.0/24
- allow 158.152.35.0/24
-
- # Finally, block one host specifically
- deny 158.152.34.13/32
-
- Once an filter description file is written, it can be attached to an
- interface using ifconfig:
-
- ifconfig <interface> filter <filename>
-
- From that point on, any packet originating from a blocked address will
- be dropped on the floor.
-