This post follows on from getting TCPIP to work with ADCD (zPDT and ZD&T) and allows me to FTP to z/OS from my Linux machine. There is a Q&A Has anyone configured z/OS running on ZD&T to support IPV6 protocol? but this was not enough information for me.
I’ve written about the IP V6 concepts and how they fit with z/OS.
You need to:
- Configure the Linux device map to add an OSA entry in the device map. You specify the path, and z/OS device addresses.
- Configure z/OS to support AF_NET6. You can make this change dynamically – or just re-ipl.
- Configure TCPIP to add an IFCONFIG6 entry. You need the z/OS AF_NET6 change before the IFCONFIG6 change is accepted. You need to restart TCPIP (or re-ipl).
- Configure a VTAM TRLE pointing to the devices defined in the devmap entry. This can be configured dynamically.
- Define a TCPIP interface, pointing to the PORTNAME of the TRLE definition. This defines a IP V6 address. The change can be configured dynamically.
- Test it!
Configuring the Linux Devmap
Create the Linux devmap entry
[manager] # tap2 define network adapter (OSA) for communication with Linux name awsosa 0019 --path=A2 --pathtype=OSD --tunnel_intf=y --tunnel_ip=172.25.1.6 # QDIO mode device 408 osa osa device 409 osa osa device 40a osa osa
This session has IP V4 address 172.25.1.6, and uses device addresses 408,409 and 40a. It uses path A2.
Restart zD&T to pick up the changes, and re-ipl z/OS.
You have to configure both z/OS and TCPIP to enable TCPIP V6 support.
Use D OMVS,S to show the BPXPRMxx members being used.
Update bpxprmxx with AF_INIT6, by adding the following into a BPXPRMxx member.
NETWORK DOMAINNAME(AF_INET6) DOMAINNUMBER(19) MAXSOCKETS(50000) TYPE(INET)
Check if your AF_INET is INET or CINET (Common INET is used when you have multiple TCPIP stacks), and specify the same value.
If you mis configure it
DOMAINNUMBER value 19 is required ( see DOMAINNUMBER ) When I used a different value I got
BPXF202I DOMAIN AF_INET6 WAS NOT ACTIVATED FOR FILE SYSTEM
TYPE INET. RETURN CODE = 0000045A, REASON CODE = 743A0000
and, when TCPIP was started
EZZ0695I IPCONFIG6 STATEMENT ON LINE 1 NOT VALID – IPV6 SUPPORT IS NOT
Where 045A is EAFNOSUPPORT The address family is not supported.
Check AF_INET6 is configured
The command D OMVS,PFS gave me
PFS TYPE ENTRY ASNAME DESC ST START/EXIT TIME INET EZBPFINI N/A SOCKETS A 2022/09/20 04.08.00 NFS GFSCINIT NFSC REMOTE A 2022/09/20 04.07.23 ZFS IOEFSCM N/A LOCAL A 2022/09/20 04.07.19 AUTOMNT BPXTAMD N/A LOCAL A 2022/09/20 04.07.19 UDS BPXTUINT N/A SOCKETS A 2022/09/20 04.07.19 PFS TYPE DOMAIN MAXSOCK OPNSOCK HIGHUSED INET AF_INET6 50000 5 5 AF_INET 64000 8 8 UDS AF_UNIX 10000 2 2
Check AF_INET6 is in the list.
I added “include user.Z25A.tcpparms(iconfig6)” into the TCPIP PROF.
This member had just
The only change when TCPIP was restarted was the additional message
EZZ0300I OPENED INCLUDE FILE ‘USER.Z25A.TCPPARMS(ICONFIG6)’
Check the configuration
On Linux the find_io command gave
FIND_IO for "colinpaice@colinpaice" Interface Current MAC IPv4 IPv6 Path Name State Address Address Address ------ --------- ----------- ------- --------- ---------------- -------------- A0 tap0 UP, RUNNING fa:... 10.1.1.1 fe80::f85c:c2ff:fe0a:1415%tap0 A1 tap1 UP, RUNNING 5e:... 172.26.1.6 fe80::5cda:64ff:feee:eeaa%tap1 A2 tap2 UP, RUNNING 4a:... 172.25.1.6 fe80::4850:5fff:fe5e:87c5%tap2
Check the interface is UP, RUNNING
Define a VTAM TRLE
You need to create a VTAM TRLE resource. I invented PORTCP, and created member user.z25a.vtamlst(TRLE).
OSATRL3 VBUILD TYPE=TRL OSATRL3E TRLE LNCTL=MPC,READ=(0408),WRITE=(0409),DATAPATH=(040A), X PORTNAME=PORTCP, X MPCLEVEL=QDIO
This uses address 0408,0409, and 040a (matching the devmap entry above)
Use V net,act,id=trle to activate it.
Note: USER.Z25A.VTAMLST is in the DD concatenation for //VTAMLST.
Use D NET,TRL to display the defined TRLs. This showed
TRLE = OSATRL3E STATUS = NEVAC
Showing the TRLE above, and the status. It becomes ACTIVE when the TCPIP interface is activated.
Create the TCPIP interface definition
IP V6 uses an interface definition instead of a link and device.
INTERFACE IFPORTCP6 DELETE INTERFACE IFPORTCP6 DEFINE IPAQENET6 CHPIDTYPE OSD PORTNAME PORTCP INTFID 7:7:7:7 IPADDR FD00::67:1:1
I activated these using
- v tcpip,,stop,ifportcp6
- v tcpip,,obey,USER.Z25A.TCPPARMS(IFACE6)
- You might need v tcpip,,stop,ifportcp6
I found it better to stop the interface before updating it, as sometimes the updates were not all made.
Once these definitions were activated, TSO NETSTAT HOME gave
IntfName: IFPORTCP6 Address: fd00::67:1:1 Type: Global Flags: Address: fe80::7:7:7:7 Type: Link_Local Flags: Autoconfigured
This shows an address fd00::67:1:1 and address fe80::7:7:7:7 based on the INTFID. If you do not specify an INTFID you get a name like fe80::a2:a201:a2:a2a2, based on the chpid (value a2). If the chpid was changed, you would get a different IP address. You can see the chpid from the Linux from_io command, or the z/OS d NET,ID=OSATRL3E,E command.
I could not get any IP address specified in the IPADDR parameter, to work. I could ping to it, but there were no responses.
The interface gets a MAC address based on the CHPID value – for example MACADDRESS: 02A2A2A2A2A2.
NETSTAT ROUTE gave
IPV4 DESTINATIONS DESTINATION GATEWAY FLAGS REFCNT INTERFACE 127.0.0.1/32 0.0.0.0 UH 0000000000 LOOPBACK 172.26.1.2/32 0.0.0.0 UH 0000000000 ETH1 172.26.1.20/32 0.0.0.0 H 0000000000 EZAZCX 172.26.1.20/32 0.0.0.0 H 0000000000 EZASAMEMVS IPV6 DESTINATIONS DESTIP: ::1/128 GW: :: INTF: LOOPBACK6 REFCNT: 0000000000 FLGS: UH MTU: 65535 DESTIP: FD00::67:1/128 GW: :: INTF: IFPORTCP6 REFCNT: 0000000000 FLGS: UHS MTU: 1492 DESTIP: FD00::67:1:1/128 GW: :: INTF: IFPORTCP6 REFCNT: 0000000000 FLGS: UH MTU: 9000 DESTIP: FE80::7:7:7:7/128 GW: :: INTF: IFPORTCP6 REFCNT: 0000000000 FLGS: UH MTU: 9000
The Linux find_io command gave
Interface Current MAC IPv4 IPv6 Path Name State Address Address Address ----- --------- ----------- -------- ---------- -------------- ... . A0 tap0 UP, RUNNING da:... 10.1.1.1 fe80::...tap0 A1 tap1 UP, RUNNING 92:... 172.26.1.6 fe80::...%tap1 A2 tap2 UP, RUNNING 42:... 172.25.1.6 fe80::...%tap2
Update the Linux route information
I did this to try to get the IPADDR to work. It did not work, and so is this is not needed.
sudo ip -6 route add fd00::6:1:1/128 dev tap2
Use TSO NETSTAT HOME to find the IP V6 address. For example
Address: fe80::7:7:7:7, Type: Link_Local
On Linux use the find_io command to display information about the tunnels to z/OS. Find the tapn matching the chpid being used on z/OS.
command to send data to z/OS.
The response to the ping will be sent back down the connection the request arrived on.
You can use the tso netstat devlinks(intfname IFPORTCP6 command (where IFPORTCP6 is my interface) to display information about just the specified interface; for example Inbound packets, BytesIn, Outbound packets, BytesOut.
You can use
tso NETSTAT CONN
tso netstat conn (port 21
to see the connections.
You can use NETSTAT ND to display the neighbours. This gave me
Query Neighbor cache for fe80::6a:ffff:feaf:c0e4
IntfName: IFPORTCP6 IntfType: IPAQENET6
LinkLayerAddr: 026AFFAFC0E4 State: Reachable
Type: Host AdvDfltRtr: No
The value fe80::6a:ffff:feaf:c0e4 matches up with the value from find_io on Linux, and
02:6a:ff:af:c0:e4 matches up with the MAC address.