To set the IP address via the GUI:
To set the IP address via the command line:
Set the default gateway:
vim /etc/sysconfig/network
Change the GATEWAY line, save and quit
Set the IP address and network mask:
vim /etc/sysconfig/network-scripts/ifcfg-eth0
Change the IPADDR, GATEWAY and NETMASK lines, save and quit
When entering the vim commands it displayed information, but not gateway, IP or mask. I couldn’t see how to change it using those commands. We ended up using the GUI to do so.
Your original configuration file may have been missing information, if it had not yet been configured. In that case, you would need to manually add the appropriate lines — or simply use the console or GUI tools to do this for you, as you found out.
Reference:
http://www.cyberciti.biz/faq/howto-rhel-fedora-linux-setup-default-gateway/