configuring network

Hello,

I was trying to assign IP or Hostname to the system, but when I open any of the files:
/etc/hosts
/etc/inet/ipnodes
the files open in read-only mode. Thus, I can't edit it. I am doing this under root. What is the problem and how to get rid? Any suggestion?

You can either switch the files to read-write via chmod (remember to set them back to read-only when you are finished) or edit them in vi and save with the :w! command (the '!' character forces it to override the read-only mode).

ls -l /etc/hosts , eg will show you its permission.
you'll have to change it. could be that the system was hardened.

Thanks for help,
But how to start service to activate the change?

is it solaris 10? if so:

# svcadm restart network/physical

Thanks for reply, but it didn't work. When I run the command " hostname "
the output still comes as before " unknown ".
I tried many ways to assign hostname but failed. Even I am not able to assign IP address , I am trying to edit /etc/hosts or /etc/hostname.pcn0 to set, but unable.
Can anyone help?

Yeah, It is Solaris 10

edit "/etc/nodename"

Not in that case. The default permissions for /etc/[inet]/hosts is read-only even for the owner (root). Of course, root doesn't need to have the write permission to write anyway with vi (:w!).