LDP/LDP/inprogress/Linux-Networking/TCP-IP.xml

201 lines
10 KiB
XML

<sect1 id="TCP-IP">
<title>TCP-IP</title>
<para>
Even though the OSI Network Layer Model is the generally accepted model to
introduce and teach students about computer networking, it isn't the one
that is most commonly used in the "real world". In its place is the
ubiqitous TCP/IP model which was developed approximately two decades ago for
the United States Department of Defense (DoD), mainly for the purpose of
interconnecting different-brand computers. Although it is based on a
layered model, it is focused more on delivering interconnectivity than on
rigidly adhering to functional layers which is one of the reasons why TCP/IP
has become the de facto standard internetworking protocol as opposed to OSI.
</para>
<para>
Theoretically and practically, it does little different from the OSI model.
However, it differs in the number of layers that it possesses and also the
purposes of each layer. Funnily, for such a widely used protocol there seems
to be a number of different interpretations as to its composition and the
purpose of each layer. Even so, it is generally agreed that there either
four or five different layers and that they are roughly equivalent to the
same layers in the OSI Network Layer Model with the exception of one or
two which are split and/or combined.
</para>
<para>
The primary advantages of the TCP/IP protocol suite are that it is an
open protocol standard, freely available and developed
independently from any specific operating system or computer hardware
platform. As a consequence of the general popularity of the standard,
it is ideal for uniting different hardware and software, even if you
don't communicate over the Internet. It also possesses independence
from specific physical network hardware, it can be run over an
Ethernet, a Token Ring, a dial-up line, an X.25 net, and virtually
any other kind of physical transmission media, has a globally unique
addressing scheme that allows any TCP/IP device to address any other
device in the entire network, even if the network is as large as the
world-wide Internet, and has support for internetworking and routing,
standardised high-level protocols for consistent, widely available user
services. Its main disadvantage though is that it requires more effort
in administration than other simpler protocols.
</para>
<para>
We will only analyse the TCP/IP model briefly here due to the fact that
there are currently many great reference texts out there already about the
TCP/IP model such as at,
http://www.sangoma.com/fguide.htm
www.citap.com/documents/tcp-ip/tcpip012.htm
and of course in the TCP/IP Request For Comments (RFC) publication.
</para>
<para><variablelist>
<varlistentry><term>Layer 1 and 2 - Network Access</term>
<listitem><para>
<para>
These two layers (Physical/Datalink) deal with pure hardware (ie. wires,
satellite links, NICs, hubs.....) and is roughly synonymous with that of
the Physical layer of the OSI Network Layer Model. The protocols in this
layer provide the means for the system to deliver data to the other device
on a directly attached network. It defines how to use the network to
transmit an IP diagram. Unlike higher-level protocols, it must know the
details of the underlying network to correctly format the data being
transmitted to comply with the network constraints. The TCP/IP Network
Access Layer can encompass the function of all three lower layers of the
OSI reference model Network Layer, Data Link Layer, and Physical Layer.
Functions performed at this level include encapsulation of IP datagrams
into the frames transmitted by the network, and mapping of IP addresses
to the physical addresses used by the network. The network access layer
is responsible for exchanging data between a host and the network and for
delivering data between two devices on the same network. Node physical
addresses are used to accomplish delivery on the local network.
</para>
</para></listitem></varlistentry>
<varlistentry><term>Layer 3 - Internet</term>
<listitem><para>
<para>
The Internetwork Layer it is the heart of TCP/IP and the most important protocol.
IP provides the basic packet delivery service on which TCP/IP networks are built.
All protocols, in the layers above and below IP, use the Internet Protocol to
deliver data. All TCP/IP data flows through IP, incoming and outgoing, regardless
of its final destination.
</para>
<para>
The Internetwork Layer is responsible for routing messages through internetworks.
Devices responsible for routing messages between networks are called gateways in
TCP/IP terminology, although the term router is also used with increasing frequency.
The TCP/IP protocol at this layer is the Internet Protocol (IP). In addition to the
physical node addresses utilised at the network access layer, the IP protocol
implements a system of logical host addresses called IP addresses. The IP addresses
are used by the internet and higher layers to identify devices and to perform
internetwork routing. The Address Resolution Protocol (ARP) enable IP to identify the
physical address that matches a given IP address.
</para>
</para></listitem></varlistentry>
<varlistentry><term>Layer 4 - Transport</term>
<listitem><para>
<para>
The transport layer is similar to the OSI transport model, but with elements
of the OSI session layer functionality. This layer provides an application
layer delivery service. The two protocols found at the transport layer are
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
Either of these two protocols can be used by the application layer process,
the choice depends on the application's transmission reliablity requirements.
</para>
<para>
Transmission Control Protocol (TCP), is a fully reliable, connection-oriented,
acknowledged, byte stream protocol that provide reliable data delivery across
the network and in the proper sequence. TCP supports data fragmentation and
reassemble. It also support multiplexing/demultiplexing using source and
destination port numbers in much the same way they are used by UDP. TCP
provides reliability with a mechanism called Positive Acknowledgement with
Retransmission (PAR). Simply stated, a system using PAR sends the data again,
unless it hears from the remote system that the data arrived okay. The unit
of data exchanged between co-operating TCP modules is called a segment. Some
applications that use TCP are: Telnet, the network terminal protocol which
provides remote login over the network, FTP, the File Transfer Protocol which
is used for interactive file transfer between hosts, and SMTP, the Simple Mail
Transfer Protocol which delivers electronic mail.
</para>
<para>
User Datagram Protocol (UDP), gives application programs direct access
to a datagram delivery service, like the delivery service that IP provides.
This allows applications to exchange messages over the network with a
minimum of protocol overhead. UDP is an unreliable (it doesn't care about the
quality if deliveries it make), connectionless (doesn't establish a connection
on behalf of user applications) datagram protocol. Within your computer, UDP
will deliver data correctly. UDP is used as a data transport service when the
amount of data being transmitted is small, the overhead of creating connections
and ensuring reliable delivery may be greater than the work of retransmitting
the entire data set. Broadcast-oriented services use UDP, as do those in which
repeated, out of sequence, or missed requests have no harmful side effects. Since
no state is maintained for UDP transmission, it is ideal for repeated, short
operations such as the Remote Procedure Call protocol. UDP packets can arrive in
any order. If there is a network bottleneck that drops packets, UDP packets may
not arrive at all. It's up to the application built on UDP to determine that a
packet was lost, and to resend it if necessary. NFS and NIS are build on top of
UDP because of its speed and statelessness. While the performance advantages of a
fast protocol are obvious, the stateless nature of UDP is equally important. Without
state information in either the client or server, crash recovery is greatly
simplified. Some applications that use UDP are: SNMP, the Simple Network
Management Protocol, is used to collect management information from network
devices, DNS, Domain Name Service, which maps IP addresses to the names
assigned to network devices, RIP, Routing Information Protocol, routing is the
central to the way TCP/IP networks. RIP is used by the network devices to
exchange routing information, and NFS, Network File System, this protocol
allows files to be shared by various hosts on the network as if they were
local drives.
</para>
<para>
Protocols defined at this layer accept data from application protocols
running at the Application layer, encapsulate it in the protocol header,
and deliver the data segment thus formed to the lower IP layer for routing.
Unlike the IP protocol, the transport layer is aware of the identity of
the ultimate user representative process. As such, the Transport layer,
in the TCP/IP suite, embodies what data communications are all about:
The delivering of information from an application on one computer to an
application on another computer.
</para>
</para></listitem></varlistentry>
<varlistentry><term>Layer 5 - Process/Application</term>
<listitem><para>
<para>
This layer is broadly equivalent to the application, presentation,
session layers of the OSI model. It includes all processes that use the
transport layer protocols to deliver data. There are many applications
protocols. A good example of concerns handled by these process is the
reconciliation of differences in the data syntax between the platforms
on which the applications are running. It should be clear that unless
this difference in data representation is handled properly, any exchange
of data involving these processes id likely to yield erroneous
interpretations of numerical data. To resolve this issue, and other
similar issues, TCP/IP defines the eXternal Data Representation (XDR)
protocol. Reflecting on the nature of this problem, you can easily see
that the problem has nothing to do with the underlying network topology,
wiring, or electrical interference. It gives an application access to
the communication environment. Examples of protocols found at this
layer are Telnet, FTP (File Transport Protocol), SNMP (Simple Network
Management Protocol), HTTP (Hyer Text Transfer Protocol) and SMTP
(Simple Mail Transfer Protocol).
</para>
</para></listitem></varlistentry>
</variablelist></para>
</sect1>