Operating System - Linux
1832814 Members
3175 Online
110045 Solutions
New Discussion

Re: how to change from DHCP to an fix IP

 
SOLVED
Go to solution
Pierre_6
Occasional Contributor

how to change from DHCP to an fix IP

 
3 REPLIES 3
Jeffrey S. Sims
Trusted Contributor

Re: how to change from DHCP to an fix IP

Login and root, and type netconfig on the command line. That will walk you through the network configuration.

Or you can type setup at the root prompt and configure it that way.

Hope this helps.
Edwin_6
New Member

Re: how to change from DHCP to an fix IP

After running netconfig you may have to do a /etc/init.d/network start
also.

Mark Fenton
Esteemed Contributor
Solution

Re: how to change from DHCP to an fix IP

Exact syntax depends on your flavor of Linux, but basically, either use the command line utilities mentioned, or linuxconf or edit the files by hand:

# cd /etc/sysconfig/network-scripts
# vi ifcfg-eth0
Change the BOOTPROTO from DHCP to "none"
Edit the IPADDR= line to reflect the proper ipaddress (you may have to change the netmask and broadcast addresses as well). Ensure ONBOOT="yes" and restart your network

#/sbin/service network restart

( or # /etc/rc.d/init.d/network restart -- depending on where your version plunks it down)

Best regards.
Mark