Section 42.8. Network Troubleshooting (Topic 2.214)


42.8. Network Troubleshooting (Topic 2.214)

42.8.1. Review Questions

  1. What is the purpose of the search keyword in the /etc/resolv.conf file?

  2. You know that your DNS server is accepting requests. However, several hosts are consistently trying to connect to the wrong email server. Clearly, these hosts are mapping the hostname to the wrong IP address. You have checked the /etc/resolv.conf files on each of these hosts, and they list your DNS server and domain. What is the most likely cause of this problem?

  3. What is the most likely location of the file that configures network interfaces in a Debian-based system?

  4. What command will best help you learn what has occurred during the boot process?

  5. You are currently logged in to a Linux system that has three interfaces. You wish to send a large number of ping packets in a short amount of time out of the third interface to a system named jacob. What command would you issue?

  6. A DNS server is currently responding to requests very slowly. As a result, your query using the host command times out before the DNS server can respond. What option to the host command can you specify to make your system wait indefinitely for the DNS server to respond?

42.8.2. Answers

  1. The search keyword has the resolver search the specified domain rather than the default domain. Sometimes this keyword is necessary because the host thinks that there is no default domain.

  2. The /etc/hosts file probably contains incorrect IP address information for the email server. The /etc/hosts file overrides DNS and NIS lookups on most systems by default.

  3. The file is /etc/network/interfaces.

  4. The dmesg command.

  5. Enter:

     # ping -f -i eth2 jacob 

  6. Use the -w option.

42.8.3. Exercises

  1. Review the format for either the /etc/network/interfaces or the /etc/sysconfig/network-scripts/ifcfg-eth0 file. If you are using a different network interface from eth0, substitute the correct number for ifcfg-eth0. Learn the meaning of each line.

  2. Study the /etc/hosts file. Read the manpage for it. Notice that this file can contain IPv4 and IPv6 instructions. Create an entry in your /etc/hosts file that conflicts with your DNS server information. If your system uses a default configuration, the entry you just placed into the /etc/hosts file will take precedence. Review the /etc/nsswitch.conf file and confirm which resource gets precedence. Also review the /etc/host.conf file and verify the resolution order.

  3. Use the cat command to view the /etc/hostname file. If this file is empty or has a different hostname from what you expected, edit the file as root and correct the information.

  4. Issue the following command as a normal user:

     netstat -ni 

    Notice that this command provides information about the interface, including the Maximum Transmission Unit (MTU), sending and receiving information, error information, and routing metrics. The output also gives several flags. These flags are listed in Table 42-1.

    Table 42-1. Flags in netstat output

    Flag

    Meaning

    B

    Shows that the interface can send and receive broadcasts

    R

    Shows that the interface is recognized by the system

    U

    Shows that the interface is active

    L

    Indicates a loopback interface

    M

    Shows that the interface is capable of multicasting


  5. Review your interface to determine its statistics.

  6. Using the ifconfig command, experiment with the MTU for your system. The highest MTU for an Ethernet network is 1500. This is most often the MTU that you will see for your network adapters. Sometimes, however, you will need to change the MTU, due to network problems or nonstandard equipment.

  7. For the sake of practice, change the MTU to 1300 using the following command as an example:

     # ifconfig eth0 192.168.2.5 netmask 255.255.255.0 mtu 1300 

  8. You should, of course, substitute your own interface, IP address, and subnet mask. Notice that the mtu option allows you to specify any value you wish. Use the ifconfig command to verify that the MTU has changed. Return your system back to its standard MTU. While changing the MTU of a host is not very common, it is important to know all of the options of the ifconfig command.



LPI Linux Certification in a Nutshell
LPI Linux Certification in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596005288
EAN: 2147483647
Year: 2004
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net