# Change IP address

## webmusic

We just moved our servers to a new ISP location, and now have static IPs instead of dynamic. How do we change the IP address of our gentoo machine? It's an IBM server. Our other server is a MAC G4, no problem there changing the IP.

----------

## di1bert

You'll want to edit /etc/conf.d/net and change the IP address configuration

in there from dhcp to static.

Check net.example for more info on that...

HTH

-m

----------

## webmusic

 *di1bert wrote:*   

> You'll want to edit /etc/conf.d/net and change the IP address configuration
> 
> in there from dhcp to static.
> 
> Check net.example for more info on that...
> ...

 

This is Michel, Bruce's partner. 

I'm a real dummy in Linux. Could you give me step by step instructions how to change the DHCP to a fixed IP.

I tried your command and I'm receiving a message "Permission denied".

After entering my ID and PW, I see localhost in red on my screen, followed by a blue tilde and a pound sign.

Where net.example is located?

Help!

----------

## di1bert

You need to su to root if you're not already root.

Use the "cd" command to go to /etc/conf.d

Now choose your favourite editor (nano would be a good one) and edit the net file

Check for the interface in that file that you need to change from dhcp to static 

and follow the net.example file in /etc/conf.d if you need an example to work from.

Quit and save then restart the network interface ...

That should do it....

Sorry I'm on my way out otherwise I'd be able to spend a little more time ...

-m

----------

## jexxie

The net.example file is located at:

/etc/conf.d/net.example

You can edit/view it with this:

nano -w /etc/conf.d/net.example

Browse through, you're only going to need these lines in the /etc/conf.d/net file (edit with your information):

config_eth0=( "192.168.0.2 netmask 255.255.255.0" )

routes_eth0=( "default via 192.168.0.1" )

Edit your main config file:

nano -w /etc/conf.d/net

After you've done that, restart your ethernet interface:

/etc/init.d/net.eth0 restart

You should be done   :Cool: 

----------

