1

Folks, I am trying to use fixed IP on few Linux boxes in my LAN which uses DHCP right now.

My ISP router is configured to use DHCP and there already are quite a few laptop users who would want to continue using DHCP. However I want a set of 4-5 desktops to have a fixed IP so that I don't have to go to the machine's physical location and find its IP everytime it reboots. My ISP router's DHCP configuration does not have a bind MAC Address to fixed IP option. One of my colleagues claims that he was able to do that in a Windows 7 machine by specifying the fixed IP in network configuration. The Linux boxes are using Fedora Core 14.

Is there a way I can configure the Linux boxes to use a fixed IP everytime they boot up? I don't want to use a custom DHCP server on one of the boxes because that will be an extra point of failure for the network. Using an extra switch etc will not be favorable either, since it looks like Windows can use fixed IP without requiring that.

PS. I have tried adding a file with static IP data in /etc/sysconfig/network/ as mentioned in some internet forums, also tried "ifconfig eth0 ". This makes the IP stick but the network stops working. I guess the new version of Fedora Core could be a reason these slightly old forum posts are not providing the right direction.

1 Answer 1

2

first result from google search for: static ip fedora 14

http://www.liberiangeek.net/2011/02/configure-a-static-ip-address-in-fedora-14-laughlin/

quickly if you know how to use text editors etc:

as root edit the following file: /etc/sysconfig/network-scripts/ifcfg-Auto_eth0

change the line BOOTPROTO to static

then add the following to the bottom (edit the values for your local network setup - be sure to choose an IP out of the range of addresses that the dhcp server assigns but within the same subnet)

IPADDR=IP_Address NETMASK=Net_Mask BROADCAST=Broadcast IP NETWORK=Network IP GATEWAY=Gateway IP 

save the file then run the following with root privileges or with sudo

/etc/init.d/network restart 

then enjoy :)

2
  • This should work. Make sure you edit your DHCP servers configuration to not give out the IP addresses you statically assign. Commented May 3, 2011 at 3:17
  • While the file /etc/sysconfig/network-scripts/ifcfg-Auto_eth0 did not existed. I created it with the content mentioned on that page and it worked. Commented May 3, 2011 at 6:23

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.