LX0-104 · Question #481
Which of the following lines would you expect to see in the file /etc/protocols?
The correct answer is D. udp 17 UDP. The /etc/protocols file maps protocol names to their corresponding protocol numbers.
Question
Options
- Ain.tftpd: LOCAL
- Btftp dgram udp wait root /usr/sbin/tcpd in.tftpd
- Ctftp 69/udp
- Dudp 17 UDP
How the community answered
(22 responses)- A5% (1)
- B5% (1)
- D91% (20)
Why each option
The /etc/protocols file maps protocol names to their corresponding protocol numbers.
This format, service:type, is not found in /etc/protocols; it might be part of a configuration for a specific service or daemon, but not protocol definitions.
This is an entry typically found in /etc/inetd.conf or a similar configuration for xinetd, defining how a network service like TFTP is launched by a super-server.
This format, service port/protocol, is found in the /etc/services file, which maps service names to port numbers and protocols.
The /etc/protocols file defines the numeric values and names of network protocols, such as IP (0), ICMP (1), TCP (6), and UDP (17). The line "udp 17 UDP" correctly shows the UDP protocol name, its assigned number 17, and an alias.
Concept tested: /etc/protocols file format
Source: https://man7.org/linux/man-pages/man5/protocols.5.html
Topics
Community Discussion
No community discussion yet for this question.