Hi kexpert, welcome to LQ forums.
Setting up Local and Public IP's is the same, there are no differences.
Aa for setting up static IP on the network with DHCP, policy is to totally avoid IP range set on the DHCP server. If DHCP range is 192.168.0.2-192.168.0.199 and 192.168.0.1 is the gateway, then IP range for static assignement is 192.168.0.200-192.168.0.254.
The last configuration looks quite good, so I thing you have problems with routing.
First give us the output of commands "ip address" and "ip route" when you are on Dynamic address, and then when you try your static setting. You have to do it logged as root.
Next thing to know is to run command "service network restart" after each change of the ifcfg-eth0 file.
To test your connection, do following things:
1. Ping you gateway to see if you can. If you do not, then gateway has different IP or IP settings for eth0 are not good. If you can, then next thing to test is routing.
2. Ping public IP address for witch you know the IP. Do not ping the name, but it's IP. Pinging DNS address is easiest. If it does not work, then you have routing issues (gateway IP is wrong or router it self thinks your IP is in some other way, on some other interface.
3. Try pinging hostname of some public server, like
www.google.com,
www.yahoo.com, etc. If step 2 works, but this one does not, then your DNS setting is not right.
Best way to set network connection on CentOS/RHEL/Fedora is using "system-config-network" command/script. If you are in GUI, a familiar dialog will popup, and if you are in terminal/SSH mode, a simple but functional command prompt dialog screen will appear allowing system utility to do it all for you.