I needed to get my ZD&T machine connected to the internet so it could download some files as part of an install. Note, this allows my z/OS to contact the internet, externals machines cannot contact my machine.
I blogged
- Connecting a zPDT z/OS to the internet using IPv4. This describes the Linux and VTAM set up.
- Understanding BT home hub and my IPv6 addresses
It took a while to get it working. It is based on scenario 4 of the zD&T documentation.
The configuration uses the wireless connection from my Linux server.
You need to know/configure the address of various end points. Some addresses are configured by the systems, some addresses you need to configure.
Before you start
You need to know what the IP address of your z/OS image is
I used the GUA permanent address
INTERFACE WIRE6
DEFINE IPAQENET6
CHPIDTYPE OSD
IPADDR 2001:DB7:8::1
PORTNAME PORTB
INTERFACE WIRE6
ADDADDR BT:a:b:c:B8CE:404B:3360:3644
START WIRE6
What’s my TCP configuration on Linux?
The command ip addr gave (displaying only the IP V6 entries)
1: lo: <LOOPBACK,UP,LOWER_UP> ...
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eno1:...
...
inet6 fe80::2d8:61ff:fee9:312a/64 scope link ...
3: wlxcc641aee92c5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
inet6 BT:a:b:c:8b43:7ce6:34d1:c0fe/64 scope global temporary dynamic ...
inet6 BT:a:b:c:9824:30b:2f3d:acdb/64 scope global dynamic mngtmpaddr noprefixroute ...
inet6 fe80::7bfc:5da1:8c80:37a4/64 scope link noprefixroute ...
4: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc ...
link/ether ...
...
inet6 fe80::48f6:deff:fef4:c8d4/64 scope link valid_lft forever preferred_lft forever
Where
- lo is the loop back address.
- eno1 is the connection over an Ethernet cable to my laptop
- wlxcc641aee92c5 is the wireless connection to my router and the outside world. The IP address of the Linux server end is BT:a:b:c… . This value is used in the z/OS configuration.
- tap0 is the tunnel interface to z/OS from the base linux machine. It has address fe80::48f6:deff:fef4:c8d4 This address is internal to the subnet.
I think these end point addresses were all generated for me.
My devmap
The devmap file contains the definitions of the emulated devices. For the OSA I had
[manager] # tap0 define network adapter (OSA) for communication with Linux
name awsosa 0009 --path=A0 --pathtype=OSD --tunnel_intf=y # QDIO mode
device 400 osa osa --unitadd=0
device 401 osa osa --unitadd=1
device 402 osa osa --unitadd=2
name awsosa 0010 --path=F1 --pathtype=OSD --interface=wlxcc641aee92c5
device 404 osa osa --unitadd=0
device 405 osa osa --unitadd=1
device 406 osa osa --unitadd=2
device 407 osa osa --unitadd=3
device 408 osa osa --unitadd=4
device 409 osa osa --unitadd=5
Where the –interface is the same name as my wireless interface (see above).
Find_io
The find_io command gives the network configuration known by the emulation code.
FIND_IO for "colin@colin-ThinkCentre-M920s"
Interface Current MAC IPv4 IPv6
Path Name State Addr Addr Address
---- ---------------- ----------- ---- ------ --------------
F0 eno1 UP,RUNNING 00... 10.... fe80::2d8:61ff:fee9:312a%eno1
F1 wlxcc641aee92c5 UP,RUNNING cc... 192.... BT:a:b:c:8b43:7ce6:34d1:c0fe
We have the same information as the ip addr command
The OSAs
In the devmap file the OSAs were defined as starting at 400 and 404. They each use 3 “wires”. One for reading, one for writing, and one for data (addresses 400, 401 and 402).
[manager] # tap0 define network adapter (OSA) for communication with Linux
name awsosa 0009 --path=A0 --pathtype=OSD --tunnel_intf=y # QDIO mode
device 400 osa osa --unitadd=0
device 401 osa osa --unitadd=1
device 402 osa osa --unitadd=2
device 403 osa osa --unitadd=3
name awsosa 0010 --path=F1 --pathtype=OSD --interface=wlxcc641aee92c5
device 404 osa osa --unitadd=0
device 405 osa osa --unitadd=1
device 406 osa osa --unitadd=2
device 407 osa osa --unitadd=3
device 408 osa osa --unitadd=4
device 409 osa osa --unitadd=5
device 40a osa osa --unitadd=6
Where wlxcc641aee92c5 is the name of the wireless interface on Linux.
In the z/OS file ADCD.Z31B.VTAMLST(OSATRL2) is
OSATRL1 VBUILD TYPE=TRL
OSATRL1E TRLE LNCTL=MPC,READ=(0400),WRITE=(0401),DATAPATH=(0402), X
PORTNAME=PORTA, X
MPCLEVEL=QDIO
OSATRL2E TRLE LNCTL=MPC,READ=(0404),WRITE=(0405),DATAPATH=(0406,407), X
PORTNAME=PORTB, X
MPCLEVEL=QDIO
Where we have the same addresses 400 and 404.
You refer to these definitions using PORTA and PORTB.
PORTB uses data paths 0406 for the TCPIP IPv4 inerface, and 0407 for the IPv6 Interface.
You can use the VTAM command D NET,TRL to display the status of them
d net,trl
STC05323 IST097I DISPLAY ACCEPTED
STC05323 IST350I DISPLAY TYPE = TRL
------------------------------------------------------------
TRL MAJOR NODE = ISTTRL
TRLE = IUTIQDIO STATUS = NEVAC CONTROL = MPC
TRLE = IUTSAMEH STATUS = NEVAC CONTROL = MPC
2 TRLE(S) DISPLAYED
------------------------------------------------------------
TRL MAJOR NODE = OSATRL2
TRLE = OSATRL1E STATUS = ACTIV CONTROL = MPC
TRLE = OSATRL2E STATUS = ACTIV CONTROL = MPC
Define the TCP/IP interfaces
Current levels of TCP define interfaces with the “INTERFACE” statement. DEVICE and LINK statements are deprecated.
My wireless definitions ar
INTERFACE WIRE
DEFINE IPAQENET
CHPIDTYPE OSD
IPADDR 192.168.1.61
PORTNAME PORTB
START WIRE
INTERFACE WIRE6
DEFINE IPAQENET6
CHPIDTYPE OSD
IPADDR BT:a:b:c::2
PORTNAME PORTB
; INTERFACE WIRE6
; ADDADDR BT:a:b:c::1
START WIRE6
This defines both IPv4 and IPv6 interfaces, both using the same port PORTB
The interfaces are started
I chose these two addresses myself. These address show up in the NETSTAT HOME command.
After it has started
The TSO NETSTAT HOME command gave
Home address list:
LinkName: LOOPBACK
Address: 127.0.0.1
Flags:
IntfName: TAP0
Address: 10.1.1.2
Flags: Primary
IntfName: WIRE
Address: 192.168.1.61
Flags:
IntfName: WIRE6
Address: BT:a:b:c::2
Type: Global
Flags:
Address: fe80::cc64:1a02:ee:92c5
Type: Link_Local
Flags: Autoconfigured
IntfName: LOOPBACK6
Address: ::1
Type: Loopback
Flags:
Where we see the interfaces and their IP addresses.
Define the TCP Routes
I created COLIN.TCPPARMS(S5ROUTE) with content
BEGINRoutes
; Destination SubnetMask FirstHop LinkName Size
ROUTE 10.0.0.0 255.0.0.0 10.1.1.1 TAP0 MTU 1492
; Default to the internet
ROUTE DEFAULT 192.168.1.254 WIRE MTU 1492
;ROUTE DEFAULT6 fe80::6a2:22ff:feae:2871 WIRE6 MTU 5000
ENDRoutes
Note there is no DEFAULT6 entry – TCPIP works this out for itself. If you have more than one IPv6 interface you should uncomment the DEFAULT6 statement to ensure the traffic goes the right way.
I used the TCPIP console command v tcpip,,obey,COLIN.TCPPARMS(S5ROUTE) to activate the routing table. If you get it wrong, edit the member, save the changes, and issue the command again.
The TSO NETSTAT ROUTE command gave me
IPv4 Destinations
Destination Gateway Flags Refcnt Interface
----------- ------- ----- ------ ---------
Default 192.168.1.254 UGS 0000000000 WIRE
10.0.0.0/8 0.0.0.0 US 0000000000 TAP0
10.1.1.2/32 0.0.0.0 UH 0000000000 TAP0
127.0.0.1/32 0.0.0.0 UH 0000000000 LOOPBACK
192.168.1.61/32 0.0.0.0 UH 0000000000 WIRE
IPv6 Destinations
DestIP: Default
Gw: fe80::6a2:22ff:feae:2871
Intf: WIRE6 Refcnt: 0000000000
Flgs: UGD MTU: 1492
DestIP: ::1/128
Gw: ::
Intf: LOOPBACK6 Refcnt: 0000000000
Flgs: UH MTU: 65535
DestIP: BT:a:b:c::/64
Gw: ::
Intf: WIRE6 Refcnt: 0000000000
Flgs: UD MTU: 1492
DestIP: BT:a:b:c::2/128
Intf: WIRE6 Refcnt: 0000000000
Flgs: UH MTU: 1492
DestIP: fe80::cc64:1a02:ee:92c5/128
Gw: ::
Intf: WIRE6 Refcnt: 0000000000
Flgs: UH MTU: 1492
Where fe80::6a2:22ff:feae:2871 is from the BT Hub IPv6 LAN details: Link local address:.
The command TSO NETSTAT ND gives the neighbour discovery. This gave me
Query Neighbor cache for fe80::6a2:22ff:feae:2871
IntfName: WIRE6 IntfType: IPAQENET6
LinkLayerAddr: 04A222AE2871 State: Reachable
Type: Router AdvDfltRtr: Yes
Which shows what IPv6 neighbours have been discovered.
And finally – test it
I could use the TSO PING command to ping a server the internet. Check you can ping the address from Linux before you try it from z/OS, because some servers do not respond to ping requests.
Doing a wireshark trace of a successful ping showed the originator IP address was BT:a:b:c::2, the home address of interface WIRE6 in TCPIP on my z/OS image.