Title: LPIC 102 Q/A / 09 Persistent Network Configuration

Q: Which of the following commands shows the current default route without performing Domain Name System (DNS) lookups on the IP address(es) involved?
netstat -rn
netstat -n
netstat -r
netstat -f
A: A. The netstat command can be used for this purpose, and the -r option displays the current routes. The addition of -n prevents DNS lookups, which can help with performance.

Q: You are having difficulty with an interface on the server and it is currently down. Assuming that there is no hardware failure on the device itself, which command and option can you use to display information about the interface?
ifconfig -a
ifup
netstat -n
ifconfig
A: A. The ifconfig command will be used for this purpose and requires the addition of the -a option because the adapter is currently down. The ifup command can be used to bring up an interface but does not display information by default. The netstat command displays information about the network but not with the -n option.

Q: Which of the following is not used as a private address for internal, non-Internet, use?
172.16.4.2
192.168.40.3
10.74.5.244
143.236.32.231
A: D. Private IP addresses are found within the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 ranges, making an address in the 143 range a public IP.

Q: Which of the following commands adds a default gateway of 192.168.1.1 for interface eth0?
route add default gateway 192.168.1.1 eth0
eth0 --dg 192.168.1.1
route add default gw 192.168.1.1 eth0
route define eth0 192.168.1.1
A: C. The route command is used for this purpose, and adding a route is done with the add option. The default gateway is added using the default gw keywords followed by the IP of the gateway and the adapter.

Q: Which option for the host command will query for the authoritative name servers for a given domain?
-t ns
-t all
-ns
-named
A: A. The host command enables changing of the query type with the -t option. Using ns as the type will query for the name servers for a given domain. There is no all type, and the other options are also invalid.

Q: Which port(s) and protocol(s) should be opened in a firewall in order for the primary and secondary name servers to communicate for a given domain?
udp/53
Both tcp/53 and udp/53
tcp/53
udp/53 and tcp/503
A: B. Traditionally, udp/53 is used for DNS queries, but with a primary and secondary server it is assumed that zone transfers may occur. DNS zone transfers typically take place over tcp/53.

Q: Which option for the ping command enables you to choose the interface from which the Internet Control Message Protocol (ICMP) packets will be generated?
-i
-I
-t
-a
A: B. The -I option enables the choice of interface. A lowercase -i option sets the interval, whereas -a indicates an audible ping. Finally, -t enables a time-to-live (TTL)-based ping only.

Q: You need to split a subnet to enable four subnets with up to 30 hosts each. Which subnet mask, in Classless Inter-Domain Routing (CIDR) notation, facilitates this scenario?
/25
/24
/32
/27
A: D. A /27, with a netmask of 255.255.255.224, splits a subnet into four segments of 32 addresses, thus enabling 30 usable addresses.

Q: Which of the following commands queries for the mail servers for the domain example.com?
dig example.com mx
dig example.com
host -t smtp example.com
dig example.com smtp
A: A. The host or dig commands can be used for this purpose by setting the type to mx. The mx type will query for the mail exchanger for the given domain. There is no smtp type.

Q: Which of the following addresses represents the localhost in IPv6?
0:1
::1
127:0:1
:127:0:0:1
A: B. The localhost address for IPv6 can be written as ::1. Addresses shown like 127 represent the IPv4 localhost range but are not written properly for IPv4 or IPv6.

Q: Which option to the traceroute command will use TCP SYN packets for the path trace?
-T
-t
-s
-i
A: A. The -T option causes traceroute to use TCP packets. This option, which requires root privileges, can be helpful for situations where a firewall may be blocking traceroute traffic. The -i option chooses the interface, whereas -s chooses the source address. A lowercase -t option sets the Type of Service (ToS) flag.

Q: Which of the following commands will attempt to bring online all interfaces marked as auto within the networking configuration?
ifconfig -a
ifup auto
ifup -a
ifstat
A: C. The ifup command is used to bring up network interfaces, and the -a option brings up those interfaces marked as auto. Likewise, ifdown can be used to turn off network interfaces. The ifconfig -a command displays information on all interfaces, and there is no ifstat command.

