Skip to Content
Internet Core Protocols: The Definitive Guide
book

Internet Core Protocols: The Definitive Guide

by Eric Hall
February 2000
Intermediate to advanced
464 pages
15h 57m
English
O'Reilly Media, Inc.
Content preview from Internet Core Protocols: The Definitive Guide

Clients Open Connections to Servers

In contrast to server-based applications that are always listening for incoming connections on a fixed port number, client applications will use a randomly assigned port number for their end of the connection. Whenever an IP application needs to send data, the transport protocol will allocate a random port number above 1024 and use this port number for all incoming and outgoing data associated with that application.

For example, when a POP3 client is used to establish a connection with a mail server, the client application will pass an application-specific command to TCP, specifying the server’s IP address and port number as the destination. TCP will then add its own information—including stuff like the port number of the local POP3 client—and hand the entire package off to IP for delivery. IP then does its best to get the message to the destination system.

When the mail server’s IP stack receives the datagram, it verifies that it contains a TCP segment, and then hands the contents off to TCP for further processing. TCP will see that the destination port number refers to the local POP3 server, and then hand off the original application command. Once the server has processed the command, it will reverse the process, sending whatever data it generates back to the port number and IP address in use by the client. Once the transaction is finished, the client’s TCP port will be released. Any subsequent connections would require a new connection be opened, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Packet Guide to Core Network Protocols

Packet Guide to Core Network Protocols

Bruce Hartpence
Ethernet: The Definitive Guide, 2nd Edition

Ethernet: The Definitive Guide, 2nd Edition

Charles E. Spurgeon, Joann Zimmerman

Publisher Resources

ISBN: 1565925726Supplemental ContentErrata Page