/etc/services and ETC.SERVICES port assignments

The z/OS® UNIX file, /etc/services, contains the service names and port assignments of specific z/OS UNIX applications. The MVS™ data set ETC.SERVICES can also be used to contain the same information. The source for this example is shipped in SEZAINST(SERVICES) and copied to the hlq.ETC.SERVICES by the Installation Verification Procedure (IVP). The source is also installed in /usr/lpp/tcpip/samples/services for use in copying it to /etc/services. It is important that /etc/services and hlq.ETC.SERVICES be kept identical so that MVS and z/OS UNIX applications use the same port assignments. The shipped file contains the most current assignments.

Rules: The following syntax rules apply to the services information specification:
  • An ETC.SERVICES data set must be fixed or fixed block with an LRECL between 56 and 256.
  • The /etc/services z/OS UNIX file can have a maximum line length of 256.
  • Each service is listed on a single line corresponding to the form:
    ServiceName   PortNumber/ProtocolName   Aliases
    ServiceName
    Specifies an official Internet service name.
    PortNumber
    Specifies the socket port number used for the service.
    ProtocolName
    Specifies the transport protocol used for the service.
    Aliases
    Specifies a list of unofficial service names.

    Items on a line are separated by spaces or tabs.

  • A service name must start in the first position on a line.
  • The maximum service name and alias name length is 32 characters.
  • A maximum of 35 aliases is recognized.
  • Service and alias names are case sensitive.
  • Comments begin with a # or ; character and continue until the end of the line.

When services information is requested, the definitions are searched sequentially. The first entry matching a specified search request (either service name and protocol or port number and protocol) is returned.

For the search order used in locating /etc/services and ETC.SERVICES, see z/OS Communications Server: IP Configuration Guide.

Tip: The following example was used for test configuration and is for illustration only.

#  z/OS Communications Server
#  SMP/E distribution path: /usr/lpp/tcpip/samples/IBM/EZAOESER
#  SMP/E distribution path: SEZAINST(EZAEB02J)
#
Start of change#  Licensed Materials - Property of IBM
#  5650-ZOS Copyright IBM Corp. 1998, 2015
#  Status = CSV2R2End of change
#
# $Header:services 9.4$
# $ACIS:services 9.4$
# $Source: /ibm/acis/usr/src/etc/RCS/services,v $
#  Change Activity:
#
#  Flag Reason   Release  Date   Origin    Description
#  ---- -------- -------- ------ --------  -----------------------
#  $X1= D136984  R8BASEN  060303 ADAMSON : JES NJE over TCP/IP
#  $Y1= D139394  R9BASEN  061011 AMITRANO: NFS port information
#  $F1= D146073  RBBASE   081016 PACKETTA: Add port 521 alias
Start of change#  $31= RFSLEDLC CSV2R2   140731 adamson : Remove ncprout (23281)End of change
# -------------------------------------------------------------------
 
#       @(#)services    1.16 (Berkeley) 86/04/20
#
# Network services, Internet style
#
# Service     port/protocol   alias names if any                   @Y1A
#
echo            7/tcp
echo            7/udp
discard         9/tcp           sink null
discard         9/udp           sink null
systat          11/tcp          users
daytime         13/tcp
daytime         13/udp
netstat         15/tcp
qotd            17/tcp          quote
chargen         19/tcp          ttytst source
chargen         19/udp          ttytst source
ftp             21/tcp
telnet          23/tcp
smtp            25/tcp          mail
time            37/tcp          timserver
time            37/udp          timserver
rlp             39/udp          resource        # resource location
nameserver      42/tcp          name            # IEN 116
whois           43/tcp          nicname
domain          53/tcp          nameserver      # name-domain server
domain          53/udp          nameserver
mtp             57/tcp                          # deprecated
tftp            69/udp
rje             77/tcp          netrjs
finger          79/tcp
link            87/tcp          ttylink
supdup          95/tcp
hostnames       101/tcp         hostname        # usually from sri-nic
#csnet-cs       105/?
pop             109/tcp         postoffice
sunrpc          111/tcp
sunrpc          111/udp
auth            113/tcp         authentication
sftp            115/tcp
uucp-path       117/tcp
nntp            119/tcp         readnews untp   # USENET News Xfer Proto
ntp             123/udp                         # Network Time Protocol
snmp            161/udp                         # snmp request port
snmp-trap       162/udp                         # snmp monitor trap port
vmnet           175/tcp         # JES NJE over TCP/IP            @X1A
#
# UNIX specific services
#
exec            512/tcp
biff            512/udp         comsat
login           513/tcp
who             513/udp         whod
shell           514/tcp         cmd             # no passwords used
syslog          514/udp
printer         515/tcp         spooler         # line printer spooler
talk            517/udp
ntalk           518/udp
efs             520/tcp                         # for LucasFilm
#
# IBM added services
#
route           520/udp         router omproute
route           521/udp         ipv6rip ripng   #                @F1C
 