Q: In a scripting scenario, which command will return the domain name configured for the server?
dnsname
fqdn
hostname
hostname -d
A: D. The hostname command is used to return the hostname and domain. When given the -d option, just the domain name is returned to STDOUT, thereby making it appropriate for use in a script.

Q: Which command can be used to listen for netlink messages on a network?
ip monitor
netlink -a
ip netlink
route
A: A. The ip command with the monitor option/subcommand will display netlink messages as they arrive. There is no netlink subcommand for ip, and the route command will not work for this purpose.

Q: If the traceroute6 command is not available, which option to the traceroute command can be used for an IPv6 traceroute?
-ipv6
-net6
-v6
-6
A: D. The -6 option, as in traceroute -6, executes an IPv6 traceroute. The other options shown for this question are not valid. It would be rare for the traceroute6 command to not be available and still have the traceroute -6 command available.

Q: Which of the following configuration lines in /etc/nsswitch.conf causes a lookup for group information to first use local files and then use LDAP?
group: files ldap
lookup: group [local ldap]
group: [local ldap]
group: localfiles ldap
A: A. The syntax is database: databasename with additional database names separated by spaces, as shown in the correct option for this question.

Q: Which of the following dig commands sends the query for example.com directly to the server at 192.168.2.5 rather than to a locally configured resolver?
dig example.com @192.168.2.5
dig -t 192.168.2.5 example.com
dig -s 192.168.2.5 example.com
dig server=192.168.2.5 example.com
A: A. The @ symbol is used to indicate a server to which the query will be sent directly. This can be quite useful for troubleshooting resolution problems by sending the query directly to an authoritative name server for the domain. Of the other options, -t sets the type and the others are not valid.

Q: Which ports need to be allowed through the firewall for Simple Network Management Protocol (SNMP) traffic?
Ports 23 and 25
Ports 110 and 143
Ports 80 and 443
Ports 161 and 162
A: D. SNMP traffic takes place on ports 161 and 162. Though the traffic is usually on UDP, the TCP ports are also reserved for SNMP. Ports 110 and 143 are used for POP3 and IMAP, respectively, whereas 23 and 25 are telnet and SMTP. Finally, ports 80 and 443 are HTTP and HTTPS.

Q: Which of the following commands will enumerate the hosts database?
getent hosts
gethosts
nslookup
host
A: A. The getent command is used for working with NSS databases, and getent hosts will display the available hosts using the databases configured in /etc/nsswitch.conf.

Q: Which of the following netmasks is used for a subnet described with a /25 in CIDR notation?
255.255.255.0
255.255.0.0
255.255.255.192
255.255.255.128
A: D. A /25 in CIDR notation represents half of a /24 in address space, therefore making 255.255.255.128 the masked bits. The 255.255.255.0 option is /24, whereas 255.255.255.192 is a /26. Finally, 255.255.0.0 is a /16.

Q: Which of the following configuration lines will set the DNS server to 192.168.1.4 using /etc/resolv.conf?
dns 192.168.1.4
dns-server 192.168.1.4
nameserver 192.168.1.4
name-server 192.168.1.4
A: C. The configuration option is called nameserver, and the value for the option is the IP address of the desired name server. There are several options that affect how name resolution is performed, such as the number of attempts and timeout. Also, the order in which name servers appear affects in which order the name servers are queried. See resolv.conf(5)for more information.

Q: When examining open ports on the server, you see that TCP port 3000 is listed with no corresponding protocol name, such as SMTP, IMAP over SSL (IMAPS), and so on. In which file would you find a list of port-to-protocol translations that could be customized to add this new port?
/etc/ports
/etc/p2p
/etc/ppp
/etc/services
A: D. The /etc/services file contains standard port-to-protocol information based on the well-known and assigned ports from the Internet Assigned Numbers Authority (IANA). If you’d like to provide a custom name for the service, you can do so by editing this file. There is no /etc/ports or /etc/p2p file by default, and /etc/ppp is usually a directory for the Point-to-Point protocol daemon and related services.

