DECnet for Linux 

A project to provide DECnet phase IV connectivity for Linux 
 

The Kernel Patch

 

This is the distribution of a DECnet Socket Layer for LINUX and a set of utilities. The DECnet socket for linux implementation supports incoming/outgoing connections.

This code set runs on kernels 2.0.35 and 2.1.122 and provides Linux with DECnet end-node capabilities. Regarding
DECnet routing there are limitations on the Ethernet cards available. Unfortunately DECnet uses many physical addresses to deal with routing and the only Ethernet Card that responds to multiple physical addresses is the DEC Tulip. This was explained to me by Donald Becker when I consult him on the 3COM 3C509 driver and why I couldn't make this ethernet card respond to many physical addresses. Please visit http://cesdis.gsfc.nasa.gov/linux/drivers/tulip.html for further reading.

As the DECnet node address is related to the physical address of the Ethernet card, please refer later on this file to see how to setup it in case you don't have a TULIP one.
 

INSTALLATION

In order to get this code running you will have to patch and reconfigure your kernel. Make sure you are using kernel
the indicated kernel (ie. 2.0.35 or 2.1.122).

1) Create a temporary directory to untar the distribution file dnlinux.tgz

# mkdir dndist
# cd dndist
# tar xvfz dnkxxx..tgz

Copy the decnet-2_x_x.diff file from this directory to /usr/src and do the patching

# cp decnet-2_x_xxx.diff /usr/src
# cd /usr/src
# patch -p0 < decnet-2_x_x.diff

After patching the kernel you will have to reconfigure it.
 

# cd linux
# make config
 .
 .
 .
 The DECnet Protocol Socket Layer? y   ! answer yes
 .
 .
 (If you decide to build DECnet support as a module bear in mind that you will need modutils-2.1.85 and libc.5.3.44. Also you must add a line in your /etc/conf.modules file "alias net-pf-12 decnet")

# make dep; make clean;
# make zImage

# cp arch/i386/boot/zImage /vmlinux.dec

Update your lilo configuration to boot the new kernel

# liloconf

(Create a new tag "Decnet" pointing to /vmlinux.dec)

OPTIONAL: If you select DECnet as a module:
# make modules;  make modules_install

Boot the new kernel
 

2) After rebooting you can check that the DECnet protocol is installed by typing

# cat /proc/net/decnet
 

3) Download and untar the dnlib.tgz file.
 
# tar xvfz dnlib.tgz
# cd lib
# make lib; make install                             // This will create and install the supporting routines library and man pages

4) Download and untar the dnapps.tgz file
# tar xvfz dnapps.tgz
# cd apps
# make ; make install                                // This will build and install the startnet, sethost, dnmirror & dnping apps and copy
                                                                   the decnet.conf file to /etc. It also installs manual pages

5) Now take a look at /etc/decnet.conf file. This is a self-explanatory file. You will modify it to define which interface you will use DECnet on (default eth0) and will choose your decnet node address as well as the address of the other DECnet nodes you plan to communicate with.

6) Now you will start the DECnet socket Layer using the following command
 

# startnet   (You can include this in rc.inet1 for automatic startup)

If your Ethernet Card works fine with multicast, you have done all the work and you can start using the applications. For example you can try to test connectivity to a remote DECnet node with

# dnping  mv3100 100                                    // This will try to loopback 100 packets thru remote DECnet node mv3100.

I you get all the packets you have sent, then the link is working properly. Otherwise, you are not lucky and you will have to change the address of your Ethernet card in the init scripts according to the decnet address selected for your node.

On DECnet networks, the physical address of the ethernet card is a function of the DECnet node address.

The form of a DECnet physical address is

AA:00:04:00:XX:XX

The last two hex digits codify the DECnet node address.

A DECnet node address takes the form of area.node where
 
0 < area < 64

0 < node < 1024
 

For example DECnet node 1.2  refers to area 1 and node 2.

To code the DECnet node address into the DECnet Physical address we have 2 bytes (16-bits) Thus, we use 10 bits for the "node" and 6 bits for the "area"

Examples of ADDRESSES are:

                                                 Area  Node
DECnet node 1.1        AA:00:04:00:01:04------- 000001 00
                                       |___________________ 00000001
DECnet node 1.2        AA:00:04:00:02:04
OK, after obtaining your DECnet Physical Address, you will have to assign it to the select interface on system start-up.

To do that, change /etc/rc.d/rc.inet1 to contain a line at the very beginning with the following

# ifconfig eth0 hw ether AA:00:04:00:02:04
 

APPLICATIONS

These applications are included with the kernel patch:
For more applications see the file utilities page.

sethost

Terminal Emulation using CTERM
Hint: After connection, enter the following command at VMS:
 
 $ set term/dec_crt

This is because the CTERM specification available from Digital is a bit old and doesn't explain how to setup VMS terminal
characteristics. Nevertheless, this is a minor problem and you can put this command in your VMS login.com file.

ctermd

This is the daemon that allows remote terminals on other DECnet nodes to connect to Linux
emulating a terminal.
 

dnmirror

This is the first application that supports incoming connections and implements the DECnet MIRROR object. It will loopback any packet sent for testing. It should be run as:

# dnmirror&

On the VMS machine you can execute the command:

$ MCR NCP LOOPBACK NODE nodename COUNT n

dnping

This is the app for testing loopback with other DECnet node (included this machine if dnmirror is running).

# dnping mv3100 5       (Loopback 5 pkts thru MV3100)
 
 
 

Manual Pages

decnet_conf (5)
startnet (1)
sethost (1)
ctermd (1)
dnmirror (1)
dnping (1)

libdnet (3)
dnet_conn (3)
dnet_htoa (3)
dnet_ntoa (3)
getnodeadd (3)
getnodebyname (3)
getnodebyaddr (3)
setnodeent (3)

SUPPORT

I am a full time worker so I cannot promise to provide you with support, but
I will eventually answer any mail I receive. I started this work because
I wanted some kind of interaction between my favourites O.S. (VMS and LINUX).
 
Eduardo Marcelo Serrat emserrat@geocities.com