Default IPAddress on Boot

How do i go about finding all the IP Addresses that are configured to come up on my Solaris machine on boot time.
Can i add a logical IP to the list as well ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

IP addresses are configured using the files /etc/hostname.<IF> where <IF> is the interface name - le0, hme0, qfe2 etc. This file contains the hostname for that interface, this name is compared with entries in the /etc/hosts file and the corresponding address is used to bring the interface up. If using dhcp, the file is called /etc/dhcp.<IF> and is usually empty.

#cat /etc/hostname.hme0

#cat /etc/hosts   tango loghost

ifconfig -a lists all your currently running Interfaces

Virtual interfaces are created by adding a number to the end of the I/F name e.g. hme0:1, hme0:2 etc. I believe they can be configured using the same mechanism i.e.

#cat /etc/hostname.hme0:1

# cat /etc/hosts tangoviif1

You can bring  one up without rebooting by calling

ifconfig hme0:1 netmask broadcast+ up


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Find information on network interfaces:
ifconfig -a

To add (say to hme0):
# Plumb the interface.
/usr/sbin/ifconfig hme0:1 plumb
# Add netmask (x.x.x.x) & IP address (y.y.y.y)
/usr/sbin/ifconfig hme0:1 netmask x.x.x.x y.y.y.y
# Add broadcast address z.z.z.z (if in a stub network)
/usr/sbin/ifconfig hme0:1 broadcast z.z.z.z
/usr/sbin/ifconfig hme0:1 -trailers
# Bring interface up and use it.
/usr/sbin/ifconfig hme0:1 up
# Netmask for original interface
/usr/sbin/ifconfig hme0 netmask a.a.a.a
# Broadcast for orginal interface
/usr/sbin/ifconfig hme0 broadcast b.b.b.b
# Enable forwarding across both interfaces.
/usr/sbin/ndd -set /dev/ip ip_forwarding 1

The key thing is to remember that a virtual interface is driver:number (i.e.: hme0:1)

Hope this helps.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by soupdragon

Please leave any comments here within the next four days.


EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.