91
Chapter 8:
Understanding Networking Protocols
to a client computer. Because UDP doesn't offer many error-checking or error-handling
features, it should be used only when it isn't that important if data occasionally gets
mangled between points and needs to be resent, or when an application program
provides its own extensive error-checking and error-handling functions.
TCP and UDP Ports
Both TCP and UDP support the concept of ports, or application-specific addresses, to
which packets are directed on any given receiving machine. For example, most web
servers run on a server machine and receive requests through port 80. When a machine
receives any packets that are intended for the web server (such as a request to serve up
a web page), the requesting machine directs those packets to that port number. When
you request a web page from a web server, your computer sends the request to the
web server computer and specifies that its request should go to port 80, which is where
HTTP requests are directed.
Hundreds of different ports have standardized uses. Defining your own ports on
a server for specific applications is easy. A text file called SERVICES defines the ports
on a computer. An example of a portion of a Windows SERVICES file follows. (Only
selected entries are shown due to space constraints; the following is not a complete
SERVICES file, but it illustrates what the file contains.)
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This file contains port numbers for well-known
# services as defined by
# RFC 1700 (Assigned Numbers).
#
# Format:
#
# <service name>port number></protocol> [aliases ...][# <comments>]
#
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users #Active users
daytime 13/tcp
daytime 13/udp
chargen 19/tcp ttytst source #Character generator
chargen 19/udp ttytst source #Character generator
ftp-data 20/tcp #FTP, data
ftp 21/tcp #FTP. control
telnet 23/tcp
smtp 25/tcp mail #SMTP
time 37/tcp timserver
time 37/udp timserver
Summary :
When you request a web page from a web server, your computer sends the request to the web server computer and specifies that its request should go to port 80, which is where HTTP requests are directed. # # This file contains port numbers for well-known # services as defined by # RFC 1700 (Assigned Numbers).
Tags :
web,ports,serer,file,computer,machine,serices,port,request,ftp,packets,udp,timserer