timed           525/udp         timeserver
tempo           526/tcp         newdate
courier         530/tcp         rpc
conference      531/tcp         chat
#
# RVD service
#
rvd-control     531/udp                         # rvd control port
netnews         532/tcp         readnews
netwall         533/udp                      # -for emergency broadcasts
uucp            540/tcp         uucpd           # uucp daemon
#
#     Kerberos services
#
klogin          543/tcp           # Kerberos authenticated rlogin
kshell          544/tcp      cmd  # Kerberos remote shell
 
remotefs        556/tcp     rfs_server rfs  # Brunhoff remote filesystem
#
# IBM added service
#
Start of change# Andrew File System Authenticated servicesEnd of change
#
vexec           712/tcp         vice-exec
vlogin          713/tcp         vice-login
vshell          714/tcp         vice-shell
#
#     Kerberos services
#
kerberos        750/udp      kdc  # Kerberos authentication--udp
kerberos        750/tcp      kdc  # Kerberos authentication--tcp
kerboros_master 751/udp           # Kerberos authentication
kerberos_master 751/tcp           # Kerberos authentication
passwd_server   752/udp           # Kerberos passwd server
userreg_server  753/tcp           # Kerberos userreg server
krb_prop        754/tcp           # Kerberos slave propagation
erlogin         888/tcp           # Login and environment passing
#
#
#       Kerberos sample server
#
sample          906/tcp           # Kerberos sample app server
sample          906/udp           # for kerberos simple test
 
kpop            1109/tcp          # Pop with Kerberos
 
ingreslock      1524/tcp
#
#       Policy Agent QoS Listener and Collector ports
#
pagentQosListener  1700/tcp       # Policy Agent Listener thread
pagentQosCollector 1701/tcp       # Policy Agent Collector thread
#
# Andrew File System services
#
filesrv         2001/tcp
rauth2          2001/udp
rfilebulk       2002/udp
rfilesrv        2003/udp
console         2018/udp
# For file server backup and migration
client          2030/tcp
# NFS server                                                        @Y1A
#                                                                   @Y1A
#  Port 2049 must be used for nfsd.                                 @Y1A
#                                                                   @Y1A
#  Consecutive port numbers must be assigned for the NFS status,    @Y1A
#   nlockmgr, mountd, mvsmount, showattr, and pcnfsd services.      @Y1A
#   The example below uses ports 2043-2048.                         @Y1A
#  When the NFS callback function is being used the services        @Y1A
#   nfsscb_b and nfsscb_e should reserve 100 consecutive ports.     @Y1A
#   The example below uses port 10300 for the beginning port        @Y1A
#   and port 10399 as the ending port.                              @Y1A
#  For additional information see the Network File System Guide     @Y1A
#   and Reference manual.                                           @Y1A
#                                                                   @Y1A
status          2043/tcp   nfs_statd     # NFS State daemon (NSM)   @Y1A
status          2043/udp   nfs_statd     # NFS State daemon (NSM)   @Y1A
nlockmgr        2044/tcp   nfs_lockd     # NFS Lock daemon (NLM)    @Y1A
nlockmgr        2044/udp   nfs_lockd     # NFS Lock daemon (NLM)    @Y1A
mountd          2045/tcp   mount         # NFS mount daemon         @Y1A
mountd          2045/udp   mount         # NFS mount daemon         @Y1A
mvsmount        2046/tcp   nfs_mvsmnt    # NFS mvsmount daemon      @Y1A
mvsmount        2046/udp   nfs_mvsmnt    # NFS mvsmount daemon      @Y1A
showattr        2047/tcp   nfs_showattr  # NFS showattr daemon      @Y1A
showattr        2047/udp   nfs_showattr  # NFS showattr daemon      @Y1A
pcnfsd          2048/udp   nfs_pcnfs     # NFS pcnfsd daemon        @Y1A
nfsd            2049/tcp   nfs           # NFS server daemon        @Y1A
                                         #  - do not change         @Y1A
nfsd            2049/udp   nfs           # NFS server daemon        @Y1A
                                         #  - do not change         @Y1A
#                                                                   @Y1A
#  NFS Callback function port range                                 @Y1A
#                                                                   @Y1A
nfsscb_b       10300/tcp                 # NFSS callback port begin @Y1A
nfsscb_e       10399/tcp                 # NFSS callback port end   @Y1A
nfsscb_b       10300/udp                 # NFSS callback port begin @Y1A
nfsscb_e       10399/udp                 # NFSS callback port end   @Y1A
#
#     Kerberos services
#
knetd           2053/tcp          # Kerberos de-multiplexor
eklogin         2105/tcp          # Kerberos encrypted rlogin
#
# Andrew File System services
#
venus.itc       2106/tcp
ropcons         2115/udp
# The following are assigned in pairs and the bulk must be the srv +1
rupdsrv         2131/udp
rupdbulk        2132/udp
rupdsrv1        2133/udp
rupdbulk1       2134/udp
 
njenet-ssl      2252/tcp          # JES NJE over TCP/IP with SSL @X1A
 
Figure 1. /etc/services example