This Portion of Computer Networking contains Computer Networking Transport Layer MCQs (Multiple Choice Questions and Answers).
This Section covers below lists of topics.
1 INTRODUCTION
• Transport-Layer Services
2 TRANSPORT-LAYER PROTOCOLS
• Simple Protocol
• Stop-and-Wait Protocol
• Go-Back-/V Protocol (GBN)
• Selective-Repeat Protocol
• Bidirectional Protocols: Piggybacking
• Internet Transport-Layer Protocols
3 USER DATAGRAM PROTOCOL (UDP)
• User Datagram
• UDP Services
• UDP Applications
4 TRANSMISSION CONTROL PROTOCOL (TCP)
• TCP Services
• TCP Features
• Segment
• A TCP Connection
• State Transition Diagram
• Windows in TCP
• Flow Control
• Error Control
• TCP Congestion Control
• TCP Timers
• Options
1. At the transport layer, to define the processes, we need two identifiers called ____________.
- logical addresses
- physical addresses
- port addresses
- None of the choices are correct
At the transport layer, to define the processes, we need two identifiers called source port number and destination port number together we call it port Address. These port numbers are used to identify the specific application or process running on the host computer. Source port number identifies the sending process and destination port number identifies the receiving process. Together with the IP address, the port numbers allow for reliable delivery of data between different applications on different hosts.
2. The ports ranging from 0 to 1,023 are called the ___________ ports. The ports ranging from 1,024 to 49,151 are called ___________ ports. The ports ranging from 49,152 to 65,535 are called the ___________ ports.
- well-known; registered; dynamic or private
- registered; dynamic or private; well-known
- private or dynamic; well-known; registered
- private or dynamic; registered; well-known
- The ports ranging from 0 to 1,023 are called well-known ports or system ports. These are reserved by the Internet Assigned Numbers Authority (IANA) to identify the standardized services that run on a system, such as HTTP on port 80, FTP on port 21, SSH on port 22, and so on. Only privileged processes can bind to these ports, such as the operating system's kernel or services with elevated privileges.
- The ports ranging from 1,024 to 49,151 are called registered ports. These are also assigned by IANA, but they are not reserved for any particular service or application. Instead, they are available for use by any application that needs them. Some commonly used registered ports include 22 for Secure Shell (SSH), 443 for HTTPS, and 3389 for Remote Desktop Protocol (RDP).
- The ports ranging from 49,152 to 65,535 are called the dynamic ports or private ports. These ports are available for use by any application or service, and are typically used as the source port number in outgoing connections. When a client initiates a connection to a server, it uses a random port number in this range as its source port, and the server responds to that port as the destination port. Once the connection is closed, the dynamic port number is released and can be reused by another process.
3. UDP and TCP are two protocols at the ___________ layer.
- data link
- network
- transport
- application
UDP and TCP are two protocols at the transport layer of the OSI (Open Systems Interconnection) model. The transport layer is responsible for providing end-to-end communication services to applications, and it uses protocols like TCP and UDP to achieve reliable or unreliable data transfer between processes running on different hosts. TCP (Transmission Control Protocol) is a connection-oriented protocol that ensures reliable and ordered delivery of data, while UDP (User Datagram Protocol) is a connectionless protocol that provides a low-overhead, best-effort delivery of data without any reliability guarantees.
4. Which of the following functions are performed by UDP?
- process-to-process communication
- host-to-host communication
- node-to-node communication
- None of the choices are correct
- Process-to-process communication refers to the exchange of data between two processes running on different hosts connected over a network. This communication takes place at the transport layer of the OSI (Open Systems Interconnection) model, which is responsible for providing reliable and efficient end-to-end communication services to applications.
- To enable process-to-process communication, each process is assigned a unique identifier called a port number, which is used by the transport layer protocols such as TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) to identify the source and destination processes. The source process sends data to the destination process by encapsulating it into a packet, which includes the port numbers, sequence numbers, and other control information needed to ensure reliable delivery.
- Process-to-process communication is essential for many networked applications, such as web browsing, email, file transfer, and video streaming, which rely on the transport layer protocols to ensure that data is transmitted correctly and efficiently between hosts.
5. A port number is _______ bits long.
- 8
- 16
- 32
- 64
A port number is 16 bits long, which means that it can have a maximum value of 2^16 or 65,536. The port number is used by the transport layer protocols such as TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) to identify the source and destination processes in process-to-process communication. The first 1,024 port numbers are reserved for well-known services, while the rest are available for use by any application that needs them.
6. Which of the following does UDP provide?
- flow control
- connection-oriented delivery
- error control
- None of the choices are correct
UDP (User Datagram Protocol) performs the following functions:
- Multiplexing and demultiplexing: UDP uses source and destination port numbers to multiplex and demultiplex data across different applications running on the same host.
- Data encapsulation: UDP adds a header to the data received from the application layer, which includes the source and destination port numbers, as well as the length and checksum fields.
- Connectionless communication: UDP does not establish a connection before sending data, nor does it maintain any state information about the ongoing communication.
- Best-effort delivery: UDP does not guarantee the delivery of data packets, nor does it ensure the order of delivery. It simply sends the packets and hopes they reach the destination.
Overall, UDP provides a lightweight and fast transport layer protocol that is suitable for applications that do not require reliability or ordered delivery of data, such as multimedia streaming or online gaming.
7. The source port number on the UDP user datagram header defines _______.
- the sending computer
- the receiving computer
- the process running on the sending computer
- None of the choices are correct
- The source port number on the UDP (User Datagram Protocol) header defines the port number used by the sending process to communicate with the destination process. It is a 16-bit field in the UDP header that identifies the source port number, which is assigned by the operating system or the application itself. The source port number is used by the receiving process to send response packets back to the sender, as well as to multiplex multiple UDP connections on the same host.
- In the UDP header, there is also a destination port number field, which specifies the port number of the receiving process that the data is intended for. Together with the IP addresses of the sender and receiver, the source and destination port numbers enable end-to-end communication between two processes running on different hosts.
8. To use the services of UDP, we need ________ socket addresses.
- four
- two
- three
- None of the choices are correct
- To use the services of UDP (User Datagram Protocol), we need two socket addresses: a source socket address and a destination socket address. A socket address is a combination of an IP address and a port number, which identifies a unique endpoint of a communication channel. In UDP, the source socket address identifies the sender of the data, while the destination socket address identifies the receiver of the data.
- The source socket address is assigned by the operating system or the application that initiates the communication, and it includes the IP address and port number of the sending process. The destination socket address is specified by the receiving process, and it includes the IP address and port number of the destination process. When the UDP packet is sent, the source and destination socket addresses are included in the UDP header to enable the receiving process to identify the sender and the intended recipient of the data.
9. UDP packets are called __________ .
- user datagrams
- segments
- frames
- None of the choices are correct
UDP (User Datagram Protocol) packets are called datagrams. A datagram is a self-contained, independent packet of data that is transmitted over a network without any guarantee of delivery or ordering. In UDP, each datagram is preceded by a header that contains the source and destination port numbers, as well as the length and checksum fields. The length field specifies the length of the datagram, including the header, while the checksum field is used to ensure the integrity of the data.
UDP datagrams are often used in applications that require fast and lightweight communication, such as online gaming or multimedia streaming, where small delays or occasional data loss are acceptable. However, because UDP does not provide any reliability or ordering guarantees, it is not suitable for applications that require error-free and ordered delivery of data, such as email or file transfer.
10. UDP packets have a fixed-size header of _______ bytes.
- 16
- 8
- 40
- 32
UDP (User Datagram Protocol) packets have a fixed-size header of 8 bytes. The UDP header contains four fields, each of which is 2 bytes long. The fields in the UDP header are as follows:
- Source port number (2 bytes)
- Destination port number (2 bytes)
- Length (2 bytes)
- Checksum (2 bytes)
The source and destination port numbers identify the sending and receiving processes, while the length field specifies the length of the UDP datagram, including the header. The checksum field is used to verify the integrity of the data and the header. Because the UDP header is fixed in size, the maximum size of a UDP datagram is limited to 65,535 bytes (65,527 bytes of data and 8 bytes of header). However, in practice, the maximum size of a UDP datagram is often much smaller, typically around 1,500 bytes, due to the limitations of the underlying network protocols and hardware.
11. TCP is a __________ protocol.
- byte-oriented
- message-oriented
- block-oriented
- None of the choices are correct
- TCP (Transmission Control Protocol) is a byte-oriented protocol. This means that the data is transmitted in a stream of bytes, without any specific framing or structure that separates one message from another. The TCP sender divides the data into a sequence of segments, each of which is transmitted as a separate IP packet over the network. The TCP receiver then reassembles the segments into the original data stream, based on the sequence numbers and acknowledgment numbers in the TCP header.
- Because TCP is byte-oriented, it can handle data of any size and structure, as long as it is presented as a sequence of bytes. This makes TCP suitable for a wide range of applications, such as file transfer, email, and web browsing, where the data can be of arbitrary size and format. However, the byte-oriented nature of TCP can also introduce some complexity in handling the data, such as dealing with partial reads or writes, handling out-of-order data, and dealing with data that exceeds the receiver's buffer size.
12. TCP groups a number of bytes together into a packet called a ___________.
- user datagram
- segment
- datagram
- None of the choices are correct
- TCP (Transmission Control Protocol) groups a number of bytes together into a packet called a segment. A segment is a unit of data that is transmitted between the TCP endpoints over the network. Each segment consists of a TCP header followed by a data payload. The TCP header contains control information that is used to manage the transmission and reception of the data, including the sequence number, acknowledgment number, window size, and checksum.
- The size of the segments in TCP can vary depending on a number of factors, including the maximum segment size (MSS) negotiated during the three-way handshake, the available network bandwidth, and the congestion control mechanism used by TCP to avoid network congestion. In general, the size of the segments is limited to the maximum transmission unit (MTU) of the underlying network protocol, which is typically around 1500 bytes for Ethernet networks. However, TCP can also handle segments that are smaller than the MTU, and can reassemble them at the receiving end.
13. TCP is a(n) ___________ protocol.
- connection-oriented
- connectionless
- both connection-oriented and connectionless
- None of the choices are correct
TCP (Transmission Control Protocol) is a connection-oriented protocol. This means that before any data is transmitted between two hosts, a connection is established between them, and a reliable data transfer channel is set up. The process of establishing a TCP connection is called a three-way handshake, where the two hosts exchange packets to negotiate and agree on the parameters of the connection, such as the initial sequence numbers, the maximum segment size, and the window size. Once the connection is established, data can be transmitted between the two hosts in a reliable and ordered manner, with flow control and congestion control mechanisms to ensure that the data is delivered without errors or losses. Finally, the connection is closed when all the data has been transmitted or when one of the hosts terminates the connection.
TCP is widely used in applications that require reliable and ordered delivery of data, such as web browsing, file transfer, email, and remote login. However, because of its connection-oriented nature and the overhead of establishing and maintaining connections, TCP is generally slower and more resource-intensive than UDP, which is a connectionless protocol.
14. TCP is a(n) _______ transport protocol.
- unreliable
- best-effort delivery
- reliable
- None of the choices are correct
TCP (Transmission Control Protocol) is a reliable transport protocol. This means that TCP provides a guarantee that the data sent by the sender is received correctly by the receiver, without any errors or losses, and in the same order as it was sent. To achieve reliability, TCP uses a number of mechanisms, including:
- Acknowledgments: After receiving each segment, the receiver sends an acknowledgment (ACK) to the sender to confirm that the data has been received. If the sender does not receive an ACK within a certain time interval, it retransmits the segment.
- Sequence numbers: Each segment is assigned a unique sequence number by the sender, which is used to identify the position of the segment in the data stream. The receiver uses these sequence numbers to reorder the segments if they arrive out of order.
- Retransmission: If a segment is lost or damaged during transmission, the sender retransmits the segment until it receives an ACK from the receiver.
- Flow control: TCP uses a mechanism called flow control to avoid overwhelming the receiver with too much data. The receiver advertises a window size in the TCP header, which tells the sender how much data it can send before it needs to wait for an ACK.
- Congestion control: TCP uses a mechanism called congestion control to avoid overloading the network with too much traffic. Congestion control algorithms adjust the rate of data transmission based on the observed network conditions, such as the round-trip time, the packet loss rate, and the available bandwidth.
These mechanisms make TCP a highly reliable transport protocol, suitable for applications that require accurate and complete data transfer, such as file transfer, email, and web browsing. However, the reliability mechanisms of TCP also introduce some overhead and latency in the transmission of data, which can make it slower than other protocols that prioritize speed over reliability, such as UDP.
15. TCP uses _________________ to check the safe and sound arrival of data.
- an acknowledgment mechanism
- out-of-band signaling
- the services of another protocol
- None of the choices are correct
- TCP (Transmission Control Protocol) uses acknowledgments (ACKs) to check the safe and sound arrival of data. After sending each segment, the sender waits for an ACK from the receiver to confirm that the segment has been received correctly. If the sender does not receive an ACK within a certain time interval, it retransmits the segment.
- The ACK mechanism is used by TCP to provide reliable data transfer, which means that TCP guarantees that the data sent by the sender is received correctly by the receiver, without any errors or losses, and in the same order as it was sent. The use of ACKs allows TCP to detect and recover from any errors or losses that occur during transmission, by retransmitting the lost or damaged segments until they are received correctly.
- In addition to ACKs, TCP also uses sequence numbers to identify the position of each segment in the data stream and to detect out-of-order delivery. The sequence numbers are included in the TCP header and are used by the receiver to reorder the segments if they arrive out of order.
- Together, the ACKs and sequence numbers make TCP a highly reliable transport protocol, suitable for applications that require accurate and complete data transfer, such as file transfer, email, and web browsing.
16. The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a __________________.
- 0
- 1
- randomly generated number
- None of the choices are correct
- The bytes of data being transferred in each connection are numbered by TCP (Transmission Control Protocol). The numbering starts with a random sequence number, which is generated by the sender when the connection is established.
- The sequence number is a 32-bit field in the TCP header that identifies the position of the first byte of data in the segment within the data stream. The sequence number of the first segment is the initial sequence number (ISN), which is randomly generated by the sender and used to synchronize the sequence numbers between the sender and receiver.
- After the ISN is established, each subsequent segment is assigned a sequence number that is the sum of the ISN and the number of bytes of data transmitted so far. The sequence numbers are used by TCP to detect and recover from lost or out-of-order segments and to ensure that the data is delivered to the receiver in the correct order.
- In addition to the sequence number, the TCP header also includes an acknowledgment number (ACK), which is used by the receiver to confirm the receipt of the data and to inform the sender of the next expected sequence number. The ACK number is the sequence number of the next byte of data that the receiver expects to receive.
- Together, the sequence number and ACK number allow TCP to provide reliable data transfer, which means that TCP guarantees that the data sent by the sender is received correctly by the receiver, without any errors or losses, and in the same order as it was sent.
17. In TCP, the sequence number for each segment is the number of the _______ byte (virtual byte) carried in that segment.
- first
- last
- middle
- None of the choices are correct
- In TCP (Transmission Control Protocol), the sequence number for each segment is the number of the first byte (virtual byte) carried in that segment. This means that the sequence number of each segment is the sequence number of the first byte of data in the segment.
- For example, if a TCP connection is sending a file that contains 1,000 bytes of data, the first segment sent would have a sequence number of 0, since it carries the first byte of the file. The second segment would have a sequence number of 1, since it carries the second byte of the file, and so on.
- The sequence numbers are used by TCP to provide reliable data transfer, by allowing the receiver to detect and recover from lost or out-of-order segments. The receiver uses the sequence numbers to determine the position of each segment in the data stream and to reorder the segments if they arrive out of order.
- In addition to the sequence number, each TCP segment also includes an acknowledgment number (ACK), which is used by the receiver to confirm the receipt of the data and to inform the sender of the next expected sequence number. The ACK number is the sequence number of the next byte of data that the receiver expects to receive.
- Together, the sequence number and ACK number allow TCP to provide reliable data transfer, which means that TCP guarantees that the data sent by the sender is received correctly by the receiver, without any errors or losses, and in the same order as it was sent.
18. Communication in TCP is ___________.
- simplex
- half-duplex
- full-duplex
- None of the choices are correct
- Yes, communication in TCP (Transmission Control Protocol) is full duplex. This means that data can be transmitted and received simultaneously in both directions between the two hosts.
- When a TCP connection is established between two hosts, each host allocates a buffer to receive incoming data from the other host. This allows data to be transmitted in both directions at the same time, without any interference or conflict.
- For example, in a web browsing session, the client sends an HTTP request to the server, and the server responds with an HTTP response containing the requested data. During this exchange, the client is simultaneously receiving the response data while also sending further requests to the server.
- Full duplex communication is important for many applications that require real-time interaction between two hosts, such as online gaming, video conferencing, and remote desktop sharing. TCP's full duplex capability ensures that data can be transmitted and received quickly and efficiently in both directions, allowing for smooth and responsive communication between the two hosts.
19. In TCP, the value of the acknowledgment field in a sent segment defines the sequence number related to the ______ byte a party expects to receive next.
- first
- last
- next
- None of the choices are correct
- In TCP (Transmission Control Protocol), the value of the acknowledgment field in a sent segment defines the sequence number related to the next byte a party expects to receive, not the one it has already received.
- When the sender sends a TCP segment, it includes a sequence number that identifies the first byte of data in the segment. The receiver, upon receiving the segment, sends an acknowledgment (ACK) segment back to the sender that includes an acknowledgment number (ACK number) that indicates the next byte it expects to receive.
- For example, suppose the sender sends a segment with a sequence number of 1000 and a payload of 500 bytes. The receiver receives the segment and sends an ACK segment back with an ACK number of 1500, indicating that it expects to receive the next byte after the last byte of the received segment.
- Therefore, the ACK number is the sequence number related to the next byte that the receiver expects to receive, not the one it has already received. This allows TCP to provide reliable data transfer, as the receiver can acknowledge the receipt of data up to a certain point, ensuring that the sender knows which data has been successfully transmitted and which data needs to be retransmitted.
20. The inclusion of the checksum in the TCP segment is ________.
- optional
- mandatory
- depends on the type of data
- None of the choices are correct
- The inclusion of the checksum in the TCP (Transmission Control Protocol) segment is to ensure data integrity and detect errors in the data during transmission.
- When TCP segments are sent over a network, they are subject to potential errors, such as bit errors, packet corruption, and data loss. To detect and correct these errors, TCP uses a checksum field in the header of each segment.
- The checksum is calculated by the sender over the TCP header, payload, and a pseudo-header that includes the source and destination IP addresses and protocol number. The receiver performs the same calculation and compares the result to the checksum field in the received segment. If the checksums do not match, the receiver knows that an error has occurred during transmission and discards the segment.
- Therefore, the inclusion of the checksum in the TCP segment is essential for ensuring data integrity and detecting errors that could otherwise lead to corrupted or incorrect data being received by the destination host.
21. In TCP, a SYN segment consumes _____ sequence number(s).
- no
- one
- two
- None of the choices are correct
- In TCP (Transmission Control Protocol), a SYN (Synchronize) segment consumes one sequence number.
- When a TCP connection is initiated, the sending host sends a SYN segment to the receiving host. The SYN segment contains a sequence number that the receiver will use as the initial sequence number for the connection. The receiver sends back a SYN-ACK (Synchronize-Acknowledgment) segment that contains an acknowledgment number that acknowledges the receipt of the SYN segment and an initial sequence number for the receiver.
- The sequence numbers in TCP are used to number the bytes of data in a connection. The sequence number in the SYN segment is the sequence number for the first byte of data that will be sent in the connection. Therefore, it consumes one sequence number.
- Once the connection is established, the sequence number will be incremented by the number of bytes sent, and the acknowledgment number will be incremented by the number of bytes received. This ensures that both hosts keep track of the progress of the data transfer and can detect any lost or corrupted segments.
22. In TCP, a SYN + ACK segment consumes _____ sequence numbers.
- no
- three
- two
- one
- In TCP (Transmission Control Protocol), a SYN+ACK (Synchronize-Acknowledgment) segment consumes two sequence numbers.
- When a TCP connection is initiated, the sending host sends a SYN segment to the receiving host. The SYN segment contains a sequence number that the receiver will use as the initial sequence number for the connection. The receiver sends back a SYN+ACK segment that contains an acknowledgment number that acknowledges the receipt of the SYN segment and an initial sequence number for the receiver.
- The sequence numbers in TCP are used to number the bytes of data in a connection. The sequence number in the SYN segment is the sequence number for the first byte of data that will be sent in the connection. The acknowledgment number in the SYN+ACK segment is the next expected sequence number from the sender.
- Therefore, the SYN+ACK segment consumes two sequence numbers: one for the acknowledgment number and one for the initial sequence number for the receiver. Once the connection is established, the sequence number will be incremented by the number of bytes sent, and the acknowledgment number will be incremented by the number of bytes received. This ensures that both hosts keep track of the progress of the data transfer and can detect any lost or corrupted segments.
23. In TCP, an ACK segment, if carrying no data, consumes ______ sequence number(s).
- no
- one
- two
- None of the choices are correct
- In TCP (Transmission Control Protocol), an ACK (Acknowledgment) segment that carries no data consumes one sequence number.
- An ACK segment is sent by a TCP receiver to acknowledge the receipt of one or more TCP segments sent by the sender. If the ACK segment carries no data, it still contains an acknowledgment number that acknowledges the receipt of the last byte of data received successfully.
- The sequence numbers in TCP are used to number the bytes of data in a connection. Therefore, the ACK segment consumes one sequence number to acknowledge the receipt of the last byte of data received successfully. If the ACK segment carries data, it will consume an additional sequence number to indicate the sequence number of the first byte of data carried in the segment.
- Once the connection is established, the sequence number will be incremented by the number of bytes sent, and the acknowledgment number will be incremented by the number of bytes received. This ensures that both hosts keep track of the progress of the data transfer and can detect any lost or corrupted segments.
24. The connection establishment procedure in TCP is susceptible to a serious security problem called the _________ attack.
- ACK flooding
- FIN flooding
- SYN flooding
- None of the choices are correct
- The connection establishment procedure in TCP (Transmission Control Protocol) is susceptible to a serious security problem called the "TCP SYN Flood" attack.
- In a TCP SYN Flood attack, an attacker sends a large number of TCP SYN (Synchronize) segments to a victim host with a fake source IP address. When the victim host receives the SYN segments, it allocates memory resources to keep track of the connection requests and sends a SYN+ACK (Synchronize-Acknowledgment) segment back to the source IP address.
- However, since the source IP address is fake, the SYN+ACK segments are sent to an invalid or non-existent host. As a result, the victim host waits for a response that will never arrive, and its memory resources are quickly depleted, causing it to become unresponsive to legitimate traffic.
- The TCP SYN Flood attack is a type of Denial-of-Service (DoS) attack that can disrupt network services and cause significant damage to an organization. To mitigate this attack, various techniques such as rate limiting, TCP SYN cookies, and firewalls can be used.
25. The SYN flooding attack belongs to a group of security attacks known as a _____ attack.
- denial of service
- replay
- man-in-the middle
- None of the choices are correct
- The SYN flooding attack belongs to a group of security attacks known as a Denial-of-Service (DoS) attack.
- A DoS attack is an attack on a computer or network that is intended to disrupt or disable normal traffic and services. The attacker typically floods the target system with traffic, requests, or commands, overwhelming its resources and making it unavailable to users.
- In a TCP SYN Flood attack, the attacker floods the victim host with TCP SYN segments, consuming its memory resources and causing it to become unresponsive to legitimate traffic. This type of attack is one of the most common and devastating DoS attacks.
- Other types of DoS attacks include Ping Flood, Smurf Attack, DNS Amplification Attack, HTTP Flood, and many more. To protect against DoS attacks, various countermeasures such as firewalls, intrusion detection systems (IDS), and load balancers can be implemented.
26. One of the main duties of the transport layer is to provide ____________ communication.
- node-to-node
- host-to-host
- process-to-process
- None of the choices are correct
One of the main duties of the transport layer is to provide end-to-end communication .we can also say its process to process communication.
27. In TCP, a FIN segment consumes ____ sequence numbers if it does not carry data.
- two
- three
- no
- one
In TCP, a FIN segment, if it does not carry data, consumes one sequence number.Yes, that is correct. In TCP, a FIN segment consumes one sequence number if it does not carry data. This is because the FIN segment is used to signal the end of a connection and to indicate that the sender has no more data to transmit. The receiver acknowledges the FIN segment by sending an ACK segment back to the sender, which consumes one sequence number as well. Once both sides have sent and received FIN and ACK segments, the connection is considered closed.
28. A client program normally uses ____________ port number. A server program normally uses __________ port number.
- a well-known; an ephemeral
- an ephemeral; a well-known
- a private; a well-known
- None of the choices are correct
- A client program normally uses an ephemeral (or dynamic) port number, while a server program normally uses a well-known (or registered) port number.
- An ephemeral port number is a temporary port number that is assigned to the client program by the operating system from a range of available port numbers (typically between 49152 and 65535) when it initiates a connection to a server. The client program uses this port number to send and receive data over the connection.
- A well-known port number, on the other hand, is a fixed port number that is reserved for a specific service or protocol. Examples of well-known port numbers include port 80 for HTTP, port 443 for HTTPS, port 25 for SMTP, and port 22 for SSH. Server programs typically listen on these well-known port numbers for incoming connections from clients.
29. In TCP, a FIN + ACK segment consumes _____ sequence number(s) if it does not carry data.
- two
- three
- one
- no
In TCP, a FIN + ACK segment, if it does not carry data, consumes one sequence number.Yes, that is correct. A FIN + ACK segment in TCP, even if it does not carry data, consumes one sequence number. This is because the FIN + ACK segment is used to terminate the connection, and the acknowledgement number field in the segment header must acknowledge the receipt of the FIN segment from the other party. The FIN + ACK segment therefore uses one sequence number to acknowledge the FIN segment and indicate that the connection is being closed.
30. A socket address is a combination of __________.
- A MAC address and a logical address
- A MAC address and a port number
- a user-specific address and a logical address
- None of the choices are correct
A socket address is a combination of an IP address and a port number. The IP address identifies the host or network interface, while the port number identifies the specific process or service running on that host. Together, the IP address and port number uniquely identify a network endpoint that can be used for communication.
31. In TCP, one end can stop sending data while still receiving data. This is called a ______ termination.
- half-close
- half-open
- full-close
- None of the choices are correct
In TCP, one end can stop sending data while still receiving data. This is called a half-closed termination, also known as a "FIN-WAIT" state. In this state, one end sends a FIN segment to indicate that it has finished sending data and will not send any more data, but it can still receive data from the other end. The other end can continue to send data until it is also ready to terminate the connection, at which point it sends its own FIN segment. Once both ends have sent FIN segments, the connection is fully closed.
32. ______________ means accepting items from more than one source. ______________ means delivering items to more than one source.
- Demultiplexing; Multiplexing
- Multiplexing; Demultiplexing
- Encapsulation; Decapsulation
- Pulling; Pushing
Multiplexing means accepting items from more than one source. Demultiplexing means delivering items to more than one source.
In the context of networking, multiplexing refers to the process of combining multiple data streams from different applications or network connections into a single data stream that can be transmitted over a single network connection. Demultiplexing is the reverse process, where the incoming data stream is separated into individual data streams and delivered to the appropriate applications or network connections. This is a key function of the transport layer in the TCP/IP protocol suite, which allows multiple applications to share a single network connection.
33. TCP sliding windows are __________ oriented.
- packet
- segment
- byte
- None of the choices are correct
Yes, that is correct. TCP sliding windows are byte-oriented, meaning they are used to track the number of bytes that have been sent and acknowledged in a TCP connection. The sliding window mechanism allows for flow control and congestion avoidance by regulating the amount of data that can be sent at any given time based on the receiver's buffer size and the network conditions.
34. ________ means the producer delivers the items when they are produced. _______ means the consumer takes the items when it is ready to do so.
- Pushing; pulling
- Pulling; pushing
- Forwarding; accepting
- None of the choices are correct
The term "push" refers to the producer delivering the items when they are produced. The term "pull" refers to the consumer taking the items when it is ready to do so.
35. In TCP, the size of the send window is the ________ of rwnd and cwnd.
- maximum
- sum of
- minimum
- None of the choices are correct
In TCP, the size of the send window is the minimum of rwnd and cwnd.In TCP, the size of the send window is the minimum of rwnd and cwnd only when the congestion window (cwnd) is smaller than the receive window (rwnd). When cwnd is larger than rwnd, the size of the send window is determined by the receive window. This is because the receive window represents the amount of free buffer space available at the receiver for incoming data, while the congestion window limits the amount of unacknowledged data that can be sent by the sender.
36. In the stop-and-wait protocol, the maximum send window size is ______ and the maximum receive window size is _______ where m is the number of bits in the sequence.
- 1; 1
- 2m; – 1
- 1; 2m
- 2m; 2m
In the stop-and-wait protocol, the maximum send window size is 1 and the maximum receive window size is 1, where m is the number of bits in the sequence. This is because in the stop-and-wait protocol, only one packet is sent at a time, and the sender waits for an acknowledgement before sending the next packet. Therefore, the send and receive window sizes are both 1, indicating that only one packet can be in transit at any given time.
37. In TCP, the window should not be _________.
- opened
- closed
- shrunk
- slide
- In TCP, the window should not be zero. A zero window indicates that the receiver's buffer is full and cannot accept any more data.
- In TCP, the senders use the sliding window protocol to regulate the rate at which they can send data to the receivers. The sliding window mechanism allows the sender to send a certain number of packets before waiting for an acknowledgment from the receiver. If the window size is zero, it means that the receiver has no buffer space to accept any new data packets. In such cases, the sender cannot transmit any data, as there is no buffer space available for the receiver to store and process the incoming data. Therefore, having a zero window in TCP could lead to a deadlock situation where neither the sender nor the receiver can continue sending or receiving data. To avoid this situation, it is recommended to have a minimum window size of at least one, which allows the sender to transmit one packet and wait for the acknowledgment before transmitting the next one.
38. In the Go-Back-N protocol, the maximum send window size is ______ and the maximum receive window size is _______, where m is related to the number of bits in the sequence. number.
- 1; 1
- 1; 2m
- 2m – 1; 1
- 2m – 1; 2m – 1
In the Go-Back-N protocol, the maximum send window size is 2^(m-1) and the maximum receive window size is 1. This is because the receiver can only accept one packet at a time, and the sender can send up to 2^(m-1) packets before waiting for an acknowledgment.
39. In TCP, the receiver can temporarily shut down the window; the sender, however, can always send a segment of _____ byte(s) after the window is shut down.
- ten
- zero
- one
- None of the choices are correct
In TCP, the receiver can temporarily shut down the window; the sender, however, can always send a segment of one byte after the window is shut down. This segment is called a probe segment, and its purpose is to test whether the receiver's window has opened again.
40. In the selective-repeat protocol, the maximum send window size is ______ and the maximum receive window size is _______, where m is the number of bits in the sequence.
- None of these
- 1; 2m – 1
- 2m – 1; 1
- 2m – 1; 2m – 1
- The selective-repeat protocol does not have a fixed maximum window size. The window size is determined dynamically based on the current network conditions and the available resources of the sender and receiver.
- In the selective-repeat protocol, the maximum send window size is generally determined by the maximum amount of data that the network can handle without causing congestion or delays. It is not directly related to the number of bits in the sequence, as in the case of stop-and-wait or Go-Back-N protocols.
- In the selective-repeat protocol, the maximum receive window size is usually determined by the receiver's buffer size and the available memory. The receiver can acknowledge multiple packets in a single acknowledgment message, which allows for a larger receive window size than in other protocols like Go-Back-N.
41. A serious problem can arise in the sliding window operation when either the sending application program creates data slowly or the receiving application program consumes data slowly, or both. This problem is called the ______.
- silly window syndrome
- unexpected syndrome
- window bug
- None of the choices are correct
- Correct, the problem where the sliding window operation can become inefficient due to slow data creation or consumption by the sending and receiving application programs is known as "silly window syndrome". This occurs when the sender sends small amounts of data and the receiver's buffer becomes filled with small amounts of data, causing a large number of acknowledgments to be sent back and forth, which can reduce network performance. To avoid this, some TCP implementations use an algorithm called Nagle's algorithm, which collects small packets together and sends them in a single segment to improve network efficiency.
- A serious problem can arise in the sliding window operation when either the sending application program creates data slowly or the receiving application program consumes data slowly, or both. This problem is called the sliding window flow control problem, also known as the "congestion problem."
42. UDP is a ________________ transport protocol.
- connectionless, reliable
- connection-oriented, unreliable
- connectionless, unreliable
- None of the choices are correct
UDP is a connectionless and unreliable transport protocol.Yes, that is correct. UDP stands for User Datagram Protocol and it is a connectionless transport protocol that provides unreliable communication between applications. Unlike TCP, UDP does not establish a dedicated end-to-end connection before transmitting data, and it does not guarantee delivery, ordering, or error-checking of packets. Instead, UDP focuses on speed and simplicity, making it suitable for applications that require low-latency and can tolerate some data loss.
43. Nagle's algorithm can solve the silly window syndrome created by the _________.
- sender
- receiver
- both sender and receiver
- None of the choices are correct
- Nagle's algorithm can solve the silly window syndrome created by the sender.
- Nagle's algorithm can actually contribute to the silly window syndrome, rather than solving it. The algorithm is designed to reduce the number of small packets sent by the sender, but in some cases, it can cause unnecessary delay in sending packets and increase the overall latency of the communication. Specifically, the algorithm waits for an ACK from the receiver before sending another packet, even if the sender has more data to send. This can result in delays and contribute to the silly window syndrome.
44. UDP is an acronym for _______.
- User Delivery Protocol
- User Datagram Procedure
- User Datagram Protocol
- None of the choices are correct
UDP stands for User Datagram Protocol.
45. Clark's solution can solve the silly window syndrome created by the _________.
- sender
- receiver
- both sender and receiver
- None of the choices are correct
Clark's solution can solve the silly window syndrome created by the receiver.
46. Delayed acknowledgment can solve the silly window syndrome created by the _________.
- sender
- receiver
- both sender and receiver
- None of the choices are correct
Delayed acknowledgment can solve the silly window syndrome created by the sender.
47. In TCP, an ACK segments that carry no data consumes _______ sequence number(s).
- no
- one
- two
- None of the choices are correct
An ACK segment that carries no data consumes no sequence number. The acknowledgement number field in the TCP header acknowledges the receipt of all bytes up to a specified byte in the sequence number space.
48. In modern implementations of TCP, a retransmission occurs if the retransmission timer expires or ________ duplicate ACK segments have arrived.
- one
- two
- three
- None of the choices are correct
- In modern implementations of TCP, a retransmission occurs if the retransmission timer expires or three duplicate ACK segments have arrived.
- Correct! In modern TCP implementations, a retransmission occurs if either the retransmission timer expires or three duplicate ACK segments (ACKs for the same sequence number) have arrived. This is known as fast retransmit and is used to avoid unnecessary timeouts and improve performance.
49. In TCP, ________ retransmission timer is set for an ACK segment.
- one
- a previous
- no
- None of the choices are correct
- In TCP, a retransmission timer is set for a data segment, not for an ACK segment.
- When a sender transmits a data segment, it starts a timer. If the sender does not receive an acknowledgment (ACK) from the receiver within the specified time, it assumes that the data segment was lost and retransmits it. The retransmission timer value is dynamically adjusted based on network conditions and can be different for each segment sent. This process is known as the TCP retransmission timeout (RTO) mechanism.
- The ACK segment itself does not require a timer as it is sent by the receiver immediately after receiving the data segment, acknowledging its receipt.
50. In TCP, there can be ______ RTT measurement(s) in progress at any time.
- two
- only one
- several
- None of the choices are correct
- In TCP, there can be multiple Round-Trip Time (RTT) measurements in progress at any time.
- RTT is the time it takes for a data packet to travel from the sender to the receiver and back again, and it is used by TCP to determine the appropriate retransmission timer value for data segments. TCP maintains separate RTT estimates for each active connection, and it updates these estimates continuously based on the actual observed round-trip times.
- Since TCP can have multiple data segments in flight simultaneously, it is possible to have multiple RTT measurements in progress at any given time. TCP maintains separate RTT estimates for each outstanding segment, and it uses the minimum of these estimates to calculate the retransmission timer value. This approach allows TCP to adapt to changing network conditions and avoid unnecessary retransmissions.
51. We need to multiply the header length field by _______ to find the total number of bytes in the TCP header.
- 2
- 4
- 6
- None of the choices are correct
- In TCP, the header length field is a 4-bit field that specifies the length of the TCP header in 32-bit words. To find the total number of bytes in the TCP header, you need to multiply this value by 4.
- Therefore, the formula to find the total number of bytes in the TCP header is:
- Total TCP header length = Header Length field x 4 bytes per word
- Since the Header Length field can have values from 5 to 15 (corresponding to TCP headers of length 20 to 60 bytes, respectively), the total TCP header length can vary from 20 to 60 bytes.
52. In TCP, urgent data requires the urgent pointer field as well as the URG bit (to be set) in the _______ field.
- control
- offset
- sequence number
- None of the choices are correct
- In TCP, urgent data requires the urgent pointer field as well as the URG bit (to be set) in the TCP header's Control Bits field.
- The urgent pointer is a 16-bit field in the TCP header that is used to indicate the end of the urgent data within a TCP segment. It points to the byte following the last urgent data byte and is relative to the sequence number field in the TCP header.
- The URG bit is one of the control bits in the TCP header and is used to indicate the presence of urgent data. When the URG bit is set to 1, it indicates that the urgent pointer field is valid and that the data following the pointer is urgent. If the URG bit is set to 0, then the urgent pointer field is not used, and the segment does not contain urgent data.
- Together, the urgent pointer field and the URG bit allow TCP to support the transmission of urgent data within a stream of data. When a receiver receives a TCP segment with urgent data, it can process the urgent data immediately and notify the application if necessary.
53. In TCP, if the ACK value is 200, then byte _______ has been received successfully.
- 199
- 200
- 201
- None of the choices are correct
In TCP, if the ACK value is 200, then byte 201 and all bytes before it have been received successfully.
The ACK value in a TCP segment is the next expected sequence number that the receiver is waiting for. It indicates the byte number that the receiver expects to receive next. In other words, the ACK value acknowledges the receipt of all data up to but not including the ACK value.
For example, if the receiver has successfully received bytes 1 to 200 and is expecting byte 201 next, then it will send an ACK segment with an ACK value of 201. If the sender receives this ACK segment, it knows that bytes 1 to 200 have been received successfully and can proceed to send the next segment starting from byte 201.
Therefore, if the ACK value is 200, it means that all bytes up to byte 200 have been received successfully, and the receiver is expecting byte 201 next.
54. In TCP, the _______ timer prevents a long idle connection between two TCPs.
- retransmission
- persistence
- keepalive
- None of the choices are correct
- In TCP, the keepalive timer prevents a long idle connection between two TCPs.
- When a TCP connection is established, it remains open until either end closes the connection. However, there may be cases where a connection is left open but not used for an extended period. This can happen if, for example, the application at one end crashes or if there is a network failure that prevents communication between the two ends. In such cases, the TCP connection may remain open indefinitely, tying up network resources.
- To prevent this from happening, TCP uses a keepalive mechanism. The keepalive timer is a timer that is started when a TCP connection is established, and it is reset each time a segment is sent or received. If the timer expires without any segments being sent or received, then TCP sends a keepalive segment to the other end. The keepalive segment contains no data and is used only to elicit a response from the other end. If no response is received after a certain number of keepalive segments, the connection is assumed to be dead, and TCP closes it.
- By using the keepalive timer, TCP can detect when a connection is no longer needed and close it, freeing up network resources for other connections. The keepalive timer value is typically configurable and can be set to a value appropriate for the specific network environment.
55. In TCP, the _______ timer is needed to handle the zero window-size advertisement.
- retransmission
- persistence
- keepalive
- None of the choices are correct
- In TCP, the retransmission timer is needed to handle the zero window-size advertisement.
- When a TCP receiver advertises a zero window size, it means that it has no buffer space available to receive more data at the moment. This can happen if the application at the receiver end is not processing data quickly enough or if the network is congested. When the sender receives a zero window size advertisement, it must stop sending data until the receiver advertises a non-zero window size.
- To handle the situation where the receiver's window size remains zero for an extended period, TCP uses the retransmission timer. The retransmission timer is a timer that is started when a segment is sent, and it is reset each time an acknowledgment is received. If an acknowledgment is not received within the timer's expiration time, then the segment is assumed to be lost, and TCP retransmits it.
- When the sender receives a zero window size advertisement, it starts the retransmission timer for the unacknowledged segments. If the timer expires before the receiver advertises a non-zero window size, then the sender retransmits the segments. This process continues until either the receiver advertises a non-zero window size or the maximum number of retransmission attempts is reached.
- Therefore, the retransmission timer is needed to handle the situation where a receiver's window size remains zero, ensuring that data is not lost and the connection remains reliable.
56. In TCP, Karn's algorithm is used in calculations by the _______ timer.
- retransmission
- persistence
- keepalive
- None of the choices are correct
In TCP, Karn's algorithm is used in calculations by the retransmission timer.
The retransmission timer is a timer that is started when a segment is sent and is used to determine when to retransmit a segment that has not been acknowledged by the receiver. Karn's algorithm is a technique used to calculate the retransmission timer's expiration time.
The basic idea behind Karn's algorithm is that if a segment is retransmitted, then the measured round-trip time (RTT) for that segment is no longer valid because it includes the time for the original transmission and any retransmissions. Therefore, Karn's algorithm uses only the RTT measurements for segments that were transmitted and acknowledged for the first time to calculate the retransmission timer's expiration time.
The algorithm works as follows:
- Initially, the retransmission timer is set to a default value.
- When a segment is sent, the current time is recorded as the transmission time.
- When an acknowledgment is received, the current time is recorded as the receipt time.
- The RTT for the segment is calculated as the difference between the receipt time and the transmission time.
- If the segment is retransmitted, then the measured RTT for the retransmission is not used to update the retransmission timer.
- The retransmission timer's expiration time is calculated as a function of the current estimated RTT and the deviation of the RTT from the mean RTT.
By using Karn's algorithm, TCP can accurately determine when to retransmit a segment without being influenced by the RTT measurements for retransmitted segments. This helps to ensure that the retransmission timer is set appropriately, and segments are retransmitted promptly in the case of lost or delayed packets.
57. In TCP, a special segment called a probe is sent by a sending TCP when the _______ timer goes off.
- transmission
- persistence
- keepalive
- None of the choices are correct
- In TCP, a special segment called a probe is sent by a sending TCP when the persist timer goes off.
- The persist timer is a timer used by the sending TCP to handle the situation where the receiver advertises a zero window size. When the sender receives a zero window size advertisement, it must stop sending data until the receiver advertises a non-zero window size. However, the sender must also periodically check whether the receiver's window size has increased, so that it can resume sending data.
- To handle this situation, the sender uses the persist timer. The persist timer is started when the sender receives a zero window size advertisement, and it is reset each time an acknowledgment is received for a previously sent segment. If the timer expires without receiving an acknowledgment, then the sender sends a probe segment to the receiver.
- The probe segment is a special segment that contains no data, and it is used only to elicit a response from the receiver. When the receiver receives the probe segment, it must respond with an acknowledgment, which will update the sender's window size and allow it to resume sending data. If the sender receives no response to the probe segment, it will continue to send probe segments until the receiver advertises a non-zero window size or the maximum number of retransmission attempts is reached.
- Therefore, a special segment called a probe is sent by a sending TCP when the persist timer goes off, and it is used to handle the situation where the receiver advertises a zero window size.
58. __________ control refers to the mechanisms and techniques to keep the load below the capacity.
- flow
- error
- congestion
- None of the choices are correct
- Congestion control refers to the mechanisms and techniques to keep the load below the capacity of the network.
- Congestion control is a critical aspect of network protocols such as TCP that are designed to provide reliable data transfer over the Internet. It helps to prevent congestion, which can occur when too much data is sent over a network, leading to packet loss, increased delays, and reduced throughput.
- The main goal of congestion control is to ensure that the amount of traffic sent by a host does not exceed the capacity of the network. This is achieved by dynamically adjusting the rate of data transmission based on network conditions such as packet loss, delays, and congestion signals. Congestion control algorithms typically use a combination of techniques such as adjusting the sending rate, reducing the window size, and reacting to congestion signals such as packet drops and ECN (Explicit Congestion Notification) marks.
- By controlling the amount of traffic on a network, congestion control helps to ensure that the network operates efficiently and that all users can access the resources they need. Without congestion control, networks can become congested and unstable, leading to degraded performance, reduced throughput, and potentially even network failures.
59. In TCP's ________ algorithm the size of the congestion window increases exponentially until it reaches a threshold.
- congestion avoidance
- congestion detection
- slow start
- None of the choices are correct
- In TCP's congestion control algorithm, the size of the congestion window increases exponentially until it reaches a threshold. This algorithm is called the "slow start" algorithm.
- In slow start, the TCP sender starts by sending a small number of packets, and then doubles the number of packets sent for each round-trip time (RTT) until it detects congestion. The congestion window (cwnd) is the number of unacknowledged packets that a sender is allowed to have in flight at any given time. During slow start, the cwnd increases exponentially, as the sender probes the network to find the maximum rate at which it can send data without causing congestion.
- The slow start algorithm is used by TCP to initially ramp up the sending rate after a connection is established, or after a period of congestion. The goal is to quickly find the optimal rate at which data can be sent without causing congestion, while avoiding sending too much data too quickly and causing unnecessary packet loss. Once the cwnd reaches a pre-determined threshold value, the congestion control algorithm switches to a different mode, such as congestion avoidance or fast recovery, to maintain the network's stability and avoid congestion.
60. In TCP's __________ algorithm the size of the congestion window increases additively until congestion is detected.
- congestion avoidance
- congestion detection
- slow start
- None of the choices are correct
- In TCP's congestion control algorithm, the size of the congestion window increases additively until congestion is detected. This algorithm is called "congestion avoidance".
- In congestion avoidance, the TCP sender increases the congestion window size by one packet per round-trip time until congestion is detected. This is a more conservative approach than slow start, and is used to maintain the stability of the network once the sender has found the optimal rate at which it can send data without causing congestion.
- During congestion avoidance, the TCP sender monitors the network for signs of congestion, such as packet drops, ECN marks, or timeouts. If congestion is detected, the sender reduces the congestion window size and switches to a different mode, such as fast recovery or congestion avoidance with slow start. The goal is to maintain a stable rate of data transfer while avoiding congestion and minimizing packet loss.
- Overall, congestion control is an essential aspect of TCP, as it helps to ensure that the network operates efficiently and reliably, even under heavy load or in the presence of congestion. TCP's congestion control algorithms, such as slow start and congestion avoidance, are designed to dynamically adjust the sending rate based on network conditions, in order to optimize performance and avoid congestion.
61. ________ treats the two signs of congestion detections, timeout and three duplicate ACKs, in the same way.
- Taho TCP
- Reno TCP
- new Reno TCP
- None of the choices are correct
- Tahoe TCP is an early version of the TCP protocol that was developed in the 1980s. It was one of the first TCP implementations to include congestion control mechanisms, which are now a critical part of TCP and are used to ensure that the network is not overloaded with traffic.
- Tahoe TCP's congestion control algorithm uses a combination of slow start and congestion avoidance. When a connection is first established, Tahoe TCP uses slow start to gradually increase the amount of data that it sends, in order to probe the network and determine its capacity. Once the congestion window reaches a certain threshold, Tahoe TCP switches to congestion avoidance mode and increases the window size more slowly, in order to maintain a stable flow of traffic and avoid congestion.
- In Tahoe TCP, if a timeout occurs or three duplicate ACKs are received, the sender assumes that a packet has been lost and immediately reduces the congestion window size to the initial value, then restarts the congestion control algorithm with slow start. This aggressive response to congestion events can cause the network to become overloaded, leading to high packet loss and delays.
- Later versions of TCP, such as Reno and New Reno TCP, improved on Tahoe TCP by introducing more advanced congestion control mechanisms, including fast retransmit and fast recovery. These mechanisms allow TCP to respond more quickly and effectively to congestion events, leading to improved network performance and reliability.
62. In ______ TCP, when the connection is established, TCP starts the slow start algorithms and sets the ssthresh variable to a pre-agreed value (normally 64 or 128 kilobytes) and the cwnd variable to 1 MSS.
- Taho TCP
- Reno TCP
- new Reno TCP
- None of the choices are correct
- In Reno TCP, when the connection is established, TCP starts the slow start algorithm and sets the ssthresh (slow start threshold) variable to a pre-agreed value (normally 64 or 128 kilobytes) and the cwnd (congestion window) variable to 1 MSS (maximum segment size).
- During the slow start phase, the congestion window size is increased exponentially for each ACK received from the receiver until the window size reaches the slow start threshold. At this point, TCP switches to congestion avoidance mode and begins increasing the congestion window size linearly until congestion is detected.
- If a packet is lost due to congestion, Reno TCP enters the fast retransmit and fast recovery mode, where it retransmits the lost packet immediately and then reduces the congestion window size to half of the slow start threshold. This allows TCP to recover quickly from congestion events and resume normal operation.
- Overall, Reno TCP is a widely used version of TCP that provides efficient and reliable data transmission over the Internet. Its congestion control mechanisms, including slow start, congestion avoidance, fast retransmit, and fast recovery, have been refined and improved over the years to make TCP one of the most important and widely used network protocols in the world.
63. The ___________ added a new state to the congestion control FSM, called the fast recovery state.
- Taho TCP
- Reno TCP
- new Reno TCP
- None of the choices are correct
- The New Reno TCP added a new state to the congestion control Finite State Machine (FSM), called the fast recovery state. This state was added to address a limitation in the fast retransmit and fast recovery mechanisms used in Reno TCP.
- In Reno TCP, when a packet is lost due to congestion, the sender immediately retransmits the lost packet and reduces the congestion window size to half of the slow start threshold, then resumes normal operation with slow start and congestion avoidance. However, if multiple packets are lost, Reno TCP can enter a state where it continues to send packets at a reduced rate, even though the network is no longer congested. This can cause unnecessary delays and reduce network throughput.
- In New Reno TCP, the fast recovery state was introduced to address this limitation. In fast recovery, when a packet is lost, the sender immediately retransmits the lost packet and enters the fast recovery state, where it increases the congestion window size linearly for each duplicate ACK received from the receiver. This allows New Reno TCP to recover more quickly from multiple packet losses and resume normal operation with congestion avoidance.
- Overall, the addition of the fast recovery state in New Reno TCP improved the reliability and performance of TCP, making it better suited to the demands of modern network applications.
64. The ___________ treated the two signals of congestion, timeout and arrival of three duplicate ACKs, differently.
- Taho TCP
- Reno TCP
- new Reno TCP
- None of the choices are correct
- The Reno TCP treated the two signals of congestion, timeout and arrival of three duplicate ACKs, differently.
- In Reno TCP, when a packet is lost due to congestion, the sender enters the fast retransmit and fast recovery mode. This mode is triggered by the arrival of three duplicate ACKs from the receiver, which indicate that the receiver has received a packet out of order and is requesting the retransmission of the missing packet. In response, the sender immediately retransmits the lost packet and enters the fast recovery state, where it increases the congestion window size linearly for each duplicate ACK received from the receiver.
- If the sender does not receive any duplicate ACKs after retransmitting the lost packet, it assumes that the packet loss was not due to congestion and resumes normal operation with slow start and congestion avoidance. However, if the sender does receive another duplicate ACK, it assumes that congestion is still present and reduces the congestion window size to half of the slow start threshold, then resumes normal operation with slow start and congestion avoidance.
- In contrast, when a timeout occurs, Reno TCP assumes that congestion is present and reduces the congestion window size to one segment (i.e., the slow start threshold is set to 1 MSS) and enters the slow start mode.
- Overall, the different treatment of timeout and arrival of three duplicate ACKs in Reno TCP helped to improve the reliability and performance of TCP in the face of network congestion.
65. The __________ state in Reno TCP is a state somehow between the slow start and the congestion avoidance states.
- congestion avoidance
- congestion detection
- slow recovery
- None of the choices are correct
- The Congestion Avoidance (CA) state in Reno TCP is a state between the Slow Start (SS) and the Congestion Avoidance (CA) states.
- During the Slow Start phase, the congestion window size (cwnd) is increased exponentially until a threshold, called the Slow Start Threshold (ssthresh), is reached. After this threshold is reached, the congestion window size is increased linearly during the Congestion Avoidance phase until congestion is detected.
- In Reno TCP, the Congestion Avoidance phase is entered after the slow start phase or after a packet loss is detected during the slow start phase. When the congestion avoidance phase is entered, the congestion window size is set to the Slow Start Threshold (ssthresh) and the congestion window is increased linearly by one segment for each round-trip time (RTT) until congestion is detected.
- In the Congestion Avoidance state, the congestion window size grows more slowly than during slow start but faster than during the slow start threshold (ssthresh). By gradually increasing the congestion window size, the Congestion Avoidance state helps to prevent network congestion and maintain stable throughput.
- Overall, the transition from the Slow Start to the Congestion Avoidance state in Reno TCP is an important mechanism for balancing network utilization and reliability.
66. In the Reno TCP, when TCP enters the fast recovery, if duplicate ACKs continue to come, TCP ____________________________________.
- stays in this state, but the cwnd grows additively
- stays in this state, but the cwnd grows exponentially
- moves to slow start state
- moves to the congestion avoidance state but deflate the size of the cwnd to ssthresh value
- in Reno TCP, when TCP enters the fast recovery state, if duplicate ACKs continue to arrive, TCP stays in this state and the congestion window (cwnd) is increased exponentially. This is known as the fast retransmit mechanism.
- When a sender receives three duplicate ACKs, it assumes that a packet has been lost and immediately retransmits the lost packet without waiting for a timeout. The sender then enters the fast recovery state and sets the cwnd to the value of the congestion window at the time of the loss.
- If the sender receives an additional duplicate ACK while in the fast recovery state, it increases the cwnd by one for each duplicate ACK received, effectively growing the congestion window exponentially. This allows the sender to recover from the packet loss quickly, while also being conservative about the amount of traffic sent to avoid further congestion.
- If the sender receives an ACK for the lost packet, it exits the fast recovery state and returns to the congestion avoidance phase. If no duplicate ACKs are received for a period of time equal to the Round Trip Time (RTT) of the connection, the sender assumes that the congestion has subsided and returns to the congestion avoidance phase.
67. In the Reno TCP, when TCP enters the fast recovery, if a timeout occurs, TCP ____________________________________.
- stays in this state, but the cwnd grows additively
- stays in this state, but the cwnd grows exponentially
- moves to slow start state
- moves to the congestion avoidance state but deflate the size of the cwnd to ssthresh value
- Yes, that's correct. In the Reno TCP, if a timeout occurs while the sender is in the fast recovery state, TCP transitions back to the slow start state. This is because a timeout is an indication of severe congestion and it's better to start over with a smaller congestion window (cwnd) and slowly ramp up the sending rate again.
- When TCP enters the slow start state, it sets the cwnd to one MSS and starts increasing it linearly for each ACK received. The ssthresh is also set to half of the current cwnd value to allow for a smooth transition back to the congestion avoidance phase.
- Once the cwnd reaches the ssthresh value, TCP transitions back to the congestion avoidance phase and resumes the additive increase algorithm to slowly increase the congestion window size.
68. In the Reno TCP, when TCP enters the fast recovery, if a new (non duplicate) ACK arrives TCP ____________________________________.
- stays in this state, but the cwnd grows additively
- stays in this state, but the cwnd grows exponentially
- moves to slow start state
- moves to the congestion avoidance state but deflate the size of the cwnd to ssthresh value
when TCP receives a new (non-duplicate) ACK in the fast recovery state, it exits that state and enters congestion avoidance. The cwnd is set to ssthresh, and then the additive increase algorithm is used to increase the cwnd.
69. A later version of TCP, called ______ TCP, made an extra optimization on the _______ TCP.
- New Reno; Reno
- New Taho; Taho
- New Reno; Taho
- New Taho; Reno
- A later version of TCP, called New Reno TCP, made an extra optimization on the Reno TCP.
- In particular, New Reno TCP improves the performance of Reno TCP by allowing it to recover more quickly from multiple packet losses in a single congestion window. In Reno TCP, if multiple packets are lost in a single congestion window, the sender can only recover one lost packet per round-trip time (RTT) due to the fast retransmit and fast recovery algorithms. However, in New Reno TCP, the sender can recover multiple lost packets per RTT. This is achieved by adding a new algorithm called "limited transmit" to the congestion control mechanism, which allows the sender to transmit up to three additional packets immediately after detecting multiple packet losses. This helps to keep the congestion window size from dropping too low and allows for faster recovery from congestion events.
70. In the slow start algorithm, the size of the congestion window grows ______________ until ___________________.
- exponentially; it reaches a threshold
- exponentially; congestion is detected
- additively; it reaches a threshold
- additively; congestion is detected
- In the slow start algorithm, the size of the congestion window grows exponentially until either the congestion window size reaches the value of the slow start threshold (ssthresh), or congestion is detected by the occurrence of packet loss.
- During slow start, the congestion window size starts at one maximum segment size (MSS) and doubles for each successful transmission. This means that the congestion window size grows exponentially as more packets are successfully transmitted without congestion. However, if congestion is detected (e.g. due to packet loss or receipt of a congestion indication signal from the network), the congestion window size is reduced and the congestion control algorithm transitions to congestion avoidance mode.
- The slow start algorithm is used by TCP to initially ramp up its sending rate after a connection is established or after a period of inactivity. It is intended to maximize network utilization without causing congestion or excessive packet loss.
71. In the congestion avoidance algorithm, the size of the congestion window grows ______________ congestion is detected.
- exponentially; it reaches a threshold
- exponentially; congestion is detected
- additively; it reaches a threshold
- additively; congestion is detected
- In the congestion avoidance algorithm, the size of the congestion window grows additively until congestion is detected.
- After the slow start phase, TCP enters congestion avoidance mode. During this phase, the size of the congestion window is increased linearly rather than exponentially as in slow start. Specifically, the congestion window size is increased by one maximum segment size (MSS) for every round-trip time (RTT) of the connection, so long as no congestion is detected.
- If congestion is detected, either through the receipt of a packet indicating congestion from the network or through packet loss, TCP reduces the congestion window size and re-enters slow start phase to ramp up its sending rate again.
- The congestion avoidance algorithm is used to prevent TCP from overwhelming the network with traffic and causing congestion or packet loss. By gradually increasing the congestion window size, TCP can find the optimal sending rate without causing congestion, while also responding appropriately when congestion is detected.
72. The congestion window size, after it passes the initial slow start state, follows a saw tooth pattern called _________________________________.
- exponential increase, additive decrease
- additive increase, exponential decrease
- multiplicative increase, additive decrease
- additive increase, multiplicative decrease
- The congestion window size, after it passes the initial slow start state, follows a sawtooth pattern called the additive increase/multiplicative decrease (AIMD) algorithm.
- The AIMD algorithm is used in TCP congestion control to increase the sending rate of packets until congestion is detected. When there is no congestion, the congestion window size is increased additively by one maximum segment size (MSS) for every round-trip time (RTT) of the connection. However, when congestion is detected, the congestion window size is decreased multiplicatively by a factor of 2, which reduces the sending rate of packets.
- This sawtooth pattern of increasing and then decreasing the congestion window size is repeated over time, creating the AIMD algorithm. It allows TCP to quickly detect and respond to congestion in the network, while also maintaining a high sending rate when there is no congestion.