TCP-IP Conclusion - Quiz Explanation
The correct answers are indicated below, along with the text that explains the correct answers.
1.
Which two transport-layer protocols does TCP/IP provide for the two different types of client/server transactions?
Please select the best answer.
A.
The Network Time Protocol (NTP) and the User Datagram Protocol (UDP)
B.
The Network News Transport Protocol (NNTP) and the User Datagram Protocol (UDP)
C.
The User Datagram Protocol (UDP) and the Transmission Control Protocol (TCP)
D.
The Transmission Control Protocol (TCP) and the Network Time Protocol (NTP)
The correct answer is C.
UDP is for simple request-reply transactions, and TCP is for transactions that require a reliable data transfer mechanism.
2.
Where would you find a list of conventional names for TCP/IP services and the associated well-known port numbers?
Please select the best answer.
A.
In the file /etc/services
B.
In the file /etc/inetd.conf
C.
In the file /etc/hosts
D.
In the nsswitch.conf file
The correct answer is A.
You would find a list of conventional names for TCP/IP services and the associated well-known port numbers in the file /etc/services. This file associates services names with port names—it does not guarantee that a particular service is available on the machine.
3.
You receive reports that users cannot telnet into a server. You note that port 23 is not open on that server.
You want to enable telnet to handle all incoming connections, then close that connection and resume listening. Everything else seems in order.
What file should you edit to achieve your desired results?
Please select the best answer.
A.
/etc/services
B.
/etc/inetd.conf
C.
/var/log/messages
D.
/var/rpcbind
The correct answer is B.
The file you should edit is /etc/inetd.conf. inetd listens on many ports simultaneously, uses the
fork()
and
exec()
system calls to start the specific server process, then terminates. You configure it using the /etc/inetd.conf file.
4.
What is the purpose of the protocol line in the inetd.conf file?
Please select the best answer.
A.
To display the name of the service the line controls
B.
To display the user ID that will own the server process started by inetd
C.
To specify whether the process is a TCP or UDP service
D.
To display any arguments to the server started by inetd
The correct answer is C.
The protocol line in the inetd.conf file specifies whether the process is a TCP or UDP service. The service line displays the service controlled by that line. The uid line displays the user ID that will own the server process. The arguments line displays any arguments to the server process started by inetd.
5.
What is the purpose of the Remote Procedure Call (RPC) protocol?
Please select the best answer.
A.
To verify that the rpcbind process is running on a machine
B.
To allow processes to make subroutine calls on one machine that are executed by processes on a remote machine
C.
To perform bulk data transfer across the Internet
D.
To provide Internet-wide conversion between IP addresses and machine host names
The correct answer is B.
The purpose of the Remote Procedure Call (RPC) protocol is to allow processes to make subroutine calls on one machine that are executed by processes on a remote machine. The most important aspect of the RPC protocol is the portmapper process.
6.
What is the chief difference between iterative and concurrent servers?
Please select the best answer.
A.
An iterative server handles one request at a time, and while it does, other connections to that port are blocked. A concurrent server is always available for incoming connections because it splits into parent and child processes.
B.
An iterative server uses TCP, and a concurrent server uses UDP.
C.
A concurrent server handles one request at a time, and while it does, other connections to that port are blocked. An iterative server is always available for incoming connections because it splits into parent and child processes.
D.
An iterative server uses UDP, and a concurrent server uses TCP.
The correct answer is A.
The chief difference between iterative and concurrent servers is that an iterative server handles one request at a time, and while it does, other connections to that port are blocked. A concurrent server is always available for incoming connections because it splits into parent and child processes. Most UNIX systems default to using concurrent servers for telnet and other connections.
7.
You try to connect to an FTP server. However, you find that you cannot. You scan the host for open ports, looking for the FTP port. What are the well-known port numbers for FTP?
Please select the best answer.
A.
23 and 512
B.
23 and 21
C.
512 and 513
D.
20 and 21
The correct answer is D.
FTP servers listen for connections on port 21, and send information on port 20. 23 is the well-known port number for telnet. 512 and 513 are the well-known port numbers for the Berkeley “r” commands
rlogin
and
rsh
.
8.
What is the purpose of the
ls
command when using FTP?
Please select the best answer.
A.
To change the directory on a remote machine
B.
To transfer a file from a local machine to a remote machine
C.
To list the directory on a remote machine
D.
To change the directory on a local machine
The correct answer is C.
The purpose of the
ls
command when using FTP is to list the directory on a remote machine.