Linux+ Linux+ Networking Services and Protocols 2 — Questions and Answers
Question 1: Which protocol automatically assigns IP addresses, subnet masks, and default gateways to network clients?
- DNS
- NTP
- DHCP (Correct answer)
- FTP
Correct answer: DHCP
DHCP (Dynamic Host Configuration Protocol) dynamically leases IP configuration parameters to network clients.
Question 2: Which file contains static hostname-to-IP address mappings that are checked before DNS?
- /etc/resolv.conf
- /etc/hosts (Correct answer)
- /etc/hostname
- /etc/network/interfaces
Correct answer: /etc/hosts
/etc/hosts contains static hostname-to-IP mappings; by default nsswitch.conf checks this file before querying DNS.
Question 3: What is the primary purpose of NTP (Network Time Protocol) in a Linux environment?
- Translate domain names to IP addresses
- Assign dynamic IP addresses to hosts
- Synchronize system clocks across the network (Correct answer)
- Route packets between different network segments
Correct answer: Synchronize system clocks across the network
NTP synchronizes the system clock to a reliable time source, ensuring accurate and consistent timestamps across all systems.
Question 4: Which modern command replaces netstat and displays active network connections and listening ports?
- ifconfig
- ip addr
- ss (Correct answer)
- nmcli
Correct answer: ss
ss (socket statistics) is the modern replacement for netstat and displays TCP/UDP connections, listening sockets, and socket states.
Question 5: Which service is a modern NTP implementation that synchronizes the Linux system clock with remote time servers?
- ntpd
- chronyd (Correct answer)
- timesync
- hwclock
Correct answer: chronyd
chronyd is a modern, more accurate NTP implementation that adjusts and maintains system clock synchronization with remote NTP servers.
Question 6: Which command is the 'Swiss Army knife' of networking, capable of testing TCP/UDP port connectivity?
- ping
- traceroute
- nc (Correct answer)
- route
Correct answer: nc
nc (netcat) can open TCP/UDP connections to any host and port, making it useful for testing whether services are listening.
Question 7: What does the command `ssh-keygen -t ed25519` do?
- Tests SSH connectivity to a remote server
- Generates an Ed25519 SSH key pair (Correct answer)
- Converts an existing RSA key to Ed25519 format
- Verifies the integrity of an existing SSH key
Correct answer: Generates an Ed25519 SSH key pair
ssh-keygen -t ed25519 generates a new Ed25519 key pair, which is more secure and compact than RSA keys.
Which protocol automatically assigns IP addresses, subnet masks, and default gateways to network clients?