Operating System - OpenVMS
1829420 Members
2806 Online
109991 Solutions
New Discussion

Scripted TCPIP confguration

 
SOLVED
Go to solution
Brian Reiter
Valued Contributor

Scripted TCPIP confguration

Hi Folks,

I'm in the position of having to maintain a number of standalone OpenVMS systems (7-3-2 FWIW) which are in various locations round the UK. Normally the systems are configured from scratch (the FIS) prior to delivery.

In the past a number of mistakes have been made WRT to the setup of TCPIP (services not enabled mainly). Is there a way of scripting the TCPIP setup so that all the correct accounts are created without any intervention?

This can be added to a command script which configures the machines prior to installation.



Hope that makes some kind of sense.


Regards

Brian
11 REPLIES 11
Bart Zorn_1
Trusted Contributor

Re: Scripted TCPIP confguration

Hello Brian,

Well, you can configure TCPIP with TCPIP$CONFIG.COM *AND* TCPIP$CONFIG.COM is written in DCL, so one should be able to write a non-interactive DCL procedure to configure TCPIP.

However, because of the usual low quality of the TCPIP DCL code, and the fact that only the DCL-diet'ed version of TCPIP$CONFIG.COM is available, this is not an easy task.

One problem is, TCPIP$CONFIG.COM uses several undocumented subcommands of the TCPIP utility, such as GENERATE and CHECK.

I have scripted the interface and the routing configuration for our systems, but not anything else, yet.

This is done by two DCL procedures. The first defines logical names and populates the permanent database with at least one interface and a default route. This procedure is run before TCPIP$STARTUP.COM is executed (I do it from SYLOGICALS.COM).

The second procedure defines all the interfaces and their aliases. It also redefines the default route, because sometimes you lose the current default if you reconfigure interfaces. This procedure is invoked from TCPIP$SYSTARTUP.COM.

I may implement more of the configuration in this way, when the need arises and time permits...

Let me know if you want more info!

Regards,

Bart Zorn
John Abbott_2
Esteemed Contributor

Re: Scripted TCPIP confguration

Hi Brian,

You could create a command file and submit into batch as follows (as an example of enabling NTP server component)

$@TCPIP$CONFIG
3
12
2

E
E
$EXIT

This is _NOT_ ideal especially if you patch/change TCPIP versions regulary and I wouldn't recommend it for core config, client and server options *might* be ok

Usable if there's a static set of services to enable and noone has made any changes manually beforehand (as the numbers selective above would often perform the opposite function!).

J.
Don't do what Donny Dont does
Brian Reiter
Valued Contributor

Re: Scripted TCPIP confguration

Hi Bart,

I was wondering about the GENERATE and CHECK commands, will have a play with them and see what happens. Do you have any further info on them? Actually any info would be appreciated :)

John,

I considered doing it like that, it all fell over in a mess at some stages so was discounted.

cheers

Brian
Robert Gezelter
Honored Contributor

Re: Scripted TCPIP confguration

Brian,

Before you go deeply into faking the inputs to TCPIP$CONFIG, please check "under the hood" to see what is actually done.

Often in the past, when I have had to do similar things, it has been clear from a detailed examination what actual steps are being done by the configurator. In that case, it is straightforward to implement a DCL command procedure (aka "script") that issues the same commands. It is not necessary to follow the Q&A of the configurator directly (and far safer).

If I have been unclear, or can be of further assistance, please let me know!

- Bob Gezelter, http://www.rlgsc.com
Bart Zorn_1
Trusted Contributor

Re: Scripted TCPIP confguration

There is not much I do know for sure.

TCPIP GENERATE DOMAIN creates the logical names TCPIP$INET_HOST and TCPIP$INET_DOMAIN. This command is also used in TCPIP$STARTUP.COM. I do not know if it does anything else, though!

If you find out interesting things, please let us know!

Bart
Brian Reiter
Valued Contributor

Re: Scripted TCPIP confguration

Hi Robert,

I've already discounted faking the input to TCPIP$CONFIG so will do the same via a sequence of TCPIP commands.

I was just wondering if anyone had done someting similar previously.

cheers

Brian
Brian Reiter
Valued Contributor

Re: Scripted TCPIP confguration

FWIW

$TCPIP CHECK MASK_ADDRESS xxxxx
$TCPIP CHECK HOST_ADDRESS xxxxx

Mask_address validates the network mask, host_address validates the host. Both are dotted quad values and return 1 in $status if valid.

The generate option is more complex, having at least:

controller
host
service
domain

Haven't tried these as yet.

Colin Butcher
Esteemed Contributor

Re: Scripted TCPIP confguration

Hello brian,

I've done something similar myself, for all of VMS, DECnet etc., plus TCPIP. I was trying to solve exactly this problem for a system with relativey unskilled (in VMS terms) on-site labour doing the systems maangement by following a written process.

The fun with TCPIP is that TCPIP$CONFIG also creates accounts as well as configures the various components.

It's not easy to reproduce all of that outside TCPIP$CONFIG with your own code.

If you read the DCL then you'll find that they made a start at it, but figuring it out from the as shipped TCPIP$CONFIG is difficult.

One plan might be to let TCPIP$STARTUP run anyway and accept the default config with DHCP client, then apply your own config / datafiles afterwards on a per subsystem basis.

Another way might be to create the accounts and provide the databases or create them with all the TCPIP commands.

It also varioes depending which architecture and which version you're having to work with.

It took me quite some time (weeks) to figure it out and even then the result is OK, not perfect.

I have had discussions with TCPIP Engineering about this before, so I'll ask then again.

If you can, try to get to the Symposium (bootcamp): http://h71000.www7.hp.com/symposium/index.html?jumpid=symposium

Cheers, Colin (http://www.xdelta.co.uk).
Entia non sunt multiplicanda praeter necessitatem (Occam's razor).
Brian Reiter
Valued Contributor

Re: Scripted TCPIP confguration

Hi Colin,

I'm going to end up going the DCL route and creating accounts etc. So it could be interesting.

Sadly I can't even get the company to splash out for OpenVMS training for staff new to the systems. No chance of getting a trip abroad out of them :)

cheers

Brian
Bart Zorn_1
Trusted Contributor
Solution

Re: Scripted TCPIP confguration

I have now tried to script the DNS resolver information.

First I do TCPIP SET CONF NONAME and then I use TCPIP SET CONF NAME commands to set it up. Not directly rocket science.

But... it appears that you need to have a license loaded to be able to do that! This was a surprise, because you don't need a license for TCPIP SET CONF INT and for TCPIP SET ROUTE/PERM !

I could not call the first part of my setup (see my previous message) from SYLOGICALS anymore, because at that stage there are no license loaded yet.

In stead, I called the procedure using SYSMAN STARTUP in the CONFIG phase. I know, that is not recommended, but it seems to me that that phase is precisely for doing thing like this!

Regards,

Bart
Andreas Vollmer
Valued Contributor

Re: Scripted TCPIP confguration

Hello Brian,

Welcome in the club.
I asked end of 2003 the forum for help in order to do an unattended TCPIP setup and configuration.
Due to the complexity I was only partly successful - similar as Colin.
So far I was not able to find out how to setup the required services automatically.
I appreciate your feedback with your findings and your solution.
Manyt thanks
Andreas

PS: the attached ZIP-Archive is WinZIP but contains DCL scripts (ASCII).
OpenVMS Forever!