Question Details

Browse

Setting Static IP address on Fedora

By Richard Carmody - Apr. 12, 2009

I am looking to set my Fedora Core 9 box to a static IP address on my home network. It currently has a dynamic IP address, which is served from my Linksys firewall router. How do I get my Linux box to use a static IP address instead of the DHCP one?

Thank you.


Answers

Add Answer
  1. By Randy Clark on Apr. 13, 2009

    So I assume you mean you want the box to have a static IP address?


    On FC, you can access the GUI tool called Network Device Control. Over there, you can 'Configure' your Ethernet port and get it to use a Static IP. Make sure nothing else has access to that IP so you get no network conflicts.


    0 Votes
  2. By Richard Carmody on Apr. 13, 2009

    Thanks Randy. How do I do this using the CLI? I would like to set the static IP from the command line.


    0 Votes
  3. By George Murphy on Apr. 30, 2009

    Hi Richard, you have to do a few things to set up a static IP address in Fedora:

    1) edit /etc/sysconfig/network-scripts/ifcfg-eth0 (assuming you are using eth0 - you can check using ifconfig)


    2) There, set the BOOTPROTO to static. It should look something like:


    DEVICE=eth0

    BOOTPROTO=static

    BROADCAST=xxx.xxx.xxx.255 (replace xxx with your Gateway subnet)

    IPADDR=your_static_ip

    NETMASK=255.255.255.0

    ONBOOT=yes (this makes sure this is set up at boot time)

    TYPE=Ethernet


    Once you do this, you can restart the network from the CLI by typing:


    service network restart


    After this, you should be set up with your static IP.


    0 Votes
Share your knowledge

Related Questions

Browse Get answers and share your expertise.