CS Home THS Home District Page Acceptable Use Policy

What is TCP/IP

TCP/IP is a suite of network protocols based on a standard architectural model called the OSI reference model (also called the OSI stack). This model consists of seven layers, each layer communicating with each of its neighbor layers only thereby separating specific tasks and/or protocols.

The OSI Model

Application
The Application layer is the layer at which applications access network services. This layer represents the services that directly support applications such as software for file transfers, database access, email, and network games.

Presentation
The Presentation layer translates data from the Application layer into a network format (and vice-versa). This layer also manages security issues by providing services such as data encryption and compression.

Session
The Session layer allows applications on different computers to establish, use, and end a session/connection. This layer establishes dialog control between the two computers in a session, regulating which side transmits, and when and how long it transmits.

Transport
The Transport layer handles error recognition and recovery. It also repackages long messages when necessary into small packets for transmission and at the receiving end, rebuilds packets into the original message. The receiving Transport layer also sends receipt acknowledgments.

Network
The Network layer addresses messages and translates logical addresses and names into physical addresses. It also determines the route from the source to the destination computer and manages traffic problems (flow control), such as switching, routing, and controlling the congestion of data packets.

Data Link
The Data Link layer packages raw bits from the Physical layer into frames (logical, structures packets for data). This layer is responsible for transferring frames from one computer to another, without errors. After sending a frame, it waits for an acknowledgment from the receiving computer.

Physical
The Physical layer transmits bits from one computer to another and regulates the transmission of a stream of bits over a physical medium. This layer defines how the cable is attached to the network adapter and what transmission technique is used to send data over the cable.

How a Protocol Stack Works

As the reference model indicates, protocols (which compose the various layers) are like a pile of building blocks stacked one upon another. Because of this structure, groups of related protocols are often called stacks or protocol stacks.

Data is passed down the stack from one layer to the next, until it is transmitted over the network by the network access layer protocols.

At the remote end, the data is passed up the stack to the receiving application. The individual layers do not need to know how the layers above or below them function; they only need to know how to pass data to them.

Each layer in the stack adds control information (such as destination address, routing controls, and checksum) to ensure proper delivery. This control information is called a header and/or a trailer because it is placed in front of or behind the data to be transmitted. Each layer treats all of the information that it receives from the layer above it as data, and it places its own header and/or trailer around that information.

These wrapped messages are then passed into the layer below along with additional control information, some of which may be forwarded or derived from the higher layer. By the time a message exits the system on a physical link (such as a wire), the original message is enveloped in multiple, nested wrappers—one for each layer of protocol through which the data passed. When a protocol uses headers or trailers to package the data from another protocol, the process is called encapsulation.

When data is received, the opposite happens. Each layer strips off its header and/or trailer before passing the data up to the layer above. As information flows back up the stack, information received from a lower layer is interpreted as both a header/trailer and data. The process of removing headers and trailers from data is called decapsulation. This mechanism enables each layer in the transmitting computer to communicate with its corresponding layer in the receiving computer. Each layer in the transmitting computer communicates with its peer layer in the receiving computer via a process called peer-to-peer communication.

Each layer has specific responsibilities and specific rules for carrying out those responsibilities, and it knows nothing about the procedures that the other layers follow. A layer carries out its tasks and delivers the message to the next layer in the protocol stack. An address mechanism is the common element that allows data to be routed through the various layers until it reaches its destination.

Each layer also has its own independent data structures. Conceptually, a layer is unaware of the data structures used by the layers above and below it. In reality, the data structures of a layer are designed to be compatible with the structures used by the surrounding layers for the sake of more efficient data transmission. Still, each layer has its own data structures and its own terminology to describe those structures.

Higher Layer Application Protocols

Protocols are often packaged together with TCP/IP as a "suite." Higher layer application protocols in the TCP/IP suite include the Hypertext Transfer Protocol (HTTP), the File Transfer Protocol (FTP), Telnet (Telnet) which lets you logon to remote computers, Post Office Protocol (POP) and the Simple Mail Transfer Protocol (SMTP).

Telnet is a user command and an underlying TCP/IP protocol for accessing remote computers. Through Telnet, an administrator or another user can access someone else's computer remotely. On the Web, HTTP and FTP protocols allow you to request specific files from remote computers, but not to actually be logged on as a user of that computer. With Telnet, you log on as a regular user with whatever privileges you may have been granted to the specific application and data on that computer.

A Telnet command request looks like this (the computer name is made-up):

telnet the.libraryat.whatis.edu

The result of this request would be an invitation to log on with a userid and a prompt for a password. If accepted, you would be logged on like any user who used this computer every day. Telnet is most likely to be used by program developers and anyone who has a need to use specific applications or data located at a particular host computer.

All clients can use applications to access data at remote servers or other clients by opening a listening port. These ports are reserved by design and documented to anyone writing applications that utilize the TCP/IP suite of protocols. For example, telnet uses port 23. When an application uses telnet to access port 23 on another client or server, they have to "speak" telnet. The syntax of each protocol is documented in its RFC.

Another example of using telnet is to telnet to a different port - say POP 110 - to retrieve your mail, or 20 to retrieve a file. In each case, the application of the user must "speak" in the POP language if connection to 110 or in the FTP language if connecting to port 20. Below is a list of what is called "well known" ports (the top 4 most common are highlighted):

Port Number
Description
1
TCP Port Service Multiplexer (TCPMUX)
5
Remote Job Entry (RJE)
7
ECHO
18
Message Send Protocol (MSP)
20
FTP -- Data
21
FTP -- Control
22
SSH Remote Login Protocol
23
Telnet
25
Simple Mail Transfer Protocol (SMTP)
29
MSG ICP
37
Time
42
Host Name Server (Nameserv)
43
WhoIs
49
Login Host Protocol (Login)
53
Domain Name System (DNS)
69
Trivial File Transfer Protocol (TFTP)
70
Gopher Services
79
Finger
80
HTTP
103
X.400 Standard
108
SNA Gateway Access Server
109
POP2
110
POP3
115
Simple File Transfer Protocol (SFTP)
118
SQL Services
119
Newsgroup (NNTP)
137
NetBIOS Name Service
139
NetBIOS Datagram Service
143
Interim Mail Access Protocol (IMAP)
150
NetBIOS Session Service
156
SQL Server
161
SNMP
179
Border Gateway Protocol (BGP)
190
Gateway Access Control Protocol (GACP)
194
Internet Relay Chat (IRC)
197
Directory Location Service (DLS)
389
Lightweight Directory Access Protocol (LDAP)
396
Novell Netware over IP
443
HTTPS
444
Simple Network Paging Protocol (SNPP)
445
Microsoft-DS
458
Apple QuickTime
546
DHCP Client
547
DHCP Server
563
SNEWS
569
MSN
1080
Socks

 

 
 
 Home
 Previous