Quiz on Transport Layer
Introduction to the Transport layer
The transport layer is the 4th layer from the top of the OSI (Open Systems Interconnection) model. The transport layer's primary goal is to maintain order so that data is received in the same sequence that it was sent. The transport layer receives data from the upper layer (application layer), divides it into smaller segments, numbers each byte, and passes it to the lower layer (network layer) for delivery. There are two types of services provided by the transport layer: connection-oriented and connectionless. Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the two most important protocols in the Transport Layer.
Basic Transport Layer Questions (MCQ)
Which of the Following Protocols are Utilized by the Transport Layer?
- a) TCP and UDP
- b) HTTP and UDP
- c) UDP and HTTP
- d) FTP and TCP
Answer -a
Transport layer protocols are TCP and UDP.
Explanation -
TCP and UDP are both transport layer protocols used in networking. TCP is a connection-oriented protocol, whereas UDP is a connectionless protocol.
What does TCP stand for?
- a) Transmission Control Protocol
- b) Transfer Control Protocol
- c) Transmission Character Protocol
- d) Transfer Character Protocol
Answer -a
TCP stands for Transmission Control Protocol.
Explanation -
TCP is an acronym for Transmission Control Protocol and is a connection-oriented protocol that is used in the transport layer.
What does UDP Stand for?
- a) User Datagram Piece
- b) User Dedicated Program
- c) User Datagram Protocol
- d) User Defined Primitive
Answer -c)
UDP stands for User Datagram Protocol.
Explanation -
UDP is an acronym for User Datagram Protocol and is a connectionless protocol that is used in the transport layer.
Which of the Following Protocol is a Connection-Oriented Protocol?
- a) TCP
- b) ARP
- c) UDP
- d) ICMP
Answer -a TCP is a connection-oriented protocol.
Explanation - Transmission Control Protocol is a connection-oriented protocol because it requires a logical connection to be established between the two processes before data is exchanged.
Which of the Following Protocol is a Connection-less Protocol?
- a) TCP
- b) UDP
- c) ARP
- d) ICMP
Answer -b
UDP is a connection-less protocol.
Explanation -
User Datagram Protocol is a connection-less protocol because it does not establish a connection before sending data.
Which of the Following is not a Transport Layer Protocol of the TCP/IP Model?
- a) UDP
- b) BOOTP
- c) TCP
- d) SCTP
Answer -b
BOOTP is not a transport layer protocol of the TCP/IP model.
Explanation -
UDP, SCTP, and TCP are transport layer protocols, whereas BOOTP is a computer network management protocol that uses a configuration server to automatically assign an IP address to network devices.
What Layer in the OSI Model is the Transport Layer?
- a) Layer 1
- b) Layer 4
- c) Layer 6
- d) Layer 3
Answer -b
Layer 4 in the OSI model is the transport layer.
Explanation -
The transport layer is often referred to as Layer 4 in the OSI model, whereas numbered layers are not used in TCP/IP.
What is the Primary Function of the Transport Layer?
- a) Process to process delivery
- b) Node-to-node delivery
- c) Updating and maintenance of the routing table
- d) Congestion control
Answer - a)
The primary function of the transport layer is process-to-process delivery.
Explanation -
The transport layer is responsible for the process to process delivery of the entire message between two different networks. A process is an application program that runs on a computer. This layer ensures that the entire message arrives intact and in order at the receiver.
Which of the Following Service does the Transport Layer Provide?
- a) Error control
- b) Connection service
- c) Connectionless service
- d) Congestion control
Answer -a)
The transport layer provides a reliable delivery service whose primary function is Error control.
Explanation -
The transport layer protocols provide five types of services:
- Addressing
- End-to-end delivery
- Flow control
- Multiplexing
- Reliable delivery
Error Control is the primary function of the transport layer's Reliable delivery service. In reality, no transmission will be completely error-free. As a result, transport layer protocols (most particularly TCP) are designed to ensure error-free transmission.
The Transport Layer Receives Data in the Form of _____.
- a) Byte streams
- b) Packets
- c) Bits stream
- d) None of the above
Answer -a
The transport layer receives data in the form of Byte streams.
Explanation -
Some applications prefer to receive byte streams rather than packets. The transport layer supports byte-oriented data stream transmission if needed.
Intermediate Transport layer questions(MCQ)
What is the Size of the UDP Packet Header in the Transport Layer?
- a) 8 bytes
- b) 16 bytes
- c) 20 bytes
- d) 12 bytes
Answer -
The packet header size of UDP in the transport layer is 8 bytes.
Explanation -
The header size in UDP is 8 bytes, and the packet size can be up to 65,535 bytes. UDP header fields include the source and destination ports, the length of the packet (header and data), and the checksum.
What is the Next Action in the UDP Protocol if Data is Lost in the Middle?
- a) It will retransmit until it reaches its destination.
- b) It will no longer send packets.
- c) It will ignore and send the next packet.
- d) None of the above
Answer -
It will ignore it and send the next packet.
Explanation -
UDP, as a transport protocol, does not provide any mechanism for tracking lost packets or re-transmission of lost packets, and as a result, it is faster than TCP.
Which One of the Following Protocols Utilizes both TCP and UDP?
- a) SMTP
- b) FTP
- c) DNS
- d) Telnet
Answer -c)
DNS uses both TCP and UDP.
Explanation -
DNS uses TCP for zone exchanges between servers and UDP when a client attempts to resolve a hostname to an IP address. UDP can be used to transfer small amounts of data, whereas TCP must be used to transfer data larger than 512 bytes.
Which Transport Layer (layer 4) Protocol is Used for a Telnet Connection?
- a) IP
- b) UDP
- c) TCP
- d) SMTP
Answer c-
TCP is used for a Telnet connection.
Explanation -
Although Telnet uses both TCP and IP, the question specifically asks about the transport layer (layer 4) protocol, and IP operates at the network layer (layer 3), so TCP is the correct answer.
Which of the Following Services Makes use of UDP?
- a) DHCP
- b) SMTP
- c) SNMP
- d) HTTP
Answer -a
DHCP and SNMP use UDP(User Datagram Protocol).
Explanation -
The DHCP service model is connectionless and uses the User Datagram Protocol (UDP). It uses two UDP port (port 67 and port 68) numbers for its operations. SNMP uses UDP as its transport protocol because it has no need for the overhead of TCP.
Which of the Following Services Makes use of TCP?
- a) HTTP
- b) DHCP
- c) SMTP
- d) TFTP
Answer -a
HTTP and SMTP use TCP(Transmission Control Protocol).
Explanation -
HTTP uses TCP because the files, images, and web pages that we receive from the remote host must not be dropped on the way and must be delivered in the order to the HTTP client. TCP, port 25 is used by SMTP. It originated in the early 1980s when there was a need for hosts to send messages to each other reliably.
What TCP Port is used for SMTP?
- a) Port 21
- b) Port 25
- c) Port 22
- d) Port 23
Answer -b
Port 25 is used for SMTP(Simple Mail Transfer Protocol).
Explanation -
Port 25 is the original standard email SMTP port and the oldest, having debuted in 1982. The IANA (Internet Assigned Numbers Authority) still recognizes port 25 as the standard, default SMTP port.
Which of the Following OSI Model Layers is also Known as the end-to-end Layer?
- a) Network layer
- b) Transport layer
- c) Session layer
- d) Data layer
Answer -b
Transport layer is also known as the end-to-end layer.
Explanation -
In the OSI (Open Systems Interconnection) model, the transport layer is responsible for end-to-end communication, so it is also known as the end-to-end layer.
Which Port Number does HTTP Use?
- a) Port 23
- b) Port 80
- c) Port 53
- d) Port 110
Answer -
Port 80 is used by HTTP(Hypertext Transfer Protocol).
Explanation -
HTTP communicates over port 80. It is the standard network port for sending and receiving unencrypted web pages.
The Transport Layer (layer 4) Protocols used for File Transfer, DNS, and Email, respectively, are
- a) UDP, TCP, and UDP
- b) UDP, UDP, and TCP
- c) TCP, UDP, and TCP
- d) TCP, TCP, and UDP
Answer -
TCP for file transfer, UDP for DNS, and TCP for email.
Explanation -
TCP is used for file transfer because, in file transfer, correctness is necessary. DNS uses UDP because, in DNS, timely delivery is more important. Email uses TCP same as file transfer.
Advanced Transport Layer Questions(MCQ)
Which of the Following is a Congestion-controlled Version of UDP?
- a) Stream control transmission protocol
- b) Datagram congestion control protocol
- c) User congestion control protocol
- d) Structured stream transport
Answer -b
Datagram congestion control protocol is a congestion-controlled version of UDP.
Explanation -
The Datagram Congestion Control Protocol (DCCP) is a message-based transport layer protocol. It handles reliable connection establishment, teardown, congestion control, explicit congestion notification, and feature negotiation. It is used in modern systems where there is a strong probability of congestion
Which of the Following Uses UDP as its Transport Protocol?
- a) Telnet
- b) DNS
- c) SMTP
- d) HTTP
Answer -
DNS uses UDP as its transport protocol.
Explanation -
- Telnet is a byte stream protocol that requires connection establishment, so it utilizes TCP.
- DNS requires request and response, as well as a protocol that allows a server to respond to small queries from a large number of users. UDP is the most appropriate protocol for DNS querying because it is fast and stateless.
- SMTP needs reliability, so it uses TCP.
- HTTP uses TCP because HTTP requires the establishment of a connection.
To Support Electronic Mail, which of the Following Transport Layer Protocols is Used?
- a) IP
- b) SMTP
- c) TCP
- d) UDP
Answer -c
TCP is used to support electronic mail.
Explanation -
SMTP is the application layer protocol used by e-mail. TCP and UDP are two protocols used at the transport layer. TCP or Transmission Control Protocol is used as the transport layer protocol by SMTP because it is reliable.
Consider the following statements.
I. TCP is a connection-oriented protocol. II. TCP connections are full duplex. III. TCP provides flow control and quality of service.
- a) Only I is correct
- b) Only II is correct
- c) Only II and III are correct
- d) All of I, II, and III are correct
Answer -
All the given statements are correct.
Explanation -
- TCP is a connection-oriented protocol. Before sending data, TCP requires that a connection be established between two remote points.
- TCP connections are full duplexes because both the sender and the receiver can send segments at the same time.
- TCP provides flow control and it uses a sliding window for flow control.
Why is UDP, or User Datagram Protocol, Referred to as Connectionless?
- a) Because the transport layer treats all UDP packets independently.
- b) Because it sends data in the form of a stream of related packets.
- c) Because it is received in the same order as it was sent.
- d) Because it transmits data very quickly.
Answer -a
UDP, or User Datagram Protocol, is referred to as connectionless because the transport layer treats all UDP packets independently.
Explanation -
UDP is an alternative to TCP and is used when speed is critical, but data loss is not an issue. UDP is connectionless because all UDP packets are treated independently by the transport layer.
Conclusion
- The transport layer is the 4th layer from the top of the OSI (Open Systems Interconnection) model.
- The transport layer receives data from the upper layer (application layer), divides it into smaller segments, numbers each byte, and passes it to the lower layer (network layer) for delivery.
- Two types of services are provided by the transport layer: connection-oriented and connectionless.
- Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the two most important protocols in the Transport Layer.