Diagnosing and Correcting Network Problems

To diagnose misconfigured networking, you need to use the commands and analyze the files described in topic 7. To check your current network settings, you'll want to run commands such as:

  • ifconfig to find the settings of your network card(s)

  • ping to confirm connectivity to other systems

  • route to confirm the current routing table

You'll also want to check key files, such as:

  • /etc/sysconfig/network to confirm that NETWORKING=yes

  • /etc/sysconfig/network-scripts/ifcfg-eth0 to confirm defaults for your network card (assuming the default eth0 device for the network card)

  • /etc/resolv.conf to confirm connections to DNS servers (which is associated with PEERDNS=yes in the aforementioned ifcfg-eth0 configuration file)

Refer to topic 7 more information on these commands and files. There are a lot of details; if you forget something, it may be easier to use a Red Hat utility such as the GUI-based Network Configuration tool.

For this exercise, you'll need a partner. Have that partner make changes to your system. Let that partner work privately on your system, until told that the computer is rebooting. Don't look at this lab, until you've solved the problem as created by your partner.

  1. Run the ifconfig command and review your current network settings.

  2. Back up the configuration file associated with the network card, usually ifcfg-eth0 in the /etc/sysconfig/network-scripts directory. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

  3. Open up the ifcfg-eth0 file in a text editor.

  4. Set BOOTPROTO=none if it isn't already done.

  5. Set or add an IPADDR directive. Make it just a little different from the IP Address setting you saw in the output from ifconfig. Make sure the new address is on a different network; for example, if the original IP Address and network mask was 192.168.0.50 and 255.255.255.0, set IPADDR=192.168.1.50 and NETMASK=255.255.255.0.

  6. Reboot your system, and let your partner back at the computer. Tell him or her to try connecting to another system on your network.

  7. Tell your partner to back up any files that he or she might change to the home directory.

  8. If your partner gives up, restore the original ifcfg-eth0 configuration file to the /etc/sysconfig/network-scripts directory.

Image from book