Q: Which of the following commands adds a route to the server for the network 192.168.51.0/24 through its gateway of 192.168.51.1?
route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.51.1
route add -net 192.168.51/24 gw 192.168.1.51
route -net 192.168.51.0/24 192.168.51.1
route add 192.168.51.1 -n 192.168.51.0//255.255.255.0
A: A. The route command can be used for this purpose, and the syntax includes the network range, denoted with the -net option, followed by the word netmask and the masked bits, followed by the lettersgw and the IP of the gateway. The other options shown are invalid for a variety of reasons, including missing keywords and options and order.

Q: Which of the following netstat options displays the send and receive queues for each socket?
-r
-M
-a
-v
A: C. The -a option displays statistics for each socket, both listening and non-listening. Included in this information is the send and receive queues. This information can be used to gauge performance and potential bottlenecks.

Q: Which of the following represents a correct configuration line for /etc/hosts?
192.168.1.4 cwa.braingia.org cwa
cwa.braingia.org cwa 192.168.1.4
cwa.braingia.org 192.168.1.8 alias cwa
alias cwa.braingia.org cwa 192.168.1.4
A: A. The correct format is the IP address followed by canonical hostname followed by any aliases for the host. You can use entries in /etc/hosts to override DNS lookups, which can be useful to prevent those names from resolving or to provide a different resolution.

Q: Which of the following commands configures the eth0 device with an IP address of 192.168.1.1 in a /24 network?
ifconfig eth0 192.168.1.1/24
ifconfig eth0 192.168.1.1/255.255.255.0
ifconfig eth0 192.168.1.1 netmask 255.255.255.0
ifconfig 192.168.1.1 netmask 255.255.255.0 eth0
A: C. The ifconfig command for configuring interfaces begins with the device followed by the IP address, which is then followed by the netmask keyword and the netmask you want to add. Because this is a /24, the netmask is 255.255.255.0.

Q: Which of the following describes a primary difference between IPv4 and IPv6?
IPv4 is for internal networks only, whereas IPv6 is for public networks.
IPv4 is for public networks, whereas IPv6 is for internal networks.
IPv4 uses a 32-bit address, whereas IPv6 uses a 128-bit address.
With IPv6, no subnetting is necessary.
A: C. IPv4 addresses are 32 bits in length and IPv6 addresses are 128-bits. Both IPv4 and IPv6 can be used on internal and external networks alike, and subnetting is indeed necessary with IPv6.

Q: On which port does ICMP operate?
TCP/43
UDP/111
UDP/69
ICMP does not use ports.
A: D. ICMP is a layer 3 protocol, meaning that it does not use ports for communication. TCP/43 is used for whois whereas port 111 is used for sunrpc. UDP/69 is used for the TFTP protocol.

Q: Which of the following commands will change the default gateway to 192.168.1.1 using eth0?
ip route default gw 192.168.1.1
ip route change default via 192.168.1.1 dev eth0
ip route default gw update 192.168.1.1
ip route update default 192.168.1.1 eth0
A: B. The ip route command can be used for this purpose, and its syntax uses a change command and the via keyword. The same operation could be completed with the route command but would require deleting the existing gateway first and then re-adding a new default gateway.

Q: Which of the following ports is used for Secure Shell communication?
TCP/23
TCP/25
TCP/22
TCP/2200
A: C. Secure Shell (SSH) operates on TCP port 22 by default. TCP/23 is used for telnet, TCP/25 is used for SMTP, and TCP/2200 is not associated with a well-known service.

Q: Which options for netcat will create a server listening on port 8080?
netcat -p 8080
nc -l -p 8080
nc -p 8080
nc -s 8080
A: B. The nc command is used to start netcat and the -l option causes it to listen. The -p option is used to specify the port on which netcat will listen. The -s option specifies the local source address and is not used for this scenario.

