For example, a request from a client (perhaps on behalf of you at your PC) to a server on
the Internet may request a file be served from that host's File Transfer Protocol (FTP)
server or process. In order to pass your request to the FTP process in the remote server,
the Transmission Control Protocol (TCP) software layer in your computer identifies the
port number of 21 (which by convention is associated with an FTP request) in the 16-bit
port number integer that is appended to your request. At the server, the TCP layer will
read the port number of 21 and forward your request to the FTP program at the server.
Some services or processes have conventionally assigned permanent port numbers. These
are known as well-known port numbers. In other cases, a port number is assigned
temporarily (for the duration of the request and its completion) from a range of assigned
port numbers. This is called an ephemeral port number.
TCP
- TCP (Transmission Control Protocol) is a set of rules (protocol) used along with
the Internet Protocol (IP) to send data in the form of message units between computers
over the Internet. While IP takes care of handling the actual delivery of the data, TCP
takes care of keeping track of the individual units of data (called packets) that a message
is divided into for efficient routing through the Internet.
For example, when an HTML file is sent to you from a Web server, the Transmission
Control Protocol (TCP) program layer in that server divides the file into one or more
packets, numbers the packets, and then forwards them individually to the IP program
layer. Although each packet has the same destination IP address, it may get routed
differently through the network. At the other end (the client program in your computer),
TCP reassembles the individual packets and waits until they have arrived to forward them
to you as a single file.
Internet Protocol
- The Internet Protocol (IP) is the method or protocol by which data is sent from
one computer to another on the Internet. Each computer (known as a host) on the Internet
has at least one IP address that uniquely identifies it from all other computers on the
Internet. When you send or receive data (for example, an e-mail note or a Web page), the
message gets divided into little chunks called packets. Each of these packets contains
both the sender's Internet address and the receiver's address. Any packet is sent first to a
gateway computer that understands a small part of the Internet. The gateway computer
reads the destination address and forwards the packet to an adjacent gateway that in turn
reads the destination address and so forth across the Internet until one gateway recognizes
the packet as belonging to a computer within its immediate neighborhood or domain.
That gateway then forwards the packet directly to the computer whose address is
specified.
Because a message is divided into a number of packets, each packet can, if necessary, be
sent by a different route across the Internet. Packets can arrive in a different order than
the order they were sent in. The Internet Protocol just delivers them. It's up to another
protocol, the Transmission Control Protocol (TCP) to put them back in the right order.