Throughout this cookbook I will use my values for pathes, names
addresses and the like.
| Warning: |
You are requested to check wether they are applicable to your system
- and if not -
to change them accordingly. The risks of using these informations remain
at you, there is no warranty from my side. Configuration of the other
'regular' TCP/IP options on the mainframe OS are not included. So, you're
on your own for defining DNS servers, FTP Services and all other specific
uses of the OS. This document is only meant to get the TCP/IP stack in
your µmainframe OS talking to Linux (and the outside world).
|
For the following examples I assume you are logged on as a normal user:
OPERATOR. He is my
favorite for mainframe related tasks. And you need to be able to do
su root
during the installation. You should also be familiar with
routing
and
IP forwarding.
To clarify things keep the following schema at hand to see which part you
are dealing with. Each
Hercules/VMnet
has it's
own
network and therefore it's own network address. From a functional point of
view these connections are comparable to those to your ISP. All data must
be routed between your existing network and the
SLIP
connections, i.e. your kernel must be prepared to route and to forward ip
packets. Please make sure that in your initialization the following is set
(if unsure include it in your
boot.local)
echo 1 > /proc/sys/net/ipv4/ip_forward
but most modern distributions set it per default,
S.u.S.E.
has the variable
IP_FORWARD
in
/etc/rc.config,
simply set it to
IP_FORWARD="yes".
In case of a
RedHat Linux,
the above setting can be found in one line of
/etc/sysctl.conf
(net.ipv4.ip_forward=1).
192.168.4.18/30 means the
same as
192.168.4.18 with netmask
255.255.255.252, it is
simply the classless notation.
+-- Linux - basis.gfk-shw.de ----------------------------------------------------------------------------+
| |
| +-- Hercules ------------------+ +-- Hercules ------------------+ +-- Hercules ---------------------+ |
| | | | | | | |
| | +-- VSE - vse.gfk-shw.de -+ | | +-- VM - vm.gfk-shw.de ---+ | | +-- OS/390 - os.gfk-shw.de -+ | |
| | | | | | | | | | | | | |
| | | 192.168.4.18/30 | | | | 192.168.4.22/30 | | | | 192.168.4.26/30 | | |
| | +---###-------------------+ | | +---###-------------------+ | | +---###---------------------+ | |
| | CTCA 00A0/00A1 (VSE.cnf) | | CTCA 00A0/00A1 (VM.cnf) | | CTCA 0E20/0E21 (OS390.cnf) | |
| +------###---------------------+ +------###---------------------+ +------###------------------------+ |
| VMnet VMnet VMnet |
| ### ### ### |
| 192.168.4.17/30 192.168.4.21/30 192.168.4.25/30 |
| sl0 (loc.ip) P-t-P (rem.ip) sl1 (loc.ip) P-t-P (rem.ip) sl2 (loc.ip) P-t-P (rem.ip) |
| |
| - K - E - R - N - E - L - |
| |
| 192.168.4.65/26 192.168.4.129/26 192.168.4.9/30 192.168.4.13/30 |
| eth0 eth1 ippp0 (loc.ip) P-t-P (rem.ip) ippp1 (loc.ip) P-t-P (rem.ip) |
+---###---------------###----------------###-----------------------------###-----------------------------+
100Mb/s 10Mb/s ISDN to ISP #1 ISDN to ISP #2
### ### ### ###
### ### ### ###
### 192.168.4.139/26 192.168.4.10/30 192.168.4.14/30
###
###
###
###
+-- Linux - laptop100.gfk-shw.de -----------------------------------------------------------------+
| eth0 |
| 192.168.4.84/26 |
| |
| root@axel: /root #;(RC=0) x3270 -model 3279-4 -port 3270 -sb -sl 96 -tn IBM-3279 vse & |
| -or- |
| root@axel: /root #;(RC=0) x3270 -model 3279-4 -port 3270 -sb -sl 96 -tn IBM-3279 192.168.4.18 & |
| |
+-------------------------------------------------------------------------------------------------+ |
Schema 1: How all the parts are related on my machine(s)
You will need one more piece of software to be able to talk from your network or local
Linux
to your mainframe os. It is a small tool creating a
SLIP
connection on the host system, talking over a pseudo-tty and stdin/stdout the
SLIP
protocol. You can download
VMnet,
written by
Willem Konynenberg,
from
ftp.xos.nl/pub/linux/vmnet/.
After the download you are ready to unpack it:
- cd /usr/local/src
- tar -xvzf /home/inst.disk/vmnet-#.#.tar.gz
Assuming that you already downloaded and installed
Hercules
we need now to think about our later or perhaps already existing network.
| Hint: |
With the change from version 0.3 to 0.4 VMnet allows to use dynamic ip
addresses (reads them from his config file). If you need to deploy 0.3 you
will need some more hints. Contact me for Version 1.1
of this document.
|
If all fits your needs (see the
README)
you're done and can proceed with
- cd /usr/local/src/vmnet-#.#
- su root
- make
- make install
to install your VMnet into
/usr/local/bin/.
Note that vmnet needs to be setuid root, so you really need to install as
root. Without root privileges, it can't start SLIP (
make install
does all the necessary steps for you).
| Hint: |
I decided to use multiple subnets with a non-standard subnet mask for my
µmainframe(s). So I adapted VMnet to read netmask and MTU from the
config file too. If you need the adapted version 0.4, please drop me a
note.
|
Using different addresses has the advantage that you can put them in your
DNS
or
/etc/hosts
and later refer to names instead of addresses; you can comfortably
ping
your machines to check their connectivity:
ping vse
is more familiar than
ping 192.168.4.18,
isn't it? It is also shorter and less error prone.
...
# -- µmainframe --
192.168.0.1 gw-2s390 # VMnet 0.3 default
192.168.0.2 s390
# -- -- VMnet-0.4-shw, one subnet per os --
192.168.4.16 svse # subnet for VSE
192.168.4.17 gw-2vse # def-gw for vse
192.168.4.18 vse # cnslport 3271
192.168.4.20 svm # subnet for VM
192.168.4.21 gw-2vm # def-gw for vm
192.168.4.22 vm # cnslport 3272
192.168.4.24 sos390 # subnet for OS/390
192.168.4.25 gw-2os390 # def-gw for os390
192.168.4.26 os390 # cnslport 3273
192.168.4.28 ss390 # subnet for S390 (standalone)
192.168.4.29 gw-2s390 # default gateway
192.168.4.30 s390 # cnslport 3270
... |
Figure 1: Parts of /etc/hosts
The next thing to do is creating a little shell script to follow VMnet's
activities. If you have no need for it your system's
true
command will be suffificient in the following
vmnet.conf.
I suggest to put it into
/usr/local/bin/
(to have it in your
${PATH}
for immediate access). I guess your output will go to
/var/log/messages
which is the default nowadays.
#!/bin/sh
# -- /usr/local/bin/vmnet.diag, 28.10.2000 shw --
case ${2} in
192.168.4.18)
_os="VSE/ESA"
;;
192.168.4.22)
_os="VM/ESA"
;;
192.168.4.26)
_os="OS/390"
;;
192.168.4.30|192.168.0.2)
_os="S/390, standalone"
;;
*)
_os="** unknown system **"
;;
esac
logger -p user.info -t ${0##*/}[${$}] "cmd=${1} rem(${_os})=${2} loc(LINUX)=${3}"
exit 0
# -- end of vmnet.diag -- |
Figure 2: /usr/local/bin/vmnet.diag
Now we need to permit access to our slip interfaces
sl0
and following
(sl1
through
sl3)
for each user who will start Hercules and therefore starts
VMnet and accesses them. Remember: If you don't need a log you can simply
use
/bin/true
instead of
/usr/local/bin/vmnet.diag.
The configuration file's name and location must be
/etc/vmnet.conf.
#
# -- /etc/vmnet.conf, 28.10.2000 shw --
#
# usr host ip linux ip netmask mtu exec on start/stop (full qual.)
# ------ --------------- --------------- --------------- ---- -------------------------------
# VSE
OPERATOR 192.168.4.18 192.168.4.17 255.255.255.252 1500 /usr/local/bin/vmnet.diag
# VM
OPERATOR 192.168.4.22 192.168.4.21 255.255.255.252 1500 /usr/local/bin/vmnet.diag
# OS390
OPERATOR 192.168.4.26 192.168.4.25 255.255.255.252 1500 /usr/local/bin/vmnet.diag
# S390 (standalone)
OPERATOR 192.168.4.30 192.168.4.29 255.255.255.252 1500 /usr/local/bin/vmnet.diag
schwarx 192.168.4.30 192.168.4.29 255.255.255.252 1500 /usr/local/bin/vmnet.diag
developr 192.168.4.30 192.168.4.29 255.255.255.252 1500 /usr/local/bin/vmnet.diag
OPERATOR 192.168.0.2 192.168.0.1 255.255.255.252 1500 /usr/local/bin/vmnet.diag
# -- end of vmnet.conf -- |
Figure 3: /etc/vmnet.conf (Version 0.4, adapted)
To put the new slip interfaces into action someone must use them. This
magic guy will be Hercules and he needs some information how to manage
the new device
3088
which always comes in
pairs.
Mainframe TCP/IP always uses one
CUU
to read (normally the first one) and one
CUU
to write data. The result is you have to supply two addresses and
to relate them to each other, crosswise. Always use a full qualified name
for your VMnet like
/usr/local/bin/vmnet
or Hercules will crash silently and immediately. In the following
figure parts of my
*.cnfs
are shown:
# -- standalone/utilities: s390.cnf --
...
#--- ---- -- CTCA connection to outer world (slip, p-t-p) - 192.168.0.1 --
00A0 3088 00A1 192.168.0.2 /usr/local/bin/vmnet
00A1 3088 00A0 192.168.0.2 /usr/local/bin/vmnet
# -- VSE.cnf --
...
#--- ---- -- CTCA connection to outer world (slip, p-t-p) - 192.168.4.17 -
00A0 3088 00A1 192.168.4.18 /usr/local/bin/vmnet
00A1 3088 00A0 192.168.4.18 /usr/local/bin/vmnet
# -- VM.cnf --
...
#--- ---- -- CTCA connection to outer world (slip, p-t-p) - 192.168.4.21 -
00A0 3088 00A1 192.168.4.22 /usr/local/bin/vmnet
00A1 3088 00A0 192.168.4.22 /usr/local/bin/vmnet
# -- OS390.cnf --
...
#--- ---- -- CTCA connection to outer world (slip, p-t-p) - 192.168.4.25 -
0E20 3088 0E21 192.168.4.26 /usr/local/bin/vmnet
0E21 3088 0E20 192.168.4.26 /usr/local/bin/vmnet
... |
Figure 4: /usr/local/s390/*.cnf
Everything should be prepared now to fire up your µmainframe(s) with
your preferred operating system. It is very important to set the
MIH
time value (MissingInteruptHandler) for network connections to zero.
After starting Hercules with the appropriate configuration, you should
have a look after your new SLIP interface with
ifconfig -a.
The expected result from our above examples would be
(sl#/ip addresses
vary due to the starting sequence):
...
root@basis: /s390 #;(RC=0) ifconfig -a
...
sl0 Link encap:Serial Line IP
inet addr:192.168.4.17 P-t-P:192.168.4.18 Mask:255.255.255.252
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
...
root@basis: /s390 #;(RC=0) ping -c 3 gw-2vse
PING gw-2vse.gfk-shw.de (192.168.4.17): 56 data bytes
64 bytes from 192.168.4.17: icmp_seq=0 ttl=255 time=0.250 ms
64 bytes from 192.168.4.17: icmp_seq=1 ttl=255 time=0.103 ms
64 bytes from 192.168.4.17: icmp_seq=2 ttl=255 time=0.110 ms
--- basis.gfk-shw.de ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.103/0.154/0.250 ms
...
root@basis: /s390 #;(RC=0) ping -c 3 vse
PING vse.gfk-shw.de (192.168.4.18): 56 data bytes
64 bytes from 192.168.4.18: icmp_seq=0 ttl=255 time=0.216 ms
64 bytes from 192.168.4.18: icmp_seq=1 ttl=255 time=0.111 ms
64 bytes from 192.168.4.18: icmp_seq=2 ttl=255 time=0.115 ms
--- basis.gfk-shw.de ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.111/0.147/0.216 ms
...
root@basis: /s390 #;(RC=0) ps -ef | grep [v]mnet
13884 pts/5 S 0:00 /usr/local/bin/vmnet
... |
Figure 5: Controlling VMnet after starting with vse.cnf
Under VSE you need to adapt your
IPL.PROC,
and the TCP/IP for VSE
INIT.L.
These files can be located under
ICCF
or in your JCL manager but you can also maintain them as text decks under
Linux and put them on the reader:
- Hercules' console:
devinit 000c rdr/tcpip/<job.txt> ascii eof trunc
- VSE's console:
s rdr,00c,a
I haven't found a place to set the MIH time value, as far as I know VTAM
is the only one under VSE who uses such a value.
You see all necessary entries for using VSE/IP with a DNS located on the
Linux box.
=== ICCF, Lib 10: IPL.PROC ===
...
ADD 0A0:0A1,CTCA,EML 3088, CTCA support via SLIP/vmnet
...
=== Quota, Lib E: TCPINIT ===
...
* -- VSETE22 (Hercules) --
*
SET IPADDR = 192.168.4.18
SET MASK = 255.255.255.252
SET GATEWAY = OFF
SET DNS1 = 192.168.4.17
SET DEFAULT_DOMAIN = gfk-shw.de
...
* -- COMMUNICATION LINK: CTCA'S 0A0/0A1 --
*
DEFINE LINK,ID=VSEL_CTC0,TYPE=CTCA,DEV=(0A0,0A1),MTU=1500
*
*
* -- ROUTING INFORMATION --
*
DEFINE ROUTE,ID=VSER_NET,LINKID=VSEL_CTC0,IPADDR=192.168.4.16
DEFINE ROUTE,ID=VSER_DEF,LINKID=VSEL_CTC0,IPADDR=0.0.0.0, -
GATEWAY=192.168.4.17
... |
Figure 6: VSE configuration members
At the console do:
- msg tcp/ip partition
- partition id ping vse
- partition id ping gw-2vse
- partition id
Now you should see five pings for each address (don't be impatient, it's
slower than usual) with a success message.
At the time of this writing (23.12.2000) the CTCAs do not work under VM.
This is due to problems in subchannel processing. But nevertheless you can
prepare your system.
The Operator's
PROFILE EXEC,
MAINT's
USER DIRECT
and TCPMAINT's
PROFILE TCPIP,
HOSTS LOCAL,
TCPIP DATA
must be edited. Perhaps you want to use
SYSTEM DTCPARMS
instead of
DEDICAT(E/ing)
the CTCAs in
USER DIRECT,
it is another way to configure your tcp/ip servers and there might be a
default file on TCPMAINT's 198 minidisk. If you don't use
PROFILE TCPIP
make sure you have a file called
(SYSTEM_IDENTIFIER_DEFault from SYSTEM CONFIG Z) TCPIP.
This chapter is based on suggestions of
Albert Louw.
You see all necessary entries for using VM/IP with a DNS located on the
Linux box.
=== autologged Operator: PROFILE EXEC A ===
...
'CP set mitime 00A0-00A1 off'
...
=== TCPMAINT 198 minidisk: HOSTS LOCAL ===
...
HOST : 192.168.4.65 : basis.gfk-shw.de,basis ::::
HOST : 192.168.4.21 : gw-2vm.gfk-shw.de,gw-2vm ::::
HOST : 192.168.4.22 : vm.gfk-shw.de,vm ::::
;
NET : 192.168.4.20 : svm.gfk-shw.de,svm ::::
;
GATEWAY : 192.168.4.21 : gw-2vm.gfk-shw.de,gw-2vm ::::
...
=== TCPMAINT 592 minidisk: TCPIP DATA ===
...
; ---------------------------------------------------------------------
; HOSTNAME specifies the TCP host name of this VM host. If not
; specified, the default HOSTNAME will be the node name returned
; by the CMS IDENTIFY command.
;
; For example, if this TCPIP DATA file is shared between two systems,
; OURVM and YOURVM, then the following two lines will define the
; HOSTNAME correctly on each system.
; OURVM: HOSTNAME OURVM
; YOURVM: HOSTNAME YOURVM
; ---------------------------------------------------------------------
HOSTNAME vm
...
; ---------------------------------------------------------------------
; DOMAINORIGIN specifies the domain origin that will be appended
; to host names passed to the resolver. If a host name contains
; any dots, then the DOMAINORIGIN will not be appended to the
; host name. DOMAINSEARCH will look for entries in old domain.
; ---------------------------------------------------------------------
DOMAINORIGIN gfk-shw.de
DOMAINSEARCH gfk-shw.de
...
; ---------------------------------------------------------------------
; NSINTERADDR specifies the internet address of the name server.
; LOOPBACK (14.0.0.0) is the default value (your local name server).
; If a name server will not be used, then do not code an NSINTERADDR
; statement (Comment out the NSINTERADDR line below). This will cause
; all names to be resolved via site table lookup.
; ---------------------------------------------------------------------
NSINTERADDR 192.168.4.21
...
=== TCPMAINT 198 minidisk: VM#HRC TCPIP ===
...
; ----------------------------------------------------------------------
; Network via 3088 (00A0,00A1)
; ----------------------------------------------------------------------
DEVICE VMD_CTC0 CTC 00A0
LINK VML_00 CTC 0 VMD_CTC0
; ----------------------------------------------------------------------
; the local host's network address
; ----------------------------------------------------------------------
HOME
192.168.4.22 VML_00
; ----------------------------------------------------------------------
; Routing will be done by Default Gateway
; 0.0.0.252 is a bitmask instead of the known subnetmask, 0.0.0.20 the
; value for that subnet; the bits of the standard A, B, C net are
; written as zero; hosts also have zero
; ----------------------------------------------------------------------
GATEWAY
192.168.4 = VML_00 1500 0.0.0.252 0.0.0.20
DEFAULTNET 192.168.4.21 VML_00 1500 0
; ----------------------------------------------------------------------
; Start the interface
; ----------------------------------------------------------------------
START VMD_CTC0
...
=== TCPMAINT 198 minidisk: SYSTEM DTCPARMS ===
...
.****************************************** Server Definitions
:Nick.TCPIP :Type.server :Class.stack
:Attach.00A0-00A1
...
=== or USER DIRECT for user TCPIP ===
...
* -- CTCAs --
DEDICATE 00A0 00A0
DEDICATE 00A1 00A1
... |
Figure 7: VM configuration members
In user TCPMAINT do:
- makesite should finish witout errors
- sitetest test entries from HOSTS LOCAL, leave with quit
- ping vm
- ping gw-2vm
- netstat devlist
- netstat gate
Now you should see one ping for each address (don't be impatient, it's
slower than usual) with a success message. If not give it a second
chance. On a real mainframe I found out that I need two pings after the
first start. It might also be necessary to do a first ping from VM's
tcpip after the IPL to make it work (seen on real hardware).
| Tip: |
I have heard of an installation that circumvented the subchannel problems:
ƒ install L/390 as guest
ƒ dedicate the CTCAs to L/390
make VCTCAs between L/390 and TCPIP
ƒ enable routing/ip-forwarding in L/390
ƒ adapt your adressing
|
You need to insert your CTCAs into the
HCD
and to adapt the configuration of the IP stack in:
TCPIP.PROFILE,
TCPIP.DATA
and
TCPIP.HOSTS.LOCAL.
The exact location of those files can be found in the
started procedure (STC)
for your IP stack
PROCLIB(TCPIP).
Their names also depend on the parameter
DATASETPREFIX
in data set
TCPIP.DATA.
Don't expect the TSO netstat to honour your requests for a DNS, only the
OMVS environment uses DNS. It is therefore advisable to enter your
configuration in
/etc/tcpip.profile,
/etc/tcpip.data
and
/etc/resolv.conf
too. I suggest to maintain both parts because OS/390 is not
straightforward and consistent (had problems with 2.8). MIH values are set in
PARMLIB(IECIOSxx).
This chapter is based on preparations of
Albert Louw.
=== HCD ===
Sorry, no experience yet. As far as I know simply define a "CTC" with
"offline=no" and nothing special. May I suggest RTFM at this point?
Below is what the HCD report shows for the CTCAs
...
Number,Range Type - model Parameter Feature
0E20,2 CTC OFFLINE=NO 370
...
=== TCPIP.HOSTS.LOCAL ===
...
HOST : 192.168.4.65 : basis.gfk-shw.de,basis ::::
HOST : 192.168.4.25 : gw-2os390.gfk-shw.de,gw-2os390 ::::
HOST : 192.168.4.26 : os390.gfk-shw.de,os390 ::::
;
NET : 192.168.4.24 : sos390.gfk-shw.de,sos390 ::::
;
GATEWAY : 192.168.4.25 : gw-2os390.gfk-shw.de,gw-2os390 ::::
...
=== PARMLIB(IECIOSxx) ===
...
MIH TIME=00:00,DEV=(0E20,0E21)
...
=== TCPIP.DATA ===
...
HOSTNAME os390
DOMAINORIGIN gfk-shw.de
NSINTERADDR 192.168.4.25
...
=== TCPIP.PROFILE ===
...
; ----------------------------------------------------------------------
; Network via 3088 (0E20,0E21)
; ----------------------------------------------------------------------
DEVICE OS390D_CTC0 CTC 0E20
LINK OS390L_00 CTC 0 OS390D_CTC0
; ----------------------------------------------------------------------
; the local host's network address
; ----------------------------------------------------------------------
HOME
192.168.4.26 OS390L_00
PRIMARYINTERFACE OS390L_0
; ----------------------------------------------------------------------
; Routing will be done by Default Gateway
; 0.0.0.252 is a bitmask instead of the known subnetmask, 0.0.0.24 the
; value for that subnet; the bits of the standard A, B, C net are
; written as zero; hosts also have zero
; ----------------------------------------------------------------------
GATEWAY
192.168.4 = OS390L_00 1500 0.0.0.252 0.0.0.24
DEFAULTNET 192.168.4.25 OS390L_00 1500 0
; ----------------------------------------------------------------------
; Start the interface
; ----------------------------------------------------------------------
START OS390D_CTC0
... |
Figure 8: OS/390 configuration members
In TSO do:
- makesite should finish witout errors
- hometest test entries from TCPIP.HOSTS.LOCAL, leave with quit
- ping os390
- ping gw-2os390
- netstat
Now you should see one ping for each address and the active services.
- go to the RedBooks and search for "TCPIP"
- NOVELL 3.12 has a very good booklet about TCP/IP, also contained on their documentation CD
- O'Reilly: Linux Network Administrator's Guide, ISBN 1-56592-087-2
- O'Reilly: Linux-Wegweiser für Netzwerker, ISBN 3-930673-18-5
- O'Reilly: TCP/IP Network Administration, ISBN 0-937175-82-X
- Connectivity Inc. Manufacturer of TCP/IP for VSE
- IBM ISV Tech. Support (ADCD-Systems)
- Directory of RFCs and Assignments
Written by
Axel Schwarzer.
This description is provided as is; it may be distributed freely. Comments
are highly welcome (and necessary). The image of Hercules was scanned from
BROCKHAUS ENZYKLOPÄPIE
in vierundzwanzig Bänden
Neunzehnte, völlig neu bearbeitete Auflage
Neunter Band GOT-HERP
ISBN 3-7653-1209-6 Hldr. (mit Vorauslexikon)
Seite 687, rechte Spalte, obere Hälfte
and shows Herakles and Cerberus on an Amphora, ca. 515 b. Chr.,
(Louvre, Paris). Read this article, it's quite interesting.
Version/Release
1.0: sent to selected users on request
1.1: initial public issue
1.2: removed some html bugs and mispellings
1.3: focused on vmnet 0.4, removed description of 0.3, added comments for subnetmask under vm and os/390
|