Q: Which of the following commands displays the Start of Authority information for the domain example.com?
dig example.com soa
dig example.com authority
dig example.com -auth
dig -t auth example.com
A: A. The soa type is used to query for Start of Authority records for a domain. Note that in many cases, dig will attempt to look up the domain within a given command and may not appear to have had an error. For example, when running option D (dig -t auth example.com) you will receive information about example.com and there will be a line in the output that dig has ignored the invalid type of auth.

Q: Assume that you want to enable local client services to go to hosts on the network without needing to fully qualify the name by adding the domain for either example.com or example.org. Which option in /etc/resolv.conf will provide this functionality?
search
domain
local-domain
local-order
A: A. The search option is used for this purpose and can be provided with multiple domain names, each separated by a space or tab. The domain option is valid within /etc/resolv.conf but does not allow for multiple domain names. On newer systems, systemd-resolved has taken over for the /etc/resolv.conf file.

Q: Which of the following commands sends an IPv6 ping to a unique local address?
ping -6 127.0.0.1
ping6 fddi/128
ping6 fdd6:551:b09f::
ping -6 fdd6:551:b09f::
A: C. The ping6 command is used to ping IPv6 addresses. Unique local addresses are the IPv6 equivalent of RFC 1918 private addresses in IPv4. In IPv6, fc00::/7 is the unique local address space. Note that there is no -6 option to the normal ping command.

Q: Which of the following commands prevents traffic from reaching the host 192.168.1.3?
route add -host 192.168.1.3 reject
route -nullroute 192.168.1.3
route add -null 192.168.1.3
route add -block 192.168.1.3
A: A. The route command can be used for this purpose, and in the scenario described, a reject destination is used for the route. The other options shown are incorrect because they use invalid options to the route command.

Q: Which of the following describes a primary difference between traceroute and tracepath?
The traceroute command requires root privileges.
The tracepath command provides the MTU for each hop, whereas traceroute does not.
The tracepath command cannot be used for tracing a path on an external network.
The traceroute command is not compatible with IPv6.
A: B. The tracepath command provides the maximum transmission unit (MTU) of the hops where possible. Both traceroute and tracepath can be used internally or externally, and both provide IPv6 capabilities, though traceroute6 and tracepath6 provide IPv6 capabilities as well. Certain options with the traceroute command can require root privileges, but not enough information was given in the question for that to have been the correct option.

Q: Which of the following commands will emulate the ping command in Microsoft Windows, where the ping is sent for four packets and then the command exits?
ping -n 4
ping -t 4
ping -p 4
ping -c 4
A: D. The -c option provides the count of the number of pings to send. The -n option specifies numeric output only, whereas -p specifies the pattern to use for the packet content. Finally, the -t option sets the TTL.

Q: Which command provides an interface into NetworkManager that works from a terminal window?
nmcli
nmui
nm
nman
A: A. The nmcli command provides a command-line interface suitable for working with NetworkManager through a terminal or SSH connection. The nmtui command provides a curses-based interface that also works through a terminal or SSH connection.

Q: Which of the following commands configures eth1 with an additional IPv6 address of fdd6:551:b09e::?
ifconfig eth1 inet6 add fdd6:551:b09e::/128
ifconfig add fdd6:551:b09e::
ifconfig fdd6:551:b09e:: eth1
ifconfig eth1 fdd6:551:b09e
A: A. The syntax for ifconfig uses the device—in this case followed by the protocol inet6—and then the keyword add to indicate that an additional IP address is being added, followed finally by the address itself.

Q: On which port does LDAP over SSL operate?
Port 53
Port 389
Port 636
Port 443
A: C. LDAP over SSL, or LDAPS, operates on port 636. Port 53 is used for DNS, port 389 is used for normal, non-SSL LDAP, and port 443 is used for HTTP over SSL.

