COMPUTER NETWORK AND SECURITY

5.4 Transport layer: 

 

The transport service

 

1. What is the primary role of the transport layer in the OSI model?

a. Routing packets between networks
b. Ensuring end-to-end communication between applications
c. Transmitting data within a local network
d. Assigning IP addresses to devices

Answer: b. Ensuring end-to-end communication between applications

2. Which transport layer protocol provides connection-oriented and reliable communication?

a. TCP (Transmission Control Protocol)
b. UDP (User Datagram Protocol)
c. ICMP (Internet Control Message Protocol)
d. FTP (File Transfer Protocol)

Answer: a. TCP (Transmission Control Protocol)

3. What is the primary purpose of flow control in the transport layer?

a. Detecting errors in transmitted data
b. Ensuring data integrity
c. Regulating the speed of data transmission
d. Assigning port numbers to applications

Answer: c. Regulating the speed of data transmission

4. In TCP, what mechanism is used to acknowledge the receipt of data and request retransmission if necessary?

a. Sliding Window
b. Sequence Numbers
c. Three-Way Handshake
d. Acknowledgment (ACK)

Answer: d. Acknowledgment (ACK)

5. Which transport layer protocol is connectionless and does not guarantee reliable delivery of data?

a. TCP (Transmission Control Protocol)
b. UDP (User Datagram Protocol)
c. ICMP (Internet Control Message Protocol)
d. HTTP (Hypertext Transfer Protocol)

Answer: b. UDP (User Datagram Protocol)

6. What is the purpose of the three-way handshake in TCP communication?

a. To establish a connection
b. To terminate a connection
c. To regulate flow control
d. To detect errors in transmitted data

Answer: a. To establish a connection

7. Which field in the TCP header is responsible for identifying the sequence number of a segment?

a. Source Port
b. Destination Port
c. Sequence Number
d. Acknowledgment Number

Answer: c. Sequence Number

8. In the transport layer, what is the role of the port number?

a. Identifying the source and destination devices
b. Identifying the network segment
c. Identifying the protocol being used
d. Identifying the source and destination applications

Answer: d. Identifying the source and destination applications

9. What is the primary function of the transport layer checksum?

a. Encrypting the transmitted data
b. Authenticating the source device
c. Detecting errors in the transmitted data
d. Assigning unique identifiers to data segments

Answer: c. Detecting errors in the transmitted data

10. Which transport layer protocol is often used for real-time applications, such as voice and video streaming?

a. TCP (Transmission Control Protocol)
b. UDP (User Datagram Protocol)
c. ICMP (Internet Control Message Protocol)
d. SMTP (Simple Mail Transfer Protocol)


 

Transport protocols

 

1. What is the primary function of transport layer protocols in the OSI model?

a. Physical addressing
b. End-to-end communication between applications
c. Network routing
d. Data link layer framing

Answer: b. End-to-end communication between applications

2. Which transport layer protocol is connection-oriented and provides reliable, in-order delivery of data?

a. TCP (Transmission Control Protocol)
b. UDP (User Datagram Protocol)
c. ICMP (Internet Control Message Protocol)
d. HTTP (Hypertext Transfer Protocol)

Answer: a. TCP (Transmission Control Protocol)

3. What is the purpose of flow control in transport layer protocols?

a. To detect errors in transmitted data
b. To regulate the speed of data transmission
c. To encrypt the data for secure communication
d. To assign port numbers to applications

Answer: b. To regulate the speed of data transmission

4. In TCP, what mechanism is used to acknowledge the receipt of data and request retransmission if necessary?

a. Sliding Window
b. Sequence Numbers
c. Three-Way Handshake
d. Acknowledgment (ACK)

Answer: d. Acknowledgment (ACK)

5. Which transport layer protocol is connectionless and does not guarantee reliable delivery of data?

a. TCP (Transmission Control Protocol)
b. UDP (User Datagram Protocol)
c. ICMP (Internet Control Message Protocol)
d. FTP (File Transfer Protocol)

Answer: b. UDP (User Datagram Protocol)

6. What is the primary purpose of the three-way handshake in TCP communication?

a. To establish a connection
b. To terminate a connection
c. To regulate flow control
d. To detect errors in transmitted data

Answer: a. To establish a connection

7. Which field in the TCP header is responsible for identifying the sequence number of a segment?

a. Source Port
b. Destination Port
c. Sequence Number
d. Acknowledgment Number

Answer: c. Sequence Number

8. In the transport layer, what is the role of the port number?

a. Identifying the source and destination devices
b. Identifying the network segment
c. Identifying the protocol being used
d. Identifying the source and destination applications

Answer: d. Identifying the source and destination applications

9. What is the purpose of the transport layer checksum?

a. Encrypting the transmitted data
b. Authenticating the source device
c. Detecting errors in the transmitted data
d. Assigning unique identifiers to data segments

Answer: c. Detecting errors in the transmitted data

10. Which transport layer protocol is often used for real-time applications, such as voice and video streaming?

