123.456.789.012 elmo Elmo ELMOThe first part is the IP address. The next three columns say that elmo, Elmo, or ELMO can be used to refer to the machine configured as 123.456.789.012.
Configuration of a machine at an IP address differs among various TCP/IP systems. The information in the hosts file typically refers to the IP addresses of other machines on the network.
To use a service, both sides of the connection must know either the name or the port number of the service. The services file provides a way to associate a name with a port number. This allows programs to use the name. The services file on both sides of the connection (which may or may not be the same file) must associate the name with the same port number. The port number can be any number not currently in use on the network.
Here are two lines from a services file typically used with CQL++:
CQLISAM 8000/tcp # CQL ISAM server CQL 8010/tcp # CQL SQL serverThe information after # is a comment. The first line associates the name CQLISAM with port 8000. The second line associates the name CQL with port 8010. The /tcp after the port number indicates that a TCP/IP port is being defined.
When this information is in the services file(s), programs can use the names CQLISAM and CQL instead of using port numbers directly. Network administrators can then adjust the port numbers if necessary with no program changes.