Network Setup

I am moving a SUN 250 server from one location to another. The IP address has to change in order to make the server visible in the new building. The system administrator has given me the new IP address for the server, the DNS server IP and the default gateway IP. First question, is this all the information I will need to setup the server on a new network. Second question is, where do I make the changes to the IP addresses?

I know about the etc/hosts file, and added the IP of the server there. I tried to update the etc/defaultrouter file but the OS says I can't edit it, nor can I change permissions to allow me to edit it. This means the etc/defaultrouter file points to an IP for another location.

You should be able to edit /etc/defaultrouter - it should have rw-r--r-- on it as permissions.

The following copied from SUNSolve Doc ID 21252 free info doc on changing IP dated 19 Dec 2000 -

Normally to change the hostname for a machine the sys-unconfig command is used.
sys-unconfig affects the six files detailed below.

Note #1: This procedure should not be used for NIS+ masters/replicas or NIS masters.
This is only for client machines.

Note #2: This only changes the information locally. If the system is running NIS/NIS+
and/or DNS, the changes need to be made in these databases as well.

To change the hostname without having running sys-unconfig, edit the following
files:

1) /etc/hosts (change file entry to the new hostname)

2) /etc/nodename (change file entry to the new hostname)

3) /etc/hostname.<interface> (where <interface> is the name of the primary
interface for this system, i.e hostname.hme0 or hostname.le0. Change file entry to the new hostname.)

4) /etc/net/ticlts/hosts (change both columns to the new hostname)

5) /etc/net/ticots/hosts (change both coluums to the new hostname)

6) /etc/net/ticotsord/hosts (change both columns to the new hostname)

To change the IP address for a machine without running sys-unconfig, edit the following files:

1) /etc/hosts (change the IP address)

2) /etc/netmasks (if subnetting is used)

3) /etc/defaultrouter (to specify the new gateway for this subnet)

As always, check the man pages as your system may (and seems to be) different from the norm.

the above procedure by hoghunter is right

To configure the DNS
edit /etc/resolv.conf

you might need to update the default domain if the domain is different from the previous one, this is needed for NIS/NIS+

To update defaultdomain
edit /etc/defaultdomain

default route could be updated by using this command

route add 0 [next hop/gateway]

next hop/gateway being your local router's ip address