a. TCP (Transmission Control Protocol)
b. UDP (User Datagram Protocol)
c. ICMP (Internet Control Message Protocol)
d. SMTP (Simple Mail Transfer Protocol)


 

Port and Socket, 

 

1. What is a port in networking?

a. A physical connector on a computer
b. A numerical identifier for a specific process or service
c. A type of network cable
d. A security protocol

Answer: b. A numerical identifier for a specific process or service

2. How many ports are available for use in the TCP/IP protocol suite?

a. 64
b. 128
c. 256
d. 65,536

Answer: d. 65,536

3. What is the range of well-known ports as defined by the Internet Assigned Numbers Authority (IANA)?

a. 0 to 1023
b. 1024 to 49151
c. 49152 to 65535
d. 0 to 65535

Answer: a. 0 to 1023

4. Which transport layer protocol uses both source and destination port numbers to identify communication endpoints?

a. TCP (Transmission Control Protocol)
b. UDP (User Datagram Protocol)
c. ICMP (Internet Control Message Protocol)
d. HTTP (Hypertext Transfer Protocol)

Answer: a. TCP (Transmission Control Protocol)

5. In a socket, what is the combination of an IP address and a port number called?

a. Address
b. Endpoint
c. Identifier
d. Node

Answer: b. Endpoint

6. What is the purpose of ephemeral ports in a TCP/IP connection?

a. They are reserved for well-known services
b. They are dynamically assigned for short-lived client-server communication
c. They are used for secure connections
d. They are reserved for multicast communication

Answer: b. They are dynamically assigned for short-lived client-server communication

7. Which well-known port is commonly used for HTTP traffic?

a. 21
b. 80
c. 443
d. 25

Answer: b. 80

8. In the context of sockets, what is a listening socket?

a. A socket in an established connection
b. A socket waiting for incoming connections
c. A socket used for multicast communication
d. A socket reserved for secure transactions

Answer: b. A socket waiting for incoming connections

9. What is the primary purpose of a socket in network programming?

a. To secure network communication
b. To identify network devices
c. To establish a connection between processes
d. To encrypt data packets

Answer: c. To establish a connection between processes

10. Which command can be used to check the status of open ports on a system in a Unix/Linux environment?

a. netstat–
b. ipconfig
c. ping
d. traceroute

 

Connection establishment & Connection release

 

1. What is the purpose of the three-way handshake in connection establishment?

a. To verify the identity of the devices
b. To negotiate encryption parameters
c. To synchronize sequence numbers and establish a reliable connection
d. To exchange routing information

Answer: c. To synchronize sequence numbers and establish a reliable connection

2. In TCP, what is the role of the SYN flag during the three-way handshake?

a. Indicates the start of a new connection
b. Acknowledges the receipt of data
c. Signals the termination of a connection
d. Confirms successful data transmission

Answer: a. Indicates the start of a new connection

3. Which protocol is commonly used for connection establishment in web browsing?

a. UDP (User Datagram Protocol)
b. HTTP (Hypertext Transfer Protocol)
c. FTP (File Transfer Protocol)
d. TCP (Transmission Control Protocol)

Answer: d. TCP (Transmission Control Protocol)

4. What is the purpose of a FIN flag in connection release?

a. Signals the start of a new connection
b. Acknowledges the receipt of data
c. Confirms successful data transmission
d. Signals the termination of a connection

Answer: d. Signals the termination of a connection

5. Which phase of connection establishment involves the exchange of initial sequence numbers and connection parameters?

a. SYN
b. ACK
c. FIN
d. RST

Answer: a. SYN

6. In a TCP connection, what does the ACK flag indicate during the three-way handshake?

a. Acknowledges the receipt of data
b. Signals the termination of a connection
c. Confirms successful data transmission
d. Indicates the start of a new connection

Answer: a. Acknowledges the receipt of data

7. What is the purpose of the RST flag in TCP?

a. Signals the start of a new connection
b. Acknowledges the receipt of data
c. Confirms successful data transmission
d. Resets and terminates a connection

Answer: d. Resets and terminates a connection

8. In connection release, what is the purpose of a half-close or a FIN flag in one direction?

a. Signals the start of a new connection
b. Acknowledges the receipt of data
c. Confirms successful data transmission
d. Initiates termination of one side of the connection

Answer: d. Initiates termination of one side of the connection

9. What is the typical sequence of flags during a normal TCP connection release?

a. FIN, ACK, FIN, ACK
b. SYN, ACK, SYN, ACK
c. RST, ACK, RST, ACK
d. ACK, FIN, ACK, FIN

Answer: a. FIN, ACK, FIN, ACK

10. In UDP, is there a formal connection establishment or release process?

a. Yes, UDP follows a three-way handshake for connection establishment
b. No, UDP is connectionless and does not have a formal connection establishment or release process
c. Only connection establishment is formal in UDP
d. Only connection release is formal in UDP


 

Flow control & buffering, Multiplexing & de-multiplexing

 

1. What is the primary purpose of flow control in networking?

