SatpamsStress

Coretan ’satpams’ yg sedang dilanda Stress

  •  

    February 2008
    M T W T F S S
         
     123
    45678910
    11121314151617
    18192021222324
    2526272829  

setting automatic IP Address on Solaris 10

Posted by hhan on February 1, 2008

Solaris IP Setting

install solaris to your computer, download for free solaris sparc here

here is configuration that u need to set Automatic IP address on solaris 10, so u dont need manually run “ifconfig command” every time after rebooting your system.

just for additional information here is my box detail

bash-3.00# uname -a
SunOS HhANSUN 5.10 Generic_120012-14 i86pc i386 i86pc

oke… lets get it on. for first step we will look our interface with ifconfig command, its just for make sure that we have eth in our system.

> ifconfig

bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
pcn0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 172.16.30.15 netmask ffff0000 broadcast 172.16.255.255
ether 0:c:29:64:f3:4
as we see, we have two interface lo0 for loopback and pcn0.

run this command to set IP address. bash-3.00# ifconfig pcn0 172.16.30.15 netmask 255.255.255.0 u must execute that command every time after restarting your system.  we need to edit some configuration file to make our system set IP address automatic at start.

> edit /etc/netmask

bash-3.00# more /etc/netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# “decimal dot” notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
172.16.30.0 255.255.255.0

> edit /etc/hosts

bash-3.00# more /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
172.16.30.15 HhANSUN loghost

> /etc/inet/ipnodes

bash-3.00# more /etc/inet/ipnodes
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
172.16.30.15 HhANSUN loghost

> /etc/defaultrouter (optionael)

Adopted from : http://hhan.wordpress.com

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>