Transport Layer Concepts

Before moving to a more detailed discussion of TCP and UDP, it is worth pausing for a moment to focus on a few of the important concepts:

  • Connection-oriented and connectionless protocols

  • Ports and sockets

  • Multiplexing/Demultiplexing

These important concepts are essential to understanding the design of the Transport layer. You’ll learn about these concepts in the following sections.

Connection-Oriented and Connectionless Protocols

To provide the appropriate level of quality assurance for any given situation, developers have come up with two alternative protocol archetypes:

  • A connection-oriented protocol establishes and maintains a connection between communicating computers and monitors the state of that connection over the course of the transmission. In other words, each package of data sent across the network receives an acknowledgment, and the sending machine records status information to ensure that each package is received without errors, retransmitting the data if necessary. At the end of the transmission, the sending and receiving computers gracefully close the connection.

  • A connectionless protocol sends a one-way datagram to the destination and doesn’t worry about officially notifying the destination machine that data is on the way. The destination machine receives the data and doesn’t worry about returning status information to the source computer.

Figure 6.1 shows two people demonstrating connection-oriented communication. Of course, they are not intended to show the true complexity of digital communications but simply to illustrate the concept of a connection-oriented protocol.

Figure 6.1. Connection-oriented communication.


Figure 6.2 shows how the same data would be sent using a connectionless protocol.

Figure 6.2. Connectionless communication.


Ports and Sockets

The Transport layer serves as an interface between network applications and the network and provides a method for addressing network data to particular applications. In the TCP/IP system, applications can address data through either the TCP or UDP protocol module using port numbers. A port is a predefined internal address that serves as a pathway from the application to the Transport layer or from the Transport layer to the application (see Figure 6.3). For instance, a client computer typically contacts a server’s FTP application through TCP port 21.

Figure 6.3. A port address targets data to a particular application.


A closer look at the Transport layer’s application-specific addressing scheme reveals that TCP and UDP data is actually addressed to a socket. A socket is an address formed by concatenating the IP address and the port number. For instance, the socket number 111.121.131.141.21 refers to port 21 on the computer with the IP address 111.121.131.141.

Figure 6.4 shows how computers using TCP exchange socket information when they form a connection.

Figure 6.4. Exchanging the source and destination socket numbers.


The following is an example of how a computer accesses an application on a destination machine through a socket:

  1. Computer A initiates a connection to an application on Computer B through a well-known port. A well-known port is a port number that is assigned to a specific application by the Internet Assigned Numbers Authority (IANA). See Tables 6.1 and 6.2 for lists of some well-known TCP and UDP ports. Combined with the IP address, the well-known port becomes the destination socket address for Computer A. The request includes a data field telling Computer B which socket number to use when sending back information to Computer A. This is Computer A’s source socket address.

    Table 6.1. Well-Known TCP Ports
    ServiceTCP Port NumberBrief Description
    tcpmux1TCP port service multiplexor
    compressnet2Management utility
    compressnet3Compression utility
    echo7Echo
    discard9Discard or null
    systat11Users
    daytime13Daytime
    netstat15Network status
    qotd17Quote of the day
    chargen19Character generator
    ftp-data20File Transfer Protocol data
    ftp21File Transfer Protocol control
    ssh22Secure Shell
    telnet23Terminal network connection
    smtp25Simple Mail Transport Protocol
    nsw-fe27NSW user system
    time37Time server
    name42Host name server
    domain53Domain name server (DNS)
    gopher70Gopher service
    finger79Finger
    http80WWW service
    link87TTY link
    supdup95SUPDUP Protocol
    pop109Post Office Protocol
    pop2109Post Office Protocol 2
    pop3110Post Office Protocol 3
    auth113Authentication service
    sftp115Secure FTP
    uucp-path117UUCP path service
    nntp119Usenet Network News Transfer Protocol
    nbsession139NetBIOS session service

    Table 6.2. Well-Known UDP Ports
    ServiceUDP Port NumberDescription
    echo7Echo
    discard9Discard or null
    systat11Users
    daytime13Daytime
    qotd17Quote of the day
    chargen19Character generator
    time37Time server
    domain53Domain name server (DNS)
    nameserver53Domain name server (DNS)
    bootps67Bootstrap protocol service/DHCP
    bootpc68Bootstrap protocol client/DHCP
    tftp69Trivial File Transfer Protocol
    ntp123Network Time Protocol
    nbname137NetBIOS name
    snmp161Simple Network Management Protocol
    snmp-trap162Simple Network Management Protocol trap

  2. Computer B receives the request from Computer A through the well-known port and directs a response to the socket listed as Computer A’s source address. This socket becomes the destination address for messages sent from the application on Computer B to the application on Computer A.

You’ll learn more about how to initiate a TCP connection later in this hour.

Multiplexing/Demultiplexing

The socket addressing system enables TCP and UDP to perform another important Transport layer task: multiplexing and demultiplexing. As described earlier, multiplexing is the act of braiding input from several sources into a single output, and demultiplexing is the act of receiving input from a single source and delivering it to multiple outputs (see Figure 6.5).

Figure 6.5. Multiplexing and demultiplexing.


Multiplexing/demultiplexing enables the lower levels of the TCP/IP stack to process data without regard to which application initiated that data. All associations with the originating application are settled at the Transport layer, and data passes to and from the Internet layer in a single, application-independent pipeline.

The key to multiplexing and demultiplexing is the socket address. Because the socket address combines the IP number with the port number, it provides a unique identifier for a specific application on a specific machine. See the FTP server depicted in Figure 6.6. All client machines use the well-known port address TCP 21 to contact the FTP server, but the destination socket for each of the connecting PCs is unique. Likewise, all network applications running on the FTP server use the server’s IP address, but only the FTP service uses the socket address, consisting of the server’s IP address plus TCP port 21.

Figure 6.6. The socket address uniquely identifies an application on a particular server.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.196.175