% cat /etc/protocols
#ident "@(#)protocols 1.5 99/03/21 SMI" /* SVr4.0 1.1 */
#
# Internet (IP) protocols
#
ip 0 IP # pseudo internet protocol number
icmp 1 ICMP # internet control message protocol
ggp 3 GGP # gateway-gateway protocol
tcp 6 TCP # transmission control protocol
egp 8 EGP # exterior gateway protocol
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
hmp 20 HMP # host monitoring protocol
xns-idp 22 XNS-IDP # Xerox NS IDP
rdp 27 RDP # "reliable datagram" protocol
#
# Internet (IPv6) extension headers
#
hopopt 0 HOPOPT # Hop-by-hop options for IPv6
ipv6 41 IPv6 # IPv6 in IP encapsulation
ipv6-route 43 IPv6-Route # Routing header for IPv6
ipv6-frag 44 IPv6-Frag # Fragment header for IPv6
esp 50 ESP # Encap Security Payload for IPv6
ah 51 AH # Authentication Header for IPv6
ipv6-icmp 58 IPv6-ICMP # IPv6 internet control message protocol
ipv6-nonxt 59 IPv6-NoNxt # IPv6No next header extension header
ipv6-opts 60 IPv6-Opts # Destination Options for IPv6
The listing above is the contents of the
/etc/protocols file from a Solaris 8
workstation. This list of numbers is by no means complete. If you
refer to the Protocol Numbers section of the IANA web site,
you'll see many more protocol numbers. However, a system needs
to include only the numbers of the protocols that it actually uses.
Even the list shown above is more than this specific workstation
needed; for example, the second half of this table is used only on
systems that run IPv6. Don't worry if your system doesn't
use IPv6 or many of these other protocols. The additional entries do
no harm.
What exactly does this table mean? When a datagram arrives and its
destination address matches the local IP address, the IP layer knows
that the datagram has to be delivered to one of the transport
protocols above it. To decide which protocol should receive the
datagram, IP looks at the datagram's protocol number. Using
this table, you can see that if the datagram's protocol number
is 6, IP delivers the datagram to TCP; if the protocol number is 17,
IP delivers the datagram to UDP. TCP and UDP are the two transport
layer services we are concerned with, but all of the protocols listed
in the first half of the table use IP datagram delivery service
directly. Some, such as ICMP, EGP, and GGP, have already been
mentioned. Others haven't, but you don't need to be
concerned with the minor protocols in order to configure and manage a
TCP/IP network.