|
TCP/IP Network Model
An architectural model provides a common frame of reference for discussing Internet communications. It is used
not only to explain communication protocols but to develop them as well. It separates the functions performed by
communication protocols into manageable layers stacked on top of each other. Each layer in the stack performs a
specific function in the process of communicating over a network.
Understanding Architectural Models and Protocols
In an architectural model, a layer does not define a single protocol—it defines a data communication function that
may be performed by any number of protocols. Because each layer defines a function, it can contain multiple protocols,
each of which provides a service suitable to the function of that layer.
Every protocol communicates with its peer. A peer is an implementation of the same protocol in the equivalent layer
on a remote computer. Peer-level communications are standardized to ensure that successful communications take
place. Theoretically, each protocol is only concerned with communicating to its peer—it does not care about the
layers above or below it.
A dependency, however, exists between the layers. Because every layer is involved in sending data from a local
application to an equivalent remote application, the layers must agree on how to pass data between themselves on
a single computer. The upper layers rely on the lower layers to transfer the data across the underlying network.
Generally, TCP/IP is described using three to five functional layers. To describe TCP/IP based firewalls more precisely,
the common DoD reference model have been chosen , which is also known as the Internet reference model.

This model is based on the three layers defined for the DoD Protocol Model in the DDN Protocol Handbook, Volume
1. These three layers are as follows: Network access layer, Host-to-host transport layer and Application layer.
An additional layer, the internetwork layer, has been added to this model. The internetwork layer is commonly
used to describe TCP/IP.
The four network layers defined by TCP/IP model are as follows.
Layer 1 - Link (Physical Layer)
This layer defines the network hardware and device drivers.
Layer 2 - Internetwork (Network Layer)
This layer is used for basic communication, addressing and routing. TCP/IP uses IP and ICMP protocols at the network
layer.
Layer 3 - Transport
Handles communication among programs on a network. TCP and UDP falls within this layer.
Layer 4 - Application
End-user applications reside at this layer. Commonly used applications include NFS, DNS, arp, rlogin, talk, ftp,
ntp and traceroute.
The TCP/IP Model
The TCP/IP model does not exactly match the OSI model. There is no universal agreement regarding how to describe
TCP/IP with a layered model but it is generally agreed that there are fewer levels than the seven layers of the
OSI model. Most descriptions present from three to five layers. In this technical reference document the layers
of the TCP/IP model are defined as follows:
4 - Application Layer
In TCP/IP the Application Layer also includes the OSI Presentation Layer and Session Layer. In this document an
application is any process that occurs above the Transport Layer. This includes all of the processes that involve
user interaction. The application determines the presentation of the data and controls the session. In TCP/IP the
terms socket and port are used to describe the path over which applications communicate. There are numerous application
level protocols in TCP/IP, including Simple Mail Transfer Protocol (SMTP) and Post Office Protocol (POP) used for
e-mail, Hyper Text Transfer Protocol (HTTP) used for the World-Wide-Web, and File Transfer Protocol (FTP). Most
application level protocols are associated with one or more port number.
3 - Transport Layer
In TCP/IP there are two Transport Layer protocols. The Transmission Control Protocol (TCP) guarantees that information
is received as it was sent. The User Datagram Protocol (UDP) performs no end-to-end reliability checks.
2 - Internetwork Layer
In the OSI Reference Model the Network Layer isolates the upper layer protocols from the details of the underlying
network and manages the connections across the network. The Internet Protocol (IP) is normally described as the
TCP/IP Network Layer. Because of the Inter-Networking emphasis of TCP/IP this is commonly referred to as the Internet
Layer. All upper and lower layer communications travel through IP as they are passed through the TCP/IP protocol
stack.
1 - Physical Layer - Network Access Layer
In TCP/IP the Data Link Layer and Physical Layer are normally grouped together. TCP/IP makes use of existing Data
Link and Physical Layer standards rather than defining its own. Most RFCs that refer to the Data Link Layer describe
how IP utilizes existing data link protocols such as Ethernet, Token Ring, FDDI, HSSI, and ATM. The characteristics
of the hardware that carries the communication signal are typically defined by the Physical Layer. This describes
attributes such as pin configurations, voltage levels, and cable requirements. Examples of Physical Layer standards
are RS-232C, V.35, and IEEE 802.3.
The four layer structure of TCP/IP is built as information is passed down from applications to the physical network
layer. When data is sent, each layer treats all of the information it receives from the layer above as data and
adds control information to the front of that data. This control information is called a header, and the addition
of a header is called encapsulation. When data is received, the opposite procedure takes place as each layer removes
its header before passing the data to the layer above.
back to TOP
The following diagram attempts to show where various TCP/IP
and other protocols would reside in the original OSI model:
|
7
|
Application |
e.g. HTTP, SMTP, SNMP, FTP, Telnet, SSH, Scp, NFS, RTSP,
Feed, Webcal, XMPP, Whois |
|
6
|
Presentation |
e.g. XDR, ASN.1, SMB, AFP |
|
5
|
Session |
e.g. TLS, SSH, ISO 8327 / CCITT X.225, RPC, NetBIOS, ASP |
|
4
|
Transport |
e.g. TCP, UDP, RTP, SCTP, SPX, ATP |
|
3
|
Network |
e.g. IP, ICMP, IGMP, BGP, OSPF, RIP, IGRP, EIGRP, ARP, RARP,
X.25 |
|
2
|
Data Link |
e.g. Ethernet, Token ring, HDLC, Frame relay, ISDN, ATM,
802.11 WiFi, FDDI, PPP |
|
1
|
Physical |
e.g. wire, radio, fiber optic |
Commonly, the top three layers of the OSI model (Application, Presentation and Session) are considered as a single
Application Layer in the TCP/IP suite. Because the TCP/IP suite has no unified session layer on which higher layers
are built, these functions are typically carried out (or ignored) by individual applications. The most notable
difference between TCP/IP and OSI models is the Application layer, as TCP/IP integrates a few steps of the OSI
model into its Application layer.
A simplified TCP/IP interpretation of the stack is shown below:
|
5
|
Application
"Layer 7" |
e.g. HTTP, FTP, DNS
(routing protocols like BGP and RIP, which for a variety of reasons run over TCP and UDP respectively, may also
be considered part of the Network layer) |
|
4
|
Transport |
e.g. TCP, UDP, RTP, SCTP
(routing protocols like OSPF, which run over IP, may also be considered part of the Network layer) |
|
3
|
Internet |
For TCP/IP this is the Internet Protocol (IP)
(required protocols like ICMP and IGMP run over IP, but may still be considered part of the network layer; ARP
does not run over IP) |
|
2
|
Data Link |
e.g. Ethernet, Token ring, etc. |
|
1
|
Physical |
e.g. physical media, and encoding techniques, T1, E1 |
The Network Access layer
1 - Physical layer
The Physical layer describes the physical characteristics of the communication, such as conventions about the nature
of the medium used for communication (such as wires, fiber optic links or radio links), and all related details
such as connectors, channel codes and modulation, signal strengths, wavelength, low-level synchronization and timing
and maximum distances. The Internet protocol suite does not cover the physical layer of any network; see the articles
on specific network technologies for detail on the physical layer of each particular technology.
2 - Data Link layer
The data link layer specifies how packets are transported over the physical layer, including the framing (i.e.
the special bit patterns which mark the start and end of packets). Ethernet, for example, includes fields in the
packet header which specify which machine or machines on the network a packet is destined for. Examples of Data
link layer protocols are Ethernet, Wireless Ethernet, SLIP, Token Ring and ATM.
PPP is a little more complex, as it was originally specified as a separate protocol which ran on top of another
data link layer, HDLC/SDLC.
This layer is sometimes further subdivided into Logical Link Control and Media Access Control.
3 - Internetwork layer
As originally defined, the Network layer solves the problem of getting packets across a single network. Examples
of such protocols are X.25, and the ARPANET's Host/IMP Protocol.
With the advent of the concept of internetworking, additional functionality was added to this layer, namely getting
data from the source network to the destination network. This generally involves routing the packet across a network
of networks, known as an internet.
In the internet protocol suite, IP performs the basic task of getting packets of data from source to destination.
IP can carry data for a number of different higher level protocols; these protocols are each identified by a unique
IP Protocol Number. ICMP and IGMP are protocols 1 and 2, respectively.
Some of the protocols carried by IP, such as ICMP (used to transmit diagnostic information about IP transmission)
and IGMP (used to manage multicast data) are layered on top of IP but perform network layer functions, illustrating
an incompatibility between the internet and OSI models. All routing protocols, such as BGP, OSPF, and RIP are also
really part of the network layer, although they might seem to belong higher in the stack.
4 - Transport layer
The protocols at the Transport layer can solve problems like reliability ("did the data reach the destination?")
and ensure that data arrives in the correct order. In the TCP/IP protocol suite, transport protocols also determine
which application any given data is intended for.
The dynamic routing protocols which technically fit at this layer in the TCP/IP Protocol Suite (since they run
over IP) are generally considered to be part of the Network layer; an example is OSPF (IP protocol number 89).
TCP (IP protocol number 6) is a "reliable", connection-oriented, transport mechanism providing a reliable
byte stream, which makes sure data arrives complete, undamaged, and in order. TCP tries to continuously measure
how loaded the network is and throttles its sending rate in order to avoid overloading the network. Furthermore,
TCP will attempt to deliver all data correctly in the specified sequence. These are its main differences from UDP,
and can become disadvantageous in real-time streaming or routing applications with high internetwork layer loss
rates.
The newer SCTP is also a "reliable", connection-oriented, transport mechanism. It is record rather than
byte oriented, and provides multiple sub-streams multiplexed over a single connection. It also provides multi-homing
support, in which a connection end can be represented by multiple IP addresses (representing multiple physical
interfaces), such that if one fails the connection is not interrupted. It was developed initially for telephony
applications (to transport SS7 over IP), but can also be used for other applications.
UDP (IP protocol number 17) is a connectionless datagram protocol. It is a "best effort" or "unreliable"
protocol - not because it is particularly unreliable, but because it does not verify that packets have reached
their destination, and gives no guarantee that they will arrive in order. If an Application requires these characteristics,
it must provide them itself, or use TCP.
UDP is typically used for applications such as streaming media (audio and video, etc) where on-time arrival is
more important than reliability, or for simple query/response applications like DNS lookups, where the overhead
of setting up a reliable connection is disproportionately large.
DCCP is currently under development by IETF. It provides TCP's flow control semantics, while keeping UDP's datagram
service model visible to the user.
Both TCP and UDP are used to carry a number of higher-level applications. The applications at any given network
address are distinguished by their TCP or UDP Port Number. By convention certain well known ports are associated
with specific applications.
RTP is a datagram protocol that is designed for real-time data such as streaming audio and video. Although RTP
uses the UDP packet format as a basis, it provides a function that is at the same protocol layer.
5 - Application layer
The Application layer is the layer that most common network-aware programs use in order to communicate across a
network with other programs. Processes that occur in this layer are application specific; data is passed from the
network-aware program, in the format used internally by this application, and is encoded into a standard protocol.
Some specific programs are considered to run in this layer. They provide services that directly support user applications.
These programs and their corresponding protocols include HTTP (The World Wide Web), FTP (File transport), SMTP
(Email), SSH (Secure remote login), DNS (Name <-> IP Address lookups) and many others.
Once the data from an application has been encoded into a standard application layer protocol it will be passed
down to the next layer of the IP stack.
At the Transport Layer, applications will most commonly make use of TCP or UDP, Server applications are often associated
with a well-known port number. Ports for server applications are officially allocated by the Internet Assigned
Numbers Authority (IANA) but most developers of new protocols nowadays just do their own thing and as its rare
to have more than a few server applications on the same system problems with port conflicts are rare.
back to TOP
Any questions or inquiries may be e-mailed to keppanet@hotmail.com.
|