Thursday, January 30, 2014

Networking a virtual KS-10

SIMH is in continuous evolution, adding new enhancements practically each month. The last oficially released version is still 3.9, but the new 4.0 version can be downloaded (as source) from the development git repository, and it is usually stable enough to be used (with all the caveats about using beta software).

The communication devices for several of the emulated DEC machines have received some attention in the last months. Right now it is posible to configure synchronous communication devices for the PDP-10, PDP-11 and VAX simulators, and those emulated devices have reached a point so useful things can be done with them. Specifically, it is now posible to give DECNET connectivity to TOPS-10 running over the pdp10 simulator. That simulator impersonates a KS based DECSYSTEM-2020, which had no ethernet devices supported in DECNET, so the only chance to network it is to use the serial devices. Right now simh includes support for the KDP/DUP combo and for the DMR controller. The DMR controller is still a little bit green and does not work properly, but the KDP/DUP is good enough to set up a decnet link. This article will tell you how to do it.

Communication devices in simh 4.0

Most communication devices emulated in simh share a common framework, so they have similar setup commands. They can be wired to real communication ports in the host computer, so actual wires and communication lines can be used to hook virtual machines. Nevertheless, we are going to use "virtual" wires based on TCP/IP connections. For each virtual line, we have to configure both communication endpoints:
  • We must attach our endpoint to a local port (TCP or UDP)
  • We must peer with the IP address and port number of the remote endpoint
This is the relevant stanza of my vax780.ini configuration setting un two lines of a DMC-11 device:

set dmc enable
set dmc lines=4

set dmc0 peer=
att dmc0 33061,UDP

set dmc1 peer=
att dmc1 34061,UDP                                                              

The values are self-describing. Line 0 is attached to the local UDP port 33061, while it is paired to the remote UDP port 21080 in the machine with address Of course if you are running all the machines in the same host you would unse here.

Now, the DUP device is an exception, since it does not share the same underworks as the DMC, DZ, VH and other serial stuff. The config stanza in the pdp10.ini file is:

set kdp enable
set dup enable
ATTACH DUP0 21080,Connect=,UDP
Instead of using two separated statements, the attaching and pairing is done in just one line. Just check the "wires" are correctly connected and it will be ok. The choice between UDP and TCP (to use TCP just don't specify UDP) is basically up to you. If you plan to use the link between an instance running in a laptop and your home system you will probably want to use TCP, since it makes it easier to set up the port forwarding and NAT stuff.

Generating a TOPS-10 monitor with KDP/DUP and DECNET

I am assuming you have a TOPS-10 version 7.04 up and running. If not, refer to this article. Once you have it up, you will need to know the name and address you want to assign to your future new TOPS-10 DECNET node. You will want also to get:
Be aware those manuals are for the 7.03 version of the monitor, and there are important differences in the install process. They can be just a guideline. 

To generate a monitor with the necessary components, just follow the standard MONGEN procedure described here, with some differences. This is the section with the most important changes. The non-default responses are in red.

Disk sets (ALL) :
Configure non-autoconfigured hardware (NO,YES) : YES
Number of RX211s (0,0-2) : 0
Number of KMC/DUP Lines (0,0-2) : 1
Type of line for KDP0 (ANF10,DECNET,USER,IBM) : DECNET
Number of DMR11 Lines (0,0-8) : 0
Number of PTYs (20,1-476) :

Network software (YES,NO) : YES
Node name : BTES11
Number of remote TTYs (456,0-456) : 16

ANF-10 software (YES,NO) : YES
  Node name (BTES11) :
  Node number of central site (1,1-77) : 11
  Remote terminals (YES,NO) :
  Virtual terminals (YES,NO) :
  Remote card readers (YES,NO) :
  Remote line printers (YES,NO) :
  Remote paper tape punches (NO,YES) :
  Remote paper tape readers (NO,YES) :
  Remote plotters (NO,YES) :
  Remote DN8x DDCMP devices (YES,NO) : no
  Remote data entry terminals (YES,NO) :
  Remote task-to-task (YES,NO) :
  Number of connects (256,1-512) : 16

DECnet software (YES,NO) : YES
  Node name (BTES11) :
  Area number of central site (1,1-63) : 7
  Node number of central site (1,1-1023) : 911
  Transmit password (DECNET20) :
  Remote terminals (YES,NO) :

Decimal "symbol,value"    

It is very important to not take the default to the "Number of remote TTYs" and "Number of connects" questions. If you take the default the resulting monitor will not fit in the KS-10 memory space and it will not boot. Use your own node name and address. By the way, you must configure ANF10, or else the link step will fail with undefined symbols. It is also important to set up the machine as a ROUTING node; NONROUTING works only for ethernet connected nodes.

I use the following MIC file to automate the compilation and linking of the monitor:

. compile/compile f,s        
. compile/compile devprm,netprm,d36par        
. compile/compile syscnf+<common,comdev,commod>        

. r link newsys/save/noinitial/hash:13k = /locals -        common,comdev,commod,tops10[10,7,mon,ks]/search-
. r pip        

This procedure leaves the new monitor at NEW:NEWSYS.EXE, so it can be booted answering [1,5]NEWSYS to the BOOT> prompt.

Configuring DECNET-10

The monitor will start up the required components (NML, MX) automatically, but you have to add the commands to start up the circuit and the FAL listener to SYS:SYSTEM.CMD:

START FAL-STREAM 1                   

And while you are in it, make sure you have got also the following line:


This one should go just before the NCP line shown above. This configuration allows for two simultaneous FAL operations (that is, you will be able to access your TOPS-10 files from two DECNET nodes at the same time). You can add more FAL streams, or leave just one, as you wish.

Booting the new monitor and testing the network

Now you can boot your newly created monitor. First shut down the system using SET KSYS NOW at the OPR> prompt, then stop the simulator using CTRL-E and boot it again.

sim> b rp
BOOT V4(76)

[Loading from DSKB:NEWSYS.EXE[1,5]]

BTES11 30-Jan-14
Why reload: new
Startup option: go
[Rebuilding the system search list from the HOM blocks]

[Rebuilding the active swapping list from the HOM blocks]

[Rebuilding the system dump list from the HOM blocks]

BTES11 15:05:25 CTY system 4096                           

Hopefully the machine will boot up and you will get the OPR> prompt. Now you can use NCP commands to check the network status (this is the result in my "production" machine):

OPR>enter ncp
NCP>show exec char
14:07:10        NCP

Request # 3; Show Executor Node Characteristics Completed

Executor Node = 7.80 (BITXT1)

  Identification = DECnet-10 Version 4.0
  Management Version = 4.0.0
  Loop Count = 1
  Loop Length = 127
  Loop With = Mixed
  Incoming Timer = 30
  Outgoing Timer = 60
  NSP Version = 4.0.0
  Maximum Links = 65535
  Delay Factor = 48
  Delay Weight = 10
  Inactivity Timer = 120
  Retransmit Factor = 10
  Routing Version = 2.0.0
  Type = Routing IV
  Routing Timer = 600
  Broadcast Routing Timer = 40
  Maximum Address = 1023
  Maximum Circuits = 20
  Maximum Cost = 100
  Maximum Hops = 16
  Maximum Visits = 20
  Maximum Broadcast Nonrouters = 64
  Maximum Broadcast Routers = 32
  Maximum Buffers = 80
  Buffer Size = 576
  Segment Buffer Size = 576
NCP>show known circuits
14:07:27        NCP

Request # 4; Show Known Circuits Summary Completed

Circuit     State                  Loopback    Adjacent
                                     Name        Node
KDP-0-0     On                                 7.61 (BITXOO)              

If the wiring of the KDP/DUP and the DMC interfaces is right and the VAX has the corresponding circuit (DMC-0) defined and up , you should get an adjacency up in your VAX machine (configured as router) and your network will be up and running:

[ANF10 network: connected to BITXT1(10), located at BITXT1(10), 1 node]
Node    BITXT1  (10)    BITXT1  24-Jan-14

[DECnet network: local node BITXT1, 12 reachable nodes in area 7]
BITXT1  MBSERV          

.r nft

*dir bitxov::
Total of 9 files            

The performance is good enough for SET HOST, but it is a bit slow for file transfers. You can get "Insufficient resources at remote node" trying to pull files from a VMS node. I have been poking around to fix that, but the lack of knowledge and available documentation has stopped me from progressing on that. The error seems to appear randomly, so it is not a big problem anyway.

And that is all! If you try to do this recipe and come into trouble, feel free to drop a comment and I will do my best to help you to fix it.

No comments:

Post a Comment