LPIC 102-500
>>Networking Fundamentals exam
Answers with explanation
Take the test here (You need an account. It's free)
1. Which of the following commands shows the current default route without performing Domain Name System (DNS) lookups on the IP address(es) involved?
A. netstat -rn
B. netstat -n
C. netstat -r
D. netstat -f
ANSWER: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.
2. 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?
A. ifconfig -a
B. ifup
C. netstat -n
D. ifconfig
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.
3. Which of the following is not used as a private address for internai, non-Internet, use?
A. 172.16.4.2
B. 192.168.40.3
C. 10.74.5.244
D. 143.236.32.231
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.
4. Which of the following commands adds a default gateway of 192.168.1.1 for interface etho?
A. route add default gateway 192.168.1.1 eth0
B. eth0 -dg 192.168.1.1
C. route add default gw 192.168.1.1 eth0
D. route define eth0 192.168.1.1
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.
5. Which option for the host command will query for the authoritative name servers for a given domain?
A. -t ns
B. -t all
C. -ns
D. -named
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.
6. 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?
A. udp/53
B. Both tcp/53 and udp/53
C. tcp/53
D. udp/53 and tcp/503
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.
7. Which option for the ping command enables you to choose the interface from which the Internet Control Message Protocol (ICMP) packets will be generated?
A. -i
B. -I
C. -t
D. -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.
8. 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?
A. /25
B. /24
C. /32
D. /27
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.
9. Which of the following commands queries for the mail servers for the domain example. com?
A. dig example.com mx
B. dig example.com
C. host -t smtp example.com
D. dig example.com smtp
9. 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.
10. Which of the following addresses represents the localhost in IPv6?
A. 0:1
B. ::1
C. 127:0:1
D. :127:0:0:1
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
11. Which option to the traceroute command will use TCP SYN packets for the path trace?
A. -T
B. -t
C. -s
D. -i
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.
12. Which of the following commands will attempt to bring online all interfaces marked as auto within the networking configuration?
A. ifconfig -a
B. ifup auto
C. ifup -a
D. ifstat
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.
13. In a scripting scenario, which command will return the domain name configured for the server?
A. dnsname
B. fqdn
C. hostname
D. hostname -d
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.
14. Which command can be used to listen for netlink messages on a network?
A. ip monitor
B. netlink -a
C. ip netlink
D. route
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.
15. If the traceroute6 command is not available, which option to the traceroute command can be used for an IPv6 traceroute?
A. -ipv6
B. -net6
C. -v6
D. -6
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.
16. 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?
A. group: files Idap
B. lookup: group [local Idap]
C. group: [local ldap]
D. group: localfiles ldap
A. The syntax is database: databasename with additional database names separated by spaces, as shown in the correct option for this question.
17. 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?
A. dig example.com @192.168.2.5
B. dig -t 192.168.2.5 example.com
C. dig -s 192.168.2.5 example.com
D. dig server=192.168.2.5 example.com
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.
18. Which ports need to be allowed through the firewall for Simple NetWork Management Protocol (SNMP) traffic?
A. Ports 23 and 25
B. Ports 110 and 143
C. Ports 80 and 443
D. Ports 161 and 162
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.
19. Which of the following commands will enumerate the hosts database?
A. getent hosts
B. gethosts
C. nslookup
D. host
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.
20. Which of the following netmasks is used for a subnet described with a /25 in CIDR notation?
A. 255.255.255.0
B. 255.255.0.0
C. 255.255.255.192
D. 255.255.255.128
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.
21. Which of the following configuration lines will set the DNS server to 192.168.1.4 using /etc/resolv.conf?
A. dns 192.168.1.4
B. dns-server 192.168.1.4
C. nameserver 192.168.1.4
D. name-server 192.168.1.4
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.
22. 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?
A. /etc/ports
B. /etc/p2p
C. /etc/ppp
D. /etc/services
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 (lANA). 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.
23. 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?
A. route add -net 192.168.51.0 netmask 255.255.255.0 gw 192.168.51.1
B. route add -net 192.168.51/24 gw 192.168.1.51
C. route -net 192.168.51.0/24 192.168.51.1
D. route add 192.168.51.1 -n 192.168.51.0//255.255.255.0
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 letters gw and the IP of the gateway. The other options shown are invalid for a variety of reasons, including missing keywords and options and order.
24. Which of the following netstat options displays the send and receive queues for each socket?
A. -r
B. -M
C. -a
D. -v
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.
25. Which of the following represents a correct configuration line for /etc/hosts?
A. 192.168.1.4 cwa.linux.org cwa
B. cwa.linux.org cwa 192.168.1.4
C. cwa.linux.org 192.168.1.8 alias cwa
D. alias cwa.linux.org cwa 192.168.1.4
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.
26. Which of the following commands configures the etho device with an IP address of 192.168.1.1 in a /24 network?
A. ifconfig eth0 192.168.1.1/24
B. ifconfig eth0 192.168.1.1/255.255.255.0
C. ifconfig eth0 192.168.1.1 netmask 255.255.255.0
D. ifconfig 192.168.1.1 netmask 255.255.255.0 eth0
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.
27. Which of the following describes a primary difference between IPv4 and IPv6?
A. IPv4 is for internal networks only, whereas IPv6 is for public networks.
B. IPv4 is for public networks, whereas IPv6 is for internal networks.
C. IPv4 uses a 32-bit address, whereas IPv6 uses a 128-bit address.
D. With IPv6, no subnetting is necessary.
C. IPv4 addresses are 32 bits in length and IPv6 addresses are 128-bits, Both IPv4 and IPv6 can be used on internai and externai networks alike, and subnetting is indeed necessary with IPv6
28. On which port does ICMP operate?
A. TCP/43
B. UDP/111
C. UDP/69
D. ICMP does not use ports.
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.
29. Which of the following commands will change the default gateway to 192.168.1.1 using etho?
A. ip route default gw 192.168.1.1
B. ip route change default via 192.168.1.1 dev eth0
C. ip route default gw update 192.168.1.1
D. ip route update default 192.168.1.1 eth0
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.
30. Which of the following ports is used for Secure Shell communication?
A. TCP/23
B. TCP/25
C. TCP/22
D. TCP/2200
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.
31. Which options for netcat will create a server listening on port 8080?
A. netcat -p 8080
B. nc -l -p 8080
C. nc -p 8080
D. nc -s 8080
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.
32. Which of the following commands displays the Start of Authority information for the domain example. com?
A. dig example.com soa
B. dig example.com authority
C. dig example.com -auth
D. dig -t auth example.com
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.
33. 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?
A. search
B. domain
C. local-domain
D. local-order
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.
34. Which of the following commands sends an IPv6 ping to a unique local address?
A. ping -6 127.0.0.1
B. ping6 2001::7333
C. ping6 2001::7333
D. ping - 6 2001::7333
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.
35. Which of the following commands prevents traffic from reaching the host 192.168.1.3?
A. route add -host 192.168.1.3 reject
B. route -nullroute 192.168.1.3
C. route add -null 192.168.1.3
D. route add -block 192.168.1.3
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.
36. Which of the following describes a primary difference between traceroute and tracepath?
A. The traceroute command requires root privileges.
B. The tracepath command provides the MTU for each hop, whereas traceroute does not.
C. The tracepath command cannot be used for tracing a path on an externai network.
D. The traceroute command is not compatible with IPv6.
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.
37. 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?
A. ping -n 4
B. ping -t 4
C. ping -p 4
D. ping -c 4
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.
38. Which command provides an interface into NetworkManager that works from a terminal window?
A. nmcli
B. nmui
C. nm
D. nman
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.
39. Which of the following commands configures eth1 with an additional IPv6 address of 2001::7333:: ?
A. ifconfig eth1 inet6 add 2001::7333/128
B. ifconfig add 2001::7333::
C. ifconfig 2001::7333:: eth1
D. ifconfig eth1 2001::7333
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.
40. On which port does LDAP over SSL operate?
A. Port 53
B. Port 389
C. Port 636
D. Port 443
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.
41. 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?
A. Add a firewall entry for the IP address of www.example.com to prevent traffic from passing through it.
B. Delete www.example.com from the route table using the route command.
C. Add a null route to prevent access to the IP address for www.example.com.
D. Add an entry for www.example.com in /etc/hosts to point to 127.0.0.1.
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.
42. Which of the following commands should be executed after running ip route change?
A. ip route flush cache
B. ip route reload
C. ip route cache reload
D. ip route restart
A. The ip route flush cache command should be executed after changing the routes. The other commands shown for this question are not valid.
43. Which option should be used to send a DNS query for a Sender Policy Framework (SPF) record with dig?
A. -t txt
B. -t spf
C. -t mx
D. -t mailspf
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.
44. Which of the following protocols uses a three-way handshake?
A. ICMP
B. TCP
C. UDP
D. IP
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.
45. How many IP addresses are available in the 172.16.0.0 private range in IPv4?
A. /32
B. 16,777,216
C. 65,536
D. 1,048,576
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.
46. 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?
A. TCP traffic has been blocked at the firewall.
B. The DNS lookup is failing.
C. ICMP traffic has been blocked.
D. There is a reject route in place.
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.
47. 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?
A. The G signifies that the route is good.
B. The G signifies that the route is unavailable.
C. The G signifies that this is a gateway.
D. The G signifies that the route is an aggregate.
C. The G signifies a gateway within the route table.
48. Which of the following commands requests a zone transfer of example. org from the server at 192.168.1.4?
A. dig example.org @192.168.1.4 axfr
B. dig example.org @192.168.1.4
C. dig example.org @192.168.1.4 xfer
D. dig example.org #192.168.1.4 xfer
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.
49. Which of the following commands displays the number of packets forwarded by the kernel?
A. Is
B. ipstat
C. ifconfig -a
D. netstat -s
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 is command is not used for networking, and the ipstat command does not exist.
50. When using the ip command, which protocol family is used as the default if not otherwise specified?
A. tcpip
B. ip
C. inet
D. arp
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.
51. Which of the following commands changes the Media Access Control (MAC) address of eth0?
A. ifmac eth0
B. ifconfig eth0 hw ether
C. ifconfig eth0 mac
D. ifconfig eth0 hw mac
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.
52. 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?
A. -d
B. -e
C. -f
D. -n
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.
53. 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?
A. arp -d
B. netstat -rn
C. hostname
D. dig
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.
54. Which of the following commands displays information such as link status about the wireless device wlan0?
A. iw dev wlan0 link
B. wlan0 list
C. iw wlan0 -l
D. iw dev link
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.
55. Which command is used for setting parameters such as the essid, channei, and other related options for a wireless device?
A. ifconfig
B. iwconfig
C. wlancfg
D. iconf
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.
56. Which of the following commands can be used to scan for available wireless networks?
A. iwlist get
B. iwconfig scan
C. iwlist scan
D. iw-scan
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.
57. You need to offer internally facing NTP services. On which protocol and port does NTP listen?
A. TCP/20 and TCP/21
B. UDP/123
C. TCP/139
D. UDP/5150
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.
58. You need to set the MTU to a specific value for a network interface. Which option to ifconfig facilitates this?
A. -mtu
B. mtu
C. metric
D. addrmtu
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.
59. Which option to the arp command creates a new entry for a given IP address-to-MAC address pair?
A. -s
B. -c
C. -d
D. -add
A. The -s option creates an ARP table entry. The -d option removes an entry. The -c and -add options do not exist.
60. Which of the following commands shows network sockets and their allocated memory?
A. ss -m
B. mpas
C. mem
D. free
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.
61. 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?
A. -e
B. -a
C. -c
D. -f
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.
62. Which of the following commands can be used to test network connectivity at the TCP level instead of telnet?
A. netstat
B. nc
C. nettest
D. ping
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.
63. Which option to tcpdump displays a list of available interfaces on which tcpdump can operate?
A. -a
B. -d
C. -D
D. -i
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.
64. Which command provides a method for sending ICMP requests for IPv6?
A. ping6
B. pingv6
C. tracert
D. 6ping
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.
65. Which of the following commands displays information about addresses, specifically only IPv6 addresses, currently in use on the computer?
A. ip addr
B. ip -6 addr
C. ip6add
D. ipv6addr
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.
66. Which of the following commands will disable ARP on the interface etho?
A. ifconfig eth0 -arp
B. ip eth0 noarp
C. ifconfig eth0 noarp
D. if eth0 disable arp
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.
67. 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?
A. inet
B. addr
C. dev
D. device
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.
68. Which option to the ss command shows the process IDs associated with the socket?
A. -l
B. -a
C. -p
D. -f
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.
69. Which option to traceroute causes the command to use ICMP for requests?
A. -T
B. -A
C. -I
D. -i
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.
70. Which programmatic function is used by the hostname command internally?
A. getaddr
B. gethost
C. gethostname
D. getname
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.
71. Which of the following commands will examine the system log for information regarding DHCP activity?
A. grep -i dhcp /var/log/syslog
B. grep -v dhcp /var/log/syslog
C. grep -vi dhcp /var/log/kern.log
D. dmesg | grep dhcp
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.
72. Which of the following characters are valid for hostnames in /etc/hosts?
A. Alphanumerics, minus, underscore, and dot
B. Alphanumerics, minus, and dot
C. Alphanumerics and dot
D. Alphanumerics
B. Only alphanumerics, minus/dash, and dot are valid for hosts in /etc/hosts.
73. Which of the following configuration lines in /etc/resolv. conf enables debugging?
A. debug
B. options debug
C. option debug
D. enable-debug
B. Options within /etc/resolv.conf are preceded with the options keyword followed by one or more options, such as debug.
74. Which of the following commands views systemd Journal entries for the NetworkManager unit?
A. systemd NetworkManager
B. systemd NetworkCtl
C. systemctl NetworkManager
D. journalctl -u NetworkManager
D. The journalctl command will be used for this purpose. Adding the - u option specifies the unit for which Journal entries are desired.
75. Which file is read at boot to set the local computer’s hostname?
A. /etc/hostname
B. /etc/hosts
C. /etc/localhost
D. /etc/networkhost
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.
76. Which traceroute command is used exclusively for IPv6 route traces?
A. trace6
B. traceroute6
C. tracert6
D. 6trace
B. The traceroute6 command is used for tracing IPv6 routes. The other commands do not exist.
77. Which type can be used with the dig command to test a zone transfer?
A. xfr
B. transfer
C. zxfr
D. axfr
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.
78. Which option to the host command sets the query type to ANY?
A. -a
B. -b
C. -c
D. -d
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.
79. Within which file can per-user default settings be created for the dig command?
A. /etc/dig.cfg
B. /etc/dig.conf
C. ~/.digrc
D. ~/.dig.conf
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.
80. Which type of DNS record is used for specifying a POP3 server?
A. POP
B. PO
C. MX
D. There is no specific type for POP3 servers.
D. POP3 servers do not have a specific type in DNS. MX type indicates mail exchanger, or SMTP server.
81. Which of the following iproute2 commands changes the address of device etho to 192.168.1.1 with netmask 255.255.255.0?
A. ip addr add 192.168.1.1/24 dev eth0
B. ip addr eth0 192.168.1.1 255.255.255.0
C. ip addr dev eth0 192.168.1.1 255.255.255.0
D. ip addr 192.168.1.1/255.255.255.0 eth0
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.
82. Which command is used to show the settings for DNS resolution with systemd-resolved?
A. systemctl resolvers
B. resolvectl status
C. systemctl -resolvers
D. resolvectl -view-status
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.
83. Which of the following commands enables NetworkManager so that it can be used to configure Ethernet and Wi-Fi network devices?
A. nmcli networking on
B. netman enable
C. NetworkManager -enable
D. nmti -enable networking
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.
84. 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?
A. NXDOMAIN means that you have received a nonauthoritative answer for the query.
B. NXDOMAIN means that the domain or host is not found.
C. NXDOMAIN indicates a successful query.
D. NXDOMAIN signifies a new domain record has been added.
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.
85. Which systemd daemon can be used to manage network interfaces through systemd?
A. networker
B. networked
C. networkd
D. netwrkd
C. The systemd-networkd daemon can be used to manage networking through systemd. The other options shown are not valid.
86. Which command for hostnamecti can be used to set the hostname?
A. set-host
B. set-hostname
C. set-name
D. hostname
B. The set-hostname command within hostnamectl sets the hostname of the device. The other commands shown are not valid for use with hostnamectl.
87. On which port does IMAP over SSL (IMAPS) listen?
A. 993
B. 995
C. 465
D. 514
A. IMAPS uses port 993 by default, as defined by lANA. Port 995 is POP3S, port 465 is SMTPS, and port 514 is used by syslog.
88. 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?
A. -n
B. -o
C. -l
D. -f
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.