DHCP to static

Stuart Sears stuart at sjsears.com
Thu Oct 7 17:02:32 UTC 2004


On Thursday 07 Oct 2004 15:26, Ryan Golhar wrote:
> I have a bunch of machines that obtain their IP address from DHCP.  The
> IP addresses are assigned by MAC address, so the machines get the same
> IP address at all times.
>
> If I want to convert them to static IP address so they don't use DHCP,
> do I just need to set up /etc/sysconfig/networking/profiles/ifcfg-eth0
> correctly?  Is there anything else I need to change?
>
> Ryan
You may have to edit /etc/resolv.conf if they get their nameserver information 
through DHCP as well.
personally (as I loathe redhat-config-network) I just use netconfig for this, 
which will write the necessary file in /etc/sysconfig/network-scripts
and update your /etc/resolv.conf too, if you fill in the nameserver line.
nb it only writes files and does not update the interfaces, so
netconfig
service network restart
(or ifdown/ifup)
if you want immediate effects.
Stuart
-- 
Stuart Sears RHCE, RHCX
Quidquid latine dictum sit, altum viditur 




More information about the redhat-list mailing list