Here is another q&d script (see post on "screams for scripting" for definition of q&d) that helps me when working with the netowrk configs.
This one basically writes all the various configs in one stdout rather than having to cat or vi each config individually. It also has route -n and ifconfig included to help as well.
basically when you run it, pipe it to less so that you can scroll back and forth through it to examine the configs, and I have saved much time troubleshooting with the output in one place. For me it is easier to spot mistakes in the address configs this way.
Once agaiin in the q&d tradition, there is no error checking, so some of the output may produce blank lines or error messages form the system if for instance one of the files being examined does not exist...
#!/bin/bash
echo "Default Gateway Check"
echo
cat /etc/sysconfig/network
echo
echo "DNS setup check"
echo
cat /etc/resolv.conf
echo
echo "static eth0 check"
echo
cat /etc/sysconfig/network-scripts/ifcfg-eth0
echo
echo "static eth1 check"
echo
cat /etc/sysconfig/network-scripts/ifcfg-eth1
echo
echo "static eth2 check"
echo
cat /etc/sysconfig/network-scripts/ifcfg-eth2
echo
echo "check perm route forwarding"
echo
cat /etc/sysctl.conf | grep ip_forward
echo
echo "Routing Table"
echo
route -n
echo
echo "ifconfig output"
ifconfig
echo
I named it cfg_chk.sh so to run it it is ./cfg_chk | less or you can redirect to a file and then less the file for similar results, so you will have a copy of config to use in a before and after scenario