Transport Layer

Ace your homework & exams now with Quizwiz!

Why is it necessary to define port numbers at the receiving end for network services (such as web, email, etc.)?

Before sending a datagram, the sender needs to know the port number at which the receiver is running the server application. Defining standard ports makes it easy for senders to guess the correct port number from the name of the service. If standard port numbers were not defined, senders would have to first ask receivers for the correct port number before sending any application data.

What is connection establishment in TCP? Why is it necessary?

Connection establishment relates to the initialization of sequence numbers for a TCP connection and exchange of this initialization information between sender and receiver. Connection establishment is necessary to help the sender and receiver to generate suitable sequence numbers and to ensure that both sender and receiver know what sequence numbers to expect from the other side.

How is flow control implemented?

Flow control is implemented in TCP by each side indicating a "window size" to the other side. The window size is the amount of data the receiver is capable of processing. This is therefore the amount of data that the sender may send without waiting for an acknowledgement from the receiver.

What is flow control?

Flow control is the control of the rate at which data is transmitted from the sender to the receiver. Flow control is useful if a receiver is too slow to process data at the rate at which it is being delivered by the sender. In other words, flow control minimizes the problem of "drinking from a fire hose".

If you were developing an application that provided services over the network, could you have your application listen to client requests on port 80 (the port for web servers)? If yes, do you think it would be a good idea? Why, or why not?

If you are an application developer, and you develop an application that listens on port 80, in most cases, the application w ill run fine because client PCs rarely run web servers. But if your application is deployed on a server that is also running a web server provided by the OS vendor, chances are that packets sent to port 80 will be directed to the web server and not to your application. Your application will appear unresponsive as a result. As an application developer therefore, it is a good idea to avoid the reserved ports (0-1023).

Describe the three-way handshake used in TCP.

In the 3-way handshake, the sender and receiver exchange a total of 3 packets using which they inform each other of the initial sequence number they intend to use for the connection. In the first packet, the sender sends its ISN. In the second packet, the receiver sends its own ISN as well as an acknowledgment of the sender's ISN. In the third packet, the sender acknowledges the receiver's ISN.

How is the multiplexing at the transport layer different from the multiplexing at the physical layer?

Multiplexing at the physical layer refers to detection of a signal among multiple signals over a shared medium. Each of these signals typically is from a different host. Multiplexing at the transport layer refers to multiple applications on the same host sharing the common medium. All applications at a host create one signal stream. The physical medium multiplexes signal streams from multiple hosts.

What is multiplexing in the context of the transport layer?

Multiplexing at the transport layer refers to the ability of multiple applications on a computer to share the common transmission medium. TCP enables multiplexing by providing port addresses to each application on a host. Each application that needs a network connection, a browser tab for example is assigned a port number. Incoming data is sent to the correct application by the operating system based on the port number

What are some application scenarios where UDP may be more useful than TCP? Why?

Real time applications such as voice and video commonly use UDP. Also, most network services such as DNS use UDP.

What is segmentation?

Segmentation is the process of breaking down large blocks of data into smaller blocks. This is done because the maximum packet size at the network layer is 65,536 bytes. If an application has a bigger block of data to transfer (audio and video files come to mind), some entity needs to chop the larger block of data into smaller segments before handing the segments to the network layer. Therefore the transport layer performs segmentation when necessary.

Why is segmentation useful?

Segmentation is useful because if the transport layer did not perform segmentation, the application developers would have to do it while developing their applications, and also keep track of lost and duplicate packets.

What is the maximum number of possible TCP ports on a machine?

Since the port address field is 16 bits long, the maximum number of ports per machine = 2^16 = 65,536.

What is sliding window in the context of flow control? Describe its operation.

Sliding window is the flow control mechanism used by TCP. The sliding window refers to a variable-length window that allows the sender to transmit a specified number of data units even if no acknowledgement is received. The window can be called the "sent window" since all the data in the window has been sent and is waiting to be acknowledged. As the acknowledgments are received, the window keeps sliding over the remaining data to be sent. When new data enters the window, it is sent out to the receiver.

How does TCP provide reliability?

TCP provides reliability through the use of sequence numbers. Each TCP datagram is assigned a sequence number. The receiver keeps track of the sequence numbers of the incoming datagrams and alerts the sender if a datagram is not received within a reasonable amount of time. The receiver also periodically sends acknowledgments of incoming datagrams to the sender. If an acknowledgment is not received within a reasonable amount of time, the sender assumes the worst and resends the datagram

Why are two protocols, TCP and UDP, defined at the transport layer instead of just TCP?

TCP provides reliable transmission of data, but at the cost of computation overhead and network delays. Many applications, particularly voice and video applications prefer real time delivery more than reliability. For these applications a simpler Transport layer protocol called the User Datagram Protocol has been defined. UDP eliminates all the computational processing associated with TCP.

Why is the initial sequence number for a connection chosen at random?

The initial sequence number is chosen at random to maximize the possibility that a duplicate ISN can be detected easily.

What are the functions of the transport layer?

The main function of the transport layer is segmentation and re-assembly of user data. If requested, the transport layer keeps track of these segments to account for packet loss or duplication during transmission by the network layer. The Transport layer also provides a mechanism (port addresses) to distinguish between the data streams created by each individual application on the computer. Finally, the Transport layer provides flow control by allowing receiving computers to specify the data transfer rate.

What is reliability in the context of the transport layer?

The network layer only provides best effort delivery and may drop packets or duplicate packets during transmission. Some entity needs to resolve these losses and duplications. Reliability in the context of the transport layer therefore refers to the correction of lost and duplicate packets.

A receiver sends an acknowledgment packet with the number 2817 in the acknowledgment number field. What inference can the sender draw from this packet?

The sender can infer that the receiver has correctly all data up to the byte numbered 2,816 correctly and it is now waiting to receiving data beginning with byte number 2,817.

Why is it more useful to allow the receiver to control flow speed, rather than the sender?

The sender is programmed to always transmit at the highest speed possible. The only issue of concern is whether the receiver can handle data at the rate at which it is being transmitted. Therefore, the flow control mechanism allows the receiver to slow the sender down when necessary.

What are the important potential problems with reliability that are handled by the transport layer?

The transport layer handles all duplicate or lost packets.

What is the function of the window-size field in TCP?

The window size field indicates the number of data bytes the sender of the datagram is willing to accept.

What is a socket?

A network IP address and a port address together constitute a communication socket. Applications can send data over the network using a socket. Each network connection is identified by a pair of sockets - the port and IP addresses of the sender are the socket at one end of the connection and the port and IP addresses of the receiver are the socket at the other end of the connection. Together, the two sockets make up the network connection.

What is a port?

A port identifies a communication channel on the host. Each application on the PC is assigned a separate port by the client operating system.


Related study sets

physical science chapter 8 online assessment

View Set

PP: RNSG 1538 Family Mastery Quiz

View Set

Unit 1: Psychology's History and Approaches

View Set

10.3.16 Web Application Attacks Section Quiz

View Set

Biomechanics of the Foot and Ankle

View Set

English 10 Part 2 Final Exam (Test,Quizes)

View Set

Chapter 8- The Human Resource Management Function

View Set