Finally I’ve got around to tinkering with DECnet for Linux. DECnet has been in the Linux Kernel for a long time, but very few people use it.
The first thing I had to do was move the HECnet bridging software off servalan and on to another machine that runs 24/7. The logical choice, in my case, was the Raspberry-Pi running RaspBMC that is taped to the back of my television.
So, with the bridging software moved, I came across a problem. DECnet names are 6 characters, and servalan is 8. As I use names of Sci-Fi characters and ideas for my various Unix machines, I picked DAVROS, purely because Servalan was the Big Bad of Blake’s Seven and Davros was a Big Bad on Doctor Who. (My Windows machines are named after the Istari from Tolkien’s works).
So, after agreeing that I would use the name DAVROS and number 1.252, and noting that DECnet was still included in the kernel that Ubuntu uses, the first step was to convice the network interface that it was using the appropriate DECnet hardware address (which for 1.252 would be AA-00-04-00-FC-04).
So, edit /etc/network/interfaces (as root) to have the following entry:
iface eth2 inet static
hwaddress ether AA:00:04:00:FC:04
(obviously those are my ip addresses and i’m using eth2 for some reason).
Next, my /etc/decnet.conf files looks like this:
# # DECnet hosts file # #Node Node Name Node Line Line #Type Address Tag Name Tag Device #----- ------- ----- ----- ----- ------ executor 1.252 name davros line eth2 node 1.250 name tardis node 1.251 name sidrat
(TARDIS is an existing Simulated VAX, and SIDRAT will be a node clustered with TARDIS sometime soon)
My /etc/decnet.proxy looks like this:
# /etc/decnet.proxy # # DECnet proxy database. # The format of this file is (one entry per line) # node::remoteuser localuser # # ... # # ^tramp$::^test$ chrissie # Explicitly convert 'test' on tramp to chrissie # ^zaphod$::.* none # Disable proxies from zaphod .*::.* */DEFAULT # associate all remote users with a # similarly named user on the local VMS machine # # a user called 'none') # .*::.* decnet # Like a default DECnet account # .*::.* * # Equivalent to VMS *::* * proxy (make this last # # if you use it)
And my /etc/dnetd.conf looks like this:
# /etc/dnetd.conf # # Define DECnet objects # # Fields # name: object name (or * for any named object, number must be 0) # number: object number (or 0 for a named object) # options: auth[,auto accept]: # auth: Whether to authenticate users: Y or N # auto accept: Should we accept incoming connections # This is needed for non-decnet daemons # (not calling dnet_accept) # user: If auth is N then use this user # daemon: program to run or 'internal' # # name number options user daemon # FAL 17 Y,N fal fal MIRROR 25 Y,N root internal MAIL 27 N,N vmsmail vmsmaild CTERM 42 N,N root ctermd DTERM 23 N,N root rmtermd NML 19 N,N nobody dnetnml * * Y,R none internal
To install the DECnet tools:
# apt-get install dnet-progs
This will give you a whole load of DECnet tools. Some work, some crash spectacularly.
Getting the nodelist from HECnet and putting it into the /etc/decnet.conf file is a pain in the arse to do manually.
First copy is across (using the address 1.13:: as it won’t understant mim:: yet):
# dncopy 1.13::nodenames.dat nodenames.dat
Next you’ll need this badly written bit of C that I bodged up and call mkhecnodes.c:
char *nodenum, *nodename;
if (line != ‘ ‘)
nodenum = strtok (line, ” \n”);
nodename = strtok (NULL, ” \n”);
for(i = 0; nodename[i]; i++)
nodename[i] = tolower(nodename[i]);
Compile it up and run it, giving it the node list as input and directing the output to the end of /etc/decnet.conf:
# gcc -o mkhecnodes mkhecnodes.c # ./mkhecnodes < nodenames.dat >> /etc/decnet.conf
You might want to go through it and delete your duplicate node info, but I didn’t bother and it works fine. If you want your node names in upper case, remove the for loop.