Q: You need to prevent local clients from going to a certain host, www.example.com, and instead redirect them to localhost. Which of the following is a method to override DNS lookups for the specified host?
Add a firewall entry for the IP address of www.example.com to prevent traffic from passing through it.
Delete www.example.com from the route table using the route command.
Add a null route to prevent access to the IP address for www.example.com.
Add an entry for www.example.com in /etc/hosts to point to 127.0.0.1.
A: D. The best option for this question is to add an entry for the host in /etc/hosts. Doing so will always cause DNS queries to resolve to 127.0.0.1. The other options are not as robust because they rely on www.example.com always having the same IP address, or the solutions require additional maintenance to constantly add new IP addresses if www.example.com’s IP address changes.

Q: Which of the following commands should be executed after running ip route change?
ip route flush cache
ip route reload
ip route cache reload
ip route restart
A: A. The ip route flush cache command should be executed after changing the routes. The other commands shown for this question are not valid.

Q: Which option should be used to send a DNS query for a Sender Policy Framework (SPF) record with dig?
-t txt
-t spf
-t mx
-t mailspf
A: A. SPF records are stored in the txt record type in DNS, making -t txt the correct option for this. Of the other options, only -t mx is valid and returns the mail exchangers for the given domain.

Q: Which of the following protocols uses a three-way handshake?
ICMP
TCP
UDP
IP
A: B. TCP is a connection-oriented protocol that uses a three-way handshake to establish a connection. ICMP does not use ports for communication, and UDP is connectionless. IP is the core Internet Protocol and does not use a handshake.

Q: How many IP addresses are available in the 172.16.0.0 private range in IPv4?
/32
16,777,216
65,536
1,048,576
A: D. There are 1,048,576 IP addresses in the 172.16.0.0 private range. There are 16,777,216 in the 10.0.0.0 range and 65,536 in the 192.168.0.0 range.

Q: When troubleshooting a connectivity issue, you have found that you can reach a server via the web but cannot ping it. Which of the following best describes a possible cause for this scenario?
TCP traffic has been blocked at the firewall.
The DNS lookup is failing.
ICMP traffic has been blocked.
There is a reject route in place.
A: C. The only viable possibility of those listed is that ICMP traffic is blocked. TCP traffic is obviously passing because of the ability to get there using HTTP, and DNS must also be working.

Q: When viewing the available routes using the route command, one route contains UG flags and the others contain U flags. What do the letters UG signify in the route table?
The G signifies that the route is good.
The G signifies that the route is unavailable.
The G signifies that this is a gateway.
The G signifies that the route is an aggregate.
A: C. The G signifies a gateway within the route table.

Q: Which of the following commands requests a zone transfer of example.org from the server at 192.168.1.4?
dig example.org @192.168.1.4 axfr
dig example.org @192.168.1.4
dig example.org @192.168.1.4 xfer
dig example.org #192.168.1.4 xfer
A: A. The axfr type is a zone transfer, and the @ symbol signifies the server to which the query will be sent. There is no xfer type, and option B is just a normal query for the domain sent to the specified server.

Q: Which of the following commands displays the number of packets forwarded by the kernel?
ls
ipstat
ifconfig -a
netstat -s
A: D. The netstat -s command displays aggregate statistical information for networking, including the total packets received and the number of packets forwarded. The ifconfig command does not show packets forwarded. The ls command is not used for networking, and the ipstat command does not exist.

Q: When using the ip command, which protocol family is used as the default if not otherwise specified?
tcpip
ip
inet
arp
A: C. The ip command defaults to the inet family if not otherwise specified with the -f option. The command will attempt to guess the correct family and fall back to inet. The other families listed as options for this command are not valid for use with the ip command.

Q: Which of the following commands changes the Media Access Control (MAC) address of eth0?
ifmac eth0
ifconfig eth0 hw ether
ifconfig eth0 mac
ifconfig eth0 hw mac
A: B. The ifconfig command will be used for this purpose, followed by the interface. The hw keyword is used for the hardware address, which is then followed by the hardware class, in this case ether. That is followed by the new MAC address (not depicted in the options). The other commands are not valid.

