This howto is intended to provide the information needed to set up Static IP Addressing. I use Mandrake linux and am not sure how closely other distro's follow the same file naming scheme.
Setting up Static IP Addressing involves checking and/or editing 4 files. You may want to make copies of your current files just so you have them to fall back on if something goes wrong. The files are:
/etc/resolv.conf /etc/hosts /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth0 (your ifcfg file may differ, eth0, eth1, wlan0, etc.)
These are the fields required for the /etc/sysconfig/network-scripts/ifcfg-eth0 file: (this is an example, replace values appropriately for your network. This example includes wireless, if you don't have wireless leave out those fields)
DEVICE=eth1 BOOTPROTO=static IPADDR=192.168.0.2 NETMASK=255.255.255.0 NETWORK=192.168.0.0 BROADCAST=192.168.0.255 ONBOOT=yes MII_NOT_SUPPORTED=yes WIRELESS_MODE=Managed WIRELESS_ESSID=any WIRELESS_ENC_KEY=""
Next is the /etc/sysconfig/network file:
HOSTNAME=something-cool NETWORKING=yes GATEWAY=192.168.0.1 GATEWAYDEV=eth1
The /etc/hosts file needs the IP and Hostname added to it:
127.0.0.1 localhost 192.168.0.2 something-cool
Last is the /etc/resolv.conf file which contains the DNS IP's:
nameserver 205.221.122.145 nameserver 205.221.122.142
Once the 4 files have been checked and edited, simply restart the network as root:
service network restart
I hope this was helpful and clear enough to understand what needs to be done to use Static IP Addressing.
