The following is a summary of each topic in the chapter and some questions for your reflection.
What Did I Learn in this Module? (15.3.1)
• TCP and UDP—UDP is a ’best effort’ delivery system that does not require acknowledgment of receipt. UDP is preferable with applications such as streaming audio and VoIP. Acknowledgments would slow down delivery and retransmissions are undesirable. Packets take a path from the source to a destination. A few packets may be lost but it is usually not noticeable.
TCP packets take a path from the source to the destination. However, each of the packets has a sequence number. TCP breaks up a message into small pieces known as segments. The segments are numbered in sequence and passed to the IP process for assembly into packets. TCP keeps track of the number of segments that have been sent to a specific host from a specific application. If the sender does not receive an acknowledgment within a certain period of time, it assumes that the segments were lost and retransmits them. Only the portion of the message that is lost is resent, not the entire message.
• Port Numbers—When a message is delivered using either TCP or UDP, the protocols and services requested are identified by a port number. A port is a numeric identifier within each segment that is used to keep track of specific conversations between a client and server. Every message that a host sends contains both a source and destination port.
When a message is received by a server, it is necessary for the server to be able to determine which service is being requested by the client. Clients are preconfigured to use a destination port that is registered on the internet for each service.
Ports are assigned and managed by an organization known as the ICANN. Ports are broken into three categories and range in number from 1 to 65,535:
• Well-Known Ports – Destination ports that are associated with common network applications are identified as well-known ports. These ports are in the range of 1 to 1023.
• Registered Ports – Ports 1024 through 49151 can be used as either source or destination ports. These can be used by organizations to register specific applications such as IM applications.
• Private Ports – Ports 49152 through 65535 are often used as source ports. These ports can be used by any application.
The source port number is dynamically generated by the sending device to identify a conversation between two devices. This process allows multiple conversations to occur simultaneously. It is common for a device to send multiple HTTP service requests to a web server at the same time. Each separate HTTP conversation is tracked based on the source ports.
The client places a destination port number in the segment to tell the destination server what service is being requested. A server can offer more than one service simultaneously, such as web services on port 80 at the same time that it offers FTP connection establishment on port 21.
Unexplained TCP connections can pose a major security threat. They can indicate that something or someone is connected to the local host. Sometimes it is necessary to know which active TCP connections are open and running on a networked host. Netstat is an important network utility that can be used to verify those connections. The command netstat is used to list the protocols in use, the local address and port numbers, the foreign address and port numbers, and the connection state.
I once ordered some furniture from one of those online stores. It was sent to me in three different boxes, over the span of two weeks. I was not worried that anything was missing because I received email updates that detailed the location of each box along its route from the store to my home. That example is like TCP. All along the route, there are built-in checks to ensure that what needs to be delivered gets delivered, and in the right order.
There is still a need for UDP in networking. I would not enjoy streaming a movie where it stops for minutes at a time waiting for the network to send the next scene. Can you think of a good analogy for UDP?