Q: You are using the route command to view routes. However, name resolution is taking a long time and causing delay in the response from the route command. Which option to route can be added to cause it to not perform name resolution?
-d
-e
-f
-n
A: D. The -n option causes route to use numeric values only, performing no name resolution. This option is useful for the scenario described. The -e option causes the output to be in netstat format. There is no -d or -f option for the route command.

Q: You have replaced a device on the network but used the IP from another active device. Which command can be run to remove the MAC address entry from your computer so that it performs the address resolution again?
arp -d
netstat -rn
hostname
dig
A: A. Because we’re working with MAC addresses, the arp command will be used. The -d option removes or deletes an Address Resolution Protocol (ARP) entry, which would be appropriate here so that the MAC address resolution occurs again. The netstat command will not be used for this purpose. The hostname and dig commands work with name resolution but not for MAC addresses or the ARP table.

Q: Which of the following commands displays information such as link status about the wireless device wlan0?
iw dev wlan0 link
wlan0 list
iw wlan0 -l
iw dev link
A: A. The iw command will be used for this purpose. When using iw with a specific device, the dev keyword appears next, followed by the device name and then the command you want to execute on that device. In this case, the link command is used.

Q: Which command is used for setting parameters such as the essid, channel, and other related options for a wireless device?
ifconfig
iwconfig
wlancfg
iconf
A: B. The iwconfig command, which is similar to the ifconfig command, works with an individual wireless interface to set and display parameters. Of the other commands, the ifconfig command is valid but not used for wireless. The other commands are not valid.

Q: Which of the following commands can be used to scan for available wireless networks?
iwlist get
iwconfig scan
iwlist scan
iw-scan
A: C. The iwlist command will be used for this purpose, and the scan subcommand is used to look for local access points and wireless networks. Superuser privileges are required for a full scan. The iwconfig command does not have a scan subcommand. Likewise, there is no subcommand called get for the iwlist command, and there is no iw-scan command.

Q: You need to offer internally facing NTP services. On which protocol and port does NTP listen?
TCP/20 and TCP/21
UDP/123
TCP/139
UDP/5150
A: B. NTP listens on UDP port 123 by default. Ports 20 and 21 are used for FTP services, port 139 is used by NetBIOS, and port 5150 is not usually used.

Q: You need to set the MTU to a specific value for a network interface. Which option to ifconfig facilitates this?
-mtu
mtu
metric
addrmtu
A: B. The mtu can be used to set the value for the maximum transmission unit (MTU) for a given interface. The metric option sets the interface metric. The other options are not valid.

Q: Which option to the arp command creates a new entry for a given IP address-to-MAC address pair?
-s
-c
-d
--add
A: A. The -s option creates an ARP table entry. The -d option removes an entry. The -c and --add options do not exist.

Q: Which of the following commands shows network sockets and their allocated memory?
ss -m
mpas
mem
free
A: A. The ss command provides many of the same functions as netstat but can show some extended information, such as memory allocation for a given socket. The free command shows memory usage but not by socket, and the other two commands do not exist.

Q: When troubleshooting a potential hardware problem, you need to determine which physical interface is being used for a certain address. One way to accomplish this is with the ping command in order to monitor the activity lights on the device. Which of the following options to ping will flood the interface with ECHO_REQUEST packets?
-e
-a
-c
-f
A: D. The -f option is a flood ping. This will effectively cause the interface to send and receive large amounts of traffic, usually making it easier to find on a switch. The -a option is an audible ping, emitting a sound on ping. The -c option sends a certain count of pings, and there is no -e option.

Q: Which of the following commands can be used to test network connectivity at the TCP level instead of telnet?
netstat
nc
nettest
ping
A: B. The netcat command provides a method for opening and communicating on both sides, server and client, for a TCP connection. The netcat command avoids some of the issues with telnet capturing characters specific to the Telnet protocol. The netstat command does not test connectivity, and ping does not do so at the TCP level. There is no nettest command.

