Configuring the network

You can either route all required traffic from ZD&T to Z image that is running on ZD&T, which is also known as automatic network configuration. Or you can assign the static IP to the Z Image.

Automatic network configuration

In this scenario, all the Linux® ports are routed to ZD&T z/OS® ports except a few ports that are required for the Linux machine.

If you decide to use this method, the network configuration can be installed automatically when you run the ZD&T Personal Edition installer. For more information, see Installing Personal Edition.

If you do not decide to use the method when you run the installer, the network configuration still can be installed by running the scripts in the /opt/ConfigGuideSample. Run the following script.
./zdt_config_network10
Automatic network configuration makes the following changes to your Linux operating system.
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9451
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9450
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:1947
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3270

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 10.1.1.2 tcp dpts:0:21
ACCEPT tcp -- 0.0.0.0/0 10.1.1.2 tcp dpts:23:1946
ACCEPT tcp -- 0.0.0.0/0 10.1.1.2 tcp dpts:1948:2021
ACCEPT tcp -- 0.0.0.0/0 10.1.1.2 tcp dpt:2022
ACCEPT tcp -- 0.0.0.0/0 10.1.1.2 tcp dpts:2023:3269
ACCEPT tcp -- 0.0.0.0/0 10.1.1.2 tcp dpts:3271:5900
ACCEPT tcp -- 0.0.0.0/0 10.1.1.2 tcp dpts:5903:9449
ACCEPT tcp -- 0.0.0.0/0 10.1.1.2 tcp dpts:9452:6553

Assigning a static IP to ZD&T z/OS

In this scenario, ZD&T z/OS was assigned a separate IP within the same subnet of the Linux machine where ZD&T Personal Edition is installed. In this way, you have 2 separate IP addresses. One is assigned for the Linux machine, and the other is assigned for z/OS images.

