Network Protocols
Network Protocols
This chapter introduces the Oracle Solaris implementation of the TCP/IP network protocol
suite. The information is intended for system and network administrators who are unfamiliar
with basic TCP/IP concepts. The remaining parts of this book assume that you are familiar with
these concepts.
“TCP/IP” is the acronym that is commonly used for the set of network protocols that compose
the Internet Protocol suite. Many texts use the term “Internet” to describe both the protocol suite
and the global wide area network. In this book, “TCP/IP” refers specifically to the Internet
protocol suite. “Internet” refers to the wide area network and the bodies that govern the
Internet.
To interconnect your TCP/IP network with other networks, you must obtain a unique IP
address for your network. At the time of this writing, you obtain this address from an Internet
service provider (ISP).
37
Introducing the TCP/IP Protocol Suite
If hosts on your network are to participate in the Internet Domain Name System (DNS), you
must obtain and register a unique domain name. The InterNIC coordinates the registration of
domain names through a group of worldwide registries. For more information on DNS, refer to
System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP).
4 Transport Manages the transfer of data. Also assures that the received data are
identical to the transmitted data.
2 Data link Handles the transfer of data across the network media.
The OSI model defines conceptual operations that are not unique to any particular network
protocol suite. For example, the OSI network protocol suite implements all seven layers of the
OSI model. TCP/IP uses some of OSI model layers. TCP/IP also combines other layers. Other
network protocols, such as SNA, add an eighth layer.
OSI Layer
OSI Ref. Layer No. Equivalent TCP/IP Layer TCP/IP Protocol Examples
5,6,7 Application, Application NFS, NIS, DNS, LDAP, telnet, ftp, rlogin, rsh, rcp,
session, RIP, RDISC, SNMP, and others
presentation
1 Physical Physical Ethernet (IEEE 802.3), Token Ring, RS-232, FDDI, and
network others
The table shows the TCP/IP protocol layers and the OSI model equivalents. Also shown are
examples of the protocols that are available at each level of the TCP/IP protocol stack. Each
system that is involved in a communication transaction runs a unique implementation of the
protocol stack.
Data-Link Layer
The data-link layer identifies the network protocol type of the packet, in this instance TCP/IP.
The data-link layer also provides error control and “framing.” Examples of data-link layer
protocols are Ethernet IEEE 802.2 framing and Point-to-Point Protocol (PPP) framing.
Internet Layer
The Internet layer, also known as the network layer or IP layer, accepts and delivers packets for
the network. This layer includes the powerful Internet Protocol (IP), the Address Resolution
Protocol (ARP), and the Internet Control Message Protocol (ICMP).
IP Protocol
The IP protocol and its associated routing protocols are possibly the most significant of the
entire TCP/IP suite. IP is responsible for the following:
■ IP addressing – The IP addressing conventions are part of the IP protocol. “Designing an
IPv4 Addressing Scheme” on page 58 introduces IPv4 addressing and “IPv6 Addressing
Overview” on page 74 introduces IPv6 addressing.
■ Host-to-host communications – IP determines the path a packet must take, based on the
receiving system's IP address.
■ Packet formatting – IP assembles packets into units that are known as datagrams.
Datagrams are fully described in “Internet Layer: Where Packets Are Prepared for Delivery”
on page 47.
■ Fragmentation – If a packet is too large for transmission over the network media, IP on the
sending system breaks the packet into smaller fragments. IP on the receiving system then
reconstructs the fragments into the original packet.
Oracle Solaris supports both IPv4 and IPv6 addressing formats, which are described in this
book. To avoid confusion when addressing the Internet Protocol, one of the following
conventions is used:
■ When the term “IP” is used in a description, the description applies to both IPv4 and IPv6.
■ When the term “IPv4” is used in a description, the description applies only to IPv4.
■ When the term “IPv6” is used in a description, the description applies only to IPv6.
ARP Protocol
The Address Resolution Protocol (ARP) conceptually exists between the data-link and Internet
layers. ARP assists IP in directing datagrams to the appropriate receiving system by mapping
Ethernet addresses (48 bits long) to known IP addresses (32 bits long).
Introducing the TCP/IP Protocol Suite
ICMP Protocol
The Internet Control Message Protocol (ICMP) detects and reports network error conditions.
ICMP reports on the following:
■ Dropped packets – Packets that arrive too fast to be processed
■ Connectivity failure – A destination system cannot be reached
■ Redirection – Redirecting a sending system to use another router
Transport Layer
The TCP/IP transport layer ensures that packets arrive in sequence and without error, by
swapping acknowledgments of data reception, and retransmitting lost packets. This type of
communication is known as end-to-end. Transport layer protocols at this level are
Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Stream Control
Transmission Protocol (SCTP). TCP and SCTP provide reliable, end-to-end service. UDP
provides unreliable datagram service.
TCP Protocol
TCP enables applications to communicate with each other as though they were connected by a
physical circuit. TCP sends data in a form that appears to be transmitted in a
character-by-character fashion, rather than as discrete packets. This transmission consists of
the following:
■ Starting point, which opens the connection
■ Entire transmission in byte order
■ Ending point, which closes the connection.
TCP attaches a header onto the transmitted data. This header contains many parameters that
help processes on the sending system connect to peer processes on the receiving system.
TCP confirms that a packet has reached its destination by establishing an end-to-end
connection between sending and receiving hosts. TCP is therefore considered a “reliable,
connection-oriented” protocol.
SCTP Protocol
SCTP is a reliable, connection-oriented transport layer protocol that provides the same services
to applications that are available from TCP. Moreover, SCTP can support connections between
systems that have more than one address, or multihomed. The SCTP connection between
sending and receiving system is called an association. Data in the association is organized in
chunks. Because SCTP supports multihoming, certain applications, particularly applications
used by the telecommunications industry, need to run over SCTP, rather than TCP.
Introducing the TCP/IP Protocol Suite
UDP Protocol
UDP provides datagram delivery service. UDP does not verify connections between receiving
and sending hosts. Because UDP eliminates the processes of establishing and verifying
connections, applications that send small amounts of data use UDP.
Application Layer
The application layer defines standard Internet services and network applications that anyone
can use. These services work with the transport layer to send and receive data. Many application
layer protocols exist. The following list shows examples of application layer protocols:
■ Standard TCP/IP services such as the ftp, tftp, and telnet commands
■ UNIX “r” commands, such as rlogin and rsh
■ Name services, such as NIS and the domain name system (DNS)
■ Directory services (LDAP)
■ File services, such as the NFS service
■ Simple Network Management Protocol (SNMP), which enables network management
■ Router Discovery Server protocol (RDISC) and Routing Information Protocol (RIP)
routing protocols
UNIX“r”Commands
The UNIX “r” commands enable users to issue commands on their local machines that run on
the remote host. These commands include the following:
■ rcp
■ rlogin
■ rsh
Instructions for using these commands are in the rcp(1), rlogin(1), and rsh(1) man pages.
Name Services
Oracle Solaris provides the following name services:
■ DNS – The domain name system (DNS) is the name service provided by the Internet for
TCP/IP networks. DNS provides host names to the IP address service. DNS also serves as a
database for mail administration. For a complete description of this service, see System
Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP). See also the
resolver(3RESOLV) man page.
■ /etc files – The original host-based UNIX name system was developed for standalone
UNIX machines and then adapted for network use. Many old UNIX operating systems and
computers still use this system, but it is not well suited for large complex networks.
■ NIS – Network Information Service (NIS) was developed independently of DNS and has a
slightly different focus. Whereas DNS focuses on making communication simpler by using
machine names instead of numerical IP addresses, NIS focuses on making network
administration more manageable by providing centralized control over a variety of network
information. NIS stores information about machine names and addresses, users, the
network itself, and network services. NIS name space information is stored in NIS maps. For
more information on NIS Architecture and NIS Administration, see System Administration
Guide: Naming and Directory Services (DNS, NIS, and LDAP).
How the TCP/IP Protocols Handle Data Communications
Directory Service
Oracle Solaris supports LDAP (Lightweight Directory Access Protocol) in conjunction with the
Sun Open Net Environment (Sun ONE) Directory Server, as well as other LDAP directory
servers. The distinction between a name service and a directory service is in the differing extent
of functionality. A directory service provides the same functionality of a naming service, but
provides additional functionalities as well. See System Administration Guide: Naming and
Directory Services (DNS, NIS, and LDAP).
File Services
The NFS application layer protocol provides file services for Oracle Solaris. You can find
complete information about the NFS service in System Administration Guide: Network Services.
Network Administration
The Simple Network Management Protocol (SNMP) enables you to view the layout of your
network and the status of key machines. SNMP also enables you to obtain complex network
statistics from software that is based on a graphical user interface (GUI). Many companies offer
network management packages that implement SNMP.
Routing Protocols
The Routing Information Protocol (RIP) and the Router Discovery Server Protocol (RDISC)
are two available routing protocols for TCP/IP networks. For complete lists of available routing
protocols for Oracle Solaris 10, refer to Table 5–1 and Table 5–2.
Protocols on each layer of the sending host also interact with their peers on the receiving host.
Figure 1–1 shows this interaction.
protocols at each layer either add or remove fields from the basic header. When a protocol on
the sending system adds data to the packet header, the process is called data encapsulation.
Moreover, each layer has a different term for the altered packet, as shown in the following
figure.
Network media
This section summarizes the life cycle of a packet. The life cycle starts when you issue a
command or send a message. The life cycle finishes when the appropriate application on the
receiving system receives the packet.
Suppose the user issues an rlogin command to log in to the remote system, as shown in
Figure 1–1. The rlogin command uses the TCP transport layer protocol. TCP expects to
receive data in the form of a stream of bytes that contain the information in the command.
Therefore, rlogin sends this data as a TCP stream.
How the TCP/IP Protocols Handle Data Communications
The transport layer protocol creates a virtual flow of data between the sending and receiving
application, differentiated by the transport port number. The port number identifies a port, a
dedicated location in memory for receiving or sending data. In addition, the transport protocol
layer might provide other services, such as reliable, in order data delivery. The end result
depends on whether TCP, SCTP, or UDP handles the information.
TCP Segmentation
TCP is often called a “connection-oriented” protocol because TCP ensures the successful
delivery of data to the receiving host. Figure 1–1 shows how the TCP protocol receives the
stream from the rlogin command. TCP then divides the data that is received from the
application layer into segments and attaches a header to each segment.
Segment headers contain sending and receiving ports, segment ordering information, and a
data field that is known as a checksum. The TCP protocols on both hosts use the checksum data
to determine if the data transfers without error.
UDP Packets
UDP is a “connectionless” protocol. Unlike TCP, UDP does not check that data arrived at the
receiving host. Instead, UDP formats the message that is received from the application layer
into UDP packets. UDP attaches a header to each packet. The header contains the sending and
receiving ports, a field with the length of the packet, and a checksum.
The sending UDP process attempts to send the packet to its peer UDP process on the receiving
host. The application layer determines whether the receiving UDP process acknowledges the
reception of the packet. UDP requires no notification of receipt. UDP does not use the
three-way handshake.
How the TCP/IP Protocols Handle Data Communications
IP Datagrams
IP attaches an IP header to the segment or packet's header, in addition to the information that is
added by TCP or UDP. Information in the IP header includes the IP addresses of the sending
and receiving hosts, the datagram length, and the datagram sequence order. This information is
provided if the datagram exceeds the allowable byte size for network packets and must be
fragmented.
5. The application layer receives the message. The application layer then performs the
operation that the sending host requested.
The Internet Engineering Task Force (IETF) web site (http://www.ietf.org/ The IETF is the body responsible for the
home.html) architecture and governance of the Internet.
The IETF web site contains information
about the various activities of this
organization. The site also includes links to
the major publications of the IETF.
Finding Out More About TCP/IP and the Internet
Generally, For Your Information (FYI) documents appear as a subset of the RFCs. FYIs contain
information that does not deal with Internet standards. FYIs contain Internet information of a
more general nature. For example, FYI documents include a bibliography that list introductory
TCP/IP books and papers. FYI documents provide an exhaustive compendium of
Internet-related software tools. Finally, FYI documents include a glossary of Internet and
general networking terms.
You will find references to relevant RFCs throughout this guide and other books in the Oracle
Solaris System Administrator Collection.