A text file that assigns Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) port numbers to TCP/IP protocols and services for a computer on a TCP/IP network. The entries in the services file are used for well-known service (WKS) records in Domain Name System (DNS) servers and other Windows Sockets applications. You can also use the file to quickly determine which well-known TCP or UDP port number is assigned to a specific network service or protocol.
You will find the services file at the following location on a computer running Microsoft Windows:
Each line in the services file contains the standard name for the service followed by the well-known port number as defined in Request for Comments (RFC) 1060, an alias, and an optional comment prefixed with a pound sign (#). The following example is a portion from the sample services file included with Windows:
# <service name> <port number>/<protocol> [aliases...]
ftp-data 20/tcp # FTP, data
ftp 21/tcp # FTP. control
smtp 25/tcp mail # Simple Mail Transfer Protocol
time 37/tcp timeserver
time 37/udp timeserver
You can change the default port number for a TCP/IP service by editing the services file - for example, if you need to run multiple Simple Network Management Protocol (SNMP) agents or if you want to change the default File Transfer Protocol (FTP) control port to make access more private.