a. Assigning IP addresses
b. Regulating the speed of data transmission
c. Identifying network devices
d. Ensuring data integrity

Answer: b. Regulating the speed of data transmission

2. In flow control, what is the role of a buffer?

a. Regulating data flow in real-time
b. Storing and managing temporarily excess data
c. Authenticating network devices
d. Assigning port numbers

Answer: b. Storing and managing temporarily excess data

3. What can happen in the absence of proper flow control mechanisms?

a. Data corruption
b. Data loss
c. Slow transmission speed
d. All of the above

Answer: d. All of the above

4. Which flow control mechanism involves the sender waiting for an acknowledgment before sending more data?

a. Sliding Window
b. Stop-and-Wait
c. Leaky Bucket
d. Token Bucket

Answer: b. Stop-and-Wait

5. What is the purpose of the sliding window technique in flow control?

a. Regulating the flow of data packets
b. Dynamically adjusting the window size for optimal data transmission
c. Detecting errors in transmitted data
d. Assigning unique identifiers to data segments

Answer: b. Dynamically adjusting the window size for optimal data transmission

Multiplexing & De-multiplexing:

6. What is multiplexing in networking?

a. Combining multiple signals into a single channel for transmission
b. Separating a single signal into multiple channels for transmission
c. Authenticating network devices
d. Regulating the speed of data transmission

Answer: a. Combining multiple signals into a single channel for transmission

7. What is the purpose of de-multiplexing in networking?

a. Combining multiple signals into a single channel
b. Separating a single signal into multiple channels
c. Authenticating network devices
d. Regulating the speed of data transmission

Answer: b. Separating a single signal into multiple channels

8. Which multiplexing technique allocates a specific time slot for each channel in a communication link?

a. Frequency Division Multiplexing (FDM)
b. Time Division Multiplexing (TDM)
c. Code Division Multiplexing (CDM)
d. Wavelength Division Multiplexing (WDM)

Answer: b. Time Division Multiplexing (TDM)

9. What is the primary advantage of Frequency Division Multiplexing (FDM)?

a. Simplicity in implementation
b. Efficient use of bandwidth
c. Low latency in communication
d. Dynamic allocation of time slots

Answer: b. Efficient use of bandwidth

10. In packet switching, what is the process of de-multiplexing at the receiving end called?

a. Modulation
b. Demodulation
c. De-multiplexing
d. Multiplexing


 

Congestion control algorithm

 

1. What is congestion control in networking?

a. Authenticating network devices
b. Regulating the speed of data transmission
c. Assigning IP addresses
d. Detecting errors in transmitted data

Answer: b. Regulating the speed of data transmission

2. Which of the following is a goal of congestion control algorithms?

a. Maximizing data transmission speed
b. Minimizing packet loss and delays
c. Authenticating devices on the network
d. Assigning port numbers

Answer: b. Minimizing packet loss and delays

3. What is the primary cause of congestion in a network?

a. Slow data transmission speed
b. High network utilization
c. Insufficient IP addresses
d. Lack of flow control

Answer: b. High network utilization

4. In the context of congestion control, what is a bottleneck link?

a. A link with the fastest transmission speed
b. A link that becomes saturated, limiting overall network performance
c. A link that is prone to errors
d. A link used for multicast communication

Answer: b. A link that becomes saturated, limiting overall network performance

5. Which congestion control algorithm reacts to network congestion by reducing the transmission rate when congestion is detected?

a. Choke Packet
b. Leaky Bucket
c. Token Bucket
d. Additive Increase Multiplicative Decrease (AIMD)

Answer: d. Additive Increase Multiplicative Decrease (AIMD)

6. What is the purpose of Random Early Detection (RED) in congestion control?

a. To randomly drop packets without detecting congestion
b. To detect and mark packets before congestion occurs
c. To prioritize packets based on their content
d. To authenticate network devices

Answer: b. To detect and mark packets before congestion occurs

7. Which congestion control mechanism involves signaling the sender to slow down before the network becomes congested?

a. Explicit Congestion Notification (ECN)
b. Random Early Detection (RED)
c. Additive Increase Multiplicative Decrease (AIMD)
d. Leaky Bucket

Answer: a. Explicit Congestion Notification (ECN)

8. What does the term "window-based" refer to in the context of congestion control algorithms?

a. Regulating the speed of data transmission
b. Dynamically adjusting the window size for optimal data transmission
c. Detecting errors in transmitted data
d. Assigning port numbers to applications

Answer: b. Dynamically adjusting the window size for optimal data transmission

9. Which congestion control algorithm is commonly used in TCP to prevent network congestion?

a. Choke Packet
b. Leaky Bucket
c. Token Bucket
d. TCP Tahoe and TCP Reno

Answer: d. TCP Tahoe and TCP Reno

10. What is the purpose of Quality of Service (QoS) in congestion control?

a. Prioritizing certain types of traffic over others-
b. Randomly dropping packets to control congestion
c. Authenticating network devices
d. Assigning IP addresses