Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Enjoy The TCP/IP Guide? Get the complete PDF!
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Lower-Layer (Interface, Internet and Transport) Protocols (OSI Layers 2, 3 and 4)
      9  TCP/IP Transport Layer Protocols
           9  Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)
                9  TCP/IP Transmission Control Protocol (TCP)
                     9  TCP Fundamentals and General Operation

Previous Topic/Section
TCP Ports, Connections and Connection Identification
Previous Page
Pages in Current Topic/Section
1
Next Page
TCP Basic Operation: Connection Establishment, Management and Termination
Next Topic/Section

TCP Common Applications and Server Port Assignments

We saw in the overview of TCP that the protocol originally included the functions of both modern TCP and the Internet Protocol. TCP was split into TCP and IP to allow applications that didn't need TCP's complexity to bypass it, using the much simpler UDP instead as a transport layer protocol instead. This was an important step in the development of the TCP/IP protocol suite, since there are several important protocols for which UDP is ideally suited, and even some where TCP is more of a nuisance than a benefit.

Most commonly, however, UDP is only used in special cases. The UDP applications topic describes the two types of protocols that may be better suited to UDP than TCP: ones where speed is more important than reliability, and ones that send only short messages infrequently. The majority of TCP/IP applications do not fall into these categories. Thus, even though the layering of TCP and IP means most protocols aren't required to use TCP, most of them do anyway. The majority of the protocols that use it employ all or at least most of the features it provides. The establishment of a persistent connection is necessary for many interactive protocols, such as Telnet, as well as for ones that send commands and status replies, like HTTP. Reliability and flow control are essential for protocols that send large files, like FTP or the e-mail protocols.

Table 150 shows some of the more significant application protocols that run on TCP. I have shown for each the well-known or registered port number reserved for that protocol's server process (clients use ephemeral ports, not the port numbers in the table). I have also shown the special “keyword” shortcut for each port assignment, and provided brief comments on why the protocol is well-matched to TCP.


Table 150: Common TCP Applications and Server Port Assignments

Port #

Keyword

Protocol

Comments

20 and 21

ftp-data / ftp

File Transfer Protocol (FTP, data and control)

Used to send large files, so ideally suited for TCP.

23

telnet

Telnet Protocol

Interactive session-based protocol. Requires the connection-based nature of TCP.

25

smtp

Simple Mail Transfer Protocol (SMTP)

Uses an exchange of commands, and sends possibly large files between devices.

53

domain

Domain Name Server (DNS)

An example of a protocol that uses both UDP and TCP. For simple requests and replies, DNS uses UDP. For larger messages, especially zone transfers, TCP is used.

70

gopher

Gopher Protocol

A messaging protocol that has been largely replaced by the WWW.

80

http

Hypertext Transfer Protocol (HTTP / World Wide Web)

The classic example of a TCP-based messaging protocol.

110

pop3

Post Office Protocol
(POP version 3)

E-mail message retrieval protocols; use TCP to exchange commands and data.

119

nntp

Network News Transfer Protocol (NNTP)

Used for transferring NetNews (USEnet) messages, which can be lengthy.

139

netbios-ssn

NetBIOS Session Service

A session protocol, clearly better suited to TCP than UDP.

143

imap

Internet Message Access Protocol (IMAP)

Another e-mail message retrieval protocol.

179

bgp

Border Gateway Protocol (BGP)

While interior routing protocols like RIP and OSPF use either UDP or IP directly, BGP runs over TCP. This allows BGP to assume reliable communication even as it sends data over potentially long distances.

194

irc

Internet Relay Chat (IRC)

IRC is like Telnet in that it is an interactive protocol that is strongly based on the notion of a persistent connection between a client and server.

2049

nfs

Network File System (NFS)

NFS was original implemented using UDP for performance reasons. Given that it is responsible for large transfers of files and UDP is unreliable, this was probably not the best idea, and TCP versions were created. The latest version of NFS uses TCP exclusively.

6000 - 6063

TCP

x11

Used for the X Window graphical system. Multiple ports are dedicated to allow many sessions.


A couple of the protocols in the table above use both TCP and UDP, to get the “best of both worlds”. Short, simple messages can be sent with UDP, while larger files are moved with TCP. Many of the protocols that use both TCP and UDP are actually utility/diagnostic protocols (such as Echo, Discard and the Time Protocol). These are a special case, because they were designed to use both UDP and TCP specifically to allow their use for diagnostics on both protocols.

I haven't included an exhaustive list of TCP applications above; see the topic on common TCP/IP applications and port numbers, which also contains a pointer to the full (massive) list of TCP well-known and registered server ports.

 


Previous Topic/Section
TCP Ports, Connections and Connection Identification
Previous Page
Pages in Current Topic/Section
1
Next Page
TCP Basic Operation: Connection Establishment, Management and Termination
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.