changing ip and hostname on solaris

dears

does any one know in steps how can i change ip and hostname on solaris

Dear Murad,

for change your ip, first add your new ip in /etc/hosts file
than for activate your new ip can using this command

ifconfig [interface] [yournewip] subnetmask [yoursubnetmask] up

for see that you new Ip was activated use

ifconfig -a

for change hostname i'm not yet know :smiley:

regards,

heru

put hostname in /etc/hostname.[interface]

eg /etc/hostname.le0 or /etc/hostname.hme0

and

/etc/nodename

On Solaris 10 you (may) need to update all of the following files.

     /etc/defaultdomain
     /etc/defaultrouter
     /etc/hostname.interface
     /etc/inet/hosts
     /etc/inet/netmasks

or Solaris < 10 yo may also need to update

     /etc/net/*/hosts

bear in mind also that may applications use this kind of information, and may break if you change it.

Additionally, on Solaris 10, you'll need to modify /etc/inet/ipnodes.

Cheers,
ZB

Yes, I forgot that one.

thats why when i see this thread,
i prefer to sys-unconfig -- erase them all, restart from scratch blank system,
there are to many to change.

cheers.

sys-unconfig, does a whole lot more that change the hostname. For example clobbering the root ssh keys, renaming the original vfstab, and dfstab. Depending on what you are doing the may be the correct approach, but not by any means in every case.

Hi,
Can any one let me know that how can i manually assign a IP on the Intel platform running solaris 10 coz ,

when I fire the following command

ifconfig hme0 plumb
then i get ifconfig : hme0 : plumb ; no such file or directory

also I have tried to assign a IP in the Host file ( /etc/inet/host)
or /etc/hosts file and rebooted the system system but it didn't work out
I have also created a file name /etc/hostname.hme0 and manually added a hostname entry in it but that too failed

Also I have fire the following command

ifconfig hme0 inet 192.168.0.1 netmask 255.255.255.0 broadcast + up

but that too fail with the same error hme0 no such file or directory
In the /etc I have only hosts file but , according to solaris it says that it creates a /etc/hostname.INTERFACE file say /etc/hostname.hme0 but there is no such file in /etc/dir.

I think Intel platform does not support this and for this we need a SPARC system if we want to assign a manual IP to the system Please do let me know.................. :frowning:

post the output of "dladm show-dev" to see which interfaces you have...

if you want to change IP and hostname without dealing with config files, you may use sysunconfig command. But it will require you to register again.