Dnet2 UserGuide
Dnet2 UserGuide
Network
Project: Dnet2
Product OSK / AK
Synopsis: Principals of Dnet2. How to configure Dnet2.
Kongsberg Maritime AS
Kongsberg Maritime AS
Table of contents
1 ABOUT THIS DOCUMENT ..................................................................................4
1.1 Document history ...................................................................................................4
1.2 References ..............................................................................................................4
1.3 Definitions / Abbreviations ....................................................................................4
2 INTRODUCTION....................................................................................................5
2.1 Purpose ...................................................................................................................5
2.2 INSTALLATION ON WINDOWS .......................................................................6
2.3 OskConfigure .........................................................................................................6
2.4 Manual trouble shooting on Windows....................................................................7
4 CONFIGURATION: ............................................................................................... 8
4.1 ON Windows ..........................................................................................................8
4.2 ON SBC ..................................................................................................................9
5 REFERENCE .........................................................................................................10
5.1 Dnet2Loader .........................................................................................................10
5.1.1 Command line parameters ........................................................................ 10
5.1.2 Usage ........................................................................................................ 10
5.1.3 Dnserv integration .................................................................................... 11
5.1.4 Dnet2 only between XP OS‟es on, example from AIM ........................... 11
5.1.5 Statistics .................................................................................................... 11
5.1.6 Compatibility with Dnet applications. ...................................................... 11
5.1.7 Example on a mixed configuration ........................................................... 12
5.2 API to Dnet statistics and management ................................................................ 14
5.3 Compability ..........................................................................................................15
5.3.1 API‟s ......................................................................................................... 15
/ / Page 2 of 17
Kongsberg Maritime AS
/ / Page 3 of 17
Kongsberg Maritime AS
A First Issue
1.2 References
No Doc No Description
/ / Page 4 of 17
Kongsberg Maritime AS
2 INTRODUCTION
DNET 2
Host
172.21.x.x
IP net A
172.23.x.x
IP net AB
IP net B
172.22.x.x
Dnet2 is implemented as a virtual network adapter; the real adapters may still be used.
2.1 Purpose
Sample:
/ / Page 5 of 17
Kongsberg Maritime AS
The addresses used is according to our standard, but can be changed via configuration.
See KM Bookshelf IP addresses and port-number conventions, 1002320.doc.
2.3 OskConfigure
First time, the virtual adapter is installed, and two warning dialogue may occur.
/ / Page 6 of 17
Kongsberg Maritime AS
======== D n e t 2 I n s t a l l ============
Install Dnet2 system from :.xxx
AkUtils
0 = Show install Information
1 = Install DNE
2 = Install Virtuall adapter
3 = Install Dnet2 driver
4 = UnInstall DNE
5 = UnInstall Virtuall adapter
6 = UnInstall Dnet2 driver
/ / Page 7 of 17
Kongsberg Maritime AS
3 INSTALLATION ON SBC
Dnet2 is included in the AK release (xx.xx.xx) and newer, no additional installation is
needed.
4 CONFIGURATION:
The usage of Dnet2 features is controlled by :T154 in the bootp. This defines the IP
network address used for the AB interface.
dnet:\
:hn:\
:sm=255.255.0.0:\
:T150=ac.15.00.00:\
:T151=ac.16.00.00:
:T154=ac.17.00.00:\
:T152=e6.15.00.00:\
:T153=e6.16.00.00
4.1 ON Windows
The driver is loaded and started by dnserv (when T154 exist), and left running after
dnserv exits.
AB net will therefore not be operating before the application is started, but is operating
after the application is terminated.
/ / Page 8 of 17
Kongsberg Maritime AS
If the AB net must be operating immediately, the following must be inserted into
registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\
REG_SZ Dnet2= "C:\Program Files\Common Files\Deterministic
Networks\Dnet2\bin\Dnet2Loader.exe" -hide
4.2 ON SBC
The driver starts automatically (when T154 exist), and remain active.
/ / Page 9 of 17
Kongsberg Maritime AS
5 REFERENCE
5.1 Dnet2Loader
The main purpose for the net2Loader is to configure and start the Dnet2Driver on
windows. In addition it has features to show statistics from the Dnet2.
The first instance loaded, will spawn a service thread necessary to serve remote statistic
requests.
When Dnet2loader terminates, the Dnet2Driver is left running. It can be stopped
manually with “net stop dn2aknet” in a cmd window for example to upgrade to new
version.
NB: The corresponding” net start dn2aknet” will not start the driver correct, the
Dnet2Loader.exe must be used.
5.1.2 Usage
The normal usage is to launch the first instance with –hide, this will then configure and
start the driver in addition to host the service thread.. If statistics is needed, launch
another instance and use the statistics dialogue.
/ / Page 10 of 17
Kongsberg Maritime AS
By stopping the dnet2loader process, the actual driver will remain loaded and active.
This mean that the Dnet2 address (172.23.x.x) will work, but remote statistics requests
will not be served.
5.1.5 Statistics
When T154 exists in bootp, dnserv will include the Dnet2 statistics in the counters for
lost messages.
Multicasts which shall be used on Dnet machines (including SBC 400) must be in the
range defined by :T152 in bootp (old range)
Dnet machines must always be addressed with A addresses (defined by :T150)
The application on Dnet2 machines must accept both A and AB address as form
address.
/ / Page 11 of 17
Kongsberg Maritime AS
# Individual entries
PCU3a:ht=ethernet:ha=02414c421403:ip=172.21.140.3:bf=/Bin/Ps/rcu500_std.str:tc=network.c
onfig
PCU3b:ht=ethernet:ha=02414c422403:ip=172.22.140.3:bf=/Bin/Ps/rcu500_std.str:tc=network.c
onfig
PCU4a:ht=ethernet:ha=02414c421404:ip=172.21.140.4:bf=/Bin/Ps/rcu500_std.str:tc=network.c
onfig
PCU4b:ht=ethernet:ha=02414c422404:ip=172.22.140.4:bf=/Bin/Ps/rcu500_std.str:tc=network.c
onfig
PCU5a:ht=ethernet:ha=02414c421405:ip=172.21.140.5:bf=/Bin/Ps/rcu500_std.str:tc=network.c
onfig
PCU5b:ht=ethernet:ha=02414c422405:ip=172.22.140.5:bf=/Bin/Ps/rcu500_std.str:tc=network.c
onfig
PCU6a:ht=ethernet:ha=02414c421406:ip=172.21.140.6:bf=/Bin/Ps/rcu500_std.str:tc=network.c
onfig
PCU6b:ht=ethernet:ha=02414c422406:ip=172.22.140.6:bf=/Bin/Ps/rcu500_std.str:tc=network.c
onfig
PCU7a:ht=ethernet:ha=02414c421407:ip=172.21.140.7:bf=/Bin/Ps/rcu400h_std.str:tc=network.
config
PCU7b:ht=ethernet:ha=02414c422407:ip=172.22.140.7:bf=/Bin/Ps/rcu400h_std.str:tc=network.
config
PCU10a:ht=ethernet:ha=02414c42140a:ip=172.21.140.10:bf=/Bin/Ps/rcu400h_std.str:tc=networ
k.config
PCU10b:ht=ethernet:ha=02414c42240a:ip=172.22.140.10:bf=/Bin/Ps/rcu400h_std.str:tc=networ
k.config
#-------------------------------------------------------------------------
# IP Host # MessPort WaitPort PsPsComPort IoPort
#-------------------------------------------------------------------------
172.23.101.1 OS001 # 10100 11100 12100 13100 # OS001
172.23.101.1 DS001 # 10200 11200 12200 13200 # DS001
172.23.101.2 OS002 # 10100 11100 12100 13100 # Main-DP SdpOS
SDP-OS2 101
172.23.101.2 DS002 # 10200 11200 12200 13200 #
172.21.1.1 PS001 # 10500 11500 12500 13500 # Main-DP A Controller
DpPs01 500
172.21.1.2 PS002 # 10500 11500 12500 13500 # Main-DP A IO1
DpPs02 501
172.21.1.11 PS011 # 10500 11500 12500 13500 # Main-DP B Controller
DpPs11 510
172.21.1.12 PS012 # 10500 11500 12500 13500 # Main-DP B IO1
DpPs12 511
172.21.101.2 PS017 # 10517 11517 12517 13517 # Main-DP A Simulator
DpPs17 516 WinPS@OS001
172.21.101.2 PS018 # 10518 11518 12518 13518 # Main-DP A VRM
DpPs18 517 WinPS@OS001
/ / Page 12 of 17
Kongsberg Maritime AS
/ / Page 13 of 17
Kongsberg Maritime AS
/* -----------------------------------------------------------------------------
* Dn2_StartDriver - Start the driver.
*
* RETURNS: ERROR_SUCCESS (0) if OK, or other error values defined in
<WinError.h>
*/
ULONG Dn2_StartDriver()
/* -----------------------------------------------------------------------------
* Dn2_Dn2_StopDriver- Stop the driver.
*
*
* RETURNS: ERROR_SUCCESS (0) if OK, or other error values defined in
<WinError.h>
*/
ULONG Dn2_StopDriver()
/* -----------------------------------------------------------------------------
* Dn2_IsDriverStarted - determines if driver is started
*
*
* RETURNS: 1 if started, or 0 if not. Other errors can be obtained by GetLastError();
*/
ULONG Dn2_IsDriverStarted()
/* -----------------------------------------------------------------------------
* Dn2_SetDriverConfig - Sets the driver configuration.
/ / Page 14 of 17
Kongsberg Maritime AS
* Parameters, IpA, IpB, IpAB Host order IP address for real adapters (A+B) and
virtual (AB)
* NetMask Host order network mask.
* RETURNS: ERROR_SUCCESS (0) if OK, or other error values defined in
<WinError.h>
*/
ULONG Dn2_SetDriverConfig(ULONG IpA,ULONG IpB,ULONG IpAB, ULONG
NetMask)
/* -----------------------------------------------------------------------------
* Dn2_GetNetStat - Retrieve the communication hosts and the absolute traffic counters.
*
* RETURNS: ERROR_SUCCESS (0) if OK, or other error values defined in
<WinError.h>
*/
ULONG Dn2_GetNetStat(HANDLE hDn2,
} DN2_STATISTICS_ENTRY, *PD2_STATISTICS_ENTRY;
5.3 Compability
5.3.1 API’s
Some API‟s are not 100% as they was when dnet2 is enabled.
dnetSend()
- If the address to send to is a net A address/broadcast dnetSend() works as it
always has.
/ / Page 15 of 17
Kongsberg Maritime AS
To maintain compability with mixed dnet and dnet2 deliveries, the dnet and timesync
servers broadcast their messages on the net A and net B internet addresses.
/ / Page 16 of 17
Kongsberg Maritime AS
A requirement for the dnet2 project has been to not introduce these new methods on
SBC400, SBC400H and RCY400H. However because of the way “AIM net” uses
“host” files in a client-server interaction to obtain a stations internet address and the
logistic methods for handling different “host” files in one delivery we have found it
useful for the “old” computers to be aware of the new introduced net AB internet
address.
If a net AB internet address is defined (T154 bootp server) the following routines works
this way:
gethostip()
- Returns net A internet address even if T154 is defined by the BOOTP server.
dnetSend():
- Sending network messages, unicast or broadcast to a net A internet address
works as before.
- Sending multicast messages to a dnet multicast address (BOOTP T152)
works as before.
- Sending network messages to a net AB, unicast or broadcast internet address
will result in a “standard” dnet message on net A and net B. The destination
address in the message is changed from net AB to first net A and then net B
by the dnetSend() API.
- Sending multicast messages to an address not defined by the dnet setup in
the BOOTP server works as before, it fails with “network unreachable”.
dnetRecv():
- Massages with “old” dnet type addresses will be received as before.
- Messages designated for a net AB address will not be received (As before).
/ / Page 17 of 17