Q: Which option to tcpdump displays a list of available interfaces on which tcpdump can operate?
-a
-d
-D
-i
A: C. The -D option lists the interfaces on a given computer. The -d option dumps compiled matching code, and -i selects an interface. There is no -a option.

Q: Which command provides a method for sending ICMP requests for IPv6?
ping6
pingv6
tracert
6ping
A: A. The ping6 command performs the same as the IPv4 ping command but does so for IPv6. The other commands are not valid on Linux.

Q: Which of the following commands displays information about addresses, specifically only IPv6 addresses, currently in use on the computer?
ip addr
ip -6 addr
ip6add
ipv6addr
A: B. The ip command can be used for this purpose. When using it with the addr object and the -6 option, only information about IPv6 addresses will be shown. The first option, simply ip addr, will show all addresses, including IPv4. The other commands are not valid.

Q: Which of the following commands will disable ARP on the interface eth0?
ifconfig eth0 -arp
ip eth0 noarp
ifconfig eth0 noarp
if eth0 disable arp
A: A. The ifconfig command will be used for this purpose, and ARP can be disabled by preceding the word arp with a minus sign, as shown. If no minus sign is present, then ARP will be enabled. The other commands will not work for this scenario.

Q: Which option to the route command forces the kernel to use the specified device for the route rather than attempting to determine the correct device?
inet
addr
dev
device
A: C. The dev option specifies the device to use for the route being specified. This is a typical use case for many routes to reduce the chance of the kernel guessing incorrectly. The other options shown for this question are not valid.

Q: Which option to the ss command shows the process IDs associated with the socket?
-l
-a
-p
-f
A: C. The -p option shows the process IDs associated with a given socket within the ss output. The -a option is all sockets, whereas -l is listening sockets. The -f option is used to specify the protocol family.

Q: Which option to traceroute causes the command to use ICMP for requests?
-T
-A
-I
-i
A: C. The -I option tells traceroute to use ICMP for requests. The -T option is TCP SYN. The -A option performs AS path lookups, and the -i option configures traceroute to use the specified interface.

Q: Which programmatic function is used by the hostname command internally?
getaddr
gethost
gethostname
getname
A: C. Internally, the hostname command uses gethostname. This can be useful to know when troubleshooting address resolution issues such as conflicting results for host naming. The other functions are not valid.

Q: Which of the following commands will examine the system log for information regarding DHCP activity?
grep -i dhcp /var/log/syslog
grep -v dhcp /var/log/syslog
grep -vi dhcp /var/log/kern.log
dmesg | grep dhcp
A: A. The grep command used with the -i option makes the grep case insensitive. When used with the -v option, grep will exclude the argument, thus doing the opposite of what’s needed here. The kernel ring buffer will probably not contain information about DHCP, making dmesg an incorrect option.

Q: Which of the following characters are valid for hostnames in /etc/hosts?
Alphanumerics, minus, underscore, and dot
Alphanumerics, minus, and dot
Alphanumerics and dot
Alphanumerics
A: B. Only alphanumerics, minus/dash, and dot are valid for hosts in /etc/hosts.

Q: Which of the following configuration lines in /etc/resolv.conf enables debugging?
debug
options debug
option debug
enable-debug
A: B. Options within /etc/resolv.conf are preceded with the options keyword followed by one or more options, such as debug.

Q: Which of the following commands views systemd journal entries for the NetworkManager unit?
systemd NetworkManager
systemd NetworkCtl
systemctl NetworkManager
journalctl -u NetworkManager
A: D. The journalctl command will be used for this purpose. Adding the -u option specifies the unit for which journal entries are desired.

Q: Which file is read at boot to set the local computer’s hostname?
/etc/hostname
/etc/hosts
/etc/localhost
/etc/networkhost
A: A. The /etc/hostname file typically contains only the hostname of the local computer rather than the hostname and domain name. This is then read at boot time to set the hostname for the computer. The /etc/hosts file contains information on various hosts for name resolution purposes. The other files do not exist.

