How to configure DHCP to Static IP

I am pretty new to this. My router was earlier configured to enable DHCP, thus my UNIX box is using the dhcp address, i.e. I have to do a ifconfig dhcp hme0 start. Since I am planning to use my NT as a web server, I needed to use the static IP address. How do I configure the unix box to use the static IP address? What files do I have to change? Please help. Thanks.

What is the OS and version?

Normally, you would have to put the hostname and IP into your /etc/hosts file and possibly change /etc/nsswitch.conf (on Solaris) to look at files first.

OR, your DNS may take care of this since you wrote the NT box will have the static IP.

if you are using a linksys router with dhcp, all you need to do is for the computer that you want to have a static ip, just set that computers ip to any value like this, 192.168.1.2 - 99

if your router is a linux box, then you can change the file

/etc/init.d/network-scripts/ifcfg-ethx

where x is the interface number.
inside that file you can specify.

DHCP=no
ON BOOT = yes

IP_ADDR = "xxx.xxx.xxx.xxx" etc.

hope this helps.

  • Sirius.

the previous post is correct. You can also just use the ifconfig command, and specify the IP address. Make sure you also specify the address mask!

|Dan|

"linux is like a wigwam, no windows, no gates, and an apache inside!!"

Good days every body,
I discovered this trea and I thougt that i could post my question on It.
I have acquired and IBM AIX system 4 months ago.
The system is configure in DHCP by default
I want some body to tell me step by step how to use SMIT to configure the whole system to Staitc IP.
I am a newbie to this system AIX.
I find it difficul to use the command line to configure the system.
I need your help.
Regards.