Search This Blog

Tuesday 27 January 2009

Change IP and hostname in Solaris

This is the procedure to change and IP address and hostname in solaris (v440). It is best to be connected by serial port or net sc.

Find the existing IP address

# ifconfig -a

bring down the port

# ifconfig 'port' down

When you see the existing details, update accordingly. This assumes netmask and broadcast are being changed too where x is details

# ifconfig 'port' inet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx broadcast xxx.xxx.xxx.xxx

Make a copy of the hosts file

# cp /etc/hosts /etc/hosts.bak

edit the hosts file with the new IP address. If necessary, do the same on /etc/netmask

Restart the inet service, this will assign the new values

# /etc/init.d/inetsvc stop
# /etc/init.d/inetsvc start

if you need to change the default route, find the existing one with

# netstat -nar

to delete the existing route

# route delete default 'defaultroute'

then add it with

# route add default 'defaultroute'

make a back up of /etc/defaultroute and modify it.

To change the hostname, make a backup of hosts and modify /etc/hosts. Then make a back up of the following files and modify all

/etc/nodename
/etc/hostname.*interface
/etc/inet/hosts
/etc/inet/ipnodes

and rename directory under /var/crash

# cd /var/crash
# mv oldname newname

then reboot the server to ensure all changes have taken effect.

1 comment:

  1. Casino Online - XN Games
    XN Games provides top gaming games for online casinos. 퍼스트 카지노 We've handpicked a game that suits 우리카지노 쿠폰 your needs, with 우리카지노 everything from a favorite to a

    ReplyDelete