Q: Which traceroute command is used exclusively for IPv6 route traces?
trace6
traceroute6
tracert6
6trace
A: B. The traceroute6 command is used for tracing IPv6 routes. The other commands do not exist.

Q: Which type can be used with the dig command to test a zone transfer?
xfr
transfer
zxfr
axfr
A: D. The axfr type can be used with dig to request a zone transfer. The client from which you request the zone transfer will need to be authorized to initiate a transfer.

Q: Which option to the host command sets the query type to ANY?
-a
-b
-c
-d
A: A. Setting -a as an option to the host command sets the query type to ANY. The -c option sets the class, and -d turns on debugging. There is no -b option.

Q: Within which file can per-user default settings be created for the dig command?
/etc/dig.cfg
/etc/dig.conf
~/.digrc
~/.dig.conf
A: C. The .digrc file, when created in a user’s home directory, can be used to set defaults for use of the dig command. There is no dig configuration file found in /etc.

Q: Which type of DNS record is used for specifying a POP3 server?
POP
PO
MX
There is no specific type for POP3 servers.
A: D. POP3 servers do not have a specific type in DNS. MX type indicates mail exchanger, or SMTP server.

Q: Which of the following iproute2 commands changes the address of device eth0 to 192.168.1.1 with netmask 255.255.255.0?
ip addr add 192.168.1.1/24 dev eth0
ip addr eth0 192.168.1.1 255.255.255.0
ip addr dev eth0 192.168.1.1 255.255.255.0
ip addr 192.168.1.1/255.255.255.0 eth0
A: A. The ip addr add command is used to add IP addresses to interfaces using the syntax shown in option A. The other options do not have the correct syntax.

Q: Which command is used to show the settings for DNS resolution with systemd-resolved?
systemctl resolvers
resolvectl status
systemctl --resolvers
resolvectl --view-status
A: B. The resolvectl command is used for assistance with resolution issues for systemd-resolved and, when given the status command, will return the DNS settings. The other options shown do not exist. The resolvectl command is somewhat new, and if it’s not yet available on a given systemd-based distribution, then systemd-resolve --status can be used.

Q: Which of the following commands enables NetworkManager so that it can be used to configure Ethernet and Wi-Fi network devices?
nmcli networking on
netman enable
NetworkManager --enable
nmti --enable networking
A: A. The nmcli command is the only valid NetworkManager command shown as an option, and when given the networking on command, NetworkManager will control the network interfaces. It is worth noting that if you disable NetworkManager control with networking off then all of the previously managed interfaces are disabled.

Q: You are troubleshooting a DNS problem using the dig command and receive a status: NXDOMAIN message. Which of the following best describes what NXDOMAIN means?
NXDOMAIN means that you have received a nonauthoritative answer for the query.
NXDOMAIN means that the domain or host is not found.
NXDOMAIN indicates a successful query.
NXDOMAIN signifies a new domain record has been added.
A: B. NXDOMAIN is the status for a nonexistent domain or host, basically that the host for which the query was sent does not exist. A normal status when there has not been an error is NOERROR.

Q: Which systemd daemon can be used to manage network interfaces through systemd?
networker
networked
networkd
netwrkd
A: C. The systemd-networkd daemon can be used to manage networking through systemd. The other options shown are not valid.

Q: Which command for hostnamectl can be used to set the hostname?
set-host
set-hostname
set-name
hostname
A: B. The set-hostname command within hostnamectl sets the hostname of the device. The other commands shown are not valid for use with hostnamectl.

Q: On which port does IMAP over SSL (IMAPS) listen?
993
995
465
514
A: A. IMAPS uses port 993 by default, as defined by IANA. Port 995 is POP3S, port 465 is SMTPS, and port 514 is used by syslog.

Q: When you’re looking to parse the output of the ip command, which option can you set to remove newlines so that the output can be piped to the grep command?
-n
-o
-l
-f
A: B. The -o option removes newlines from the output, making the output more suitable for the grep command. The -l option specifies the number of loops for the ip addr flush command, the -f option specifies the protocol family, and there is no -n option.