Tuesday, April 27, 2010

Configuring static IP in Fedora

If all you have is a CLI, then you might find this to be of benefit. Otherwise you could just use the Network Device Control GUI.

Here are the steps:
  1. Execute ifconfig and find out your ethernet configuration name (e.g. eth0)
  2. Go to /etc/sysconfig/network-script
  3. edit ifcfg-eth0 (depends on your ethernet)
  4. Update the file as follow (set the IPADDR, BROADCAST according to your desired configuration)

  5. Restart the network service
    service network restart

Here's a brief explanation on the configuration:
  • BOOTPROTO : telling the network that we're configuring it as static ip
  • ONBOOT : the configuration will be set at boot time
  • BROADCAST : your gateway
  • NETMASK : your netmask


.