Difference between revisions of "NET/ROM"

From LinuxHam
Jump to navigationJump to search
m (Re-format the descriptions)
(axattach has been renamed to kissattach a very, very long time ago.)
 
Line 59: Line 59:
=== Creating the NET/ROM Network device ===
=== Creating the NET/ROM Network device ===


When you have the two configuration files completed you must create the NET/ROM device in much the same way as you did for the AX.25 devices. This time you use the nrattach command. The nrattach works in just the same way as the axattach command except that it creates NET/ROM network devices called `nr[0-9]'. Again, the first time you use the nrattach command it creates the `nr0' device, the second time it creates the `nr1' network devices etc. To create the network device for the NET/ROM port we've defined we would use:
When you have the two configuration files completed you must create the NET/ROM device in much the same way as you did for the AX.25 devices. This time you use the nrattach command. The nrattach works in just the same way as the [[kissattach]] command except that it creates NET/ROM network devices called `nr[0-9]'. Again, the first time you use the nrattach command it creates the `nr0' device, the second time it creates the `nr1' network devices etc. To create the network device for the NET/ROM port we've defined we would use:


     # nrattach netrom
     # nrattach netrom

Latest revision as of 21:58, 13 July 2015

NET/ROM was the first layer 3 protocol providing transparent routing to the packet radio user thus enabled less constraint growth of the packet radio network.

The NET/ROM protocol relies on, and uses the AX.25 ports you have created. The NET/ROM protocol rides on top of the AX.25 protocol. To configure NET/ROM on an AX.25 interface you must configure two files. One file describes the NET/ROM interfaces, and the other file describes which of the AX.25 ports will carry NET/ROM. You can configure multiple NET/ROM ports, each with its own callsign and alias, the same procedure applies for each.

NET/ROM Configuration

Configuring /etc/ax25/nrports

The first is the /etc/ax25/nrports file. This file describes the NET/ROM ports in much the same way as the /etc/ax25/axports file describes the AX.25 ports. Each NET/ROM device you wish to create must have an entry in the /etc/ax25/nrports file. Normally a Linux machine would have only one NET/ROM device configured that would use a number of the AX.25 ports defined. In some situations you might wish a special service such as a BBS to have a separate NET/ROM alias and so you would create more than one.

This file is formatted as follows:

   name callsign  alias  paclen   description

Where:

name
is the text name that you wish to refer to the port by.
callsign
is the callsign that the NET/ROM traffic from this port will use. Note, this is not that address that users should connect to to get access to a node style interface. (The node program is covered later). This callsign/ssid should be unique and should not appear elsewhere in either of the /etc/ax25/axports or the /etc/ax25/nrports files.
alias
is the NET/ROM alias this port will have assigned to it.
paclen
is the maximum size of NET/ROM frames transmitted by this port.
description
is a free text description of the port.

An example would look something like the following:

   netrom  VK2KTJ-9        LINUX   236     Linux Switch Port

This example creates a NET/ROM port known to the rest of the NET/ROM network as `LINUX:VK2KTJ-9'.

This file is used by programs such as the call program.

Configuring /etc/ax25/nrbroadcast

The second file is the /etc/ax25/nrbroadcast file. This file may contain a number of entries. There would normally be one entry for each AX.25 port that you wish to allow NET/ROM traffic on.

This file is formatted as follows:

   axport min_obs def_qual worst_qual verbose

Where:

axport
is the port name obtained from the /etc/ax25/axports file. If you do not have an entry in /etc/ax25/nrbroadcasts for a port then this means that no NET/ROM routing will occur and any received NET/ROM broadcasts will be ignored for that port.
min_obs
is the minimum obselesence value for the port.
def_qual
is the default quality for the port.
worst_qual
is the worst quality value for the port, any routes under this quality will be ignored.
verbose
is a flag determining whether full NET/ROM routing broadcasts will occur from this port or only a routing broadcast advertising the node itself.

An example would look something like the following:

   radio    1       200      100         1

Creating the NET/ROM Network device

When you have the two configuration files completed you must create the NET/ROM device in much the same way as you did for the AX.25 devices. This time you use the nrattach command. The nrattach works in just the same way as the kissattach command except that it creates NET/ROM network devices called `nr[0-9]'. Again, the first time you use the nrattach command it creates the `nr0' device, the second time it creates the `nr1' network devices etc. To create the network device for the NET/ROM port we've defined we would use:

   # nrattach netrom

This command would start the NET/ROM device (nr0) named netrom configured with the details specified in the /etc/ax25/nrports file.

Starting the NET/ROM daemon

The Linux kernel does all of the NET/ROM protocol and switching, but does not manage some functions. The NET/ROM daemon manages the NET/ROM routing tables and generates the NET/ROM routing broadcasts. You start NET/ROM daemon with the command:

   # /usr/sbin/netromd -i

You should soon see the /proc/net/nr_neigh file filling up with information about your NET/ROM neighbours.

Remember to put the /usr/sbin/netromd command in your rc files so that it is started automatically each time you reboot.

Configuring NET/ROM routing

You may wish to configure static NET/ROM routes for specific hosts. The nrparms command enables you to do this. Again, the man page offers a complete description, but a simple example might be:

   # /usr/sbin/nrparms -nodes VK2XLZ-10 + #MINTO 120 5 radio VK2SUT-9

This command would set a NET/ROM route to #MINTO:VK2XLZ-10 via a neighbour VK2SUT-9 on my AX.25 port called `radio'.

You can manually create entries for new neighbours using the nrparms command as well. For example:

   # /usr/sbin/nrparms -routes radio VK2SUT-9 + 120

This command would create VK2SUT-9 as a NET/ROM neighbour with a quality of 120 and this will be locked and will not be deleted automatically.

The NET/ROM protocol

The original NET/ROM protocol was defined by a company named Software 2000 many years ago for their commercial ROMs for the TNC2. Later implementations such as by The/NET were implementing supersets of the protocol.

NET/ROM packets start with a a 5 byte long transport layer folling the AX.25 layer's headers. This header is looking as follows:

  Offset     Use
       0     Circuit Index
       1     Circuit ID
       2     TX Sequence Number
       3     RX Sequence Number
       4     Opcode and Flags

The Opcode and Flags field is constructed as follows:

    Bits     Use
   0 - 3     Opcode
       4     Reserviert
       5     More Follows Flag
       6     NAK Flag
       7     Choke

NET/ROM implements seven operations for the opcode field. Opcodes 0..6 were already defined in the original Software 2000 NET/ROM specification.

       0    Protocol Extension
       1    Connect Request
       2    Connect Acknowledge
       3    Disconnect Request
       4    Disconnect Acknowledge
       5    Information
       6    Information Acknowledge
       7    Reset

G8PZT Reset

The Reset operation was designed by G8PZT. It solves the problem that NET/ROM has nothing equivalent to TCP's RST flag to tell the remote side that a connection does no longer exist on the local side. Strict NET/ROM has no other way of dealing with this case than letting the connection timeout - a very slow recovery method. To avoid reset wars Linux will never reply to a Reset packet with another Reset packet. For paranoia reasons the G8PZT Reset extension is currently disabled by default; it needs to be explcitly enabled by:

sysctl -w net.netrom.reset=1

The intent is to change the default to enabled after Linux 2.6.17 has been released and no issues have been found.