To configure the network, complete the following steps:
  1. Obtain the static IP within the same subnet of your Linux machine.
  2. Run the create_devmap command from /opt/ConfigGuideSample with a host name. You can provide a host name that you want.
    Perl create_devmap.pl <disk path> -h <host name> > (<devmap name>)

    For example, Perl create_devmap.pl /home/ibmsys1/volumes -h zos-dev4 >generateddevmap.

  3. Verify whether the DEVMAP is displayed as shown below.
    [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
    
    [manager]  # eno1 define network adapter (OSA) for communication with network
    name awsosa 0019 --path=F0 --pathtype=OSD                   # QDIO mode
    device 404 osa osa --unitadd=0
    device 405 osa osa --unitadd=1
    device 406 osa osa --unitadd=2
    
  4. IPL the ZD&T z/OS with the CS loadparm option.
  5. Copy GBLRESOL, TCPDATA, and PROF2 from ADCD.Z24A.TCPPARMS to USER.Z24A.TCPPARMS.
  6. Copy FTPD, NFSC, NFSS, PORTMAP, RESOLVER, and TCPIP from ADCD.Z24A.PROCLIB to USER.Z24A.PROCLIB.
  7. Edit FTPD, NFSS, NFSC, PORTMAP, and RESOLVER. After you make changes, verify whether the output is displayed as shown below.
    USER.PROCLIB(FTPD)
    //*SYSTCPD DD DISP=SHR,DSN=TCPIP.SEZAINST(TCPDATA)            
    //*SYSTCPD DD DISP=SHR,DSN=ADCD.&SYSVER..TCPPARMS(TCPDATA)    
    //SYSTCPD DD DISP=SHR,DSN=USER.TCPPARMS(TCPDATA)  
      USER.PROCLIB(NFSC)
    //*SYSTCPD  DD   DISP=SHR,DSN=ADCD.&SYSVER..TCPPARMS(TCPDATA) 
    //SYSTCPD  DD   DISP=SHR,DSN=USER.TCPPARMS(TCPDATA) 
      USER.PROCLIB(NFSS)
    //*SYSTCPD  DD   DISP=SHR,DSN=ADCD.&SYSVER..TCPPARMS(TCPDATA) 
    //SYSTCPD  DD   DISP=SHR,DSN=USER.TCPPARMS(TCPDATA)      
      USER.PROCLIB(PORTMAP)
    //*SYSTCPD  DD DSN=ADCD.&SYSVER..TCPPARMS(TCPDATA),DISP=SHR 
    //SYSTCPD  DD DSN=USER.TCPPARMS(TCPDATA),DISP=SHR   
    
      USER.PROCLIB(RESOLVER)
    //*SETUP DD DISP=SHR,DSN=ADCD.&SYSVER..TCPPARMS(GBLRESOL),FREE=CLOSE  
    //SETUP DD DISP=SHR,DSN=USER.TCPPARMS(RESOLVER),FREE=CLOSE            
    //*                                                                   
      USER.PROCLIB(TCPIP)
    //*                                                         
    //PROFILE  DD DISP=SHR,DSN=USER.TCPPARMS(PROFILE)           
    //*PROFILE  DD DISP=SHR,DSN=FEU.&SYSVER..TCPPARMS(PROFILE)  
    //*PROFILE  DD DISP=SHR,DSN=ADCD.&SYSVER..TCPPARMS(PROF1)   
    //*PROFILE  DD DISP=SHR,DSN=ADCD.&SYSVER..TCPPARMS(PROF2)   
    //*PROFILE  DD DISP=SHR,DSN=TCPIP.PROFILE.TCPIP    
    
    //*SYSTCPD  DD DSN=ADCD.&SYSVER..TCPPARMS(TCPDATA),DISP=SHR    
    //SYSTCPD  DD DSN=USER.TCPPARMS(TCPDATA),DISP=SHR 
    
  8. Create the member IPNODES in USER.Z24A.TCPPARMS.
    000001 X.XX.XXX.XXX ZOS-DEV4 ZOS-DEV4.ibm.com         
    000002 10.1.1.1       LINUX                           
    000003 127.0.0.1      LOCALHOST                       
    

    Replace X.XX.XXX.XXX with the static IP.

    Replace ZOS-DEV4 with the host name that is used in step 2.

    Replace ZOS-DEV4.ibm.com with the fully qualified host name.

  9. Rename GBLRESOL to RESOLVER in USER.Z24A.TCPPARMS, and edit it as shown below.
    ****** ***************************** Top of Data ******************************
    000001   DEFAULTTCPIPDATA('USER.TCPPARMS(TCPDATA)')                            
    000002   GLOBALTCPIPDATA('USER.TCPPARMS(TCPDATA)')                             
    000003   GLOBALIPNODES('USER.TCPPARMS(IPNODES)')                               
    000004   DEFAULTIPNODES('USER.TCPPARMS(IPNODES)')                              
    000005   COMMONSEARCH                                                          
    000006   CACHE                                                                 
    000007   CACHESIZE(200M)                                                       
    000008   MAXTTL(2147483647)                                                    
    000009   UNRESPONSIVETHRESHOLD(25)                                             
    ****** **************************** Bottom of Data ****************************
    
  10. Edit USER.Z24A.TCPPARMS(TCPDATA).
    000072 ; No prefix is required if the TCPIP.DATA file is not being shared.
    000073 ;                                                                  
    000074 S0W1:   HOSTNAME   XXXX 
    000075 ;        
    Replace XXXX with Hostname used in Step2     
    
    000085 ; host name.                                           
    000086 ;                                                      
    000087 DOMAINORIGIN  XXXX                       
    000088 ;                                                      
    000089 ;                                                      
    
    Replace XXXX with a domain name, for example, ibm.com. Do not append a host name with the domain name, for example, ZDT-DEV4.ibm.com.
    000143 NSINTERADDR  Primary DNS          
    000144 NSINTERADDR  Secondary DNS  
    
    Repeat if a single NSINTERADDR is present in the existing source, and provide the primary and secondary DNS. You can find the primary and secondary DNS in the DEVMAP as shown below, or ask your network administrator for the DNS.
    # ; Define name servers with NSINTERADDR x.x.x.x
    # NSINTERADDR        9.26.32.5
    # NSINTERADDR        9.26.33.5
    # RESOLVEVIA         UDP
    
  11. Rename PROF2 in USER.Z24A.TCPPARMS to PROFILE, and edit it.
    000070 ;This device defines the tunnel                                         
    000071 DEVICE PORTA  MPCIPA                                                    
    000072 LINK TAP0  IPAQENET PORTA                                               
    000073 HOME 10.1.1.2 TAP0                                                      
    000074 ; This second device is optional                                        
    000075 ;DEVICE PORTB    MPCIPA                                                 
    000076 ;LINK ETH0 IPAQENET  PORTB                                              
    000077 ;HOME XX.XX.XX.X  ETH0                                                  
    000078 BEGINRoutes                                                             
    000079 ;     Destination   SubnetMask    FirstHop       LinkName  Size         
    000080 ROUTE 10.1.1.1    255.255.255.0       =        TAP0 MTU 1492            
    000081 ROUTE XX.XX.XX.0  255.255.254.0       =        ETH0 MTU 1492            
    000082 ROUTE DEFAULT                     XX.XX.XX.1 ETH0 MTU 1492              
    000083 ENDRoutes
    

    Replace XX.XX.XX with the static IP, and check which protocol is running. If eth0 is running, your devmap has a correct structure of PROFILE that you can copy and paste. Otherwise, you need to change the structure manually. To check which protocol is running, use FIND_IO to check the subnet mask and destination, and IFCONFIG to find the subnet mask and destination in Linux.

    For example, run FIND_IO for ibmsys1@csx101.XX.ibm.com to check whether TAP0 and ETH0 are running on a machine.

                                                                                                                                                                                                                   
             Interface         Current          MAC                IPv4                                                                                                                                                 IPv6
     Path    Name              State            Address            Address                                                                                                                                              Address
    ------   ----------------  ---------------- -----------------  ----------------                                                                                                                                     
      F0     eth0              UP, RUNNING      fa:16:3e:2f:c9:9c  9.28.160.193                                                                                                                                         fe80::f816:3eff:fe2f:c99c%eth0
      *      virbr0            UP, NOT-RUNNING  52:54:00:77:c7:21  192.168.122.1                                                                                                                                        
      *      virbr0-nic        DOWN             52:54:00:77:c7:21  *                                                                                                                                                    
      A0     tap0              UP, RUNNING      12:3e:b7:80:ad:d1  10.1.1.1                                                                                                                                             fe80::103e:b7ff:fe80:add1%tap0
      A1     tap1              DOWN             02:a1:a1:a1:a1:a1  *                                                                                                                                                    
      A2     tap2              DOWN             02:a2:a2:a2:a2:a2  *                                                                                                                                                    
      A3     tap3              DOWN             02:a3:a3:a3:a3:a3  *                                                                                                                                                    
      A4     tap4              DOWN             02:a4:a4:a4:a4:a4  *                                                                                                                                                    
      A5     tap5              DOWN             02:a5:a5:a5:a5:a5  *                                                                                                                                                    
      A6     tap6              DOWN             02:a6:a6:a6:a6:a6  *                                                                                                                                                    
      A7     tap7              DOWN             02:a7:a7:a7:a7:a7  *                                                                                                                                                    
    
     End of FIND_IO
    
  12. Re-IPL the machine, or restart the TCP/IP and resolver by using console commands:
    P TCPIP
    P RESOLVER
    S TCPIP
    S RESOLVER,SUB=MSTR
  13. Verify whether the static IP works.
    1. Open another terminal emulator, and connect with your static IP and port 23. Then, z/OS login screen is displayed.
    2. On the Command pane of ISPF, enter ping <ip of other machine>. Other machine responds.
    3. Enter the master console command D U,,,404,3. Four-zero-four status is turned into active (A-BSY).
    4. Enter the following console command, and OSA should be active.
      v net,id=osatrl2,act