- Home
- Server Administration
- LPIC-1 Linux Administrator 102
56.
You’re configuring a new system, and your network administrator scribbles its IP address
(172.25.78.89), netmask (255.255.255.0), gateway address (172.25.79.1), and DNS server
address (10.24.89.201) on a piece of paper. You enter this information into your configuration
files and type ifup eth0, but you find that you can’t access the Internet with this computer.
Which of the following is definitely true?
- A.Because the DNS server is on a completely different network, it won’t function properly for your system. You should ask for the local network’s DNS server’s IP address.
- B.The netmask identifies the gateway as being on a different network segment than the computer you’re configuring, so the two can’t communicate directly. You most likely misread one address.
- C.Because the IP addresses involved are private IP addresses, there’s no way for them to access the Internet. You must ask for public IP addresses for this system or use only your local private network.
- D.The computer’s IP address is a Class B address, but the netmask is for a Class C address. This combination can’t work together, so you must obtain a new IP address or netmask.
- E.The ifup utility works only for computers that use DHCP, so the use of a static IP address as specified in the question won’t work correctly.
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
The computer’s IP address (172.25.78.89) and netmask (255.255.255.0) mean that the computer can directly address computers with IP addresses in the range of 172.25.78.1 to 172.25.78.254, but the gateway address (172.25.79.1) is outside of this range. Thus, either the IP address or the gateway address is wrong, and option B is correct. Nothing about the way DNS operates necessitates that the DNS server be on the same network segment as the DNS client, so option A is incorrect. Although private IP addresses are often isolated from the Internet, as option C specifies, Network Address Translation (NAT) can get around this limitation. Thus, although there could be some truth to option C, it’s not certain to be true. The class A/B/C distinctions are just guidelines that can be overridden by specific configurations. Thus, option D is incorrect. Option E’s assertion that ifup is used only on computers that use DHCP is incorrect; ifup can work on computers that use static IP addresses, provided that the relevant information is entered correctly. |
57.
What is the purpose of the -n option to route?
- A.It causes no operation to be performed; route reports what it would do if -n were omitted.
- B.It precedes specification of a netmask when setting the route.
- C.It limits route’s output to descriptions of non-Internet routes.
- D.It forces interpretation of a provided address as a network address rather than a host address.
- E.It causes machines to be identified by IP address rather than hostname in output.
- Answer & Explanation
- Report
Answer : [E]
Explanation :
Explanation :
The -n option is used when you want to use route to display the current routing table, and it does as option E specifies. There is no route parameter that behaves as options A or C specify. Option B describes the purpose of the netmask parameter to route. Option D describes the purpose of the -net parameter to route. |
58.
What is the purpose of /etc/resolv.conf?
- A.It holds the names of network protocols and the port numbers with which they’re associated.
- B.It controls whether the computer’s network options are configured statically or via a DHCP server.
- C.It specifies the IP address of a DHCP server from which the computer attempts to obtain an IP address.
- D.It holds the routing table for the computer, determining the route that network packets take to other computers.
- E.It sets the computer’s default search domain and identifies (by IP address) the name servers that the computer may use.
- Answer & Explanation
- Report
Answer : [E]
Explanation :
Explanation :
Option E correctly identifies the function of /etc/resolv.conf. Option A describes the purpose of /etc/services. Various distribution-specific configuration files perform the function described in option B, but /etc/resolv.conf is not one of these files. A DHCP client sends a broadcast to locate a DHCP server; there is no client configuration file that holds the DHCP server’s address, as option C describes. The routing table is maintained internally, although basic routing information may be stored in distribution-specific configuration files, so option D is also incorrect. |
59.
WWhich of the following entries are found in the /etc/hosts file?
- A.A list of hosts allowed to remotely access this one
- B.Mappings of IP addresses to hostnames
- C.A list of users allowed to remotely access this host
- D.Passwords for remote Web administration
- E.A list of port numbers and their associated protocols
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
The /etc/hosts file holds mappings of IP addresses to hostnames, on a one-line-permapping basis. Thus, option B is correct. The file does not list the users (option C) or other hosts (option A) allowed to remotely access this one, affect remote administration through a Web browser (option D), or map port numbers to protocols (option E). |
60.
How can you reconfigure Linux to use DNS queries prior to consulting /etc/hosts?
- A.Edit the /etc/resolv.conf file, and be sure the nameserver dns line comes before the nameserver files line.
- B.As root, type nslookup dns.
- C.Edit the /etc/named.conf file, and change the preferred-resolution option from files to dns.
- D.Edit /etc/nsswitch.conf, and change the order of the files and dns options on the hosts: line.
- E.As root, type dig local dns.
- Answer & Explanation
- Report
Answer : [D]
Explanation :
Explanation :
The /etc/nsswitch.conf file controls the order of name resolution, among other things. Option D correctly describes the procedure for changing the order in which Linux performs name resolution. The /etc/resolv.conf file mentioned in option A controls the DNS servers that Linux consults, but it doesn’t control access to /etc/hosts. Option B’s nslookup command resolves a hostname, so option B will return the IP address of the computer called dns, if Linux can find such a system. The /etc/named.conf file of option C is the configuration file for the standard name server. This server isn’t likely to be installed on most Linux systems, and even if it is, the procedure described in option C is invalid. Like option B’s nslookup, option E’s dig looks up hostname-to-IP-address mappings, so option E will display such mappings for the computers called local and dns, if they exist. |