protocols File Format for TCP/IP

Purpose

Defines the Internet protocols used on the local host.

Description

The /etc/protocols file contains information about the known protocols used in the DARPA Internet. Each protocol is represented by a single line in the protocols file. Each entry corresponds to the form:

Name Number Aliases

The fields contain the following information:

Item Description
Name Specifies an official Internet Protocol name.
Number Specifies a protocol number.
Aliases Specifies any unofficial names used for the protocol.

Items on a line are separated by one or more spaces or tab characters. Comments begin with the # (pound sign), and routines that search the protocols file do not interpret characters from the beginning of a comment to the end of the line. A protocol name can contain any printable character except a field delimiter, new line character, or comment character.

The protocol and alias names are case sensitive.

The lines appear as follows:

ip           0          #dummy for IP
icmp         1          #control message protocol
#ggp         2          #gateway^2 (not normally used)
tcp          6          #tcp
#egp         8          #exterior gateway protocol
#pup        12          #pup
udp         17          #user datagram protocol